]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/gameserv.cpp
Added a loop that makes gameserv reload if disconnected. It gives 3 attempts until...
[irc/gameservirc.git] / gameserv / gameserv.cpp
index c5e9cdfbd806cbdd86041a47e560cd9704796d8b..2239ce7fb41c64e6a2d05f711e49055cc89cc6cc 100644 (file)
@@ -46,7 +46,6 @@ int stricmp(const char *s1, const char *s2);
 int strnicmp(const char *s1, const char *s2, size_t len);
 // String Functions
 
-
 /********** Password functions **********/
 
 bool passcmp(char *encrypted, char *plaintext); // Compares an encrypted pass with a plain text one
@@ -58,6 +57,7 @@ bool check_password(char *name, char *plaintext); // Finds a password for the gi
 
 /********** GameServ Booleans **********/
 
+bool shuttingdown;
 bool is_playing(char *u); // True if the given nickname in the clients list is playing.
 bool is_playing(aClient *user);
 
@@ -176,7 +176,7 @@ void gameserv(char *source, char *buf)
        ts = strtok(NULL, "\1");
         notice(s_GameServ, source, "\1PING %s\1", ts);
     } else if (stricmp(cmd, "\1VERSION\1") == 0) {
-       notice(s_GameServ, source, "\1VERSION %s %s +devel\1", PACKAGE, VERSION);
+       notice(s_GameServ, source, "\1VERSION %s %s\1", PACKAGE, VERSION);
     } else if (stricmp(cmd, "SEARCH") == 0) {
        cmd = strtok(NULL, " ");
 
@@ -243,6 +243,7 @@ void gameserv(char *source, char *buf)
            #else
                raw("SQUIT %s :leaving: %s used the Shutdown command.", servername, source);
            #endif
+           shuttingdown = true;
        }
     } else if (stricmp(cmd, "SAVE") == 0) {
        aClient *user;
@@ -2919,7 +2920,11 @@ unsigned long HASH(const unsigned char *name, int size_of_table)
 
   while (*name)
   {
-    h = (h << 4) + tolower(*name++);
+    #ifdef P10
+       h = (h << 4) + (*name++); // Case sensitive for numerics
+    #else
+       h = (h << 4) + tolower(*name++);
+    #endif
     if ((g = (h & 0xF0000000)))
       h ^= g >> 24;
     h &= ~g;