* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2010 InspIRCd Development Team
* See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
killonbadreply = true;
}
- std::string RandString()
- {
- char out[11];
- for(unsigned int i = 0; i < 10; i++)
- out[i] = ((rand() % 26) + 65);
- out[10] = '\0';
-
- return out;
- }
-
ModResult OnUserRegister(LocalUser* user)
{
- std::string pingrpl = RandString();
+ std::string pingrpl = ServerInstance->GenRandomStr(10);
user->Write("PING :%s", pingrpl.c_str());
return MOD_RES_PASSTHRU;
}
- ModResult OnPreCommand(std::string &command, std::vector<std::string> ¶meters, User* user, bool validated, const std::string &original_line)
+ ModResult OnPreCommand(std::string &command, std::vector<std::string> ¶meters, LocalUser* user, bool validated, const std::string &original_line)
{
if (command == "PONG")
{