X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_xline%2Fcmd_gline.cpp;h=3f042c3669de0d8292740a22709971c25d881580;hb=045747290ba1088daf7f70d5d36d0eb4c8ba2b4e;hp=18a661b24ec3f7569a9b327a8743fda8ffd1ec79;hpb=c67d3103e9f7397f0ab9631bf07a5e5547deb2c3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_xline/cmd_gline.cpp b/src/coremods/core_xline/cmd_gline.cpp index 18a661b24..3f042c366 100644 --- a/src/coremods/core_xline/cmd_gline.cpp +++ b/src/coremods/core_xline/cmd_gline.cpp @@ -20,23 +20,15 @@ #include "inspircd.h" #include "xline.h" +#include "core_xline.h" -/** Handle /GLINE. - */ -class CommandGline : public Command +CommandGline::CommandGline(Module* parent) + : Command(parent, "GLINE", 1, 3) { - public: - /** Constructor for gline. - */ - CommandGline (Module* parent) : Command(parent,"GLINE",1,3) { flags_needed = 'o'; Penalty = 0; syntax = " [ :]"; } - /** Handle command. - * @param parameters The parameters to the command - * @param user The user issuing the command - * @return A value from CmdResult to indicate command success or failure. - */ - CmdResult Handle(const std::vector& parameters, User *user); -}; - + flags_needed = 'o'; + Penalty = 0; + syntax = " [ :]"; +} /** Handle /GLINE */ @@ -63,7 +55,8 @@ CmdResult CommandGline::Handle (const std::vector& parameters, User return CMD_FAILURE; } - if (ServerInstance->HostMatchesEveryone(ih.first+"@"+ih.second,user)) + InsaneBan::IPHostMatcher matcher; + if (InsaneBan::MatchesEveryone(ih.first+"@"+ih.second, matcher, user, "G", "hostmasks")) return CMD_FAILURE; else if (target.find('!') != std::string::npos) @@ -111,5 +104,3 @@ CmdResult CommandGline::Handle (const std::vector& parameters, User return CMD_SUCCESS; } - -COMMAND_INIT(CommandGline)