summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-10-17 15:40:01 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-10-17 15:40:01 +0200
commita681248b3c989667c2d025758722d2c90b444abe (patch)
tree06b703bf68df52b92f60853d66c6e7a2978b4d29
parent8cd84786d0b710a60d25e4c9c58fdde2fb0b8211 (diff)
m_delayjoin Only send JOIN on mode change if the mode being changed is a prefix mode
-rw-r--r--src/modules/m_delayjoin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp
index a9a92e67a..20d4c8e8f 100644
--- a/src/modules/m_delayjoin.cpp
+++ b/src/modules/m_delayjoin.cpp
@@ -182,6 +182,11 @@ ModResult ModuleDelayJoin::OnRawMode(User* user, Channel* channel, const char mo
if (!user || !channel || param.empty())
return MOD_RES_PASSTHRU;
+ ModeHandler* mh = ServerInstance->Modes->FindMode(mode, MODETYPE_CHANNEL);
+ // If not a prefix mode then we got nothing to do here
+ if (!mh || !mh->GetPrefixRank())
+ return MOD_RES_PASSTHRU;
+
User* dest;
if (IS_LOCAL(user))
dest = ServerInstance->FindNickOnly(param);