- // Check with the helpop database, if not found send to +h
- if (do_helpop(parameters, pcnt, user) == false)
- {
- // Not handled by the Database, Tell the user, and forward.
- for (int i = 1; output != ""; i++)
- {
- snprintf(a,MAXBUF,"line%d",i);
- /* "nohelpo" for opers "nohelp" for users */
- output = helpop->ReadValue("nohelpo", std::string(a), 0);
- if (output != "")
- {
- user->WriteServ("290 "+std::string(user->nick)+" :"+output);
- }
- }
- // Forward.
- sendtohelpop(user, pcnt, parameters);
- }
- }
-
- return CMD_SUCCESS;
- }
-
-
- bool do_helpop(const char** parameters, int pcnt, userrec *src)
- {
- char search[MAXBUF];
- std::string output = " "; // a fix bought to you by brain :p
- char a[MAXBUF];
- int nlines = 0;
-
- if (!pcnt)
- {
- strcpy(search,"start");
- }
- else
- {
- if (*parameters[0] == '?')
- parameters[0]++;
- strlcpy(search,parameters[0],MAXBUF);
- }