]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_conn_waitpong.cpp
Sort CAPAB CHANMODES and USERMODES
[user/henk/code/inspircd.git] / src / modules / m_conn_waitpong.cpp
index 362835c6db0c8cba1845ca28a07dce220b682c8c..00b728b51dbf9c20162a84d0c95207073591b869 100644 (file)
@@ -2,7 +2,7 @@
  *       | 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
@@ -45,19 +45,9 @@ class ModuleWaitPong : public Module
                        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());
 
@@ -68,7 +58,7 @@ class ModuleWaitPong : public Module
                return MOD_RES_PASSTHRU;
        }
 
-       ModResult OnPreCommand(std::string &command, std::vector<std::string> &parameters, User* user, bool validated, const std::string &original_line)
+       ModResult OnPreCommand(std::string &command, std::vector<std::string> &parameters, LocalUser* user, bool validated, const std::string &original_line)
        {
                if (command == "PONG")
                {