]> jfr.im git - irc/gameservirc.git/commitdiff
Fixed a few things with the version and ping.
authorkainazzzo <redacted>
Tue, 28 Oct 2003 12:38:18 +0000 (12:38 +0000)
committerkainazzzo <redacted>
Tue, 28 Oct 2003 12:38:18 +0000 (12:38 +0000)
git-svn-id: https://svn.code.sf.net/p/gameservirc/code/trunk@41 bc333340-6410-0410-a689-9d09f3c113fa

gameserv/gameserv.cpp

index 32dcbc9778454997e3cdf79252941193840baf6e..93b17bec8e45980fe74390433c51fb9af61e5300 100644 (file)
@@ -120,7 +120,7 @@ void gameserv(char *source, char *buf)
     cmd++;    // Get rid of that : at the beginning of the :text  (command)
 
     cout << "Source: " << source << "\ncmd: " << cmd << endl;
-    long int mn = midnight();
+    long int mn = midnight() - 12 * 3600; // 12 noon ;)
 
     if (mn > timestamp)
     {
@@ -129,13 +129,13 @@ void gameserv(char *source, char *buf)
        save_timestamp();
     }
 
-    if (strnicmp(cmd, ":\1PING", 6) == 0)
+    if (strnicmp(cmd, "\1PING", 6) == 0)
     {
        char *ts;
        ts = strtok(NULL, "\1");
         notice(s_GameServ, source, "\1PING %s\1", ts);
-    } else if (stricmp(cmd, ":\1VERSION\1") == 0) {
-       notice(s_GameServ, source, "\1VERSION GameServ v1.0b\1");
+    } else if (stricmp(cmd, "\1VERSION\1") == 0) {
+       notice(s_GameServ, source, "\1VERSION GameServ v1.0.1 +devel\1");
     } else if (stricmp(cmd, "SEARCH") == 0) {
        cmd = strtok(NULL, " ");
 
@@ -2426,17 +2426,12 @@ return 1;
 
 long int stringtoint(char *number)
 {
-    cout << "stringtoint: " << number << endl;
     long int x, len = strlen(number), sum = 0;
     if (len == 1)
         return chartoint(number[0]);
     sum += chartoint(number[len - 1]);
     for (x = len - 2; x >= 0; x--)
-    {
-       cout << "Adding: " << chartoint(number[x]) * pow(10, abs(x - len + 1)) << 
-               endl;
         sum += chartoint(number[x]) * pow(10, abs(x - len + 1));
-    }
     return sum;
 }