Integer type name change.
[silc.git] / apps / silcd / server_util.h
index 283864f3384b1854570633505b182f091c516528..b7e040451df8ed31cc705a83aaf50f1013f3d9e3 100644 (file)
@@ -35,12 +35,29 @@ bool silc_server_remove_clients_by_server(SilcServer server,
    `from' and which are originated from a server that we have connection
    to, when we've acting as backup router. If it is FALSE the `to' will
    be the new source. This function also removes the clients that are
-   *really* originated from `from'. These are clients that the `from'
-   owns, and not just clients that are behind the `from'. */
+   *really* originated from `from' if `remove_from' is TRUE. These are
+   clients that the `from' owns, and not just clients that are behind
+   the `from'. */
 void silc_server_update_clients_by_server(SilcServer server, 
                                          SilcServerEntry from,
                                          SilcServerEntry to,
-                                         bool resolve_real_server);
+                                         bool resolve_real_server,
+                                         bool remove_from);
+
+/* Updates servers that are from `from' to be originated from `to'.  This
+   will also update the server's connection to `to's connection. */
+void silc_server_update_servers_by_server(SilcServer server, 
+                                         SilcServerEntry from,
+                                         SilcServerEntry to);
+
+/* Removes channels that are from `from. */
+void silc_server_remove_channels_by_server(SilcServer server, 
+                                          SilcServerEntry from);
+
+/* Updates channels that are from `from' to be originated from `to'.  */
+void silc_server_update_channels_by_server(SilcServer server, 
+                                          SilcServerEntry from,
+                                          SilcServerEntry to);
 
 /* Checks whether given channel has global users.  If it does this returns
    TRUE and FALSE if there is only locally connected clients on the channel. */
@@ -57,4 +74,15 @@ bool silc_server_channel_has_local(SilcChannelEntry channel);
 bool silc_server_client_on_channel(SilcClientEntry client,
                                   SilcChannelEntry channel);
 
+/* Checks string for bad characters and returns TRUE if they are found. */
+bool silc_server_name_bad_chars(const char *name, SilcUInt32 name_len);
+
+/* Modifies the `nick' if it includes bad characters and returns new
+   allocated nickname that does not include bad characters. */
+char *silc_server_name_modify_bad(const char *name, SilcUInt32 name_len);
+
+/* Find number of sockets by IP address indicated by `ip'. Returns 0 if
+   socket connections with the IP address does not exist. */
+SilcUInt32 silc_server_num_sockets_by_ip(SilcServer server, const char *ip);
+
 #endif /* SERVER_UTIL_H */