+ 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)
{
char* pingrpl = RandString(10);
virtual int OnUserRegister(userrec* user)
{
char* pingrpl = RandString(10);
@@ -72,7+73,7 @@ class ModuleWaitPong : public Module
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);
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->Extend(extenstr, pingrpl);
return 0;
}
return 0;
}
@@ -81,14+82,14 @@ class ModuleWaitPong : public Module
if(command == "PONG")
{
char* pingrpl;
if(command == "PONG")
{
char* pingrpl;
- user->GetExt("waitpong_pingstr", pingrpl);
+ user->GetExt(extenstr, pingrpl);
if(pingrpl)
{
if(strcmp(pingrpl, parameters[0]) == 0)
{
DELETE(pingrpl);
if(pingrpl)
{
if(strcmp(pingrpl, parameters[0]) == 0)
{
DELETE(pingrpl);
- user->Shrink("waitpong_pingstr");
+ user->Shrink(extenstr);
return 1;
}
else
return 1;
}
else
@@ -99,25+100,24 @@ class ModuleWaitPong : public Module