X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fchannels.cpp;h=f49d359cd27f778c4a599948e51265ee05a7d0ea;hb=0c9a94ea9285d1094c031d0c4ed06326b99cf890;hp=77b7f81db21281f835f104fce93bcfec68e1a230;hpb=854af2945eb6b9b62c19e3c823d3bcc8a84e52ae;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/channels.cpp b/src/channels.cpp index 77b7f81db..f49d359cd 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -25,8 +25,6 @@ #include "inspircd.h" #include "listmode.h" -#include -#include "mode.h" namespace { @@ -292,17 +290,17 @@ Channel* Channel::JoinUser(LocalUser* user, std::string cname, bool override, co return chan; } -void Channel::ForceJoin(User* user, const std::string* privs, bool bursting, bool created_by_local) +Membership* Channel::ForceJoin(User* user, const std::string* privs, bool bursting, bool created_by_local) { if (IS_SERVER(user)) { ServerInstance->Logs->Log("CHANNELS", LOG_DEBUG, "Attempted to join server user " + user->uuid + " to channel " + this->name); - return; + return NULL; } Membership* memb = this->AddUser(user); if (!memb) - return; // Already on the channel + return NULL; // Already on the channel user->chans.push_front(memb); @@ -350,6 +348,7 @@ void Channel::ForceJoin(User* user, const std::string* privs, bool bursting, boo } FOREACH_MOD(OnPostJoin, (memb)); + return memb; } bool Channel::IsBanned(User* user)