]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_who.cpp
Fix passing wrong instance to resolver
[user/henk/code/inspircd.git] / src / cmd_who.cpp
index bb4a37234010174b0153d9d9ad10ec889bc1f2ee..de3f30196fae2fc5fb9a5aaa02f250d3ff4681ce 100644 (file)
@@ -23,8 +23,7 @@
 #include "wildcard.h"
 #include "commands/cmd_who.h"
 
-extern ServerConfig* Config;
-extern user_hash clientlist;
+extern InspIRCd* ServerInstance;
 extern chan_hash chanlist;
 extern std::vector<userrec*> all_opers;
 
@@ -196,7 +195,7 @@ void cmd_who::Handle (const char** parameters, int pcnt, userrec *user)
                }
                else
                {
-                       for (user_hash::iterator i = clientlist.begin(); i != clientlist.end(); i++)
+                       for (user_hash::iterator i = ServerInstance->clientlist.begin(); i != ServerInstance->clientlist.end(); i++)
                        {
                                if (whomatch(i->second, matchtext, opt_realname, opt_showrealhost))
                                {
@@ -228,7 +227,7 @@ void cmd_who::Handle (const char** parameters, int pcnt, userrec *user)
                }
        }
        /* Send the results out */
-       if ((whoresults.size() < (size_t)Config->MaxWhoResults) && (!opt_unlimit))
+       if ((whoresults.size() < (size_t)ServerInstance->Config->MaxWhoResults) && (!opt_unlimit))
        {
                for (std::vector<std::string>::const_iterator n = whoresults.begin(); n != whoresults.end(); n++)
                        user->WriteServ(*n);