summaryrefslogtreecommitdiff
path: root/src/coremods
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-05-16 16:40:22 +0200
committerAttila Molnar <attilamolnar@hush.com>2015-05-16 16:40:22 +0200
commit127fe6ed1076c294e01925e4fa8ab2bd64c1b0e0 (patch)
tree8d09613eaab5dd99e6ffdc95ecbabe2f8d9c1640 /src/coremods
parent9fc261d4cdfccacd53ab815539a93b23f3b75d73 (diff)
Move topic and NAMES sending on join from core into core_channel
Diffstat (limited to 'src/coremods')
-rw-r--r--src/coremods/core_channel/core_channel.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/coremods/core_channel/core_channel.cpp b/src/coremods/core_channel/core_channel.cpp
index 47f722e1e..ac590ebcc 100644
--- a/src/coremods/core_channel/core_channel.cpp
+++ b/src/coremods/core_channel/core_channel.cpp
@@ -34,6 +34,23 @@ class CoreModChannel : public Module
{
}
+ void OnPostJoin(Membership* memb) CXX11_OVERRIDE
+ {
+ Channel* const chan = memb->chan;
+ LocalUser* const localuser = IS_LOCAL(memb->user);
+ if (localuser)
+ {
+ if (chan->topicset)
+ Topic::ShowTopic(localuser, chan);
+ chan->UserList(localuser);
+ }
+ }
+
+ void Prioritize() CXX11_OVERRIDE
+ {
+ ServerInstance->Modules.SetPriority(this, I_OnPostJoin, PRIORITY_FIRST);
+ }
+
Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides the INVITE, JOIN, KICK, NAMES, and TOPIC commands", VF_VENDOR|VF_CORE);