]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_check.cpp
Change allocation of UserManager::clientlist to be physically part of the object...
[user/henk/code/inspircd.git] / src / modules / m_check.cpp
index 84e147f7b88979ddf630edbd332d75245c31806f..d7cfe74bd50bf2ff4505aae97b6e426070c9f3a7 100644 (file)
@@ -126,7 +126,7 @@ class CommandCheck : public Command
                        user->SendText(checkstr + " realname " + targuser->fullname);
                        user->SendText(checkstr + " modes +" + targuser->FormatModes());
                        user->SendText(checkstr + " snomasks " + GetSnomasks(targuser));
-                       user->SendText(checkstr + " server " + targuser->server);
+                       user->SendText(checkstr + " server " + targuser->server->GetName());
                        user->SendText(checkstr + " uid " + targuser->uuid);
                        user->SendText(checkstr + " signon " + timestring(targuser->signon));
                        user->SendText(checkstr + " nickts " + timestring(targuser->age));
@@ -192,8 +192,10 @@ class CommandCheck : public Command
 
                        for (UCListIter i = targuser->chans.begin(); i != targuser->chans.end(); i++)
                        {
-                               Channel* c = *i;
-                               chliststr.append(c->GetPrefixChar(targuser)).append(c->name).append(" ");
+                               Membership* memb = *i;
+                               Channel* c = memb->chan;
+                               chliststr.push_back(memb->GetPrefixChar());
+                               chliststr.append(c->name).push_back(' ');
                        }
 
                        std::stringstream dump(chliststr);
@@ -230,7 +232,7 @@ class CommandCheck : public Command
                                 */
                                user->SendText("%s member %-3lu %s%s (%s@%s) %s ",
                                        checkstr.c_str(), ServerInstance->Users->GlobalCloneCount(i->first),
-                                       targchan->GetAllPrefixChars(i->first), i->first->nick.c_str(),
+                                       i->second->GetAllPrefixChars(), i->first->nick.c_str(),
                                        i->first->ident.c_str(), i->first->dhost.c_str(), i->first->fullname.c_str());
                        }
 
@@ -246,7 +248,8 @@ class CommandCheck : public Command
                        long x = 0;
 
                        /* hostname or other */
-                       for (user_hash::const_iterator a = ServerInstance->Users->clientlist->begin(); a != ServerInstance->Users->clientlist->end(); a++)
+                       const user_hash& users = ServerInstance->Users->GetUsers();
+                       for (user_hash::const_iterator a = users.begin(); a != users.end(); ++a)
                        {
                                if (InspIRCd::Match(a->second->host, parameters[0], ascii_case_insensitive_map) || InspIRCd::Match(a->second->dhost, parameters[0], ascii_case_insensitive_map))
                                {