From: kainazzzo Date: Tue, 28 Oct 2003 12:38:18 +0000 (+0000) Subject: Fixed a few things with the version and ping. X-Git-Url: https://jfr.im/git/irc/gameservirc.git/commitdiff_plain/0eeaca4c0e2a8bb571b1182ead50094c03268b81 Fixed a few things with the version and ping. git-svn-id: https://svn.code.sf.net/p/gameservirc/code/trunk@41 bc333340-6410-0410-a689-9d09f3c113fa --- diff --git a/gameserv/gameserv.cpp b/gameserv/gameserv.cpp index 32dcbc9..93b17be 100644 --- a/gameserv/gameserv.cpp +++ b/gameserv/gameserv.cpp @@ -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; }