+ unsigned char* out = new unsigned char[length+1];
+ for(unsigned int i = 0; i < length; i++)
+ out[i] = ((rand() % 26) + 65);
+ out[length] = '\0';
+
+ return (char*)out;
}
}
- virtual int OnUserRegister(userrec* user)
+ virtual int OnUserRegister(User* user)
{
char* pingrpl = RandString(10);
{
char* pingrpl = RandString(10);
-
+
user->Write("PING :%s", pingrpl);
user->Write("PING :%s", pingrpl);
-
+
if(sendsnotice)
if(sendsnotice)
- user->WriteServ("NOTICE %s :*** If you are having problems connecting due to ping timeouts, please type /quote PONG %s or /raw PONG %s now.", user->nick, pingrpl, pingrpl);
-
- user->Extend("waitpong_pingstr", pingrpl);
+ user->WriteServ("NOTICE %s :*** If you are having problems connecting due to ping timeouts, please type /quote PONG %s or /raw PONG %s now.", user->nick.c_str(), pingrpl, pingrpl);
+
+ user->Extend(extenstr, pingrpl);
return 0;
}
return 0;
}
-
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec* user, bool validated, const std::string &original_line)