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 32 by knight, Sun Oct 2 20:41:23 2005 UTC vs.
Revision 1028 by michael, Sun Nov 8 13:03:38 2009 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 166 | Line 165 | dohelp(struct Client *source_p, const ch
165      return;
166    }
167  
169 #ifndef _WIN32
168    if (!S_ISREG(sb.st_mode))
169    {
170      ilog(L_NOTICE, "help file %s not found", path);
# Line 174 | Line 172 | dohelp(struct Client *source_p, const ch
172                 me.name, source_p->name, topic);
173      return;
174    }
177 #endif
175  
176    sendhelpfile(source_p, path, topic);
177   }

Comparing ircd-hybrid/modules/m_help.c (property svn:keywords):
Revision 32 by knight, Sun Oct 2 20:41:23 2005 UTC vs.
Revision 1028 by michael, Sun Nov 8 13:03:38 2009 UTC

# Line 1 | Line 1
1 < Revision
1 > Id Revision

Diff Legend

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