]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_eline.cpp
InspSocket -> BufferedSocket. Paves the way for a SimpleSocket class which ident...
[user/henk/code/inspircd.git] / src / cmd_eline.cpp
index 981a10f32cfc6e15b18944dc87653ed276626a76..6a4db99dd3e80c987b717f2fcb7d03fc85e7e6e7 100644 (file)
  */
 
 #include "inspircd.h"
-#include "configreader.h"
-#include "users.h"
-#include "modules.h"
 #include "xline.h"
 #include "commands/cmd_eline.h"
 
-extern "C" DllExport command_t* init_command(InspIRCd* Instance)
+extern "C" DllExport Command* init_command(InspIRCd* Instance)
 {
        return new cmd_eline(Instance);
 }
 
 /** Handle /ELINE
  */
-CmdResult cmd_eline::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_eline::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],'@'))