]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_tline.cpp
Allow configuring whether SETNAME sends snotices and is oper-only.
[user/henk/code/inspircd.git] / src / modules / m_tline.cpp
index 64beb31203c5db6adcd5a7425cf238af80b88b7b..692472e117fa1180f8e302f40455bea0e054f5d5 100644 (file)
@@ -30,13 +30,14 @@ class CommandTline : public Command
                flags_needed = 'o'; this->syntax = "<mask>";
        }
 
-       CmdResult Handle (const std::vector<std::string> &parameters, User *user)
+       CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE
        {
                unsigned int n_matched = 0;
                unsigned int n_match_host = 0;
                unsigned int n_match_ip = 0;
 
-               for (user_hash::const_iterator u = ServerInstance->Users->clientlist->begin(); u != ServerInstance->Users->clientlist->end(); u++)
+               const user_hash& users = ServerInstance->Users->GetUsers();
+               for (user_hash::const_iterator u = users.begin(); u != users.end(); ++u)
                {
                        if (InspIRCd::Match(u->second->GetFullRealHost(),parameters[0]))
                        {
@@ -54,7 +55,7 @@ class CommandTline : public Command
                        }
                }
 
-               unsigned long n_counted = ServerInstance->Users->clientlist->size();
+               unsigned long n_counted = users.size();
                if (n_matched)
                {
                        float p = (n_matched / (float)n_counted) * 100;