]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_check.cpp
m_spanningtree Remove declaration for nonexistent function: OnLine()
[user/henk/code/inspircd.git] / src / modules / m_check.cpp
index c72f88faa404f1a4436056719511406181c390f5..35901f8d5f751ae26371a7cf97eeaf0e28b0f3d3 100644 (file)
@@ -192,8 +192,12 @@ class CommandCheck : public Command
 
                        for (UCListIter i = targuser->chans.begin(); i != targuser->chans.end(); i++)
                        {
-                               Channel* c = (*i)->chan;
-                               chliststr.append(c->GetPrefixChar(targuser)).append(c->name).append(" ");
+                               Membership* memb = *i;
+                               Channel* c = memb->chan;
+                               char prefix = memb->GetPrefixChar();
+                               if (prefix)
+                                       chliststr.push_back(prefix);
+                               chliststr.append(c->name).push_back(' ');
                        }
 
                        std::stringstream dump(chliststr);
@@ -228,9 +232,10 @@ class CommandCheck : public Command
                                /*
                                 * Unlike Asuka, I define a clone as coming from the same host. --w00t
                                 */
-                               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(),
+                               const UserManager::CloneCounts& clonecount = ServerInstance->Users->GetCloneCounts(i->first);
+                               user->SendText("%s member %-3u %s%s (%s@%s) %s ",
+                                       checkstr.c_str(), clonecount.global,
+                                       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 +251,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))
                                {