Removed unused functions.
authorPekka Riikonen <priikone@silcnet.org>
Tue, 19 Apr 2005 15:46:54 +0000 (15:46 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 19 Apr 2005 15:46:54 +0000 (15:46 +0000)
apps/silcd/server_util.c
apps/silcd/server_util.h

index 46cf87aa619cf6f9e4d5bb7a77d0b722dc1d1d7e..1f202168f5e55317be877f49083c5c4e1d1caa16 100644 (file)
@@ -1093,66 +1093,6 @@ bool silc_server_client_on_channel(SilcClientEntry client,
                              (void *)chl);
 }
 
-/* Checks string for bad characters and returns TRUE if they are found. */
-
-bool silc_server_name_bad_chars(const char *name, SilcUInt32 name_len)
-{
-  int i;
-
-  for (i = 0; i < name_len; i++) {
-    if (!isascii(name[i]))
-      return TRUE;
-    if (name[i] <= 32) return TRUE;
-    if (name[i] == ' ') return TRUE;
-    if (name[i] == '*') return TRUE;
-    if (name[i] == '?') return TRUE;
-    if (name[i] == ',') return TRUE;
-    if (name[i] == '@') return TRUE;
-    if (name[i] == '!') return TRUE;
-  }
-
-  return FALSE;
-}
-
-/* Same as silc_server_name_bad_chars but check for channel names. */
-
-bool silc_server_name_bad_chchars(const char *name, SilcUInt32 name_len)
-{
-  int i;
-
-  for (i = 0; i < name_len; i++) {
-    if (!isascii(name[i]))
-      return TRUE;
-    if (name[i] <= 32) return TRUE;
-    if (name[i] == ' ') return TRUE;
-    if (name[i] == '*') return TRUE;
-    if (name[i] == '?') return TRUE;
-    if (name[i] == ',') return TRUE;
-  }
-
-  return FALSE;
-}
-
-/* Modifies the `name' if it includes bad characters and returns new
-   allocated name that does not include bad characters. */
-
-char *silc_server_name_modify_bad(const char *name, SilcUInt32 name_len)
-{
-  int i;
-  char *newname = strdup(name);
-
-  for (i = 0; i < name_len; i++) {
-    if (!isascii(newname[i])) newname[i] = '_';
-    if (newname[i] <= 32) newname[i] = '_';
-    if (newname[i] == ' ') newname[i] = '_';
-    if (newname[i] == '*') newname[i] = '_';
-    if (newname[i] == '?') newname[i] = '_';
-    if (newname[i] == ',') newname[i] = '_';
-  }
-
-  return newname;
-}
-
 /* Find number of sockets by IP address indicated by `ip'. Returns 0 if
    socket connections with the IP address does not exist. */
 
index 62b3d60fef2527d0c76e14f23fa2d783345e83e9..1c9c5ee09a5291a1f6e2e8b72115a35bf7e6a294 100644 (file)
@@ -94,14 +94,6 @@ bool silc_server_client_on_channel(SilcClientEntry client,
                                   SilcChannelEntry channel,
                                   SilcChannelClientEntry *chl);
 
-/* Checks string for bad characters and returns TRUE if they are found. */
-bool silc_server_name_bad_chars(const char *name, SilcUInt32 name_len);
-bool silc_server_name_bad_chchars(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,