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)
{
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, " ");
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;
}