]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_conn_join.cpp
m_spanningtree Remove duplicate code for sending channel messages from RouteCommand()
[user/henk/code/inspircd.git] / src / modules / m_conn_join.cpp
index 113e49dffa48b0172830dbab53a340ba8c9baf57..fdcf82dccdd3a6066350bb52a012fa1c4c42cfe6 100644 (file)
 
 #include "inspircd.h"
 
-/* $ModDesc: Forces users to join the specified channel(s) on connect */
-
 class ModuleConnJoin : public Module
 {
        public:
-               void init()
-               {
-                       Implementation eventlist[] = { I_OnPostConnect };
-                       ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
-               }
-
                void Prioritize()
                {
                        ServerInstance->Modules->SetPriority(this, I_OnPostConnect, PRIORITY_LAST);
                }
 
-               Version GetVersion()
+               Version GetVersion() CXX11_OVERRIDE
                {
                        return Version("Forces users to join the specified channel(s) on connect", VF_VENDOR);
                }
 
-               void OnPostConnect(User* user)
+               void OnPostConnect(User* user) CXX11_OVERRIDE
                {
                        LocalUser* localuser = IS_LOCAL(user);
                        if (!localuser)
@@ -57,7 +49,7 @@ class ModuleConnJoin : public Module
 
                        while (chans.GetToken(chan))
                        {
-                               if (ServerInstance->IsChannel(chan, ServerInstance->Config->Limits.ChanMax))
+                               if (ServerInstance->IsChannel(chan))
                                        Channel::JoinUser(localuser, chan);
                        }
                }