summaryrefslogtreecommitdiff
path: root/src/messages.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-04-25 16:20:23 -0400
committerAdam <Adam@anope.org>2014-04-25 16:20:23 -0400
commit2ab4f175a8ff96355bbb58302eee87138577a3c5 (patch)
tree08e1c95ffc76fda30f712f497044b70d5c82f9c9 /src/messages.cpp
parentc9473bcc67e0259b0aa79c95424e6fc044777ccc (diff)
Don't allow users to join channels they are already in
Diffstat (limited to 'src/messages.cpp')
-rw-r--r--src/messages.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/messages.cpp b/src/messages.cpp
index bb699a18e..97f0dd968 100644
--- a/src/messages.cpp
+++ b/src/messages.cpp
@@ -128,6 +128,9 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co
User *u = it->second;
keep_their_modes = ts <= c->creation_time; // OnJoinChannel can call modules which can modify this channel's ts
+ if (c->FindUser(u))
+ continue;
+
/* Add the user to the channel */
c->JoinUser(u, keep_their_modes ? &status : NULL);