diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-03-28 20:02:48 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-03-28 20:02:48 +0000 |
commit | 976b8fd690df06fa9c86d63609ec4f0ce5e9a55f (patch) | |
tree | f3d3aa08fe563a2ea314fec54bde71cee424a2d7 /src/modules | |
parent | 974bc2356a808849d535d9cae0be62981c911b22 (diff) |
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
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_helpop.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
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++; |