diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-01-22 14:17:15 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-01-22 14:17:15 +0000 |
commit | ad3825303f9d3c82dd0cf03d7b10e9d1f75615a9 (patch) | |
tree | 871c47788cde322ed79a6d8187a3516a84f37da6 | |
parent | ee80c158465a01e7d9840de418b652090aaac36b (diff) |
Small fix: don't set default modes when joining if usercount == 0, set if it was actually created locally - this is needed due to +P.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10976 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/channels.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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); } |