diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-04-09 15:44:19 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-04-09 15:44:19 +0200 |
commit | 9ca7437e8faa192d26e1170e5825318ea0088be2 (patch) | |
tree | 76ce9c0d389e8ba41c0110581297b751b1b658a6 /src/modules/m_services_account.cpp | |
parent | 852dd0337a7e886f21ac3259591a8563206c93d4 (diff) |
m_services_account Remove now needless workaround added to 2.0 to display the correct host when cgiirc users log in using SASL
Diffstat (limited to 'src/modules/m_services_account.cpp')
-rw-r--r-- | src/modules/m_services_account.cpp | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index feb62f858..edb6f6ef5 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -102,24 +102,6 @@ class AChannel_M : public SimpleChannelModeHandler AChannel_M(Module* Creator) : SimpleChannelModeHandler(Creator, "regmoderated", 'M') { } }; -static bool ReadCGIIRCExt(const char* extname, User* user, const std::string*& out) -{ - ExtensionItem* wiext = ServerInstance->Extensions.GetItem(extname); - if (!wiext) - return false; - - if (wiext->creator->ModuleSourceFile != "m_cgiirc.so") - return false; - - StringExtItem* stringext = static_cast<StringExtItem*>(wiext); - std::string* addr = stringext->get(user); - if (!addr) - return false; - - out = addr; - return true; -} - class AccountExtItemImpl : public AccountExtItem { public: @@ -140,17 +122,8 @@ class AccountExtItemImpl : public AccountExtItem // Logged in if (IS_LOCAL(user)) { - const std::string* host = &user->dhost; - if (user->registered != REG_ALL) - { - if (!ReadCGIIRCExt("cgiirc_webirc_hostname", user, host)) - { - ReadCGIIRCExt("cgiirc_webirc_ip", user, host); - } - } - - user->WriteNumeric(900, "%s!%s@%s %s :You are now logged in as %s", - user->nick.c_str(), user->ident.c_str(), host->c_str(), value.c_str(), value.c_str()); + user->WriteNumeric(900, "%s %s :You are now logged in as %s", + user->GetFullHost().c_str(), value.c_str(), value.c_str()); } AccountEvent(creator, user, value).Send(); |