From 976b8fd690df06fa9c86d63609ec4f0ce5e9a55f Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 28 Mar 2005 20:02:48 +0000 Subject: Fixed m_helpop.cpp lowercasing the first line of the text git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@932 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_helpop.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index e98669f0e..00e886cb4 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -39,12 +39,6 @@ void handle_helpop(char **parameters, int pcnt, userrec *user) return; } - // FIX by brain: make the string lowercase, ConfigReader is - // case sensitive - char* lower = parameters[0]; - for (int t = 0; t < strlen(lower); t++) - lower[t] = tolower(lower[t]); - if (parameters[0][0] == '!') { // Force send to all +h users @@ -97,11 +91,19 @@ bool do_helpop(char **parameters, int pcnt, userrec *src) search++; } + // FIX by brain: make the string lowercase, ConfigReader is + // case sensitive + char lower[MAXBUF]; + strcpy(lower,search,MAXBUF); + for (int t = 0; t < strlen(lower); t++) + lower[t] = tolower(lower[t]); + + int nlines = 0; for (int i = 1; output != ""; i++) { snprintf(a,MAXBUF,"line%d",i); - output = helpop->ReadValue(search, a, 0); + output = helpop->ReadValue(lower, a, 0); if (output != "") { Srv->SendTo(NULL,src,"290 "+std::string(src->nick)+" :"+output); nlines++; -- cgit v1.2.3