$Id: commands,v 2.16 2003/11/22 13:57:23 blusseau 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).

* -add nick passwd {level OR MASTER}       
             create a new registered user named "nick" having "passwd" as
             password. The level can be an integer or the word MASTER.

* -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".

* -access nick [level]
             show or set the level of the registered user named "nick".
             
* -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:
-----

* -ban duration {nickname OR IP} [reason]
              eject the given user out of the hub and ban him for the given
              duration. The duration is in minutes. The value can be suffixed
              by a 'h' for hour or 'd' for day.
              Note: the ban is performed only on the cluster node with a
                    matching user.

* -kick {nickname OR IP} reason
              eject the given user out of the hub. Only users with the SIGNKICK
              level can kick without a reason.

* -skick nickname reason
              eject the given user out of the hub. Without printing anythink on
              the chat. Only users with the SIGNKICK level can kick without a
              reason.

* -clearban
              clearing the banlist. On a cluster, only the ban list of the
              local node is cleared.

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

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

* -unban (nickname OR ip) [(nickname OR ip)...]
              remove ban of the given nick(s)/ip(s). 
              Notre: The unban is performed on all nodes of the cluster.

* -banlist
              display banned IP list. On a cluster, only the ban list of the
              local node is displayed.

* -getip nick
              Get IP of a user. Not cluster compatible. This command is
              deprecated.

* -revip ip
              Reveal's all the users having the given IP. Not cluster
              compatible.

* -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
