#include "inspircd.h"
-/* $ModDesc: Forces users to join the specified channel(s) on connect */
-
class ModuleConnJoin : public Module
{
public:
- void init() CXX11_OVERRIDE
- {
- Implementation eventlist[] = { I_OnPostConnect };
- ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
- }
-
void Prioritize()
{
ServerInstance->Modules->SetPriority(this, I_OnPostConnect, PRIORITY_LAST);
while (chans.GetToken(chan))
{
- if (ServerInstance->IsChannel(chan, ServerInstance->Config->Limits.ChanMax))
+ if (ServerInstance->IsChannel(chan))
Channel::JoinUser(localuser, chan);
}
}