X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_passforward.cpp;h=f46e79c0f2c7b709f9aaac764f3922926635de7d;hb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;hp=fb7bae234c2c48c288104d7423f67f252b09fdbf;hpb=428a5e3d0f5060d43c56a8a8595c8102241ce7ea;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_passforward.cpp b/src/modules/m_passforward.cpp index fb7bae234..f46e79c0f 100644 --- a/src/modules/m_passforward.cpp +++ b/src/modules/m_passforward.cpp @@ -27,7 +27,7 @@ class ModulePassForward : public Module std::string nickrequired, forwardmsg, forwardcmd; public: - ModulePassForward() + void init() { OnRehash(NULL); Implementation eventlist[] = { I_OnPostConnect, I_OnRehash }; @@ -41,10 +41,10 @@ class ModulePassForward : public Module void OnRehash(User* user) { - ConfigReader Conf; - nickrequired = Conf.ReadValue("passforward", "nick", "NickServ", 0); - forwardmsg = Conf.ReadValue("passforward", "forwardmsg", "NOTICE $nick :*** Forwarding PASS to $nickrequired", 0); - forwardcmd = Conf.ReadValue("passforward", "cmd", "PRIVMSG $nickrequired :IDENTIFY $pass", 0); + ConfigTag* tag = ServerInstance->Config->ConfValue("passforward"); + nickrequired = tag->getString("nick", "NickServ"); + forwardmsg = tag->getString("forwardmsg", "NOTICE $nick :*** Forwarding PASS to $nickrequired"); + forwardcmd = tag->getString("cmd", "PRIVMSG $nickrequired :IDENTIFY $pass"); } void FormatStr(std::string& result, const std::string& format, const LocalUser* user)