X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_nationalchars.cpp;h=eb2d080c8d07bb7374de29aea8d386ea860d2a39;hb=a4f222ee1b05e2fdb2744c1694f9140f8099b009;hp=4e921957a338abef8a732da5ca1c2fb9b53bc579;hpb=5c9427cde0a949a17a476311db0a2a275345337b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp index 4e921957a..eb2d080c8 100644 --- a/src/modules/m_nationalchars.cpp +++ b/src/modules/m_nationalchars.cpp @@ -29,13 +29,9 @@ #include "caller.h" #include -/* $ModDesc: Provides an ability to have non-RFC1459 nicks & support for national CASEMAPPING */ - class lwbNickHandler : public HandlerBase1 { public: - lwbNickHandler() { } - ~lwbNickHandler() { } bool Call(const std::string&); }; @@ -241,10 +237,6 @@ class ModuleNationalChars : public Module national_case_insensitive_map = m_lower; ServerInstance->IsNick = &myhandler; - - Implementation eventlist[] = { I_OnRehash, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - OnRehash(NULL); } void On005Numeric(std::map& tokens) CXX11_OVERRIDE @@ -252,7 +244,7 @@ class ModuleNationalChars : public Module tokens["CASEMAPPING"] = casemapping; } - void OnRehash(User* user) CXX11_OVERRIDE + void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { ConfigTag* tag = ServerInstance->Config->ConfValue("nationalchars"); charset = tag->getString("file"); @@ -302,10 +294,10 @@ class ModuleNationalChars : public Module /*so Bynets Unreal distribution stuff*/ void loadtables(std::string filename, unsigned char ** tables, unsigned char cnt, char faillimit) { - std::ifstream ifs(filename.c_str()); + std::ifstream ifs(ServerInstance->Config->Paths.PrependConfig(filename).c_str()); if (ifs.fail()) { - ServerInstance->Logs->Log("m_nationalchars",LOG_DEFAULT,"loadtables() called for missing file: %s", filename.c_str()); + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "loadtables() called for missing file: %s", filename.c_str()); return; } @@ -320,7 +312,7 @@ class ModuleNationalChars : public Module { if (loadtable(ifs, tables[n], 255) && (n < faillimit)) { - ServerInstance->Logs->Log("m_nationalchars",LOG_DEFAULT,"loadtables() called for illegal file: %s (line %d)", filename.c_str(), n+1); + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "loadtables() called for illegal file: %s (line %d)", filename.c_str(), n+1); return; } }