updates.
[silc.git] / doc / draft-riikonen-silc-spec-01.nroff
index 5a4799bd01aa9be309ef25de50f4208a99b9a7c8..854a0376631ea92b626678491966f1fc81d10320 100644 (file)
@@ -2182,24 +2182,22 @@ List of all defined commands in SILC follows.
 
    5    SILC_COMMAND_LIST
 
-        Max Arguments:  2
-            Arguments:  (1) [<Channel ID>] [<server>]
+        Max Arguments:  1
+            Arguments:  (1) [<Channel ID>]
 
-        The list command is used to list channels and their topics on
+        The list command is used to list channels and their topics on the
         current server.  If the <Channel ID> parameter is used, only the
         status of that channel is displayed.  Secret channels are not
         listed at all.  Private channels are listed with status indicating
-        that the channel is private.
-
-        If the <server> argument is specified the specified server's
-        channels are listed.  In this case the command must be sent to
-        the server who owns the channel that was requested.
+        that the channel is private.  Router may reply with all channels
+        it knows about.
 
         Reply messages to the command:
 
-        Max Arguments:  4
+        Max Arguments:  5
             Arguments:  (1) <Status Payload>  (2) <Channel ID>
-                        (3) <channel>         (4) <topic>
+                        (3) <channel>         (4) [<topic>]
+                        (5) [<user count>]
 
         This command may reply with several command reply messages to form
         a list of results.  In this case the status payload will include
@@ -2219,8 +2217,8 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_WILDCARDS
             SILC_STATUS_ERR_NOT_REGISTERED
             SILC_STATUS_ERR_TOO_MANY_PARAMS
-            SILC_STATUS_ERR_NO_SUCH_CHANNEL
             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
+            SILC_STATUS_ERR_NO_CHANNEL_ID
             SILC_STATUS_ERR_NO_SUCH_SERVER
 
 
@@ -2237,7 +2235,7 @@ List of all defined commands in SILC follows.
 
         After setting the topic the server must send the notify type
         SILC_NOTIFY_TYPE_TOPIC_SET to its primary router and then to
-        the channel which mode was changed.
+        the channel which topic was changed.
 
         Reply messages to the command:
 
@@ -2265,24 +2263,52 @@ List of all defined commands in SILC follows.
 
    7    SILC_COMMAND_INVITE
 
-        Max Arguments:  2
-            Arguments:  (1) <Client ID>  (2) <Channel ID>
+        Max Arguments:  4
+            Arguments:  (1) <Channel ID>       (2) [<Client ID>]
+                        (3) [<adding client>]  (4) [<removing client>]
 
         This command is used to invite other clients to join to the
         channel.  The <Client ID> argument is the target client's ID that
         is being invited.  The <Channel ID> is the Channel ID of the
         requested channel.  The sender of this command must be on the
-        channel.  This command must fail if the requested channel does
-        not exist, the requested client is already on the channel or if
-        the channel is invite only channel and the caller of this command
-        does not have at least channel operator privileges.
+        channel.  The server must also send the notify type
+        SILC_NOTIFY_TYPE_INVITE to its primary router and then to the
+        client indicated by the <Client ID>.
+
+        The <adding client> and <removing client> can be used to add to
+        and remove from the invite list.  The format of the <adding client>
+        and <removing client> is as follows:
+
+            [<nickname>[@<server>]!][<username>]@[<hostname>]
+
+        When adding to or removing from the invite list the server must
+        send the notify type SILC_NOTIFY_TYPE_INVITE to its primary router
+        and must not send it to the client which was added to the list.
+        The client which executes this command must have at least channel
+        operator privileges to be able to add to or remove from the invite
+        list.  The wildcards may be used with this command.  If adding or
+        removing from than one clients then the lists are an comma (`,')
+        separated list.
+
+        Note that the <Client ID> provided must be resolved into correct
+        nickname and hostname and add to the invite list before sending
+        the notify packet.
+        
+        When this command is given with only <Channel ID> argument then
+        the command merely returns the invite list of the channel.   This
+        command must fail if the requested channel does not exist, the
+        requested <Client ID> is already on the channel or if the channel
+        is invite only channel and the caller of this command does not
+        have at least channel operator privileges.
 
         Reply messages to the command:
 
-        Max Arguments:  2
-            Arguments:  (1) <Status Payload>
+        Max Arguments:  3
+            Arguments:  (1) <Status Payload>  (2) <Channel ID>
+                        (3) [<invite list>]
 
-        This command replies only with Status Payload.
+       This command replies with the invite list of the channel if it
+       exists.
 
         Status messages:
 
@@ -2296,6 +2322,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_CHANNEL_ID
             SILC_STATUS_ERR_NOT_ON_CHANNEL
             SILC_STATUS_ERR_USER_ON_CHANNEL
+            SILC_STATUS_ERR_NO_CHANNEL_PRIV
 
 
    8    SILC_COMMAND_QUIT
@@ -2353,18 +2380,21 @@ List of all defined commands in SILC follows.
 
    10   SILC_COMMAND_INFO
 
-        Max Arguments:  1
-            Arguments:  (1) [<server>]
+        Max Arguments:  2
+            Arguments:  (1) [<server>]  (2) [<Server ID>]
 
         This command is used to fetch various information about a server.
         If <server> argument is specified the command must be sent to
         the requested server.
 
+        If the <Server ID> is specified the server information if fetched
+        by the provided Server ID.
+
         Reply messages to the command:
 
-        Max Arguments:  3
+        Max Arguments:  4
             Arguments:  (1) <Status Payload>  (2) <Server ID>
-                        (3) <string>
+                        (3) <server name>     (4) <string>
 
         This command replies with the Server ID of the server and a
         string which tells the information about the server.
@@ -2377,6 +2407,8 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
             SILC_STATUS_ERR_TOO_MANY_PARAMS
             SILC_STATUS_ERR_NO_SUCH_SERVER
+            SILC_STATUS_ERR_NO_SUCH_SERVER_ID
+            SILC_STATUS_ERR_NO_SERVER_ID
 
 
    11   SILC_COMMAND_CONNECT
@@ -2523,13 +2555,13 @@ List of all defined commands in SILC follows.
         Reply messages to the command:
 
         Max Arguments:  14
-            Arguments:  (1) <Status Payload>      (2) <channel> 
-                        (3) <Channel ID>          (4) <Client ID>
-                        (5) <channel mode mask>   (6) <created>
-                        (7) <Channel Key Payload> (8) [<ban mask>]
-                        (9) [<invite list>]       (10) [<topic>]
-                       (11) [<hmac>]              (12) <list count>
-                       (13) <Client ID list>      (14) <client mode list>
+            Arguments:  (1) <Status Payload>        (2) <channel> 
+                        (3) <Channel ID>            (4) <Client ID>
+                        (5) <channel mode mask>     (6) <created>
+                        (7) [<Channel Key Payload>] (8) [<ban list>]
+                        (9) [<invite list>]         (10) [<topic>]
+                        (11) [<hmac>]               (12) <list count>
+                        (13) <Client ID list>       (14) <client mode list>
 
         This command replies with the channel name requested by the
         client, channel ID of the channel and topic of the channel
@@ -2540,8 +2572,10 @@ List of all defined commands in SILC follows.
         and/or invite list is set they are sent as well.
 
         The <list count>, <Client ID list> and <client mode list> are
-        the clients curerntly on the channel and their modes on the
-        channel.
+        the clients currently on the channel and their modes on the
+        channel.  The <Client ID list> is formed by adding the ID Payloads
+        one after the other.  The <client mode list> is formed by adding
+        32 bit MSB first order values one after the other.
 
         Client receives the channel key in the reply message as well
         inside <Channel Key Payload>.
@@ -2570,8 +2604,9 @@ List of all defined commands in SILC follows.
 
         Reply messages to the command:
 
-        Max Arguments:  2
-            Arguments:  (1) <Status Payload>  (2) [<motd>]
+        Max Arguments:  3
+            Arguments:  (1) <Status Payload>  (2) <Server ID>
+                        (3) [<motd>]
 
         This command replies with the motd message if it exists.
 
@@ -2626,6 +2661,7 @@ List of all defined commands in SILC follows.
               privileges by SILC_COMMAND_SILCOPER command.  Client
               may unset the mode itself.
 
+
         Reply messages to the command:
 
         Max Arguments:  2
@@ -2651,11 +2687,10 @@ List of all defined commands in SILC follows.
 
    17   SILC_COMMAND_CMODE
 
-        Max Arguments:  8
+        Max Arguments:  6
             Arguments:  (1) <Channel ID>    (2) <channel mode mask>
                         (3) [<user limit>]  (4) [<passphrase>]
-                        (5) [<ban mask>]    (6) [<invite list>]
-                        (7) [<cipher>]      (8) [<hmac>]
+                        (5) [<cipher>]      (6) [<hmac>]
 
         This command is used by client to set or change channel flags on
         a channel.  Channel has several modes that set various properties
@@ -2783,46 +2818,7 @@ List of all defined commands in SILC follows.
               to set/unset this mode.
 
 
-           0x0080    SILC_CMODE_BAN
-
-              Ban mask has been set to the channel.  The ban mask
-              may be used to ban specific clients to join the channel.
-              The <ban mask> argument is the set ban mask.  When
-              unsetting a ban mask the mask must be provided as
-              argument.  Channel founder and channel operator may
-              set/unset this mode.  Channel founder may not be
-              added to the ban list.  <ban mask> is an comma (`,')
-              separated list of banned clients in the following format:
-
-                [<nickname>[@<server>]!][<username>]@[<hostname>]
-
-              Wildcards maybe used when banning clients.
-
-              Typical implementation would use [+|-]b on user interface
-              to set/unset this mode.
-
-
-           0x0100    SILC_CMODE_INVITE_LIST
-
-              Invite list has been set to the channel.  The invite list
-              can be used to mark the clients that is able to join
-              channel without being invited when the channel is set to
-              be invite-only channel.  The <invite list> argument is the
-              set invite mask.  When unsetting entry from the invite list
-              the entry must be provided as argument.  Channel founder and
-              channel operator may set/unset this mode.  The <invite list>
-              is command (`,') separated list of invited clients in the
-              following format:
-
-                [<nickname>[@<server>]!][<username>]@[<hostname>]
-
-              Wildcards maybe used when setting the invite list.
-
-              Typical implementation would use [+|-]I on user interface
-              to set/unset this mode.
-
-        
-           0x0200    SILC_CMODE_CIPHER
+           0x0080    SILC_CMODE_CIPHER
 
               Sets specific cipher to be used to protect channel
               traffic.  The <cipher> argument is the requested cipher.
@@ -2835,7 +2831,7 @@ List of all defined commands in SILC follows.
               to set/unset this mode.
 
 
-           0x0400    SILC_CMODE_HMAC
+           0x0100    SILC_CMODE_HMAC
 
               Sets specific hmac to be used to compute the MACs of the
               channel message.  The <hmac> argument is the requested hmac.
@@ -2876,7 +2872,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
 
 
-   19   SILC_COMMAND_CUMODE
+   18   SILC_COMMAND_CUMODE
 
         Max Arguments:  3
             Arguments:  (1) <Channel ID>  (2) <mode mask>
@@ -2998,9 +2994,6 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_SERVER_PRIV
 
 
-
-
-
    21   SILC_COMMAND_CLOSE
 
         Max Arguments:  2
@@ -3171,7 +3164,55 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NOT_ON_CHANNEL
 
 
-   26 - 199
+   26   SILC_COMMAND_BAN
+
+        Max Arguments:  3
+            Arguments:  (1) <Channel ID>         (2) [<adding client>]
+                        (3) [<removing client>]
+
+        This command is used to manage the ban list of the channel
+        indicated by the <Channel ID>.  A client that is banned from
+        channel is no longer able to join the channel.  The client which
+        is executing this command must have at least channel operator
+        privileges on the channel.
+
+        The <adding client> and <removing client> are used to add to and
+        remove from the ban list.  The format of the <adding client> and
+        the <removing client> is of following format:
+
+            [<nickname>[@<server>]!][<username>]@[<hostname>]
+
+        The server must send the notify type SILC_NOTIFY_TYPE_BAN to its
+        primary router after adding to or removing from the ban list.
+        The wildcards may be used with this command.  If adding or removing
+        from than one clients then the lists are an comma (`,') separated
+        list.
+
+        If this command is executed without the ban arguments the command
+        merely replies with the current ban list.
+
+
+        Reply messages to the command:
+
+        Max Arguments:  3
+            Arguments:  (1) <Status Payload>  (2) <Channel ID>
+                        (3) [<ban list>]
+
+        This command replies with the <Channel ID> of the channel and
+        the current <ban list> of the channel if it exists.
+
+        Status messages:
+
+            SILC_STATUS_OK
+            SILC_STATUS_ERR_NOT_REGISTERED
+            SILC_STATUS_ERR_TOO_MANY_PARAMS
+            SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
+            SILC_STATUS_ERR_NO_CHANNEL_ID
+            SILC_STATUS_ERR_NOT_ON_CHANNEL
+            SILC_STATUS_ERR_NO_CHANNEL_PRIV
+
+
+   27 - 199
 
         Currently undefined commands.