aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_delayjoin.cpp
diff options
context:
space:
mode:
authorGravatar Attila Molnar2014-10-17 15:40:01 +0200
committerGravatar Attila Molnar2014-10-17 15:40:01 +0200
commita681248b3c989667c2d025758722d2c90b444abe (patch)
tree06b703bf68df52b92f60853d66c6e7a2978b4d29 /src/modules/m_delayjoin.cpp
parentInitialize all fields of issl_session on module load in SSL modules (diff)
downloadinspircd++-a681248b3c989667c2d025758722d2c90b444abe.tar.gz
inspircd++-a681248b3c989667c2d025758722d2c90b444abe.tar.bz2
inspircd++-a681248b3c989667c2d025758722d2c90b444abe.zip
m_delayjoin Only send JOIN on mode change if the mode being changed is a prefix mode
Diffstat (limited to 'src/modules/m_delayjoin.cpp')
-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);