summaryrefslogtreecommitdiff
path: root/src/messages.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-06-01 21:51:00 -0400
committerAdam <Adam@anope.org>2013-06-01 21:56:52 -0400
commit9956da18e3186591b5347e63081756390f4f35d5 (patch)
tree61992e9d8b370cec2785db1ea281175359088cc3 /src/messages.cpp
parentb56e71ab14b020a3a01f1fbd183382083156aaf4 (diff)
Move OnJoinChannel event to trigger after the user has completely joined and document it more about what you should and shouldnt do in it
Diffstat (limited to 'src/messages.cpp')
-rw-r--r--src/messages.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/messages.cpp b/src/messages.cpp
index ce92841e6..fcaeffa43 100644
--- a/src/messages.cpp
+++ b/src/messages.cpp
@@ -128,18 +128,18 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co
User *u = it->second;
/* Add the user to the channel */
- ChanUserContainer *cc = c->JoinUser(u);
+ c->JoinUser(u, keep_their_modes ? &status : NULL);
- /* Update their status internally on the channel */
- if (keep_their_modes)
- cc->status = status;
+ /* Check if the user is allowed to join */
+ if (c->CheckKick(u))
+ continue;
/* Set whatever modes the user should have, and remove any that
* they aren't allowed to have (secureops etc).
*/
c->SetCorrectModes(u, true);
-
- c->CheckKick(u);
+
+ FOREACH_MOD(OnJoinChannel, (u, c));
}
/* Channel is done syncing */