X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_remove.cpp;h=354fe7a8d89f567509d7ba40a66eae12ac0df8b0;hb=dafc021be4f3ad34ca37953de6a0109a161dd165;hp=a9c478a8914c097de705d710b3a41bbbf83f66ab;hpb=fea1a27cb96a114f698eedcf90401b78406108fb;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index a9c478a89..354fe7a8d 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -7,6 +7,7 @@ #include "channels.h" #include "modules.h" #include "helperfuncs.h" +#include "inspircd.h" /* $ModDesc: Provides a /remove command, this is mostly an alternative to /kick, except makes users appear to have parted the channel */ @@ -16,6 +17,8 @@ * eg: +h can remove +hv and users with no modes. +a can remove +aohv and users with no modes. */ +extern InspIRCd* ServerInstance; + class RemoveBase { private: @@ -84,10 +87,10 @@ class RemoveBase username = parameters[ neworder ? 1 : 0]; /* Look up the user we're meant to be removing from the channel */ - target = Srv->FindNick(username); + target = ServerInstance->FindNick(username); /* And the channel we're meant to be removing them from */ - channel = Srv->FindChannel(channame); + channel = ServerInstance->FindChan(channame); /* Fix by brain - someone needs to learn to validate their input! */ if (!target || !channel) @@ -124,8 +127,8 @@ class RemoveBase } else { - log(DEBUG, "Setting ulevel to %s", Srv->ChanMode(user, channel).c_str()); - ulevel = chartolevel(Srv->ChanMode(user, channel)); + log(DEBUG, "Setting ulevel to %s", channel->GetStatusChar(user)); + ulevel = chartolevel(channel->GetStatusChar(user)); } /* Now it's the same idea, except for the target. If they're ulined make sure they get a higher level than the sender can */ @@ -146,8 +149,8 @@ class RemoveBase } else { - log(DEBUG, "Setting tlevel to %s", Srv->ChanMode(target, channel).c_str()); - tlevel = chartolevel(Srv->ChanMode(target, channel)); + log(DEBUG, "Setting tlevel to %s", channel->GetStatusChar(target)); + tlevel = chartolevel(channel->GetStatusChar(target)); } hasnokicks = (Srv->FindModule("m_nokicks.so") && channel->IsModeSet('Q'));