diff options
author | Peter Powell <petpow@saberuk.com> | 2017-10-11 00:11:26 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-10-11 11:47:57 +0100 |
commit | 6226ed9a29edb636506a6ab0fd756cfcc1267cdb (patch) | |
tree | 14a64ae5c2d916616eaa63bda54a0fe6c2ff5d0f /src | |
parent | e0ee89ff9751363c7639c8c83506591de1b5859a (diff) |
Get rid of ReadCGIIRCExt() in m_sasl.
This is unnecessary since 852dd0337a.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_sasl.cpp | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index d2f04d9d2..f1c467204 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -162,53 +162,16 @@ class SaslAuthenticator SaslResult result; bool state_announced; - /* taken from m_services_account */ - static bool ReadCGIIRCExt(const char* extname, User* user, 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; - } - - void SendHostIP() { - std::string host, ip; - - if (!ReadCGIIRCExt("cgiirc_webirc_hostname", user, host)) - { - host = user->host; - } - if (!ReadCGIIRCExt("cgiirc_webirc_ip", user, ip)) - { - ip = user->GetIPString(); - } - else - { - /* IP addresses starting with a : on irc are a Bad Thing (tm) */ - if (ip.c_str()[0] == ':') - ip.insert(ip.begin(),1,'0'); - } - parameterlist params; params.push_back(sasl_target); params.push_back("SASL"); params.push_back(user->uuid); params.push_back("*"); params.push_back("H"); - params.push_back(host); - params.push_back(ip); + params.push_back(user->host); + params.push_back(user->GetIPString()); SendSASL(params); } |