]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_tline.cpp
Change module versions to use a string instead of fixed digits, and use propset ID...
[user/henk/code/inspircd.git] / src / modules / m_tline.cpp
index 79f9dff3c9dc99c45eeddc3104b0b947ea0c4e82..c249f3b3ba7f5ba8ad05bf8beac92b904822ab07 100644 (file)
  */
 
 #include "inspircd.h"
-#include "wildcard.h"
 
 /* $ModDesc: Provides /tline command used to test who a mask matches */
 
 /** Handle /TLINE
- */ 
+ */
 class CommandTline : public Command
 {
  public:
@@ -37,7 +36,7 @@ class CommandTline : public Command
                for (user_hash::const_iterator u = ServerInstance->Users->clientlist->begin(); u != ServerInstance->Users->clientlist->end(); u++)
                {
                        n_counted++;
-                       if (match(u->second->GetFullRealHost(),parameters[0]))
+                       if (InspIRCd::Match(u->second->GetFullRealHost(),parameters[0]))
                        {
                                n_matched++;
                                n_match_host++;
@@ -45,7 +44,7 @@ class CommandTline : public Command
                        else
                        {
                                std::string host = std::string(u->second->ident) + "@" + u->second->GetIPString();
-                               if (match(host, parameters[0], true))
+                               if (InspIRCd::MatchCIDR(host, parameters[0]))
                                {
                                        n_matched++;
                                        n_match_ip++;
@@ -57,7 +56,7 @@ class CommandTline : public Command
                else
                        user->WriteServ( "NOTICE %s :*** TLINE: Counted %0.0f user(s). Matched '%s' against no user(s).", user->nick.c_str(), n_counted, parameters[0].c_str());
 
-               return CMD_LOCALONLY;                   
+               return CMD_LOCALONLY;
        }
 };
 
@@ -68,7 +67,7 @@ class ModuleTLine : public Module
        ModuleTLine(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                newcommand = new CommandTline(ServerInstance);
                ServerInstance->AddCommand(newcommand);
 
@@ -78,7 +77,7 @@ class ModuleTLine : public Module
        virtual ~ModuleTLine()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_VENDOR,API_VERSION);