$Id: commands,v 2.8 2003/06/17 16:31:30 ericprev Exp $

I) Master/OP commands
---------------------

This is the list of commands that can be used by operator and master of hub.
These commands are only accepted if they have been sent by someone who is either
operator or master and if the destination nickname is "Hub-Security". When an
operator or a master enters a hub, a private chat is automatically opened to
enter such commands:

each commands start with a -

If a command parameter must contain space, but the parameter between quotes.
A quoted parameter cannot contain quote, there is no escape code.


Account management (master only):
---------------------------------

* -ulist    
             return the list of all existing registered nickname with their
             password and their type (Normal user, Operator or Master).

* -olist     same as -ulist but only Operator accounts are displayed.

* -mlist     same as -ulist but only Master accounts are displayed.

* -add nick passwd type       
             create a new registered user named "nick" having "passwd" as
             password. The account type is "type". Type is a 1 letter type:
             N for normal user, O for operator, M for master of the hub.

* -del nick
             remove the registered user named "nick".
             Note: if this user still is connected, he is not affected.

* -rename oldnick newnick
             rename then registered user named "oldnick" with the newly
             nick "newnick".

* -passwd nick newpasswd
             change the password of the registered user named "nick" to
             "newpasswd".

* -type nick type
             change the type of the registered user named "nick" to
             "type" (see /add for values).
             
* -reload
	     force the hub to reload some parameters

* -set variable value
	     
	     

DB access (master only):
------------------------

The database contains most of the basic configuration of the hub like
hubname, hub address, if the hub must be registered ...
See configuration_file file for the list of keys.

* -dblist
              display all keys of the database with their type and content.

* -dbshow key
              same as /db but only the given key is displayed.

* -dbadd key type value
              create a new key. The type can be "int", "float" or "str".
              A value incompatible with the type doesn't generate any error.

* -dbset key value
              update the value of an existing key.

* -dbdel key
              delete the given key. Some keys are protected because they are
              required by the hub.

* -silence TYPE user_name
	           disable Users from sending specified commands.


misc:
-----

* -pbankick nickname reason
               eject the given user out of the hub using the KICKPERMBAN value.

* -tbankick nickname reason
               eject the given user out of the hub using the KICKTEMPBAN2 value.

* -kick (nickname OR IP) reason
              eject the given user out of the hub using the KICKTEMPBAN value.

* -skick nickname reason
              eject the given user out of the hub. Without printing anythink on the chat.

* -clearpban
               clearing the permbanlist

* -cleartban
               clearing the tempbanlist

* -close nickname reason
               disconect a user with message on the chat.

* -redir nick address
              redirect the given user to another hub.

* -bcast msg
              send the given message to all connected users.

* -tbanip ip [time]
              add temporary ban on the given ip(s).
                                if time is not given KICKTEMPBAN value from database is used
              ip can also be a nickname. In this case, the hub automatically
              uses the ip used by the user having this nickname.

* -tunbanip ip [ip...]
              remove temporary ban of the given ip(s) 

* -tbannick nick [nick...]
              add temporary ban on the given nick(s).

* -tunbannick nickname
              remove temporary ban of the given nickname

* -tbanlist
              display temporary banned IP list.

* -pbanip ip [time]
              add permanent ban on the given ip(s).
                                if time is not given KICKPERMBAN value from database is used
              ip can also be a nickname. In this case, the hub automatically
              uses the ip used by the user having this nickname.

* -punbanip ip [ip...]
              remove permanent ban of the given ip(s) 

* -pbannick nick [nick...]
              add permanent ban on the given nick(s).

* -punbannick nickname
              remove permanent ban of the given nickname

* -pbanlist
              display permanently banned IP list.

* -getip nick
              Get IP of a user.
* -revip ip
              Reveal's all the users having the given IP.

* -showtype nick
              Get type of an account.

* -users
              display the number of users seen since the hub start.

external program:
-----------------

* -startprg name
              start the given external program (-e required during hub start and
              name must be a valid name in this directory. 
              NOTE: name cannot contain $, | or space because DC doesn't allow
              these characters.

debug fuction:
--------------

-dump username
	      give a lot of information about a user in memory inculding the seveur ID
	      users buy the user when cluster mode is in use.

-dumpqueue
	      dump the list of the user beeing in queue to login.

cluster function (Master Only):
-------------------------------

-hpset hub_id cluster_id hub_address flags
         set an entry in the hub password file for the given hub.
         hub_address can be either a FQDN or an IP. hub_id is the HUB_ID
         key of the remote hub. cluster_id is MD5 of the cluster name.
         flags value contains at least one of the following keywords.
         keywords are separated by a dot (.) and contains no space.
         Keywords: None, Autostart, Rejected.

         Keyword meaning:
            * None : means no flag :)
            * Autostart : if no connection with this hub exists, the hub will
                          periodically try to establish one.
            * Rejected : after a manual or automatic hub connection attempt,
                         the cluster ID associated to this hub ID was rejected
                         by the remote hub. The entry is not destroyed, it is
                         just ignored.

-hpdel hub_id
         remove an entry in the hub password file for the given hub.

-hpcnx hub_id
         for a connection attempt for the given hub.
         Note: the attempt will occur in the next 60 seconds.

-hpget hub_id
         retrieve the hub password file entry having the given hub_id.

-hpgetall
         retrieve all the hub password file entries.

-hpstat
         list the established cluster connections.


I) standard commands
--------------------

These commands can be used by any user but cannot be sent from the
"Hub-security" private chat.

each commands start with a + and can be sent in global or any private chat. The
sent commands are not displayed to other chat users.

+help
              display the help of user commands.

+new_chat chatname [password]
              create a new multi-users chat named "chatname" with an optional
              password. The multi-users chat (mchat in short) works like the
              normal private chat except you can be more than 2 users in this
              chat.
              Note: it is not possible to create to mchat with the same name.

+leave chatname
              leave the multi-users chat named "chatname".

+list chatname
              list the user of the multi-users chat named "chatname".

+join chatname [password]
              connect to a multi-users chat named "channame".
					a new "channame" has to start with '#' !!!

+seen nick
              showing when a user entered or left the hub.

+afk message
              add an 'away-from-keyboard'-message

+back
              delete the afk message

+msg dest_nick message
              post a message to a user not in the hub

+clearmsg
              delete messages created with +msg

