+Mon Apr 22 09:09:44 CEST 2002 Pekka Riikonen <priikone@silcnet.org>
+
+ * Added BLOCK_INVITE user mode to be able to block incoming
+ invite notifications. Protoocol TODO #26. Affected files
+ are lib/silccore/silcmode.h, lib/silcclient/command.c and
+ silcd/command.c.
+
Sun Apr 21 19:44:38 EEST 2002 Pekka Riikonen <priikone@silcnet.org>
* Disconnect Payload includes now the status type. Updated
24. Implement the <Requested Attributes> and the Attribute Payload to
the core library, client and server.
- 26. INVITE notify blocking by mode? Quiet user mode to quiet a user on
- channel, settable by chan op/founder?
+ 27. Quiet user mode to quiet a user on channel, settable by chan
+ op/founder?
This can be used to block unwanted private
messages.
w Set/unset to reject anyone from watching you
+ I Set/unset invitite blocking. When set server
+ does not send invitie notifications to you
See also: CMODE, CUMODE, AWAY
strncat(channel->invite_list, invite, len);
strncat(channel->invite_list, ",", 1);
- /* Send notify to the client that is invited to the channel */
- idp = silc_id_payload_encode(channel_id, SILC_ID_CHANNEL);
- idp2 = silc_id_payload_encode(sender->id, SILC_ID_CLIENT);
- silc_server_send_notify_dest(server, dest_sock, FALSE, dest_id,
- SILC_ID_CLIENT,
- SILC_NOTIFY_TYPE_INVITE, 3,
- idp->data, idp->len,
- channel->channel_name,
- strlen(channel->channel_name),
- idp2->data, idp2->len);
- silc_buffer_free(idp);
- silc_buffer_free(idp2);
+ if (!(dest->mode & SILC_UMODE_BLOCK_INVITE)) {
+ /* Send notify to the client that is invited to the channel */
+ idp = silc_id_payload_encode(channel_id, SILC_ID_CHANNEL);
+ idp2 = silc_id_payload_encode(sender->id, SILC_ID_CLIENT);
+ silc_server_send_notify_dest(server, dest_sock, FALSE, dest_id,
+ SILC_ID_CLIENT,
+ SILC_NOTIFY_TYPE_INVITE, 3,
+ idp->data, idp->len,
+ channel->channel_name,
+ strlen(channel->channel_name),
+ idp2->data, idp2->len);
+ silc_buffer_free(idp);
+ silc_buffer_free(idp2);
+ }
}
/* Add the client to the invite list of the channel */
touch draft-riikonen-silc-ke-auth-05.txt
touch draft-riikonen-silc-commands-03.txt
touch draft-riikonen-silc-flags-payloads-00.txt
- -cd ..
if SILC_DIST_CLIENT
dist-hook:
certain users. However, this document does not specify
such service.
+
+ 0x00001000 SILC_UMODE_BLOCK_INVITE
+
+ Marks that the client wishes to block incoming invite
+ notifications. Client MAY set and unset this mode.
+ When set server does not deliver invite notifications
+ to the client. Note that this mode may make it harder
+ to join invite-only channels.
+
If the <client mode mask> was not provided this command merely
returns the mode mask to the client.
else
mode &= ~SILC_UMODE_REJECT_WATCHING;
break;
+ case 'I':
+ if (add)
+ mode |= SILC_UMODE_BLOCK_INVITE;
+ else
+ mode &= ~SILC_UMODE_BLOCK_INVITE;
+ break;
default:
COMMAND_ERROR(SILC_STATUS_ERR_UNKNOWN_MODE);
goto out;
#define SILC_UMODE_BLOCK_PRIVMSG 0x00000200 /* Client blocks privmsgs */
#define SILC_UMODE_DETACHED 0x00000400 /* Client is detached */
#define SILC_UMODE_REJECT_WATCHING 0x00000800 /* Client rejects watching */
+#define SILC_UMODE_BLOCK_INVITE 0x00001000 /* Client blocks invites */
/***/
#endif