ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_help.c
(Generate patch)

Comparing:
ircd-hybrid/modules/m_help.c (file contents), Revision 33 by knight, Sun Oct 2 20:50:00 2005 UTC vs.
ircd-hybrid-7.3/modules/m_help.c (file contents), Revision 1055 by michael, Thu Jan 28 09:03:31 2010 UTC

# Line 36 | Line 36
36   #include "modules.h"
37   #include "irc_string.h"
38  
39 – #define HPATH  IRCD_PREFIX "/help/opers"
40 – #define UHPATH IRCD_PREFIX "/help/users"
39   #define HELPLEN 400
40  
41   static void m_help(struct Client *, struct Client *, int, char *[]);
# Line 124 | Line 122 | mo_uhelp(struct Client *client_p, struct
122   static void
123   dohelp(struct Client *source_p, const char *hpath, char *topic)
124   {
125 +  char h_index[] = "index";
126    char path[PATH_MAX + 1];
127    struct stat sb;
128    int i;
# Line 131 | Line 130 | dohelp(struct Client *source_p, const ch
130    if (topic != NULL)
131    {
132      if (*topic == '\0')
133 <      topic = "index";
133 >      topic = h_index;
134      else
135      {
136        /* convert to lower case */
137 <      for (i = 0; topic[i] != '\0'; i++)
137 >      for (i = 0; topic[i] != '\0'; ++i)
138          topic[i] = ToLower(topic[i]);
139      }
140    }
141    else
142 <    topic = "index"; /* list available help topics */
142 >    topic = h_index;    /* list available help topics */
143  
144    if (strpbrk(topic, "/\\"))
145    {
# Line 160 | Line 159 | dohelp(struct Client *source_p, const ch
159  
160    if (stat(path, &sb) < 0)
161    {
163 –    ilog(L_NOTICE, "help file %s not found", path);
162      sendto_one(source_p, form_str(ERR_HELPNOTFOUND),
163                 me.name, source_p->name, topic);
164      return;
165    }
166  
169 – #ifndef _WIN32
167    if (!S_ISREG(sb.st_mode))
168    {
172 –    ilog(L_NOTICE, "help file %s not found", path);
169      sendto_one(source_p, form_str(ERR_HELPNOTFOUND),
170                 me.name, source_p->name, topic);
171      return;
172    }
177 – #endif
173  
174    sendhelpfile(source_p, path, topic);
175   }
# Line 212 | Line 207 | sendhelpfile(struct Client *source_p, co
207    while (fbgets(line, sizeof(line), file))
208    {
209      line[strlen(line) - 1] = '\0';
210 <    if(line[0] != '#')
210 >    if (line[0] != '#')
211      {
212        if (!started)
213        {
214          type = RPL_HELPSTART;
215 <        started = 1;
215 >        started = 1;
216        }
217        else
218          type = RPL_HELPTXT;

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)