+/* Sends UMODE_CHANGE notify type. This tells that `client_id' client's
+ user mode in the SILC Network was changed. This function is used to
+ send the packet between routers as broadcast packet. */
+
+void silc_server_send_notify_umode(SilcServer server,
+ SilcSocketConnection sock,
+ bool broadcast,
+ SilcClientID *client_id,
+ SilcUInt32 mode_mask)
+{
+ SilcBuffer idp;
+ unsigned char mode[4];
+
+ idp = silc_id_payload_encode((void *)client_id, SILC_ID_CLIENT);
+ SILC_PUT32_MSB(mode_mask, mode);
+
+ silc_server_send_notify(server, sock, broadcast,
+ SILC_NOTIFY_TYPE_UMODE_CHANGE, 2,
+ idp->data, idp->len,
+ mode, 4);
+ silc_buffer_free(idp);
+}
+
+/* Sends BAN notify type. This tells that ban has been either `add'ed
+ or `del'eted on the `channel. This function is used to send the packet
+ between routers as broadcast packet. */
+
+void silc_server_send_notify_ban(SilcServer server,
+ SilcSocketConnection sock,
+ bool broadcast,
+ SilcChannelEntry channel,
+ char *add, char *del)
+{
+ SilcBuffer idp;
+
+ idp = silc_id_payload_encode((void *)channel->id, SILC_ID_CHANNEL);
+ silc_server_send_notify(server, sock, broadcast,
+ SILC_NOTIFY_TYPE_BAN, 3,
+ idp->data, idp->len,
+ add, add ? strlen(add) : 0,
+ del, del ? strlen(del) : 0);
+ silc_buffer_free(idp);
+}
+
+/* Sends INVITE notify type. This tells that invite has been either `add'ed
+ or `del'eted on the `channel. The sender of the invite is the `client_id'.
+ This function is used to send the packet between routers as broadcast
+ packet. */
+
+void silc_server_send_notify_invite(SilcServer server,
+ SilcSocketConnection sock,
+ bool broadcast,
+ SilcChannelEntry channel,
+ SilcClientID *client_id,
+ char *add, char *del)
+{
+ SilcBuffer idp, idp2;
+
+ idp = silc_id_payload_encode((void *)channel->id, SILC_ID_CHANNEL);
+ idp2 = silc_id_payload_encode((void *)client_id, SILC_ID_CLIENT);
+ silc_server_send_notify(server, sock, broadcast,
+ SILC_NOTIFY_TYPE_INVITE, 5,
+ idp->data, idp->len,
+ channel->channel_name, strlen(channel->channel_name),
+ idp2->data, idp2->len,
+ add, add ? strlen(add) : 0,
+ del, del ? strlen(del) : 0);
+ silc_buffer_free(idp);
+ silc_buffer_free(idp2);
+}
+