X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fchannels.cpp;h=4286abfefe9cda30cb6ee644ef866633f2247fb1;hb=5e854d57e3ef1b315e754a38c5f0a1287559cc7e;hp=5f0f545aec3da1f8923a0337e674207666191891;hpb=9b169c24b1c04123bca3a04d08f8519362b87df4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/channels.cpp b/src/channels.cpp index 5f0f545ae..4286abfef 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -278,7 +278,7 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool if (IS_LOCAL(user) && override == false) { MOD_RESULT = 0; - FOREACH_RESULT_I(Instance,I_OnUserPreJoin,OnUserPreJoin(user,NULL,cname,privs)); + FOREACH_RESULT_I(Instance,I_OnUserPreJoin, OnUserPreJoin(user, NULL, cname, privs, key ? key : "")); if (MOD_RESULT == 1) return NULL; } @@ -298,7 +298,7 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool if (IS_LOCAL(user) && override == false) { MOD_RESULT = 0; - FOREACH_RESULT_I(Instance,I_OnUserPreJoin,OnUserPreJoin(user,Ptr,cname,privs)); + FOREACH_RESULT_I(Instance,I_OnUserPreJoin, OnUserPreJoin(user, Ptr, cname, privs, key ? key : "")); if (MOD_RESULT == 1) { return NULL; @@ -433,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++) @@ -959,7 +962,7 @@ long Channel::GetMaxBans() /* If there isnt one, we have to do some O(n) hax to find it the first time. (ick) */ for (std::map::iterator n = ServerInstance->Config->maxbans.begin(); n != ServerInstance->Config->maxbans.end(); n++) { - if (match(this->name,n->first.c_str())) + if (match(this->name,n->first)) { this->maxbans = n->second; return n->second;