Chanco is used to send messages to the control interface port of the Changi NNTP Server. When the server receives a control message, it performs the related action and returns a reply message.
Reply messages from the server contain human readable text with a blank separated return code in front. The return code is used by Chanco as its exit code.
The next chapters will cover the following topics:
Changi will automatically flush its internal buffers 15 seconds after a client, who added new articles, disconnects and remains disconnected. In all other cases you may call
chanco -v flushlogsto force buffer flushing.
Changi will also automatically update overview files when an updated group is accessed by a client for the first time. However, this may noticably degrade responsiveness of the server. Calling
chanco -v oversync normalwill start a background task on the server, which updates all overview files.
If your site is fed by a continuous pushfeed, you may make these calls automatically at fixed time periods, where flushlogs should be called more often than oversync.
The same is true after a newsreader, either local or remote, posted a new article. The new post will be seen only after all connections to the host running the newsreader had been closed.
chanco -v newgroup local.company.rumors y boss@company.comis the prefered way, because this will also maintain a file named active.times. The above example will add the new group
local.company.rumors
. The
character y
specifies that this group can receive
local posts and the parameter boss@company.com
specifies the creator, usually the mail address of the
responsible person.If you want to change the mode of this group from postable to moderated, use
chanco -v changegroup local.company.rumors mTo remove the group, simply call
chanco -v rmgroup local.company.rumors
chanco -v reject going downcauses the server to reject new connections with reason going down. Already established connections are continued. In order to allow incoming connections again, use
chanco -v allow going downThe reason must be equal to the one given in a previous reject command.
Prior to doing some reconfiguration like editing the active file, you should call
chanco -v flushserver under constructionwhich will flush the sever's internal active and history file buffers back to the disk and put the server into flushed state. As long as the server is left in this mode, neither the active nor the history files will be changed. Therefore the server is not able to insert incoming articles anymore, but will store them in a batchfile in directory CHANGISPOOLDIR\incoming. The name of the batchfile equals the name of the host sending the article.
Returning from flushed to normal mode is done by calling
chanco -v go under construction
For some specific tasks you may wish to completely disable the server without shutting down. In this case call
chanco -v flushserver shutupimmediately followed by
chanco -v pause shutupwhich will flush all internal buffers and then freeze all connections. Note that no connections will be dropped or rejected during the paused state. They just hang. Only keep the server in this mode for a short time and call
chanco -v go shutupas soon as possible to get it back to a normal state. Otherwise open connections may time out and get dropped on the client side.
Chanco go
command, the server remains paused and clients are not
able to continue with newsreading.
chanco -v param d P1will switch-on debugging of access permission control. This will have the same effect as calling Changi with option -dP. After having solved the problem you should call
chanco -v param d P0to switch-off debugging.
You may also switch accessfiles based on the time of day. For example, at 8 o'clock in the morning you may call
chanco param a nntp_access.dayand at 9 o'clock in the evening
chanco param a nntp_access.nightto have different access permissions. Note that this will not touch existing connections, because access permission files are only checked while establishing a new client connection.
Example:
The following REXX script will query all active newsgroups and display them on the console:
/* List all active newsgroups */ DO i = 0 '@chanco -v groupentry' i if rc \= 0 & rc \= 2 THEN LEAVE ENDDepending on your active file, this script will display something similar to
0 comp.os.os2.advocacy y 0 comp.os.os2.announce m 0 comp.os.os2.apps y 2 Go on 0 control y 0 control.cancel n 0 control.newgroup n 0 control.rmgroup n 0 junk y 1 not available
URL: changi/manual/chanco.html Created: 3 August 1996 Revised: 2 December 1996 Author: harald@os2point.ping.de |