diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-11-01 08:44:18 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-11-01 08:44:18 +0000 |
commit | 015930fbdb3eed82b44c758a59be7c932cbe5d9d (patch) | |
tree | 8f181d945f8d6058cf440f630e4e4eb91b80c643 /src/modules/m_helpop.cpp | |
parent | d248ac1a94664492c55dd9086888faf289db7d55 (diff) |
Remove <helpop file>
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5618 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_helpop.cpp')
-rw-r--r-- | src/modules/m_helpop.cpp | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index cc82e1218..f5fce322b 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -24,8 +24,8 @@ using namespace std; // Global Vars static ConfigReader *helpop; -bool do_helpop(const char**, int, userrec*); -void sendtohelpop(userrec*, int, const char**); +/*bool do_helpop(const char**, int, userrec*); +void sendtohelpop(userrec*, int, const char**);*/ /* $ModDesc: /helpop Command, Works like Unreal helpop */ @@ -98,7 +98,7 @@ class cmd_helpop : public command_t for (int i = 1; output != ""; i++) { snprintf(a,MAXBUF,"line%d",i); - output = helpop->ReadValue("nohelp", std::string(a), 0); + output = helpop->ReadValue("helpop_nohelp", a, 0); if(output != "") { @@ -117,7 +117,7 @@ class cmd_helpop : public command_t { snprintf(a,MAXBUF,"line%d",i); /* "nohelpo" for opers "nohelp" for users */ - output = helpop->ReadValue("nohelpo", std::string(a), 0); + output = helpop->ReadValue("helpop_nohelpo", a, 0); if (output != "") { user->WriteServ("290 "+std::string(user->nick)+" :"+output); @@ -141,13 +141,14 @@ class cmd_helpop : public command_t if (!pcnt) { - strcpy(search,"start"); + strcpy(search,"helpop_start"); } else { if (*parameters[0] == '?') parameters[0]++; - strlcpy(search,parameters[0],MAXBUF); + strlcpy(search, "helpop_", MAXBUF); + strlcat(search, parameters[0], MAXBUF); } for (char* n = search; *n; n++) @@ -197,7 +198,6 @@ class HelpopException : public ModuleException class ModuleHelpop : public Module { private: - ConfigReader *conf; std::string h_file; cmd_helpop* mycommand; Helpop* ho; @@ -215,20 +215,10 @@ class ModuleHelpop : public Module virtual void ReadConfig() { - conf = new ConfigReader(ServerInstance); - h_file = conf->ReadValue("helpop", "file", 0); - - if (h_file == "") - { - helpop = NULL; - HelpopException e("Missing helpop file"); - throw(e); - } - - helpop = new ConfigReader(ServerInstance, h_file); - if ((helpop->ReadValue("nohelp", "line1", 0) == "") || - (helpop->ReadValue("nohelpo", "line1", 0) == "") || - (helpop->ReadValue("start", "line1", 0) == "")) + helpop = new ConfigReader(ServerInstance); + if ((helpop->ReadValue("helpop_nohelp", "line1", 0) == "") || + (helpop->ReadValue("helpop_nohelpo", "line1", 0) == "") || + (helpop->ReadValue("helpop_start", "line1", 0) == "")) { HelpopException e("m_helpop: Helpop file is missing important entries. Please check the example conf."); throw(e); @@ -242,10 +232,8 @@ class ModuleHelpop : public Module virtual void OnRehash(const std::string ¶meter) { - DELETE(conf); if (helpop) DELETE(helpop); - ReadConfig(); } @@ -260,7 +248,6 @@ class ModuleHelpop : public Module virtual ~ModuleHelpop() { ServerInstance->Modes->DelMode(ho); - DELETE(conf); DELETE(helpop); DELETE(ho); } |