]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_list.cpp
Fix passing wrong instance to resolver
[user/henk/code/inspircd.git] / src / cmd_list.cpp
index f08e56d20b0b121a4a9158034d7f88f37b8a4879..3dbb3c2e28864b6a4bd1abcf23afecf746097f0d 100644 (file)
 #include "ctables.h"
 #include "commands.h"
 #include "helperfuncs.h"
+#include "inspircd.h"
 #include "commands/cmd_list.h"
 
-extern chan_hash chanlist;
+extern InspIRCd* ServerInstance;
 
 void cmd_list::Handle (const char** parameters, int pcnt, userrec *user)
 {
        user->WriteServ("321 %s Channel :Users Name",user->nick);
-       for (chan_hash::const_iterator i = chanlist.begin(); i != chanlist.end(); i++)
+       for (chan_hash::const_iterator i = ServerInstance->chanlist.begin(); i != ServerInstance->chanlist.end(); i++)
        {
                // if the channel is not private/secret, OR the user is on the channel anyway
                bool n = i->second->HasUser(user);
                if (((!(i->second->modes[CM_PRIVATE])) && (!(i->second->modes[CM_SECRET]))) || (n))
                {
-                       long users = usercount(i->second);
+                       long users = i->second->GetUserCounter();
                        if (users)
                                user->WriteServ("322 %s %s %d :[+%s] %s",user->nick,i->second->name,users,chanmodes(i->second,n),i->second->topic);
                }