summaryrefslogtreecommitdiff
path: root/modules
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 /modules
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 'modules')
-rw-r--r--modules/pseudoclients/chanserv.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp
index 116d5a5ac..a6871189c 100644
--- a/modules/pseudoclients/chanserv.cpp
+++ b/modules/pseudoclients/chanserv.cpp
@@ -288,17 +288,14 @@ class ChanServCore : public Module, public ChanServService
{
this->Hold(c);
}
- if (c->ci)
- {
- c->CheckModes();
- if (Me && Me->IsSynced())
+ c->CheckModes();
+ if (Me && Me->IsSynced() && c->ci)
+ {
+ /* Update channel topic */
+ if ((c->ci->HasExt("KEEPTOPIC") || c->ci->HasExt("TOPICLOCK")) && c->ci->last_topic != c->topic)
{
- /* Update channel topic */
- if ((c->ci->HasExt("KEEPTOPIC") || c->ci->HasExt("TOPICLOCK")) && c->ci->last_topic != c->topic)
- {
- c->ChangeTopic(!c->ci->last_topic_setter.empty() ? c->ci->last_topic_setter : c->ci->WhoSends()->nick, c->ci->last_topic, c->ci->last_topic_time ? c->ci->last_topic_time : Anope::CurTime);
- }
+ c->ChangeTopic(!c->ci->last_topic_setter.empty() ? c->ci->last_topic_setter : c->ci->WhoSends()->nick, c->ci->last_topic, c->ci->last_topic_time ? c->ci->last_topic_time : Anope::CurTime);
}
}
}