From 312d49abb008dccf9871b663decaa1bacf18c20a Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 11 Aug 2006 11:06:40 +0000 Subject: Move all of the xline stuff into class XLineManager, make an instance of it in class InspIRCd and use it (eliminates another extern) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4878 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_qline.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/cmd_qline.cpp') diff --git a/src/cmd_qline.cpp b/src/cmd_qline.cpp index 90e3c99fc..c82b5f53c 100644 --- a/src/cmd_qline.cpp +++ b/src/cmd_qline.cpp @@ -23,15 +23,13 @@ #include "helperfuncs.h" #include "commands/cmd_qline.h" - - void cmd_qline::Handle (const char** parameters, int pcnt, userrec *user) { if (pcnt >= 3) { if (nick_matches_everyone(parameters[0],user)) return; - add_qline(duration(parameters[1]),user->nick,parameters[2],parameters[0]); + ServerInstance->XLines->add_qline(duration(parameters[1]),user->nick,parameters[2],parameters[0]); FOREACH_MOD(I_OnAddQLine,OnAddQLine(duration(parameters[1]), user, parameters[2], parameters[0])); if (!duration(parameters[1])) { @@ -41,11 +39,11 @@ void cmd_qline::Handle (const char** parameters, int pcnt, userrec *user) { ServerInstance->WriteOpers("*** %s added timed Q-line for %s, expires in %d seconds.",user->nick,parameters[0],duration(parameters[1])); } - apply_lines(APPLY_QLINES); + ServerInstance->XLines->apply_lines(APPLY_QLINES); } else { - if (del_qline(parameters[0])) + if (ServerInstance->XLines->del_qline(parameters[0])) { FOREACH_MOD(I_OnDelQLine,OnDelQLine(user, parameters[0])); ServerInstance->WriteOpers("*** %s Removed Q-line on %s.",user->nick,parameters[0]); -- cgit v1.2.3