]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_delayjoin Only send JOIN on mode change if the mode being changed is a prefix mode
authorAttila Molnar <attilamolnar@hush.com>
Fri, 17 Oct 2014 13:40:01 +0000 (15:40 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Fri, 17 Oct 2014 13:40:01 +0000 (15:40 +0200)
src/modules/m_delayjoin.cpp

index a9a92e67a9b382a65f113e30a1879b36a97d39b4..20d4c8e8faeeed905350aac88dfc2eb79c90b511 100644 (file)
@@ -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);