]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chghost.cpp
Wahhhhhhhhhhhh bwahahaha. Mass commit to tidy up tons of messy include lists
[user/henk/code/inspircd.git] / src / modules / m_chghost.cpp
index d4e7edb516728e5d71602e166ba64115d2093b97..fdb438c91a2eaebcd2711b2f6f8f4da6a9e676b9 100644 (file)
@@ -21,17 +21,17 @@ using namespace std;
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
-#include "helperfuncs.h"
+
 #include "inspircd.h"
 
 /* $ModDesc: Provides support for the CHGHOST command */
 
-extern InspIRCd* ServerInstance;
+
 
 class cmd_chghost : public command_t
 {
  public:
      cmd_chghost () : command_t("CHGHOST",'o',2)
cmd_chghost (InspIRCd* Instance) : command_t(Instance,"CHGHOST",'o',2)
        {
                this->source = "m_chghost.so";
                syntax = "<nick> <newhost>";
@@ -60,7 +60,7 @@ class cmd_chghost : public command_t
                userrec* dest = ServerInstance->FindNick(parameters[0]);
                if (dest)
                {
-                       if ((dest->ChangeDisplayedHost(parameters[1])) && (!ServerInstance->IsUlined(user->server)))
+                       if ((dest->ChangeDisplayedHost(parameters[1])) && (!ServerInstance->ULine(user->server)))
                        {
                                // fix by brain - ulines set hosts silently
                                ServerInstance->WriteOpers(std::string(user->nick)+" used CHGHOST to make the displayed host of "+dest->nick+" become "+parameters[1]);
@@ -78,7 +78,7 @@ class ModuleChgHost : public Module
                : Module::Module(Me)
        {
                
-               mycommand = new cmd_chghost();
+               mycommand = new cmd_chghost(ServerInstance);
                ServerInstance->AddCommand(mycommand);
        }