#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 */
* 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:
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)
}
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 */
}
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'));