#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 = "<ident@host> [<duration> :<reason>]"; }
- /** 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<std::string>& parameters, User *user);
-};
-
+ flags_needed = 'o';
+ Penalty = 0;
+ syntax = "<ident@host> [<duration> :<reason>]";
+}
/** Handle /GLINE
*/
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)
return CMD_SUCCESS;
}
-
-COMMAND_INIT(CommandGline)