X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fchannels.cpp;h=9ed0f8ee400ead02f0390535d9991bc1afad65a8;hb=56c4074af5b848b10623f6bcc63da188038ad037;hp=7a42bccbbb4ba201943cf9926a9022ddfd520a2f;hpb=84af5345c10e05b9ae20774943a4cb6a2cdac38d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/channels.cpp b/src/channels.cpp index 7a42bccbb..9ed0f8ee4 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -296,6 +296,7 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool strlcpy(cname, cn, Instance->Config->Limits.ChanMax); Ptr = Instance->FindChan(cname); + bool created_by_local = false; if (!Ptr) { @@ -310,6 +311,7 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool else { privs = "@"; + created_by_local = true; } if (IS_LOCAL(user) && override == false) @@ -412,9 +414,11 @@ 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() == 0) + if (created_by_local) + { + /* As spotted by jilles, dont bother to set this on remote users */ Ptr->SetDefaultModes(); + } return Channel::ForceChan(Instance, Ptr, user, privs, bursting); }