From 86a7fa3a06c44470707e586896eca54fc506dfc7 Mon Sep 17 00:00:00 2001 From: Daniel Vassdal Date: Thu, 30 Jan 2014 06:25:02 -0800 Subject: m_conn_join: Fixed indentation --- src/modules/m_conn_join.cpp | 54 ++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'src/modules/m_conn_join.cpp') diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp index fdcf82dcc..aec32e192 100644 --- a/src/modules/m_conn_join.cpp +++ b/src/modules/m_conn_join.cpp @@ -24,35 +24,35 @@ class ModuleConnJoin : public Module { - public: - void Prioritize() + public: + void Prioritize() + { + ServerInstance->Modules->SetPriority(this, I_OnPostConnect, PRIORITY_LAST); + } + + Version GetVersion() CXX11_OVERRIDE + { + return Version("Forces users to join the specified channel(s) on connect", VF_VENDOR); + } + + void OnPostConnect(User* user) CXX11_OVERRIDE + { + LocalUser* localuser = IS_LOCAL(user); + if (!localuser) + return; + + std::string chanlist = ServerInstance->Config->ConfValue("autojoin")->getString("channel"); + chanlist = localuser->GetClass()->config->getString("autojoin", chanlist); + + irc::commasepstream chans(chanlist); + std::string chan; + + while (chans.GetToken(chan)) { - ServerInstance->Modules->SetPriority(this, I_OnPostConnect, PRIORITY_LAST); - } - - Version GetVersion() CXX11_OVERRIDE - { - return Version("Forces users to join the specified channel(s) on connect", VF_VENDOR); - } - - void OnPostConnect(User* user) CXX11_OVERRIDE - { - LocalUser* localuser = IS_LOCAL(user); - if (!localuser) - return; - - std::string chanlist = ServerInstance->Config->ConfValue("autojoin")->getString("channel"); - chanlist = localuser->GetClass()->config->getString("autojoin", chanlist); - - irc::commasepstream chans(chanlist); - std::string chan; - - while (chans.GetToken(chan)) - { - if (ServerInstance->IsChannel(chan)) - Channel::JoinUser(localuser, chan); - } + if (ServerInstance->IsChannel(chan)) + Channel::JoinUser(localuser, chan); } + } }; MODULE_INIT(ModuleConnJoin) -- cgit v1.3.1-10-gc9f91