From: Pekka Riikonen Date: Fri, 23 Mar 2001 12:36:49 +0000 (+0000) Subject: updteas. X-Git-Tag: SILC.0.1~105 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=bed1deb6f39f715138780b887916587ff897fe97 updteas. --- diff --git a/CHANGES b/CHANGES index f6bc838f..c6c440a7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,25 @@ +Fri Mar 23 16:25:11 EET 2001 Pekka Riikonen + + * Redefined the INVITE command. The same command can be used to + invite individuals to the channel but also to manage the invite + list of the channel (to add to and remove from the invite list). + Updated the protocol specs. + + * Added new command SILC_COMMAND_BAN that can be used to manage + the ban list of the channel. Updated the protocol specs. + + * Removed the channel modes: the SILC_CMODE_BAN and the + SILC_CMODE_INVITE_LIST as they were a bit kludge to be included + in the CMODE command. The equivalent features are now available + using INVITE and BAN commands. Updated the protocol specs. + + * Added new SILC_NOTIFY_TYPE_BAN notify type to notify routers + in the network about change in the current ban list. The notify + type is not used by the client. + + * Redefined parts of the SILC_NOTIFY_TYPE_INVITE command to + support the invite lists. + Thu Mar 22 22:52:23 EET 2001 Pekka Riikonen * Added new function silc_string_regexify that converts string diff --git a/doc/draft-riikonen-silc-pp-01.nroff b/doc/draft-riikonen-silc-pp-01.nroff index 72cacb80..1c8374fd 100644 --- a/doc/draft-riikonen-silc-pp-01.nroff +++ b/doc/draft-riikonen-silc-pp-01.nroff @@ -1123,14 +1123,25 @@ ID's sent in arguments are sent inside ID Payload. 1 SILC_NOTIFY_TYPE_INVITE - Sent when receiver has been invited to a channel. This type must be - sent directly to the invited client. + Sent when an client is invited to a channel. This is also sent + when the invite list of the channel is changed. This notify type + is sent between routers and if the is argument is + provided to the client as well. - Max Arguments: 2 - Arguments: (1) (2) + Max Arguments: 4 + Arguments: (1) [] (2) + (3) [] (4) [] + + The is the client which was invited to the channel. + The is the channel. The and the + indicates the added or removed client from the + channel's invite list. The format of the is defined in the [SILC1] with SILC_COMMAND_INVITE + command. - The is the client who invites the receiver of this type - to channel indicated by . + The and is never sent to the + client indicated by the . Also note that the lists + include the already. 2 SILC_NOTIFY_TYPE_JOIN @@ -1142,10 +1153,14 @@ ID's sent in arguments are sent inside ID Payload. broadcast it to the network. Max Arguments: 2 - Arguments: (1) (2) + Arguments: (1) [] (2) The is the client that joined to the channel indicated - by the . + by the . The and + indicates the added or removed client in the current invite list. + The format of the and the is + defined in the [SILC1] with SILC_COMMAND_INVITE command. If the + is not provided then this 3 SILC_NOTIFY_TYPE_LEAVE @@ -1313,6 +1328,23 @@ ID's sent in arguments are sent inside ID Payload. The is the client which mode was changed. The is the new mode mask. + +15 SILC_NOTIFY_TYPE_BAN + + Sent when the ban list of the channel is changed. This type is sent + only between routers as broadcast packet. + + Max Arguments: 3 + Arguments: (1) (2) [] + (3) [] + + The is the channel which ban list was changed. The + is used to indicate the a ban was added and the + is used to indicate that a ban was removed from + the ban list. The format of the and the + is defined in the [SILC1] with SILC_COMMAND_BAN + command. + .in 3 Notify types starting from 16384 are reserved for private notify diff --git a/doc/draft-riikonen-silc-spec-01.nroff b/doc/draft-riikonen-silc-spec-01.nroff index 4913b100..2f658288 100644 --- a/doc/draft-riikonen-silc-spec-01.nroff +++ b/doc/draft-riikonen-silc-spec-01.nroff @@ -2263,17 +2263,43 @@ List of all defined commands in SILC follows. 7 SILC_COMMAND_INVITE - Max Arguments: 2 - Arguments: (1) (2) + Max Arguments: 4 + Arguments: (1) [] (2) [] + (3) [] (4) [] This command is used to invite other clients to join to the channel. The argument is the target client's ID that is being invited. The 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 . + + The and can be used to add to + and remove from the invite list. The format of the + and is as follows: + + [[@]!][]@[] + + 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 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 without any arguments then the command + merely returns the invite list of the channel. This command must + fail if the requested channel does not exist, the requested + 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: @@ -2653,11 +2679,10 @@ List of all defined commands in SILC follows. 17 SILC_COMMAND_CMODE - Max Arguments: 8 + Max Arguments: 6 Arguments: (1) (2) (3) [] (4) [] - (5) [] (6) [] - (7) [] (8) [] + (5) [] (6) [] This command is used by client to set or change channel flags on a channel. Channel has several modes that set various properties @@ -2785,46 +2810,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 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. is an comma (`,') - separated list of banned clients in the following format: - - [[@]!][]@[] - - 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 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 - is command (`,') separated list of invited clients in the - following format: - - [[@]!][]@[] - - 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 argument is the requested cipher. @@ -2837,7 +2823,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 argument is the requested hmac. @@ -2878,7 +2864,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) (2) @@ -3173,7 +3159,54 @@ 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) [] (2) [] + (3) [] + + This command is used to manage the ban list of the channel + indicated by the . 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 and are used to add to and + remove from the ban list. The format of the and + the is of following format: + + [[@]!][]@[] + + 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 any arguments the command + merely replies with the current ban list. + + + Reply messages to the command: + + Max Arguments: 3 + Arguments: (1) (2) + (3) [] + + This command replies with the of the channel and + the current 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_NOT_ON_CHANNEL + SILC_STATUS_ERR_NO_CHANNEL_PRIV + + + 27 - 199 Currently undefined commands. diff --git a/lib/silccore/silccommand.h b/lib/silccore/silccommand.h index dd20052d..acd3b1cb 100644 --- a/lib/silccore/silccommand.h +++ b/lib/silccore/silccommand.h @@ -85,6 +85,7 @@ typedef enum { #define SILC_COMMAND_SILCOPER 23 #define SILC_COMMAND_LEAVE 24 #define SILC_COMMAND_USERS 25 +#define SILC_COMMAND_BAN 26 /* Reserved */ #define SILC_COMMAND_RESERVED 255 diff --git a/lib/silccore/silcmode.h b/lib/silccore/silcmode.h index 6949845b..9a5c4a08 100644 --- a/lib/silccore/silcmode.h +++ b/lib/silccore/silcmode.h @@ -30,10 +30,8 @@ #define SILC_CHANNEL_MODE_TOPIC 0x0010 /* topic setting by operator */ #define SILC_CHANNEL_MODE_ULIMIT 0x0020 /* user limit set */ #define SILC_CHANNEL_MODE_PASSPHRASE 0x0040 /* passphrase set */ -#define SILC_CHANNEL_MODE_BAN 0x0080 /* ban list set */ -#define SILC_CHANNEL_MODE_INVITE_LIST 0x0100 /* invite list set */ -#define SILC_CHANNEL_MODE_CIPHER 0x0200 /* sets cipher of the channel */ -#define SILC_CHANNEL_MODE_HMAC 0x0400 /* sets hmac of the channel */ +#define SILC_CHANNEL_MODE_CIPHER 0x0080 /* sets cipher of the channel */ +#define SILC_CHANNEL_MODE_HMAC 0x0100 /* sets hmac of the channel */ /* User modes on channel */ #define SILC_CHANNEL_UMODE_NONE 0x0000 /* Normal user */ diff --git a/lib/silccore/silcnotify.h b/lib/silccore/silcnotify.h index 3b42fbaa..08a2fc91 100644 --- a/lib/silccore/silcnotify.h +++ b/lib/silccore/silcnotify.h @@ -30,7 +30,7 @@ typedef unsigned short SilcNotifyType; /* SILC notify types. Server may send these notify types to client to notify of some action. */ #define SILC_NOTIFY_TYPE_NONE 0 /* no specific type */ -#define SILC_NOTIFY_TYPE_INVITE 1 /* "invites you to channel" */ +#define SILC_NOTIFY_TYPE_INVITE 1 /* invites/invite list change */ #define SILC_NOTIFY_TYPE_JOIN 2 /* "has joined channel" */ #define SILC_NOTIFY_TYPE_LEAVE 3 /* "has left channel" */ #define SILC_NOTIFY_TYPE_SIGNOFF 4 /* "signoff" */ @@ -44,6 +44,7 @@ typedef unsigned short SilcNotifyType; #define SILC_NOTIFY_TYPE_KICKED 12 /* Kicked from channel */ #define SILC_NOTIFY_TYPE_KILLED 13 /* Killed from the network */ #define SILC_NOTIFY_TYPE_UMODE_CHANGE 14 /* user mode was changed */ +#define SILC_NOTIFY_TYPE_BAN 15 /* ban list change */ /* Prototypes */ SilcNotifyPayload silc_notify_payload_parse(SilcBuffer buffer);