X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_chghost.cpp;h=fdb438c91a2eaebcd2711b2f6f8f4da6a9e676b9;hb=d54fd9b1e6b31f69332a9241b5f17330c0ad61e0;hp=d4e7edb516728e5d71602e166ba64115d2093b97;hpb=d0b4bb3811458aa335857514e4cbb95d5c84f433;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index d4e7edb51..fdb438c91 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -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 = " "; @@ -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); }