X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_nationalchars.cpp;h=d65d3b49cd383fd6afdc3b4d3ed93340aed4f56c;hb=357d190074ee58809b31ea0c08543566168bddf6;hp=4e921957a338abef8a732da5ca1c2fb9b53bc579;hpb=8f27fefa75e2952e7ab8757eb9fe4af4586817f0;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp index 4e921957a..d65d3b49c 100644 --- a/src/modules/m_nationalchars.cpp +++ b/src/modules/m_nationalchars.cpp @@ -29,8 +29,6 @@ #include "caller.h" #include -/* $ModDesc: Provides an ability to have non-RFC1459 nicks & support for national CASEMAPPING */ - class lwbNickHandler : public HandlerBase1 { public: @@ -241,10 +239,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 +246,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 +296,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 +314,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; } }