X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fchannels.cpp;h=838013c4c808d4b62c284496565b1a7aacb03abe;hb=2fe61d7d9519056705f1eeb2842a2a0042010172;hp=b9dad3a7c46e1e83af5f22e5b494e7d4da17bd2a;hpb=db3e7d6cd7a3d46d054b6f7169c93af3619e8105;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/channels.cpp b/src/channels.cpp index b9dad3a7c..838013c4c 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -184,6 +184,7 @@ CUList* Channel::GetVoicedUsers() void Channel::SetDefaultModes() { + ServerInstance->Logs->Log("CHANNELS", DEBUG, "SetDefaultModes %s", ServerInstance->Config->DefaultModes); irc::spacesepstream list(ServerInstance->Config->DefaultModes); std::string modeseq; std::string parameter; @@ -357,7 +358,7 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool } /* As spotted by jilles, dont bother to set this on remote users */ - if (IS_LOCAL(user) && Ptr->GetUserCounter() == 1) + if (IS_LOCAL(user) && Ptr->GetUserCounter() == 0) Ptr->SetDefaultModes(); return Channel::ForceChan(Instance, Ptr, user, privs, bursting); @@ -432,7 +433,10 @@ bool Channel::IsBanned(User* user) char mask[MAXBUF]; int MOD_RESULT = 0; FOREACH_RESULT(I_OnCheckBan,OnCheckBan(user, this)); - if (!MOD_RESULT) + + if (MOD_RESULT == -1) + return true; + else if (MOD_RESULT == 0) { snprintf(mask, MAXBUF, "%s!%s@%s", user->nick, user->ident, user->GetIPString()); for (BanList::iterator i = this->bans.begin(); i != this->bans.end(); i++)