OnRehash("");
}
- virtual void OnRehash(std::string parameter)
+ virtual void OnRehash(const std::string ¶meter)
{
// on a rehash we delete our classes for good measure and create them again.
delete Conf;
return false;
}
- virtual int OnUserPreKick(userrec* source, userrec* user, chanrec* chan, std::string reason)
+ virtual int OnUserPreKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason)
{
if ((*source->oper) && (CanOverride(source,"KICK")))
{
{
// Fix by brain - allow the change if they arent on channel - rely on boolean short-circuit
// to not check the other items in the statement if they arent on the channel
- if ((!Srv->IsOnChannel(source,channel)) || ((Srv->ChanMode(source,channel) != "%") && (Srv->ChanMode(source,channel) != "@")))
+ std::string mode = Srv->ChanMode(source,channel);
+ if ((!channel->HasUser(source)) || ((mode != "%") && (mode != "@")))
{
switch (access_type)
{
{
if (chan)
{
- if ((chan->binarymodes & CM_INVITEONLY) && (CanOverride(user,"INVITE")))
+ if ((chan->modes[CM_INVITEONLY]) && (CanOverride(user,"INVITE")))
{
if (NoisyOverride)
{