X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_swhois.cpp;h=4c262c9caa6ce92a795bd62ad42c03f739659587;hb=de69e28a4a1aea89e410b693bbbb67890ecb0bd3;hp=a15d81aecfd538ce712f5c5ddfb7514c18ab5376;hpb=e80a1296a096ff2c495b3cd2a3913d5e5f6ec450;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index a15d81aec..4c262c9ca 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -106,32 +106,7 @@ class ModuleSWhois : public Module return; ConfigReader Conf; - std::string swhois; - - for (int i = 0; i < Conf.Enumerate("oper"); i++) - { - std::string name = Conf.ReadValue("oper", "name", i); - - if (name == params[0]) - { - swhois = Conf.ReadValue("oper", "swhois", i); - break; - } - } - - if (!swhois.length()) - { - for (int i = 0; i < Conf.Enumerate("type"); i++) - { - std::string type = Conf.ReadValue("type", "name", i); - - if (type == user->oper) - { - swhois = Conf.ReadValue("type", "swhois", i); - break; - } - } - } + std::string swhois = user->oper->getConfig("swhois"); if (!swhois.length()) return; @@ -146,7 +121,7 @@ class ModuleSWhois : public Module Version GetVersion() { - return Version("Provides the SWHOIS command which allows setting of arbitary WHOIS lines", VF_OPTCOMMON | VF_VENDOR, API_VERSION); + return Version("Provides the SWHOIS command which allows setting of arbitary WHOIS lines", VF_OPTCOMMON | VF_VENDOR); } };