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/trunk/modules/m_help.c (file contents):
Revision 1832 by michael, Fri Apr 19 19:16:09 2013 UTC vs.
Revision 1834 by michael, Fri Apr 19 19:50:27 2013 UTC

# Line 52 | Line 52 | m_help(struct Client *client_p, struct C
52    if ((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime)
53    {
54      /* safe enough to give this on a local connect only */
55 <    sendto_one(source_p, RPL_LOAD2HI,
55 >    sendto_one(source_p,form_str(RPL_LOAD2HI),
56                 me.name, source_p->name);
57      return;
58    }
# Line 101 | Line 101 | dohelp(struct Client *source_p, const ch
101  
102    if (strpbrk(topic, "/\\"))
103    {
104 <    sendto_one(source_p, ERR_HELPNOTFOUND,
104 >    sendto_one(source_p, form_str(ERR_HELPNOTFOUND),
105                 me.name, source_p->name, topic);
106      return;
107    }
108  
109    if (strlen(hpath) + strlen(topic) + 1 > HYB_PATH_MAX)
110    {
111 <    sendto_one(source_p, ERR_HELPNOTFOUND,
111 >    sendto_one(source_p, form_str(ERR_HELPNOTFOUND),
112                 me.name, source_p->name, topic);
113      return;
114    }
# Line 117 | Line 117 | dohelp(struct Client *source_p, const ch
117  
118    if (stat(path, &sb) < 0)
119    {
120 <    sendto_one(source_p, ERR_HELPNOTFOUND,
120 >    sendto_one(source_p, form_str(ERR_HELPNOTFOUND),
121                 me.name, source_p->name, topic);
122      return;
123    }
124  
125    if (!S_ISREG(sb.st_mode))
126    {
127 <    sendto_one(source_p, ERR_HELPNOTFOUND,
127 >    sendto_one(source_p, form_str(ERR_HELPNOTFOUND),
128                 me.name, source_p->name, topic);
129      return;
130    }
# Line 140 | Line 140 | sendhelpfile(struct Client *source_p, co
140  
141    if ((file = fopen(path, "r")) == NULL)
142    {
143 <    sendto_one(source_p, ERR_HELPNOTFOUND,
143 >    sendto_one(source_p, form_str(ERR_HELPNOTFOUND),
144                 me.name, source_p->name, topic);
145      return;
146    }
147  
148    if (fgets(line, sizeof(line), file) == NULL)
149    {
150 <    sendto_one(source_p, ERR_HELPNOTFOUND,
150 >    sendto_one(source_p, form_str(ERR_HELPNOTFOUND),
151                 me.name, source_p->name, topic);
152      return;
153    }
154  
155    line[strlen(line) - 1] = '\0';
156 <  sendto_one(source_p, RPL_HELPSTART,
156 >  sendto_one(source_p, form_str(RPL_HELPSTART),
157               me.name, source_p->name, topic, line);
158  
159    while (fgets(line, sizeof(line), file))
160    {
161      line[strlen(line) - 1] = '\0';
162  
163 <    sendto_one(source_p, RPL_HELPTXT,
163 >    sendto_one(source_p, form_str(RPL_HELPTXT),
164                 me.name, source_p->name, topic, line);
165    }
166  
167    fclose(file);
168 <  sendto_one(source_p, RPL_ENDOFHELP,
168 >  sendto_one(source_p, form_str(RPL_ENDOFHELP),
169               me.name, source_p->name, topic);
170   }
171  

Diff Legend

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