if (sock_gets(sock,buffer,sizeof(buffer)) == -1) {
while (connected) {
if (sock_gets(sock,buffer,sizeof(buffer)) == -1) {
@@ -106,6+111,14 @@ int main(int argc, char *argv[])
cmd = strtok(buf, " ");
cout << "Server: " << buffer << endl << flush;
cmd = strtok(buf, " ");
cout << "Server: " << buffer << endl << flush;
+
+ // Wait five seconds then we're loaded.
+ if (!loaded)
+ {
+ if (time(NULL) >= 5 + loadtime)
+ loaded = true;
+ }
+
if (stricmp(cmd, "PING") == 0) {
char *timestamp;
timestamp = strtok(NULL, "");
if (stricmp(cmd, "PING") == 0) {
char *timestamp;
timestamp = strtok(NULL, "");
@@ -127,6+140,9 @@ int main(int argc, char *argv[])
aClient *newuser;
nick = strtok(NULL, " ");
newuser = new aClient(nick);
aClient *newuser;
nick = strtok(NULL, " ");
newuser = new aClient(nick);
+ if (loaded)
+ notice(s_GameServ, nick, "Hello, %s! This network utilizes a services package called GameServ. For info on how to play the game, type /msg %S help.");