]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_kline.cpp
InspSocket -> BufferedSocket. Paves the way for a SimpleSocket class which ident...
[user/henk/code/inspircd.git] / src / cmd_kline.cpp
index 90ddca55c454aa97a4f709305fca7c8f772403e2..5dbdf2b2e584522f25110c4ccf0bd8c5f3ab310f 100644 (file)
  */
 
 #include "inspircd.h"
-#include "configreader.h"
-#include "users.h"
-#include "modules.h"
 #include "xline.h"
 #include "commands/cmd_kline.h"
 
-extern "C" DllExport command_t* init_command(InspIRCd* Instance)
+extern "C" DllExport Command* init_command(InspIRCd* Instance)
 {
        return new cmd_kline(Instance);
 }
 
 /** Handle /KLINE
  */
-CmdResult cmd_kline::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_kline::Handle (const char** parameters, int pcnt, User *user)
 {
        if (pcnt >= 3)
        {
-               if (ServerInstance->HostMatchesEveryone(parameters[0],user))
+               IdentHostPair ih = ServerInstance->XLines->IdentSplit(parameters[0]);
+               if (ServerInstance->HostMatchesEveryone(ih.first+"@"+ih.second,user))
                        return CMD_FAILURE;
 
                if (!strchr(parameters[0],'@'))