]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_remove.cpp
Socket engine tweaks to fix a glitch, and improvements to new m_ident
[user/henk/code/inspircd.git] / src / modules / m_remove.cpp
index 600a75d3ddcf4e12d3366346cd9d4a48a5950156..22e4b64906f06aec088e35407fe83268f0972347 100644 (file)
@@ -69,12 +69,12 @@ class RemoveBase
                }
        }
        
-       CmdResult Handle (const char** parameters, int pcnt, userrec *user, bool neworder)
+       CmdResult Handle (const char** parameters, int pcnt, User *user, bool neworder)
        {
                const char* channame;
                const char* username;
-               userrec* target;
-               chanrec* channel;
+               User* target;
+               Channel* channel;
                ModeLevel tlevel;
                ModeLevel ulevel;
                std::string reason;
@@ -149,7 +149,7 @@ class RemoveBase
                        tlevel = chartolevel(channel->GetPrefixChar(target));
                }
                
-               hasnokicks = (ServerInstance->FindModule("m_nokicks.so") && channel->IsModeSet('Q'));
+               hasnokicks = (ServerInstance->Modules->Find("m_nokicks.so") && channel->IsModeSet('Q'));
                
                /* We support the +Q channel mode via. the m_nokicks module, if the module is loaded and the mode is set then disallow the /remove */
                if ((!IS_LOCAL(user)) || (!supportnokicks || !hasnokicks || (ulevel == ULINE)))
@@ -203,16 +203,17 @@ class RemoveBase
 
 /** Handle /REMOVE
  */
-class cmd_remove : public command_t, public RemoveBase
+class cmd_remove : public Command, public RemoveBase
 {
  public:
-       cmd_remove(InspIRCd* Instance, bool& snk) : command_t(Instance, "REMOVE", 0, 2), RemoveBase(Instance, snk)
+       cmd_remove(InspIRCd* Instance, bool& snk) : Command(Instance, "REMOVE", 0, 2), RemoveBase(Instance, snk)
        {
                this->source = "m_remove.so";
                syntax = "<nick> <channel> [<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)
        {
                return RemoveBase::Handle(parameters, pcnt, user, false);
        }
@@ -220,16 +221,16 @@ class cmd_remove : public command_t, public RemoveBase
 
 /** Handle /FPART
  */
-class cmd_fpart : public command_t, public RemoveBase
+class cmd_fpart : public Command, public RemoveBase
 {
  public:
-       cmd_fpart(InspIRCd* Instance, bool& snk) : command_t(Instance, "FPART", 0, 2), RemoveBase(Instance, snk)
+       cmd_fpart(InspIRCd* Instance, bool& snk) : Command(Instance, "FPART", 0, 2), RemoveBase(Instance, snk)
        {
                this->source = "m_remove.so";
                syntax = "<channel> <nick> [<reason>]";
        }
 
-       CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+       CmdResult Handle (const char** parameters, int pcnt, User *user)
        {
                return RemoveBase::Handle(parameters, pcnt, user, true);
        }
@@ -263,7 +264,7 @@ class ModuleRemove : public Module
                output.append(" REMOVE");
        }
        
-       virtual void OnRehash(userrec* user, const std::string&)
+       virtual void OnRehash(User* user, const std::string&)
        {
                ConfigReader conf(ServerInstance);
                supportnokicks = conf.ReadFlag("remove", "supportnokicks", 0);