]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_svshold.cpp
More AddModes fixes
[user/henk/code/inspircd.git] / src / modules / m_svshold.cpp
index 61665508540a1e5bbe6f07156cc06772d1410d52..3eff54cabc1a0132e11c283b40ab9494f435dd94 100644 (file)
  */
 
 #include "inspircd.h"
-#include <algorithm>
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
-#include "configreader.h"
 
 /* $ModDesc: Implements SVSHOLD. Like Q:Lines, but can only be added/removed by Services. */
 
@@ -52,16 +47,17 @@ SVSHoldMap HoldMap;
 
 /** Handle /SVSHold
  */
-class cmd_svshold : public command_t
+class CommandSvshold : public Command
 {
  public:
-       cmd_svshold(InspIRCd* Me) : command_t(Me, "SVSHOLD", 'o', 1)
+       CommandSvshold(InspIRCd* Me) : Command(Me, "SVSHOLD", 'o', 1)
        {
                this->source = "m_svshold.so";
                this->syntax = "<nickname> [<duration> :<reason>]";
+               TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END);
        }
 
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user)
+       CmdResult Handle(const char** parameters, int pcnt, User *user)
        {
                /* syntax: svshold nickname time :reason goes here */
                /* 'time' is a human-readable timestring, like 2d3h2s. */
@@ -155,13 +151,13 @@ bool SVSHoldComp(const SVSHold* ban1, const SVSHold* ban2)
 
 class ModuleSVSHold : public Module
 {
-       cmd_svshold *mycommand;
+       CommandSvshold *mycommand;
        
 
  public:
        ModuleSVSHold(InspIRCd* Me) : Module(Me)
        {
-               mycommand = new cmd_svshold(Me);
+               mycommand = new CommandSvshold(Me);
                ServerInstance->AddCommand(mycommand);
        }
 
@@ -170,7 +166,7 @@ class ModuleSVSHold : public Module
                List[I_OnUserPreNick] = List[I_OnSyncOtherMetaData] = List[I_OnDecodeMetaData] = List[I_OnStats] = 1;
        }
        
-       virtual int OnStats(char symbol, userrec* user, string_list &results)
+       virtual int OnStats(char symbol, User* user, string_list &results)
        {
                ExpireBans();
        
@@ -186,7 +182,7 @@ class ModuleSVSHold : public Module
                return 0;
        }
 
-       virtual int OnUserPreNick(userrec *user, const std::string &newnick)
+       virtual int OnUserPreNick(User *user, const std::string &newnick)
        {
                ExpireBans();