summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-19 22:50:38 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-19 22:50:38 +0000
commit140bafe54469d7d7f97ffd77d44ce105ae2c6c52 (patch)
treef01ac97f9f57ad347d844c687f613de2a732a9a4 /src
parent41ad846ec7b60d467e9f125cbfe9ab9af791f3a2 (diff)
Some fixes here
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@679 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_helpop.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp
index 1a7968b7f..2e30ae86a 100644
--- a/src/modules/m_helpop.cpp
+++ b/src/modules/m_helpop.cpp
@@ -73,29 +73,28 @@ bool do_helpop(char **parameters, int pcnt, userrec *src)
std::string output = " "; // a fix bought to you by brain :p
char a[MAXBUF];
- if (!parameters) { strcpy(search, "start"); }
- else { search = parameters[0]; }
-
- if (search[0] == '?') { search++; }
-
- // Make sure it exists.
- if (helpop->ReadValue(std::string(search), "line1", 0) == "")
- {
- // Tell caller..
- return false;
- }
+ if (!parameters) {
+ search = "start";
+ }
+ else {
+ search = parameters[0];
+ }
- // Somethings there.. tell the person who wants to know :p
+ if (search[0] == '?') {
+ search++;
+ }
+ int nlines = 0;
for (int i = 1; output != ""; i++)
{
snprintf(a,MAXBUF,"line%d",i);
output = helpop->ReadValue(std::string(search), std::string(a), 0);
if (output != "") {
Srv->SendTo(NULL,src,"290 "+std::string(src->nick)+" :"+output);
+ nlines++;
}
}
- return true;
+ return (nlines>0);
}