From 2ab4f175a8ff96355bbb58302eee87138577a3c5 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 25 Apr 2014 16:20:23 -0400 Subject: Don't allow users to join channels they are already in --- src/messages.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- cgit