]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_qline.cpp
Merge pull request #16 from Adam-/insp20
[user/henk/code/inspircd.git] / src / commands / cmd_qline.cpp
index ebd1d6b3158662578165303235a4626e047aebe4..d03c79d5da211956d1cfbcb540482f6c4fe2ca3b 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
 
 #include "inspircd.h"
 #include "xline.h"
-/*       +------------------------------------+
- *       | Inspire Internet Relay Chat Daemon |
- *       +------------------------------------+
- *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
- *
- * This program is free but copyrighted software; see
- *      the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef __CMD_QLINE_H__
-#define __CMD_QLINE_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
 
-/** Handle /QLINE. These command handlers can be reloaded by the core,
- * and handle basic RFC1459 commands. Commands within modules work
- * the same way, however, they can be fully unloaded, where these
- * may not.
- */
+/** Handle /QLINE.  */
 class CommandQline : public Command
 {
  public:
        /** Constructor for qline.
         */
-       CommandQline (InspIRCd* Instance, Module* parent) : Command(Instance,parent,"QLINE","o",1,3,false,0) { syntax = "<nick> [<duration> :<reason>]"; }
+       CommandQline ( Module* parent) : Command(parent,"QLINE",1,3) { flags_needed = 'o'; Penalty = 0; syntax = "<nick> [<duration> :<reason>]"; }
        /** Handle command.
         * @param parameters The parameters to the comamnd
-        * @param pcnt The number of parameters passed to teh command
+        * @param pcnt The number of parameters passed 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);
 };
 
-#endif
-
-
-
 
 CmdResult CommandQline::Handle (const std::vector<std::string>& parameters, User *user)
 {
@@ -73,7 +45,7 @@ CmdResult CommandQline::Handle (const std::vector<std::string>& parameters, User
                }
 
                long duration = ServerInstance->Duration(parameters[1].c_str());
-               QLine* ql = new QLine(ServerInstance, ServerInstance->Time(), duration, user->nick.c_str(), parameters[2].c_str(), parameters[0].c_str());
+               QLine* ql = new QLine(ServerInstance->Time(), duration, user->nick.c_str(), parameters[2].c_str(), parameters[0].c_str());
                if (ServerInstance->XLines->AddLine(ql,user))
                {
                        if (!duration)
@@ -98,7 +70,7 @@ CmdResult CommandQline::Handle (const std::vector<std::string>& parameters, User
        {
                if (ServerInstance->XLines->DelLine(parameters[0].c_str(), "Q", user))
                {
-                       ServerInstance->SNO->WriteToSnoMask('x',"%s Removed Q-line on %s.",user->nick.c_str(),parameters[0].c_str());
+                       ServerInstance->SNO->WriteToSnoMask('x',"%s removed Q-line on %s",user->nick.c_str(),parameters[0].c_str());
                }
                else
                {