using std::endl;
char *PACKAGE = "GameServ";
-char *VERSION = "1.2.0 +devel";
+char *VERSION = "1.2.1 +devel";
int sock;
int day;
int main(int argc, char *argv[])
{
char buffer[1024], buf[1024];
+ memset(buffer, 0, 1024);
+ memset(buf, 0, 1024);
int connected;
long lastidlecheck;
char *cmd, *source = NULL, *conf = "gameserv.conf";
raw("PROTOCTL NICKv2 VHP");
raw("PASS :%s", remotepass);
raw("SERVER %s 1 :%s", servername, servername);
- raw("NICK %S 1 %d %S %s %s %d +wghraAxNt %s :%s v%s", time(NULL), gshost,
- servername, time(NULL), gshost, PACKAGE, VERSION);
+ raw("NICK %S 1 %d %S %s %s %d +w%s %s :%s v%s", time(NULL), gshost,
+ servername, time(NULL), (isBOper() ? "o" : ""), gshost, PACKAGE, VERSION);
raw(":%S JOIN %s", c_Forest);
raw(":%S MODE %s +tn", c_Forest);
#elif defined(BAHAMUT)
raw("PASS %s :TS", remotepass);
raw("SERVER %s 1 :%s", servername, servername);
- raw("NICK %S 1 %d +w %s %s %s 0 :GameServ", time(NULL), gsident, gshost,
- servername);
+ raw("NICK %S 1 %d +w%s %s %s %s 0 :GameServ", time(NULL), (isBOper() ? "o" : ""),
+ gsident, gshost, servername);
raw(":%s SJOIN %d %d %s +nt :@%S", servername, time(NULL), time(NULL), c_Forest);
#elif defined(HYBRID)
raw("PASS %s :TS", remotepass);
raw("SERVER %s 1 :%s", servername, servername);
- raw("NICK %S 1 %d +w %s %s %s :GameServ", time(NULL), gsident, gshost,
- servername);
+ raw("NICK %S 1 %d +w%s %s %s %s :GameServ", time(NULL), (isBOper() ? "o" : ""),
+ gsident, gshost, servername);
raw(":%s SJOIN %ld %s +nt :@%S", servername, time(NULL), c_Forest);
#elif defined(P10)
// Server numeric is: [] <-- must be unique
raw("PASS :%s", remotepass);
raw("SERVER %s 1 %d %d P10 []AAF :%s", servername, time(NULL), time(NULL), servername);
- raw("[] N %S 1 %d %s %s DAqAoB %s :%S", time(NULL), gsident, gshost, gsnum);
+ raw("[] N %S 1 %d %s %s %s DAqAoB %s :%S", time(NULL), gsident, gshost,
+ (isBOper() ? "+o" : "") gsnum);
raw("[] B %s %d +tn %s:o", c_Forest, time(NULL) - 864000, gsnum);
#endif
temp = clients[hv].insertAtBack(newuser);
- #ifdef HYBRID
+ #if defined(HYBRID) || defined(BAHAMUT)
char *nickserver;
strtok(NULL, " ");
strtok(NULL, " ");
}
#if defined(P10)
} else if (stricmp(cmd, "Q") == 0) {
- unsigned long hv = sHASH((unsigned char *) source);
+// unsigned long hv = sHASH((unsigned char *) source);
#else
} else if (stricmp(cmd, "QUIT") == 0) {
- unsigned long hv = iHASH((unsigned char *) source);
+// unsigned long hv = iHASH((unsigned char *) source);
#endif
aClient *quitter;
char z = source[0];
delete [] longname;
gameserv(source, rest);
}
- else if (stricmp(dest, c_Forest) == 0 && listenonc_forest)
+ else if (stricmp(dest, c_Forest) == 0 && isListenOnCF())
{
delete [] longname;
forest(source, rest);