]>
Commit | Line | Data |
---|---|---|
a037f551 | 1 | Add /HELP <command> |
12e82c05 | 2 | |
a037f551 | 3 | include/handlers.h |
4 | include/ircd_handler.h | |
5 | include/msg.h | |
6 | add mh_* message help function handlers | |
7 | ||
8 | ircd/m_defaults.c | |
9 | add default replies for /HELP (mh_not_oper mh_not_server) | |
10 | ||
11 | ircd/m_help.c | |
12 | add mh_* functions - once finished they should be moved to their respective m_*.c files | |
13 | ||
14 | include/numeric.h | |
15 | ircd/s_err.c | |
16 | add 377 RPL_HELP, 378 RPL_ENDOFHELP, 418 ERR_NOHELP | |
17 | ||
18 | include/parse.h | |
19 | add function find_message_by_cmd to find the mh_* function to call | |
20 | ||
21 | ircd/parse.c | |
22 | add mh_* functions in the message table | |
23 | ||
24 | diff -r 3fc56aefcea6 include/handlers.h | |
25 | --- a/include/handlers.h Tue Jan 27 18:27:54 2009 +0100 | |
26 | +++ b/include/handlers.h Tue Jan 27 20:49:11 2009 +0100 | |
cddf800b | 27 | @@ -244,5 +244,77 @@ |
28 | extern int ms_wallvoices(struct Client*, struct Client*, int, char*[]); | |
29 | extern int ms_whois(struct Client*, struct Client*, int, char*[]); | |
30 | ||
31 | +extern int mh_nohelp(struct Client*, struct Client*, int, char*[]); | |
32 | +extern int mh_not_oper(struct Client*, struct Client*, int, char*[]); | |
33 | +extern int mh_not_server(struct Client*, struct Client*, int, char*[]); | |
34 | +extern int mh_admin(struct Client*, struct Client*, int, char*[]); | |
35 | +extern int mh_asll(struct Client*, struct Client*, int, char*[]); | |
36 | +extern int mh_away(struct Client*, struct Client*, int, char*[]); | |
37 | +extern int mh_check(struct Client*, struct Client*, int, char*[]); | |
38 | +extern int mh_clearmode(struct Client*, struct Client*, int, char*[]); | |
39 | +extern int mh_close(struct Client*, struct Client*, int, char*[]); | |
40 | +extern int mh_cnotice(struct Client*, struct Client*, int, char*[]); | |
41 | +extern int mh_connect(struct Client*, struct Client*, int, char*[]); | |
42 | +extern int mh_cprivmsg(struct Client*, struct Client*, int, char*[]); | |
43 | +extern int mh_die(struct Client*, struct Client*, int, char*[]); | |
44 | +extern int mh_get(struct Client*, struct Client*, int, char*[]); | |
45 | +extern int mh_gline(struct Client*, struct Client*, int, char*[]); | |
46 | +extern int mh_hash(struct Client*, struct Client*, int, char*[]); | |
47 | +extern int mh_help(struct Client*, struct Client*, int, char*[]); | |
48 | +extern int mh_info(struct Client*, struct Client*, int, char*[]); | |
49 | +extern int mh_invite(struct Client*, struct Client*, int, char*[]); | |
50 | +extern int mh_ison(struct Client*, struct Client*, int, char*[]); | |
51 | +extern int mh_join(struct Client*, struct Client*, int, char*[]); | |
52 | +extern int mh_jupe(struct Client*, struct Client*, int, char*[]); | |
53 | +extern int mh_kick(struct Client*, struct Client*, int, char*[]); | |
54 | +extern int mh_kill(struct Client*, struct Client*, int, char*[]); | |
55 | +extern int mh_links(struct Client*, struct Client*, int, char*[]); | |
56 | +extern int mh_list(struct Client*, struct Client*, int, char*[]); | |
57 | +extern int mh_lusers(struct Client*, struct Client*, int, char*[]); | |
58 | +extern int mh_map(struct Client*, struct Client*, int, char*[]); | |
59 | +extern int mh_mode(struct Client*, struct Client*, int, char*[]); | |
60 | +extern int mh_motd(struct Client*, struct Client*, int, char*[]); | |
61 | +extern int mh_names(struct Client*, struct Client*, int, char*[]); | |
62 | +extern int mh_nick(struct Client*, struct Client*, int, char*[]); | |
63 | +extern int mh_notice(struct Client*, struct Client*, int, char*[]); | |
64 | +extern int mh_oper(struct Client*, struct Client*, int, char*[]); | |
65 | +extern int mh_opmode(struct Client*, struct Client*, int, char*[]); | |
66 | +extern int mh_part(struct Client*, struct Client*, int, char*[]); | |
67 | +extern int mh_pass(struct Client*, struct Client*, int, char*[]); | |
68 | +extern int mh_ping(struct Client*, struct Client*, int, char*[]); | |
69 | +extern int mh_pong(struct Client*, struct Client*, int, char*[]); | |
70 | +extern int mh_privmsg(struct Client*, struct Client*, int, char*[]); | |
71 | +extern int mh_privs(struct Client*, struct Client*, int, char*[]); | |
72 | +extern int mh_quit(struct Client*, struct Client*, int, char*[]); | |
73 | +extern int mh_rehash(struct Client*, struct Client*, int, char*[]); | |
74 | +extern int mh_reset(struct Client*, struct Client*, int, char*[]); | |
75 | +extern int mh_restart(struct Client*, struct Client*, int, char*[]); | |
76 | +extern int mh_rping(struct Client*, struct Client*, int, char*[]); | |
77 | +extern int mh_set(struct Client*, struct Client*, int, char*[]); | |
78 | +extern int mh_sethost(struct Client*, struct Client*, int, char*[]); | |
79 | +extern int mh_settime(struct Client*, struct Client*, int, char*[]); | |
80 | +extern int mh_silence(struct Client*, struct Client*, int, char*[]); | |
81 | +extern int mh_squit(struct Client*, struct Client*, int, char*[]); | |
82 | +extern int mh_stats(struct Client*, struct Client*, int, char*[]); | |
83 | +extern int mh_time(struct Client*, struct Client*, int, char*[]); | |
84 | +extern int mh_topic(struct Client*, struct Client*, int, char*[]); | |
85 | +extern int mh_trace(struct Client*, struct Client*, int, char*[]); | |
86 | +extern int mh_uping(struct Client*, struct Client*, int, char*[]); | |
87 | +extern int mh_user(struct Client*, struct Client*, int, char*[]); | |
88 | +extern int mh_userhost(struct Client*, struct Client*, int, char*[]); | |
89 | +extern int mh_userip(struct Client*, struct Client*, int, char*[]); | |
90 | +extern int mh_version(struct Client*, struct Client*, int, char*[]); | |
91 | +extern int mh_wallchops(struct Client*, struct Client*, int, char*[]); | |
92 | +extern int mh_wallops(struct Client*, struct Client*, int, char*[]); | |
93 | +extern int mh_wallusers(struct Client*, struct Client*, int, char*[]); | |
94 | +extern int mh_wallvoices(struct Client*, struct Client*, int, char*[]); | |
95 | +extern int mh_who(struct Client*, struct Client*, int, char*[]); | |
96 | +extern int mh_whois(struct Client*, struct Client*, int, char*[]); | |
97 | +extern int mh_whowas(struct Client*, struct Client*, int, char*[]); | |
98 | + | |
99 | + | |
100 | + | |
101 | + | |
102 | + | |
103 | #endif /* INCLUDED_handlers_h */ | |
104 | ||
a037f551 | 105 | diff -r 3fc56aefcea6 include/ircd_handler.h |
106 | --- a/include/ircd_handler.h Tue Jan 27 18:27:54 2009 +0100 | |
107 | +++ b/include/ircd_handler.h Tue Jan 27 20:49:11 2009 +0100 | |
cddf800b | 108 | @@ -36,6 +36,7 @@ |
109 | SERVER_HANDLER, /**< Used for server conections. */ | |
110 | OPER_HANDLER, /**< Used for IRC operators. */ | |
111 | SERVICE_HANDLER, /**< Used for services connections. */ | |
112 | + HELP_HANDLER, /**< Used for /HELP <command> */ | |
113 | LAST_HANDLER_TYPE /**< NUmber of handler types. */ | |
114 | } HandlerType; | |
115 | ||
a037f551 | 116 | diff -r 3fc56aefcea6 include/msg.h |
117 | --- a/include/msg.h Tue Jan 27 18:27:54 2009 +0100 | |
118 | +++ b/include/msg.h Tue Jan 27 20:49:11 2009 +0100 | |
cddf800b | 119 | @@ -410,7 +410,7 @@ |
120 | * parv = parameter variable array | |
121 | */ | |
122 | /* handlers: | |
123 | - * UNREGISTERED, CLIENT, SERVER, OPER, SERVICE, LAST | |
124 | + * UNREGISTERED, CLIENT, SERVER, OPER, SERVICE, HELP, LAST | |
125 | */ | |
126 | MessageHandler handlers[LAST_HANDLER_TYPE]; | |
127 | }; | |
a037f551 | 128 | diff -r 3fc56aefcea6 include/numeric.h |
129 | --- a/include/numeric.h Tue Jan 27 18:27:54 2009 +0100 | |
130 | +++ b/include/numeric.h Tue Jan 27 20:49:11 2009 +0100 | |
131 | @@ -292,6 +292,9 @@ | |
132 | #define RPL_MOTDSTART 375 | |
133 | #define RPL_ENDOFMOTD 376 | |
134 | ||
135 | +#define RPL_HELP 377 /* QuakeNet extension */ | |
136 | +#define RPL_ENDOFHELP 378 /* QuakeNet extension */ | |
137 | + | |
138 | /* RPL_KICKEXPIRED 377 aircd */ | |
139 | /* RPL_SPAM 377 austnet */ | |
140 | /* RPL_BANEXPIRED 378 aircd */ | |
141 | @@ -342,6 +345,7 @@ | |
142 | #define ERR_QUERYTOOLONG 416 /* Undernet extension */ | |
143 | /* ERR_TOOMANYMATCHES 416 IRCnet extension */ | |
144 | #define ERR_INPUTTOOLONG 417 | |
145 | +#define ERR_NOHELP 418 /* QuakeNet extension */ | |
146 | /* ERR_LENGTHTRUNCATED 419 aircd */ | |
147 | ||
148 | #define ERR_UNKNOWNCOMMAND 421 | |
149 | @@ -476,7 +480,6 @@ | |
cddf800b | 150 | #define ERR_NOMANAGER 566 /* Undernet extension */ |
151 | #define ERR_UPASS_SAME_APASS 567 /* Undernet extension */ | |
a037f551 | 152 | #define ERR_LASTERROR 568 |
153 | - | |
cddf800b | 154 | /* RPL_LOGON 600 dalnet,unreal |
155 | RPL_LOGOFF 601 dalnet,unreal | |
a037f551 | 156 | RPL_WATCHOFF 602 dalnet,unreal |
157 | diff -r 3fc56aefcea6 include/parse.h | |
158 | --- a/include/parse.h Tue Jan 27 18:27:54 2009 +0100 | |
159 | +++ b/include/parse.h Tue Jan 27 20:49:11 2009 +0100 | |
cddf800b | 160 | @@ -15,6 +15,7 @@ |
161 | extern int parse_client(struct Client *cptr, char *buffer, char *bufend); | |
162 | extern int parse_server(struct Client *cptr, char *buffer, char *bufend); | |
163 | extern void initmsgtree(void); | |
164 | +extern struct Message *find_message_by_cmd(char *cmd); | |
165 | ||
166 | extern int register_mapping(struct s_map *map); | |
167 | extern int unregister_mapping(struct s_map *map); | |
a037f551 | 168 | diff -r 3fc56aefcea6 ircd/m_defaults.c |
169 | --- a/ircd/m_defaults.c Tue Jan 27 18:27:54 2009 +0100 | |
170 | +++ b/ircd/m_defaults.c Tue Jan 27 20:49:11 2009 +0100 | |
cddf800b | 171 | @@ -119,3 +119,18 @@ |
172 | { | |
173 | return 0; | |
174 | } | |
175 | + | |
176 | +int mh_nohelp(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
177 | +{ | |
178 | + return send_reply(sptr, ERR_NOHELP, parv[1]); | |
179 | +} | |
180 | + | |
181 | +int mh_not_oper(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
182 | +{ | |
183 | + return send_reply(sptr, SND_EXPLICIT | RPL_HELP, "%s :This command is for IRC Operators only.", parv[1]); | |
184 | +} | |
185 | + | |
186 | +int mh_not_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
187 | +{ | |
188 | + return send_reply(sptr, SND_EXPLICIT | RPL_HELP, "%s :This command is for servers only.", parv[1]); | |
189 | +} | |
190 | \ No newline at end of file | |
a037f551 | 191 | diff -r 3fc56aefcea6 ircd/m_help.c |
192 | --- a/ircd/m_help.c Tue Jan 27 18:27:54 2009 +0100 | |
193 | +++ b/ircd/m_help.c Tue Jan 27 20:49:11 2009 +0100 | |
cddf800b | 194 | @@ -90,6 +90,7 @@ |
195 | #include "msg.h" | |
196 | #include "numeric.h" | |
197 | #include "numnicks.h" | |
198 | +#include "parse.h" | |
199 | #include "send.h" | |
200 | ||
201 | /* #include <assert.h> -- Now using assert in ircd_log.h */ | |
a87bc2c2 | 202 | @@ -100,9 +101,1212 @@ |
12e82c05 | 203 | int m_help(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) |
204 | { | |
205 | int i; | |
cddf800b | 206 | + struct Message* mptr; |
207 | + MessageHandler handler = 0; | |
208 | + char *command; | |
209 | ||
210 | - for (i = 0; msgtab[i].cmd; i++) | |
211 | - sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s", sptr, msgtab[i].cmd); | |
212 | + /* list all commands */ | |
213 | + if (parc < 2) { | |
214 | + for (i = 0; msgtab[i].cmd; i++) | |
215 | + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s", sptr, msgtab[i].cmd); | |
216 | + return 0; | |
217 | + } | |
218 | + command = parv[1]; | |
219 | + | |
220 | + /* nothing found */ | |
221 | + if ((mptr = find_message_by_cmd(command)) == NULL) | |
222 | + return send_reply(sptr, ERR_NOHELP, command); | |
223 | + | |
224 | + /* found a help handler function */ | |
225 | + handler = mptr->handlers[HELP_HANDLER]; | |
226 | + | |
227 | + assert(0 != handler); | |
228 | + | |
229 | + /* call the help handler function */ | |
230 | + (*handler) (cptr, sptr, parc, parv); | |
231 | + return send_reply(sptr, RPL_ENDOFHELP, command); | |
232 | +} | |
233 | + | |
234 | + | |
235 | +/* | |
236 | + * mh_help - help message handler | |
237 | + */ | |
238 | +int mh_help(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
239 | +{ | |
240 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
241 | + "HELP :HELP [<command>]"); | |
242 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
243 | + "HELP :Lists all server commands or info on the given command."); | |
12e82c05 | 244 | return 0; |
cddf800b | 245 | } |
12e82c05 | 246 | |
cddf800b | 247 | + |
248 | +/* | |
249 | + * TODO: move all the mh_ functions into the files of the commands they belong to | |
250 | + */ | |
251 | + | |
252 | + | |
253 | +/* | |
254 | + * mh_admin - help message handler | |
255 | + * TODO: check HIS remote | |
256 | + */ | |
257 | +int mh_admin(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
258 | +{ | |
259 | + if (!IsAnOper(sptr)) | |
260 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
261 | + "ADMIN :ADMIN"); | |
262 | + else | |
263 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
264 | + "ADMIN :ADMIN [<server>]"); | |
265 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
266 | + "ADMIN :Shows administrative contact for the server."); | |
267 | + return 0; | |
268 | +} | |
269 | + | |
270 | + | |
271 | +/* | |
272 | + * mh_asll - help message handler | |
273 | + */ | |
274 | +int mh_asll(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
275 | +{ | |
276 | + if (!IsAnOper(sptr)) | |
277 | + return mh_not_oper(cptr, sptr, parc, parv); | |
278 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
279 | + "ASLL :ASLL <mask> [<server>]"); | |
280 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
281 | + "ASLL :Shows Asymmetric Link Latency information."); | |
282 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
283 | + "ASLL :Parameter <mask> is matched against directly linked servers, and may have more than one match."); | |
284 | + return 0; | |
285 | +} | |
286 | + | |
287 | + | |
288 | +/* | |
289 | + * mh_away - help message handler | |
290 | + */ | |
291 | +int mh_away(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
292 | +{ | |
293 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
294 | + "AWAY :AWAY [<message>]"); | |
295 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
296 | + "AWAY :Sets or clears the away message."); | |
297 | + return 0; | |
298 | +} | |
299 | + | |
300 | + | |
301 | +/* | |
302 | + * mh_check - help message handler | |
303 | + */ | |
304 | +int mh_check(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
305 | +{ | |
306 | + if (!IsAnOper(sptr)) | |
307 | + return mh_not_oper(cptr, sptr, parc, parv); | |
308 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
309 | + "CHECK :CHECK [<server>] <mask> [<flags>]"); | |
310 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
311 | + "CHECK :Shows detailed information about a user, a channel, a hostmask, or a server."); | |
312 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
313 | + "CHECK :Flags are: -C show clones, -c show channels, -s show servernames, -e show more, " | |
a87bc2c2 | 314 | + "-i show IPs, -I show hostnames and IPs, -u do not show users, -o show only channel operators, -l show oplevels."); |
cddf800b | 315 | + return 0; |
316 | +} | |
317 | + | |
318 | + | |
319 | +/* | |
320 | + * mh_clearmode - help message handler | |
321 | + */ | |
322 | +int mh_clearmode(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
323 | +{ | |
324 | + if (!IsAnOper(sptr)) | |
325 | + return mh_not_oper(cptr, sptr, parc, parv); | |
326 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
327 | + "CLEARMODE :CLEARMODE [!]<channel> [<modes>]"); | |
328 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
329 | + "CLEARMODE :Clears modes on a channel."); | |
330 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
331 | + "CLEARMODE :Default modes are ovpsmikbl - o deops all channel operators, " | |
332 | + "v devoices all channel voices, and b removes all channel bans."); | |
333 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
334 | + "CLEARMODE :The ! prefix may be used to override a channel quarantine."); | |
335 | + return 0; | |
336 | +} | |
337 | + | |
338 | + | |
339 | +/* | |
340 | + * mh_close - help message handler | |
341 | + */ | |
342 | +int mh_close(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
343 | +{ | |
344 | + if (!IsAnOper(sptr)) | |
345 | + return mh_not_oper(cptr, sptr, parc, parv); | |
346 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
347 | + "CLOSE :CLOSE"); | |
348 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
349 | + "CLOSE :Closes unregistered connections to the server."); | |
350 | + return 0; | |
351 | +} | |
352 | + | |
353 | + | |
354 | +/* | |
355 | + * mh_cnotice - help message handler | |
356 | + */ | |
357 | +int mh_cnotice(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
358 | +{ | |
359 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
360 | + "CNOTICE :CNOTICE <nick> <channel> :<message>"); | |
361 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
362 | + "CNOTICE :Sends a private notice to a user."); | |
363 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
364 | + "CNOTICE :A channel voice or operator can use this to bypass the target flood limit " | |
365 | + "(target change too fast error) when the user is on the channel."); | |
366 | + return 0; | |
367 | +} | |
368 | + | |
369 | + | |
370 | +/* | |
371 | + * mh_connect - help message handler | |
372 | + */ | |
373 | +int mh_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
374 | +{ | |
375 | + if (!IsAnOper(sptr)) | |
376 | + return mh_not_oper(cptr, sptr, parc, parv); | |
377 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
378 | + "CONNECT :CONNECT <server> [<port> [<remote server>]]"); | |
379 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
380 | + "CONNECT :Connects the server to another server."); | |
381 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
382 | + "CONNECT :Special port 0 can be used to let the remote server workout the port to use."); | |
383 | + return 0; | |
384 | +} | |
385 | + | |
386 | + | |
387 | +/* | |
388 | + * mh_cprivmsg - help message handler | |
389 | + */ | |
390 | +int mh_cprivmsg(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
391 | +{ | |
392 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
393 | + "CPRIVMSG :CPRIVMSG <nick> <channel> :<message>"); | |
394 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
395 | + "CPRIVMSG :Sends a private message to a user."); | |
396 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
397 | + "CPRIVMSG :A channel voice or operator can use this to bypass the target flood limit " | |
398 | + "(target change too fast error) when the user is on the channel."); | |
399 | + return 0; | |
400 | +} | |
401 | + | |
402 | + | |
403 | +/* | |
404 | + * mh_die - help message handler | |
405 | + */ | |
406 | +int mh_die(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
407 | +{ | |
408 | + if (!IsAnOper(sptr)) | |
409 | + return mh_not_oper(cptr, sptr, parc, parv); | |
410 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
411 | + "DIE :DIE <server>"); | |
412 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
413 | + "DIE :Terminates the server. The servername needs to be given as sanity check."); | |
414 | + return 0; | |
415 | +} | |
416 | + | |
417 | + | |
418 | +/* | |
419 | + * mh_get - help message handler | |
420 | + * TODO: check HIS | |
421 | + */ | |
422 | +int mh_get(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
423 | +{ | |
424 | + if (!IsAnOper(sptr)) | |
425 | + return mh_not_oper(cptr, sptr, parc, parv); | |
426 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
427 | + "GET :GET <feature> [<parameters>]"); | |
428 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
429 | + "GET :Returns the value of a feature."); | |
430 | + return 0; | |
431 | +} | |
432 | + | |
433 | + | |
434 | +/* | |
435 | + * mh_gline - help message handler | |
436 | + * TODO: check HIS | |
437 | + */ | |
438 | +int mh_gline(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
439 | +{ | |
440 | + if (!IsAnOper(sptr)) | |
441 | + return mh_not_oper(cptr, sptr, parc, parv); | |
442 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
443 | + "GLINE :GLINE [[!][+|-|>|<]<mask> [<target>] [<duration> [:<reason>]]]"); | |
444 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
445 | + "GLINE :Views, sets or changes a gline."); | |
446 | + return 0; | |
447 | +} | |
448 | + | |
449 | + | |
450 | +/* | |
451 | + * mh_hash - help message handler | |
452 | + * TODO: check HIS | |
453 | + */ | |
454 | +int mh_hash(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
455 | +{ | |
456 | + if (!IsAnOper(sptr)) | |
457 | + return mh_not_oper(cptr, sptr, parc, parv); | |
458 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
459 | + "HASH :HASH"); | |
460 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
461 | + "HASH :Shows hash table statistics."); | |
462 | + return 0; | |
463 | +} | |
464 | + | |
465 | + | |
466 | +/* | |
467 | + * mh_info - help message handler | |
468 | + * TODO: check HIS remote | |
469 | + */ | |
470 | +int mh_info(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
471 | +{ | |
472 | + if (!IsAnOper(sptr)) { | |
473 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, "INFO :INFO"); | |
474 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, "INFO :Shows info about the IRCd."); | |
475 | + return mh_not_oper(cptr, sptr, parc, parv); | |
476 | + } else { | |
477 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, "INFO :INFO [<server>]"); | |
478 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
479 | + "INFO :Show info about the IRCd. Lists a file hash and version number for its source files."); | |
480 | + } | |
481 | + return 0; | |
482 | +} | |
483 | + | |
484 | + | |
485 | +/* | |
486 | + * mh_invite - help message handler | |
487 | + */ | |
488 | +int mh_invite(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
489 | +{ | |
490 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
491 | + "INVITE :INVITE <nick> <channel>"); | |
492 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
493 | + "INVITE :Invites a user to a channel."); | |
494 | + return 0; | |
495 | +} | |
496 | + | |
497 | + | |
498 | +/* | |
499 | + * mh_ison - help message handler | |
500 | + * TODO: check that syntax is clear - no limit on number of nicks | |
501 | + */ | |
502 | +int mh_ison(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
503 | +{ | |
504 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
505 | + "ISON :ISON <nick> [<nick> [..]]"); | |
506 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
507 | + "ISON :Returns the nicks that are on the network."); | |
508 | + return 0; | |
509 | +} | |
510 | + | |
511 | + | |
512 | +/* | |
513 | + * mh_join - help message handler | |
514 | + */ | |
515 | +int mh_join(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
516 | +{ | |
517 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
518 | + "JOIN :JOIN <channel> [<key>]"); | |
519 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
520 | + "JOIN :Joins a channel, where <channel> and <key> are a comma separated list of one or more elements."); | |
521 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
522 | + "JOIN :Joining channel 0 can be used to leave all channels."); | |
523 | + return 0; | |
524 | +} | |
525 | + | |
526 | + | |
527 | +/* | |
528 | + * mh_jupe - help message handler | |
529 | + * TODO: check HIS? | |
530 | + */ | |
531 | +int mh_jupe(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
532 | +{ | |
533 | + if (!IsAnOper(sptr)) | |
534 | + return mh_not_oper(cptr, sptr, parc, parv); | |
535 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
536 | + "JUPE :JUPE [[+|-]<server> [[<target>] <duration> :<reason>]]"); | |
537 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
538 | + "JUPE :Views or manipulates server jupes."); | |
539 | + return 0; | |
540 | +} | |
541 | + | |
542 | + | |
543 | +/* | |
544 | + * mh_kick - help message handler | |
545 | + */ | |
546 | +int mh_kick(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
547 | +{ | |
548 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
549 | + "KICK :KICK <channel> <nick> [:<reason>]"); | |
550 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
551 | + "KICK :Kicks a user from a channel."); | |
552 | + return 0; | |
553 | +} | |
554 | + | |
555 | + | |
556 | +/* | |
557 | + * mh_kill - help message handler | |
558 | + */ | |
559 | +int mh_kill(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
560 | +{ | |
561 | + if (!IsAnOper(sptr)) | |
562 | + return mh_not_oper(cptr, sptr, parc, parv); | |
563 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
564 | + "KILL :KILL <nick> :<reason>"); | |
565 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
566 | + "KILL :Disconnects a user from the network."); | |
567 | + return 0; | |
568 | +} | |
569 | + | |
570 | + | |
571 | +/* | |
572 | + * mh_links - help message handler | |
573 | + * TODO: check HIS feature | |
574 | + */ | |
575 | +int mh_links(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
576 | +{ | |
577 | + if (!IsAnOper(sptr)) | |
578 | + return mh_not_oper(cptr, sptr, parc, parv); | |
579 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
580 | + "LINKS :LINKS [[<remote server>] <mask>]"); | |
581 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
582 | + "LINKS :Shows server links on the network."); | |
583 | + return 0; | |
584 | +} | |
585 | + | |
586 | + | |
587 | +/* | |
588 | + * mh_list - help message handler | |
589 | + */ | |
590 | +int mh_list(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
591 | +{ | |
592 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
593 | + "LIST :LIST :[<channel>|<parameters>|STOP]"); | |
594 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
595 | + "LIST :Lists channels on the network. See \"/QUOTE LIST :\" for more info."); | |
596 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
597 | + "LIST :Parameter <channel> is a comma separated list of one or more channels."); | |
598 | + return 0; | |
599 | +} | |
600 | + | |
601 | + | |
602 | +/* | |
603 | + * mh_lusers - help message handler | |
604 | + * TODO: check HIS remote feature | |
605 | + */ | |
606 | +int mh_lusers(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
607 | +{ | |
608 | + if (!IsAnOper(sptr)) | |
609 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
610 | + "LUSERS :LUSERS"); | |
611 | + else | |
612 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
613 | + "LUSERS :LUSERS [<dummy> [<remote server>]]"); | |
614 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
615 | + "LUSERS :Shows information about the number of users on the network."); | |
616 | + return 0; | |
617 | +} | |
618 | + | |
619 | + | |
620 | +/* | |
621 | + * mh_map - help message handler | |
622 | + * TODO: check HIS feature | |
623 | + */ | |
624 | +int mh_map(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
625 | +{ | |
626 | + if (!IsAnOper(sptr)) | |
627 | + return mh_not_oper(cptr, sptr, parc, parv); | |
628 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
629 | + "MAP :MAP [<mask>]"); | |
630 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
631 | + "MAP :Shows a map of the servers on the network."); | |
632 | + return 0; | |
633 | +} | |
634 | + | |
635 | + | |
636 | +/* | |
637 | + * mh_mode - help message handler | |
638 | + * TODO: check syntax is clear | |
639 | + */ | |
640 | +int mh_mode(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
641 | +{ | |
642 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
643 | + "MODE :MODE <channel>|<nick> [<modes>]"); | |
644 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
645 | + "MODE :Views or changes modes of a channel or user."); | |
646 | + return 0; | |
647 | +} | |
648 | + | |
649 | + | |
650 | +/* | |
651 | + * mh_motd - help message handler | |
652 | + * TODO: check HIS remote feature | |
653 | + */ | |
654 | +int mh_motd(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
655 | +{ | |
656 | + if (!IsAnOper(sptr)) | |
657 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
658 | + "MOTD :MOTD"); | |
659 | + else | |
660 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
661 | + "MOTD :MOTD [<server>]"); | |
662 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
663 | + "MOTD :Shows the Message Of The Day."); | |
664 | + return 0; | |
665 | +} | |
666 | + | |
667 | + | |
668 | +/* | |
669 | + * mh_names - help message handler | |
670 | + * TODO: check HIS remote feature | |
671 | + */ | |
672 | +int mh_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
673 | +{ | |
674 | + if (!IsAnOper(sptr)) | |
675 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
676 | + "NAMES :NAMES [[-D] <channel>]"); | |
677 | + else | |
678 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
679 | + "NAMES :NAMES [[[-D] [channel]] [<server>]]"); | |
680 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
681 | + "NAMES :Shows the names of users on the channel."); | |
682 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
683 | + "NAMES :Parameter <channel> is a comma separated list of one or more channels," | |
684 | + " and the -D option is for listing delayedjoin users."); | |
685 | + return 0; | |
686 | +} | |
687 | + | |
688 | + | |
689 | +/* | |
690 | + * mh_nick - help message handler | |
691 | + */ | |
692 | +int mh_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
693 | +{ | |
694 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
695 | + "NICK :NICK <newnick>"); | |
696 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
697 | + "NICK :Changes nickname."); | |
698 | + return 0; | |
699 | +} | |
700 | + | |
701 | + | |
702 | +/* | |
703 | + * mh_notice - help message handler | |
704 | + */ | |
705 | +int mh_notice(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
706 | +{ | |
707 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
708 | + "NOTICE :NOTICE <target> :<message>"); | |
709 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
710 | + "NOTICE :Sends a notice to a target, where <target> can be a comma separated list of one or more nicks or channels."); | |
711 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
712 | + "NOTICE :Parameter <target> can be @<channel> to send a message to all channel operators (same as WALLCHOPS)."); | |
713 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
714 | + "NOTICE :Parameter <target> can be in the form of <nick>@<server> to send to a service."); | |
715 | + if (IsAnOper(sptr)) { | |
716 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
717 | + "NOTICE :Parameter <target> can be a $<servername> to broadcast a message to all users on a server."); | |
718 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
719 | + "NOTICE :Parameter <target> can be a $@<hostmask> to broadcast a message to all users with a matching host."); | |
720 | + } | |
721 | + return 0; | |
722 | +} | |
723 | + | |
724 | + | |
725 | +/* | |
726 | + * mh_oper - help message handler | |
727 | + */ | |
728 | +int mh_oper(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
729 | +{ | |
730 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
731 | + "OPER :OPER <username> <password>"); | |
732 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
733 | + "OPER :Logs in as IRC Operator."); | |
734 | + return 0; | |
735 | +} | |
736 | + | |
737 | + | |
738 | +/* | |
739 | + * mh_opmode - help message handler | |
740 | + */ | |
741 | +int mh_opmode(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
742 | +{ | |
743 | + if (!IsAnOper(sptr)) | |
744 | + return mh_not_oper(cptr, sptr, parc, parv); | |
745 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
746 | + "OPMODE :OPMODE [!]<channel> <modes>"); | |
747 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
748 | + "OPMODE :Changes modes on a channel."); | |
749 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
750 | + "OPMODE :The ! prefix may be used to override a channel quarantine."); | |
751 | + return 0; | |
752 | +} | |
753 | + | |
754 | +/* | |
755 | + * mh_part - help message handler | |
756 | + */ | |
757 | +int mh_part(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
758 | +{ | |
759 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
760 | + "PART :PART <channel> [:<message>]"); | |
761 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
762 | + "PART :Parts a channel with an optional message."); | |
763 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
764 | + "PART :Parameter <channel> is a comma separated list of one or more channels."); | |
765 | + return 0; | |
766 | +} | |
767 | + | |
768 | + | |
769 | +/* | |
770 | + * mh_pass - help message handler | |
771 | + */ | |
772 | +int mh_pass(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
773 | +{ | |
774 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
775 | + "PASS :PASS :<password>"); | |
776 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
777 | + "PASS :Provides the password required to connect to the server."); | |
778 | + return 0; | |
779 | +} | |
780 | + | |
781 | + | |
782 | +/* | |
783 | + * mh_ping - help message handler | |
784 | + * TODO: <text> ? | |
785 | + */ | |
786 | +int mh_ping(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
787 | +{ | |
788 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
789 | + "PING :PING :<text>"); | |
790 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
791 | + "PING :Sends a ping to the server."); | |
792 | + return 0; | |
793 | +} | |
794 | + | |
795 | + | |
796 | +/* | |
797 | + * mh_pong - help message handler | |
798 | + * TODO: <text> ? | |
799 | + */ | |
800 | +int mh_pong(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
801 | +{ | |
802 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
803 | + "PONG :PONG :<text>"); | |
804 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
805 | + "PONG :Sends a pong as reply to a PING from the server."); | |
806 | + return 0; | |
807 | +} | |
808 | + | |
809 | + | |
810 | +/* | |
811 | + * mh_privmsg - help message handler | |
812 | + */ | |
813 | +int mh_privmsg(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
814 | +{ | |
815 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
816 | + "PRIVMSG :PRIVMSG <target> :<message>"); | |
817 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
818 | + "PRIVMSG :Sends a message to a target, where <target> can be a comma separated list of one or more nicks or channels."); | |
819 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
820 | + "PRIVMSG :Parameter <target> can be @<channel> to send a message to all channel operators (same as WALLCHOPS)."); | |
821 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
822 | + "PRIVMSG :Parameter <target> can be in the form of <nick>@<server> to send to a service."); | |
823 | + if (IsAnOper(sptr)) { | |
824 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
825 | + "PRIVMSG :Parameter <target> can be a $<servername> to broadcast a message to all users on a server."); | |
826 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
827 | + "PRIVMSG :Parameter <target> can be a $@<hostmask> to broadcast a message to all users with a matching host."); | |
828 | + } | |
829 | + return 0; | |
830 | +} | |
831 | + | |
832 | + | |
833 | +/* | |
834 | + * mh_privs - help message handler | |
835 | + */ | |
836 | +int mh_privs(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
837 | +{ | |
838 | + if (!IsAnOper(sptr)) | |
839 | + return mh_not_oper(cptr, sptr, parc, parv); | |
840 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
841 | + "PRIVS :PRIVS <nick> [<nick> [..]]"); | |
842 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
843 | + "PRIVS :Shows the privileges an IRC Operator has."); | |
a87bc2c2 | 844 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, |
845 | + "PRIVS :CHAN_LIMIT oper has no channel limit (JOIN)"); | |
846 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
847 | + "PRIVS :MODE_LCHAN oper can mode local chans without channel operator status"); | |
848 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
849 | + "PRIVS :WALK_LCHAN oper can walk through local modes (JOIN &chan override)"); | |
850 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
851 | + "PRIVS :DEOP_LCHAN oper cannot be deoped on local chans"); | |
852 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
853 | + "PRIVS :SHOW_INVIS show local invisible users"); | |
854 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
855 | + "PRIVS :SHOW_ALL_INVIS show all invisible users"); | |
856 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
857 | + "PRIVS :UNLIMIT_QUERY unlimited results in WHO"); | |
858 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
859 | + "PRIVS :KILL oper can KILL"); | |
860 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
861 | + "PRIVS :LOCAL_KILL oper can local KILL"); | |
862 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
863 | + "PRIVS :REHASH oper can REHASH"); | |
864 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
865 | + "PRIVS :RESTART oper can RESTART"); | |
866 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
867 | + "PRIVS :DIE oper can DIE"); | |
868 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
869 | + "PRIVS :GLINE oper can GLINE"); | |
870 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
871 | + "PRIVS :LOCAL_GLINE oper can local GLINE"); | |
872 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
873 | + "PRIVS :JUPE oper can JUPE"); | |
874 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
875 | + "PRIVS :LOCAL_JUPE oper can local JUPE"); | |
876 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
877 | + "PRIVS :OPMODE oper can OPMODE and CLEARMODE"); | |
878 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
879 | + "PRIVS :LOCAL_OPMODE oper can local OPMODE and CLEARMODE"); | |
880 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
881 | + "PRIVS :SET oper can SET"); | |
882 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
883 | + "PRIVS :WHOX log oper's usage of WHO x"); | |
884 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
885 | + "PRIVS :BADCHAN oper can BADCHAN (GLINE)"); | |
886 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
887 | + "PRIVS :LOCAL_BADCHAN oper can local BADCHAN (GLINE)"); | |
888 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
889 | + "PRIVS :SEE_CHAN oper can see in secret chans"); | |
890 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
891 | + "PRIVS :PROPAGATE propagate oper status"); | |
892 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
893 | + "PRIVS :DISPLAY oper status is displayed"); | |
894 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
895 | + "PRIVS :SEE_OPERS oper can see hidden opers"); | |
896 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
897 | + "PRIVS :WIDE_GLINE oper can set wider GLINE"); | |
898 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
899 | + "PRIVS :LIST_CHAN oper can LIST secret channels"); | |
900 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
901 | + "PRIVS :FORCE_OPMODE can hack modes on quarantined channels"); | |
902 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
903 | + "PRIVS :FORCE_LOCAL_OPMODE can hack modes on quarantined local channels"); | |
904 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
905 | + "PRIVS :APASS_OPMODE can hack modes +A/-A/+U/-U"); | |
906 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
907 | + "PRIVS :CHANSERV oper can set usermode +k"); | |
908 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
909 | + "PRIVS :XTRA_OPER oper can set usermode +X"); | |
910 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
911 | + "PRIVS :NOIDLE oper can set usermode +I"); | |
912 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
913 | + "PRIVS :FREEFORM oper can use freeform SETHOST"); | |
914 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
915 | + "PRIVS :PARANOID oper can set usermode +P"); | |
916 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
917 | + "PRIVS :CHECK oper can use CHECK"); | |
918 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
919 | + "PRIVS :WALL oper can use WALLOPS and WALLUSERS"); | |
920 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
921 | + "PRIVS :CLOSE oper can use CLOSE"); | |
922 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
923 | + "PRIVS :ROUTE oper can use CONNECT and SQUIT"); | |
924 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
925 | + "PRIVS :ROUTEINFO oper can use MAP, TRACE, ASLL, LINKS, and view JUPE list"); | |
926 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
927 | + "PRIVS :USER_PRIVACY oper can bypass user privacy (see through usermode +x)"); | |
928 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
929 | + "PRIVS :CHANNEL_PRIVACY oper can bypass channel privacy (see info on channels they are not on)"); | |
930 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
931 | + "PRIVS :SERVERINFO oper can use GET, STATS, HASH, and retrieve remote information"); | |
cddf800b | 932 | + return 0; |
933 | +} | |
934 | + | |
935 | + | |
936 | +/* | |
937 | + * mh_quit - help message handler | |
938 | + * TODO: Disconnect or Disconnects? | |
939 | + */ | |
940 | +int mh_quit(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
941 | +{ | |
942 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
943 | + "QUIT :QUIT :<message>"); | |
944 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
945 | + "QUIT :Disconnect from the network with an optional message."); | |
946 | + return 0; | |
947 | +} | |
948 | + | |
949 | + | |
950 | +/* | |
951 | + * mh_rehash - help message handler | |
952 | + * TODO: check the options, etc. | |
953 | + */ | |
954 | +int mh_rehash(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
955 | +{ | |
956 | + if (!IsAnOper(sptr)) | |
957 | + return mh_not_oper(cptr, sptr, parc, parv); | |
958 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
959 | + "REHASH :REHASH [L|M|Q]"); | |
960 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
961 | + "REHASH :Reloads the server conf file, MOTD, and log files."); | |
962 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
963 | + "REHASH :Where L reopens the log files, M flushes the MOTD cache, Q the DNS resolver is not restarted."); | |
964 | + return 0; | |
965 | +} | |
966 | + | |
967 | + | |
968 | +/* | |
969 | + * mh_reset - help message handler | |
970 | + */ | |
971 | +int mh_reset(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
972 | +{ | |
973 | + if (!IsAnOper(sptr)) | |
974 | + return mh_not_oper(cptr, sptr, parc, parv); | |
975 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
976 | + "RESET :RESET <feature> [<parameters>]"); | |
977 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
978 | + "RESET :Resets a feature to its default hardcoded value."); | |
979 | + return 0; | |
980 | +} | |
981 | + | |
982 | + | |
983 | +/* | |
984 | + * mh_restart - help message handler | |
985 | + */ | |
986 | +int mh_restart(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
987 | +{ | |
988 | + if (!IsAnOper(sptr)) | |
989 | + return mh_not_oper(cptr, sptr, parc, parv); | |
990 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
991 | + "RESTART :RESTART <server>"); | |
992 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
993 | + "RESTART :Restarts the server. The servername needs to be given as sanity check."); | |
994 | + return 0; | |
995 | +} | |
996 | + | |
997 | + | |
998 | +/* | |
999 | + * mh_rping - help message handler | |
1000 | + * TODO: <text> ? | |
1001 | + */ | |
1002 | +int mh_rping(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1003 | +{ | |
1004 | + if (!IsAnOper(sptr)) | |
1005 | + return mh_not_oper(cptr, sptr, parc, parv); | |
1006 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1007 | + "RPING :RPING <server> [<remote server>] [:<text>]"); | |
1008 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1009 | + "RPING :Pings a remote server and returns the Round Trip Time in milliseconds."); | |
1010 | + return 0; | |
1011 | +} | |
1012 | + | |
1013 | + | |
1014 | +/* | |
1015 | + * mh_set - help message handler | |
1016 | + */ | |
1017 | +int mh_set(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1018 | +{ | |
1019 | + if (!IsAnOper(sptr)) | |
1020 | + return mh_not_oper(cptr, sptr, parc, parv); | |
1021 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1022 | + "SET :SET <feature> [<parameters>] :<value>"); | |
1023 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1024 | + "SET :Changes the value of a feature."); | |
1025 | + return 0; | |
1026 | +} | |
1027 | + | |
1028 | + | |
1029 | +/* | |
1030 | + * mh_sethost - help message handler | |
1031 | + */ | |
1032 | +int mh_sethost(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1033 | +{ | |
1034 | + if (!IsAnOper(sptr)) { | |
1035 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1036 | + "SETHOST :SETHOST <spoofhost> <password>"); | |
1037 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1038 | + "SETHOST :Sets a spoof host."); | |
1039 | + } else { | |
1040 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1041 | + "SETHOST :SETHOST <user> <host>"); | |
1042 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1043 | + "SETHOST :Sets a spoof user@host."); | |
1044 | + } | |
1045 | + return 0; | |
1046 | +} | |
1047 | + | |
1048 | + | |
1049 | +/* | |
1050 | + * mh_settime - help message handler | |
1051 | + */ | |
1052 | +int mh_settime(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1053 | +{ | |
1054 | + if (!IsAnOper(sptr)) | |
1055 | + return mh_not_oper(cptr, sptr, parc, parv); | |
1056 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1057 | + "SETTIME :SETTIME <timestamp> [<server>]"); | |
1058 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1059 | + "SETTIME :Changes the time on a server." | |
1060 | + "When parameter <timestamp> is 0 the local server " | |
1061 | + "uses its own timestamp before sending it to the remote server."); | |
1062 | + return 0; | |
1063 | +} | |
1064 | + | |
1065 | + | |
1066 | +/* | |
1067 | + * mh_silence - help message handler | |
1068 | + * TODO: mention ~ exempt mask prefix | |
1069 | + */ | |
1070 | +int mh_silence(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1071 | +{ | |
1072 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1073 | + "SILENCE :SILENCE [[+|-]<mask>|<nick>]"); | |
1074 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1075 | + "SILENCE :Views or changes the silence list."); | |
1076 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1077 | + "SILENCE :Parameter <mask> is a comma separated list of one or more masks."); | |
1078 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1079 | + "SILENCE :Silence is a server side ignore -" | |
1080 | + " any message sent privately or invites from a user matching a silence mask is dropped."); | |
1081 | + return 0; | |
1082 | +} | |
1083 | + | |
1084 | + | |
1085 | +/* | |
1086 | + * mh_squit - help message handler | |
1087 | + */ | |
1088 | +int mh_squit(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1089 | +{ | |
1090 | + if (!IsAnOper(sptr)) | |
1091 | + return mh_not_oper(cptr, sptr, parc, parv); | |
1092 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1093 | + "SQUIT :SQUIT <server> [:<reason>]"); | |
1094 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1095 | + "SQUIT :Disconnects a server from the network."); | |
1096 | + return 0; | |
1097 | +} | |
1098 | + | |
1099 | + | |
1100 | +/* | |
1101 | + * mh_stats - help message handler | |
1102 | + * TODO: check HIS (too many per stats type) / HIS remote? | |
1103 | + */ | |
1104 | +int mh_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1105 | +{ | |
1106 | + if (!IsAnOper(sptr)) | |
1107 | + return mh_not_oper(cptr, sptr, parc, parv); | |
1108 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1109 | + "STATS :STATS [<type> [[<server>] [<mask>]]]"); | |
1110 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1111 | + "STATS :Shows server configuration and statistics."); | |
1112 | + return 0; | |
1113 | +} | |
1114 | + | |
1115 | + | |
1116 | +/* | |
1117 | + * mh_time - help message handler | |
1118 | + * TODO: check HIS remote feature | |
1119 | + */ | |
1120 | +int mh_time(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1121 | +{ | |
1122 | + if (!IsAnOper(sptr)) { | |
1123 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1124 | + "TIME :TIME"); | |
1125 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1126 | + "TIME :Shows the time on the server."); | |
1127 | + } | |
1128 | + else { | |
1129 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1130 | + "TIME :TIME [<server>]"); | |
1131 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1132 | + "TIME :Shows the time on the server."); | |
1133 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1134 | + "TIME :Parameter <server> can be a * to view the time from all servers."); | |
1135 | + } | |
1136 | + | |
1137 | + return 0; | |
1138 | +} | |
1139 | + | |
1140 | + | |
1141 | +/* | |
1142 | + * mh_topic - help message handler | |
1143 | + */ | |
1144 | +int mh_topic(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1145 | +{ | |
1146 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1147 | + "TOPIC :TOPIC <channel> [:<text>]"); | |
1148 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1149 | + "TOPIC :Views or changes the topic on a channel."); | |
1150 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1151 | + "TOPIC :Parameter <channel> is a comma separated list of one or more channels."); | |
1152 | + return 0; | |
1153 | +} | |
1154 | + | |
1155 | + | |
1156 | +/* | |
1157 | + * mh_trace - help message handler | |
1158 | + * TODO: check HIS / HIS remote? | |
1159 | + * TODO: check <to server> parameter | |
1160 | + */ | |
1161 | +int mh_trace(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1162 | +{ | |
1163 | + if (!IsAnOper(sptr)) | |
1164 | + return mh_not_oper(cptr, sptr, parc, parv); | |
1165 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1166 | + "TRACE :TRACE [<nick>|<server> <to server>]"); | |
1167 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1168 | + "TRACE :Shows the route to a user or server."); | |
1169 | + return 0; | |
1170 | +} | |
1171 | + | |
1172 | + | |
1173 | +/* | |
1174 | + * mh_uping - help message handler | |
1175 | + * TODO: default port 7007, define UDP_PORT | |
1176 | + */ | |
1177 | +int mh_uping(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1178 | +{ | |
1179 | + if (!IsAnOper(sptr)) | |
1180 | + return mh_not_oper(cptr, sptr, parc, parv); | |
1181 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1182 | + "UPING :UPING <server> [<port>] [<remote server>] [<number of packets>]"); | |
1183 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1184 | + "UPING :Pings the host of the server with UDP packets - server does not have to be linked."); | |
1185 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1186 | + "UPING :By default port 7007 is used, and 5 packets are sent (maximum is 20)."); | |
1187 | + return 0; | |
1188 | +} | |
1189 | + | |
1190 | + | |
1191 | +/* | |
1192 | + * mh_user - help message handler | |
1193 | + */ | |
1194 | +int mh_user(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1195 | +{ | |
1196 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1197 | + "USER :USER <username> <hostname> <servername> :<realname>"); | |
1198 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1199 | + "USER :Registers a new client connection. Parameters <hostname> and <servername> are ignored."); | |
1200 | + return 0; | |
1201 | +} | |
1202 | + | |
1203 | + | |
1204 | +/* | |
1205 | + * mh_userhost - help message handler | |
1206 | + * TODO: syntax clear? | |
1207 | + * TODO: max 5 | |
1208 | + */ | |
1209 | +int mh_userhost(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1210 | +{ | |
1211 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1212 | + "USERHOST :USERHOST <nick> [<nick> [..]]"); | |
1213 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1214 | + "USERHOST :Returns the user@host for a user."); | |
1215 | + return 0; | |
1216 | +} | |
1217 | + | |
1218 | + | |
1219 | +/* | |
1220 | + * mh_userip - help message handler | |
1221 | + * TODO: syntax clear? | |
1222 | + * TODO: max 5 | |
1223 | + */ | |
1224 | +int mh_userip(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1225 | +{ | |
1226 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1227 | + "USERIP :USERIP <nick> [<nick> [..]]"); | |
1228 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1229 | + "USERIP :Returns the user@ip for a user."); | |
1230 | + return 0; | |
1231 | +} | |
1232 | + | |
1233 | + | |
1234 | +/* | |
1235 | + * mh_version - help message handler | |
1236 | + * TODO: check HIS remote feature | |
1237 | + */ | |
1238 | +int mh_version(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1239 | +{ | |
1240 | + if (!IsAnOper(sptr)) { | |
1241 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1242 | + "VERSION :VERSION"); | |
1243 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1244 | + "VERSION :Shows information about the server, and the supported features and settings."); | |
1245 | + } | |
1246 | + else { | |
1247 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1248 | + "VERSION :VERSION [<server>]"); | |
1249 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1250 | + "VERSION :Shows information about the server, and the supported features and settings."); | |
1251 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1252 | + "VERSION :Parameter <server> can be a * to view the version info from all servers."); | |
1253 | + } | |
1254 | + return 0; | |
1255 | +} | |
1256 | + | |
1257 | + | |
1258 | +/* | |
1259 | + * mh_wallchops - help message handler | |
1260 | + * TODO: mention NOTICE @#channel? | |
1261 | + */ | |
1262 | +int mh_wallchops(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1263 | +{ | |
1264 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1265 | + "WALLCHOPS :WALLCHOPS <channel> :<message>"); | |
1266 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1267 | + "WALLCHOPS :Sends a channel notice to the operators on a channel."); | |
1268 | + return 0; | |
1269 | +} | |
1270 | + | |
1271 | + | |
1272 | +/* | |
1273 | + * mh_wallops - help message handler | |
1274 | + * TODO: check HIS ? | |
1275 | + */ | |
1276 | +int mh_wallops(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1277 | +{ | |
1278 | + if (!IsAnOper(sptr)) | |
1279 | + return mh_not_oper(cptr, sptr, parc, parv); | |
1280 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1281 | + "WALLOPS :WALLOPS :<message>"); | |
1282 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1283 | + "WALLOPS :Sends a message to all IRC Operators with usermode +w set."); | |
1284 | + return 0; | |
1285 | +} | |
1286 | + | |
1287 | + | |
1288 | +/* | |
1289 | + * mh_wallusers - help message handler | |
1290 | + */ | |
1291 | +int mh_wallusers(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1292 | +{ | |
1293 | + if (!IsAnOper(sptr)) | |
1294 | + return mh_not_oper(cptr, sptr, parc, parv); | |
1295 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1296 | + "WALLUSERS :WALLUSERS :<message>"); | |
1297 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1298 | + "WALLUSERS :Sends a message to all users with usermode +w set."); | |
1299 | + return 0; | |
1300 | +} | |
1301 | + | |
1302 | + | |
1303 | +/* | |
1304 | + * mh_wallvoices - help message handler | |
1305 | + */ | |
1306 | +int mh_wallvoices(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1307 | +{ | |
1308 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1309 | + "WALLVOICES :WALLVOICES <channel> :<message>"); | |
1310 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1311 | + "WALLVOICES :Sends a channel notice to the voices and operators on a channel."); | |
1312 | + return 0; | |
1313 | +} | |
1314 | + | |
1315 | + | |
1316 | +/* | |
1317 | + * mh_who - help message handler | |
1318 | + * TODO: this is all way too much to add here.. :( | |
1319 | + * TODO: mention <mask> - chan, nick, user, host, ip, server, realname | |
1320 | + * TODO: filter | |
1321 | +d Join-delayed channel members | |
1322 | +o IRC Operator (specifying this one means only opers are matched) | |
1323 | + | |
1324 | + * TODO: x for operators | |
1325 | + | |
1326 | + * TODO: match | |
1327 | +n Nick, u Username, h Hostname, i Numeric IP, | |
1328 | +s Servername, r Realname, a Account name | |
1329 | + | |
1330 | + | |
1331 | + * TODO: return | |
1332 | +t Include the querytype in the reply | |
1333 | +c Include (first) channel name (* when none can be shown) | |
1334 | +u Include userID with eventual ~ | |
1335 | +i Include IP | |
1336 | +h Include hostname | |
1337 | +s Include server name | |
1338 | +n Include nick | |
1339 | +f Include flags | |
1340 | +d Include "distance" in hops | |
1341 | +l Include idle time (0 for remote users) | |
1342 | +a Include account name (0 when the user has no account set) | |
1343 | +o Include oplevel | |
1344 | +r Include real name | |
1345 | +b Include account ID | |
1346 | + | |
1347 | + * TODO: HIS settings | |
1348 | + */ | |
1349 | +int mh_who(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1350 | +{ | |
1351 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1352 | + "WHO :WHO <mask> [[<match>][%<fields>[,<querytype>]] [:<mask>]]"); | |
1353 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1354 | + "WHO :Returns information on a user."); | |
1355 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1356 | + "WHO :Parameter <mask> can be a comma separated list of one or more nicks and channels."); | |
1357 | + return 0; | |
1358 | +} | |
1359 | + | |
1360 | + | |
1361 | +/* | |
1362 | + * mh_whois - help message handler | |
1363 | + * TODO: check HIS / HIS remote | |
1364 | + */ | |
1365 | +int mh_whois(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1366 | +{ | |
1367 | + if (!IsAnOper(sptr)) { | |
1368 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1369 | + "WHOIS :WHOIS [<dummy>] <nick>"); | |
1370 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1371 | + "WHOIS :Shows who someone is."); | |
1372 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1373 | + "WHOIS :Parameter <nick> is a comma separated list of one or more nicks," | |
1374 | + " <dummy> can be specified to get a reply from the user's server to show idle and signon time"); | |
1375 | + } | |
1376 | + else { | |
1377 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1378 | + "WHOIS :WHOIS [<server>] <nick>"); | |
1379 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1380 | + "WHOIS :Shows who someone is."); | |
1381 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1382 | + "WHOIS :Parameter <nick> is a comma separated list of one or more nicks," | |
1383 | + " the same nick can be specified as <server> to get a reply from the user's server to show idle and signon time"); | |
1384 | + } | |
1385 | + return 0; | |
1386 | +} | |
1387 | + | |
1388 | + | |
1389 | +/* | |
1390 | + * mh_whowas - help message handler | |
1391 | + * TODO: check HIS / HIS remote | |
1392 | + * TODO: see if 20 is a define | |
1393 | + */ | |
1394 | +int mh_whowas(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
1395 | +{ | |
1396 | + if (!IsAnOper(sptr)) { | |
1397 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1398 | + "WHOWAS :WHOWAS <nick> [<max>]"); | |
1399 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1400 | + "WHOWAS :Shows who someone was."); | |
1401 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1402 | + "WHOWAS :Parameter <nick> is a comma separated list of one or more nicks," | |
1403 | + " <max> is 0 by default (unlimited)."); | |
1404 | + } | |
1405 | + else { | |
1406 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1407 | + "WHOWAS :WHOIS <nick> [<max> [<server>]]"); | |
1408 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1409 | + "WHOWAS :Shows who someone was."); | |
1410 | + send_reply(sptr, SND_EXPLICIT | RPL_HELP, | |
1411 | + "WHOWAS :Parameter <nick> is a comma separated list of one or more nicks," | |
1412 | + " <max> is 0 by default (unlimited)," | |
1413 | + " maximum number of results from a remote server is 20."); | |
1414 | + } | |
1415 | + return 0; | |
1416 | +} | |
1417 | \ No newline at end of file | |
a037f551 | 1418 | diff -r 3fc56aefcea6 ircd/parse.c |
1419 | --- a/ircd/parse.c Tue Jan 27 18:27:54 2009 +0100 | |
1420 | +++ b/ircd/parse.c Tue Jan 27 20:49:11 2009 +0100 | |
cddf800b | 1421 | @@ -110,534 +110,534 @@ |
12e82c05 | 1422 | MSG_PRIVATE, |
cddf800b | 1423 | TOK_PRIVATE, |
1424 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1425 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1426 | - { m_unregistered, m_privmsg, ms_privmsg, mo_privmsg, m_ignore } | |
1427 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1428 | + { m_unregistered, m_privmsg, ms_privmsg, mo_privmsg, m_ignore, mh_privmsg } | |
1429 | }, | |
1430 | { | |
1431 | MSG_NICK, | |
1432 | TOK_NICK, | |
1433 | 0, MAXPARA, MFLG_SLOW | MFLG_UNREG, 0, NULL, | |
1434 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1435 | - { m_nick, m_nick, ms_nick, m_nick, m_ignore } | |
1436 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1437 | + { m_nick, m_nick, ms_nick, m_nick, m_ignore, mh_nick } | |
1438 | }, | |
1439 | { | |
1440 | MSG_NOTICE, | |
1441 | TOK_NOTICE, | |
1442 | 0, MAXPARA, MFLG_SLOW | MFLG_IGNORE, 0, NULL, | |
1443 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1444 | - { m_ignore, m_notice, ms_notice, mo_notice, m_ignore } | |
1445 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1446 | + { m_ignore, m_notice, ms_notice, mo_notice, m_ignore, mh_notice } | |
1447 | }, | |
1448 | { | |
1449 | MSG_WALLCHOPS, | |
1450 | TOK_WALLCHOPS, | |
1451 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1452 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1453 | - { m_unregistered, m_wallchops, ms_wallchops, m_wallchops, m_ignore } | |
1454 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1455 | + { m_unregistered, m_wallchops, ms_wallchops, m_wallchops, m_ignore, mh_wallchops } | |
1456 | }, | |
1457 | { | |
1458 | MSG_WALLVOICES, | |
1459 | TOK_WALLVOICES, | |
1460 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1461 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1462 | - { m_unregistered, m_wallvoices, ms_wallvoices, m_wallvoices, m_ignore } | |
1463 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1464 | + { m_unregistered, m_wallvoices, ms_wallvoices, m_wallvoices, m_ignore, mh_wallvoices } | |
1465 | }, | |
1466 | { | |
1467 | MSG_CPRIVMSG, | |
1468 | TOK_CPRIVMSG, | |
1469 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1470 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1471 | - { m_unregistered, m_cprivmsg, m_ignore, m_cprivmsg, m_ignore } | |
1472 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1473 | + { m_unregistered, m_cprivmsg, m_ignore, m_cprivmsg, m_ignore, mh_cprivmsg } | |
1474 | }, | |
1475 | { | |
1476 | MSG_CNOTICE, | |
1477 | TOK_CNOTICE, | |
1478 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1479 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1480 | - { m_unregistered, m_cnotice, m_ignore, m_cnotice, m_ignore } | |
1481 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1482 | + { m_unregistered, m_cnotice, m_ignore, m_cnotice, m_ignore, mh_cnotice } | |
1483 | }, | |
1484 | { | |
1485 | MSG_JOIN, | |
1486 | TOK_JOIN, | |
1487 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1488 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1489 | - { m_unregistered, m_join, ms_join, m_join, m_ignore } | |
1490 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1491 | + { m_unregistered, m_join, ms_join, m_join, m_ignore, mh_join } | |
1492 | }, | |
1493 | { | |
1494 | MSG_MODE, | |
1495 | TOK_MODE, | |
1496 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1497 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1498 | - { m_unregistered, m_mode, ms_mode, m_mode, m_ignore } | |
1499 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1500 | + { m_unregistered, m_mode, ms_mode, m_mode, m_ignore, mh_mode } | |
1501 | }, | |
1502 | { | |
1503 | MSG_BURST, | |
1504 | TOK_BURST, | |
1505 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1506 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1507 | - { m_ignore, m_ignore, ms_burst, m_ignore, m_ignore } | |
1508 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1509 | + { m_ignore, m_ignore, ms_burst, m_ignore, m_ignore, mh_not_server } | |
1510 | }, | |
1511 | { | |
1512 | MSG_CREATE, | |
1513 | TOK_CREATE, | |
1514 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1515 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1516 | - { m_ignore, m_ignore, ms_create, m_ignore, m_ignore } | |
1517 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1518 | + { m_ignore, m_ignore, ms_create, m_ignore, m_ignore, mh_not_server } | |
1519 | }, | |
1520 | { | |
1521 | MSG_DESTRUCT, | |
1522 | TOK_DESTRUCT, | |
1523 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1524 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1525 | - { m_ignore, m_ignore, ms_destruct, m_ignore, m_ignore } | |
1526 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1527 | + { m_ignore, m_ignore, ms_destruct, m_ignore, m_ignore, mh_not_server } | |
1528 | }, | |
1529 | { | |
1530 | MSG_QUIT, | |
1531 | TOK_QUIT, | |
1532 | 0, MAXPARA, MFLG_SLOW | MFLG_UNREG, 0, NULL, | |
1533 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1534 | - { m_quit, m_quit, ms_quit, m_quit, m_ignore } | |
1535 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1536 | + { m_quit, m_quit, ms_quit, m_quit, m_ignore, mh_quit } | |
1537 | }, | |
1538 | { | |
1539 | MSG_PART, | |
1540 | TOK_PART, | |
1541 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1542 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1543 | - { m_unregistered, m_part, ms_part, m_part, m_ignore } | |
1544 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1545 | + { m_unregistered, m_part, ms_part, m_part, m_ignore, mh_part } | |
1546 | }, | |
1547 | { | |
1548 | MSG_TOPIC, | |
1549 | TOK_TOPIC, | |
1550 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1551 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1552 | - { m_unregistered, m_topic, ms_topic, m_topic, m_ignore } | |
1553 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1554 | + { m_unregistered, m_topic, ms_topic, m_topic, m_ignore, mh_topic } | |
1555 | }, | |
1556 | { | |
1557 | MSG_INVITE, | |
1558 | TOK_INVITE, | |
1559 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1560 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1561 | - { m_unregistered, m_invite, ms_invite, m_invite, m_ignore } | |
1562 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1563 | + { m_unregistered, m_invite, ms_invite, m_invite, m_ignore, mh_invite } | |
1564 | }, | |
1565 | { | |
1566 | MSG_KICK, | |
1567 | TOK_KICK, | |
1568 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1569 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1570 | - { m_unregistered, m_kick, ms_kick, m_kick, m_ignore } | |
1571 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1572 | + { m_unregistered, m_kick, ms_kick, m_kick, m_ignore, mh_kick } | |
1573 | }, | |
1574 | { | |
1575 | MSG_WALLOPS, | |
1576 | TOK_WALLOPS, | |
1577 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1578 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1579 | - { m_unregistered, m_not_oper, ms_wallops, mo_wallops, m_ignore } | |
1580 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1581 | + { m_unregistered, m_not_oper, ms_wallops, mo_wallops, m_ignore, mh_wallops } | |
1582 | }, | |
1583 | { | |
1584 | MSG_WALLUSERS, | |
1585 | TOK_WALLUSERS, | |
1586 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1587 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1588 | - { m_unregistered, m_not_oper, ms_wallusers, mo_wallusers, m_ignore } | |
1589 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1590 | + { m_unregistered, m_not_oper, ms_wallusers, mo_wallusers, m_ignore, mh_wallusers } | |
1591 | }, | |
1592 | { | |
1593 | MSG_DESYNCH, | |
1594 | TOK_DESYNCH, | |
1595 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1596 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1597 | - { m_ignore, m_ignore, ms_desynch, m_ignore, m_ignore } | |
1598 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1599 | + { m_ignore, m_ignore, ms_desynch, m_ignore, m_ignore, mh_not_server } | |
1600 | }, | |
1601 | { | |
1602 | MSG_PING, | |
1603 | TOK_PING, | |
1604 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1605 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1606 | - { m_unregistered, m_ping, ms_ping, mo_ping, m_ignore } | |
1607 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1608 | + { m_unregistered, m_ping, ms_ping, mo_ping, m_ignore, mh_ping } | |
1609 | }, | |
1610 | { | |
1611 | MSG_PONG, | |
1612 | TOK_PONG, | |
1613 | 0, MAXPARA, MFLG_SLOW | MFLG_UNREG, 0, NULL, | |
1614 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1615 | - { mr_pong, m_pong, ms_pong, m_pong, m_ignore } | |
1616 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1617 | + { mr_pong, m_pong, ms_pong, m_pong, m_ignore, mh_pong } | |
1618 | }, | |
1619 | { | |
1620 | MSG_ERROR, | |
1621 | TOK_ERROR, | |
1622 | 0, MAXPARA, MFLG_SLOW | MFLG_UNREG, 0, NULL, | |
1623 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1624 | - { mr_error, m_ignore, ms_error, m_ignore, m_ignore } | |
1625 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1626 | + { mr_error, m_ignore, ms_error, m_ignore, m_ignore, mh_not_server } | |
1627 | }, | |
1628 | { | |
1629 | MSG_KILL, | |
1630 | TOK_KILL, | |
1631 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1632 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1633 | - { m_unregistered, m_not_oper, ms_kill, mo_kill, m_ignore } | |
1634 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1635 | + { m_unregistered, m_not_oper, ms_kill, mo_kill, m_ignore, mh_kill } | |
1636 | }, | |
1637 | { | |
1638 | MSG_USER, | |
1639 | TOK_USER, | |
1640 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1641 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1642 | - { m_user, m_registered, m_ignore, m_registered, m_ignore } | |
1643 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1644 | + { m_user, m_registered, m_ignore, m_registered, m_ignore, mh_user } | |
1645 | }, | |
1646 | { | |
1647 | MSG_AWAY, | |
1648 | TOK_AWAY, | |
1649 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1650 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1651 | - { m_unregistered, m_away, ms_away, m_away, m_ignore } | |
1652 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1653 | + { m_unregistered, m_away, ms_away, m_away, m_ignore, mh_away } | |
1654 | }, | |
1655 | { | |
1656 | MSG_ISON, | |
1657 | TOK_ISON, | |
1658 | 0, 1, MFLG_SLOW, 0, NULL, | |
1659 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1660 | - { m_unregistered, m_ison, m_ignore, m_ison, m_ignore } | |
1661 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1662 | + { m_unregistered, m_ison, m_ignore, m_ison, m_ignore, mh_ison } | |
1663 | }, | |
1664 | { | |
1665 | MSG_SERVER, | |
1666 | TOK_SERVER, | |
1667 | 0, MAXPARA, MFLG_SLOW | MFLG_UNREG, 0, NULL, | |
1668 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1669 | - { mr_server, m_registered, ms_server, m_registered, m_ignore } | |
1670 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1671 | + { mr_server, m_registered, ms_server, m_registered, m_ignore, mh_not_server } | |
1672 | }, | |
1673 | { | |
1674 | MSG_SQUIT, | |
1675 | TOK_SQUIT, | |
1676 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1677 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1678 | - { m_unregistered, m_not_oper, ms_squit, mo_squit, m_ignore } | |
1679 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1680 | + { m_unregistered, m_not_oper, ms_squit, mo_squit, m_ignore, mh_squit } | |
1681 | }, | |
1682 | { | |
1683 | MSG_WHOIS, | |
1684 | TOK_WHOIS, | |
1685 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1686 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1687 | - { m_unregistered, m_whois, ms_whois, m_whois, m_ignore } | |
1688 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1689 | + { m_unregistered, m_whois, ms_whois, m_whois, m_ignore, mh_whois } | |
1690 | }, | |
1691 | { | |
1692 | MSG_WHO, | |
1693 | TOK_WHO, | |
1694 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1695 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1696 | - { m_unregistered, m_who, m_ignore, m_who, m_ignore } | |
1697 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1698 | + { m_unregistered, m_who, m_ignore, m_who, m_ignore, mh_who } | |
1699 | }, | |
1700 | { | |
1701 | MSG_WHOWAS, | |
1702 | TOK_WHOWAS, | |
1703 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1704 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1705 | - { m_unregistered, m_whowas, m_whowas, m_whowas, m_ignore } | |
1706 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1707 | + { m_unregistered, m_whowas, m_whowas, m_whowas, m_ignore, mh_whowas } | |
1708 | }, | |
1709 | { | |
1710 | MSG_LIST, | |
1711 | TOK_LIST, | |
1712 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1713 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1714 | - { m_unregistered, m_list, m_ignore, m_list, m_ignore } | |
1715 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1716 | + { m_unregistered, m_list, m_ignore, m_list, m_ignore, mh_list } | |
1717 | }, | |
1718 | { | |
1719 | MSG_NAMES, | |
1720 | TOK_NAMES, | |
1721 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1722 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1723 | - { m_unregistered, m_names, m_names, m_names, m_ignore } | |
1724 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1725 | + { m_unregistered, m_names, m_names, m_names, m_ignore, mh_names } | |
1726 | }, | |
1727 | { | |
1728 | MSG_USERHOST, | |
1729 | TOK_USERHOST, | |
1730 | 0, 1, MFLG_SLOW, 0, NULL, | |
1731 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1732 | - { m_unregistered, m_userhost, m_ignore, m_userhost, m_ignore } | |
1733 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1734 | + { m_unregistered, m_userhost, m_ignore, m_userhost, m_ignore, mh_userhost } | |
1735 | }, | |
1736 | { | |
1737 | MSG_USERIP, | |
1738 | TOK_USERIP, | |
1739 | 0, 1, MFLG_SLOW, 0, NULL, | |
1740 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1741 | - { m_unregistered, m_userip, m_ignore, m_userip, m_ignore } | |
1742 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1743 | + { m_unregistered, m_userip, m_ignore, m_userip, m_ignore, mh_userip } | |
1744 | }, | |
1745 | { | |
1746 | MSG_TRACE, | |
1747 | TOK_TRACE, | |
1748 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1749 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1750 | - { m_unregistered, m_trace, ms_trace, mo_trace, m_ignore } | |
1751 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1752 | + { m_unregistered, m_trace, ms_trace, mo_trace, m_ignore, mh_trace } | |
1753 | }, | |
1754 | { | |
1755 | MSG_PASS, | |
1756 | TOK_PASS, | |
1757 | 0, MAXPARA, MFLG_SLOW | MFLG_UNREG, 0, NULL, | |
1758 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1759 | - { mr_pass, m_registered, m_ignore, m_registered, m_ignore } | |
1760 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1761 | + { mr_pass, m_registered, m_ignore, m_registered, m_ignore, mh_pass } | |
1762 | }, | |
1763 | { | |
1764 | MSG_LUSERS, | |
1765 | TOK_LUSERS, | |
1766 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1767 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1768 | - { m_unregistered, m_lusers, ms_lusers, m_lusers, m_ignore } | |
1769 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1770 | + { m_unregistered, m_lusers, ms_lusers, m_lusers, m_ignore, mh_lusers } | |
1771 | }, | |
1772 | { | |
1773 | MSG_TIME, | |
1774 | TOK_TIME, | |
1775 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1776 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1777 | - { m_unregistered, m_time, m_time, m_time, m_ignore } | |
1778 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1779 | + { m_unregistered, m_time, m_time, m_time, m_ignore, mh_time } | |
1780 | }, | |
1781 | { | |
1782 | MSG_SETTIME, | |
1783 | TOK_SETTIME, | |
1784 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1785 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1786 | - { m_unregistered, m_not_oper, ms_settime, mo_settime, m_ignore } | |
1787 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1788 | + { m_unregistered, m_not_oper, ms_settime, mo_settime, m_ignore, mh_settime } | |
1789 | }, | |
1790 | { | |
1791 | MSG_RPING, | |
1792 | TOK_RPING, | |
1793 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1794 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1795 | - { m_unregistered, m_not_oper, ms_rping, mo_rping, m_ignore } | |
1796 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1797 | + { m_unregistered, m_not_oper, ms_rping, mo_rping, m_ignore, mh_rping } | |
1798 | }, | |
1799 | { | |
1800 | MSG_RPONG, | |
1801 | TOK_RPONG, | |
1802 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1803 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1804 | - { m_unregistered, m_ignore, ms_rpong, m_ignore, m_ignore } | |
1805 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1806 | + { m_unregistered, m_ignore, ms_rpong, m_ignore, m_ignore, mh_not_server } | |
1807 | }, | |
1808 | { | |
1809 | MSG_OPER, | |
1810 | TOK_OPER, | |
1811 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1812 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1813 | - { m_unregistered, m_oper, ms_oper, mo_oper, m_ignore } | |
1814 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1815 | + { m_unregistered, m_oper, ms_oper, mo_oper, m_ignore, mh_oper } | |
1816 | }, | |
1817 | { | |
1818 | MSG_CONNECT, | |
1819 | TOK_CONNECT, | |
1820 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1821 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1822 | - { m_unregistered, m_not_oper, ms_connect, mo_connect, m_ignore } | |
1823 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1824 | + { m_unregistered, m_not_oper, ms_connect, mo_connect, m_ignore, mh_connect } | |
1825 | }, | |
1826 | { | |
1827 | MSG_MAP, | |
1828 | TOK_MAP, | |
1829 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1830 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1831 | - { m_unregistered, m_map, m_ignore, m_map, m_ignore } | |
1832 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1833 | + { m_unregistered, m_map, m_ignore, m_map, m_ignore, mh_map } | |
1834 | }, | |
1835 | { | |
1836 | MSG_VERSION, | |
1837 | TOK_VERSION, | |
1838 | 0, MAXPARA, MFLG_SLOW | MFLG_UNREG, 0, NULL, | |
1839 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1840 | - { m_version, m_version, ms_version, mo_version, m_ignore } | |
1841 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1842 | + { m_version, m_version, ms_version, mo_version, m_ignore, mh_version } | |
1843 | }, | |
1844 | { | |
1845 | MSG_STATS, | |
1846 | TOK_STATS, | |
1847 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1848 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1849 | - { m_unregistered, m_stats, m_stats, m_stats, m_ignore } | |
1850 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1851 | + { m_unregistered, m_stats, m_stats, m_stats, m_ignore, mh_stats } | |
1852 | }, | |
1853 | { | |
1854 | MSG_LINKS, | |
1855 | TOK_LINKS, | |
1856 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1857 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1858 | - { m_unregistered, m_links, ms_links, m_links, m_ignore } | |
1859 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1860 | + { m_unregistered, m_links, ms_links, m_links, m_ignore, mh_links } | |
1861 | }, | |
1862 | { | |
1863 | MSG_ADMIN, | |
1864 | TOK_ADMIN, | |
1865 | 0, MAXPARA, MFLG_SLOW | MFLG_UNREG, 0, NULL, | |
1866 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1867 | - { m_admin, m_admin, ms_admin, mo_admin, m_ignore } | |
1868 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1869 | + { m_admin, m_admin, ms_admin, mo_admin, m_ignore, mh_admin } | |
1870 | }, | |
1871 | { | |
1872 | MSG_HELP, | |
1873 | TOK_HELP, | |
1874 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1875 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1876 | - { m_unregistered, m_help, m_ignore, m_help, m_ignore } | |
1877 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1878 | + { m_unregistered, m_help, m_ignore, m_help, m_ignore, mh_help } | |
1879 | }, | |
1880 | { | |
1881 | MSG_INFO, | |
1882 | TOK_INFO, | |
1883 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1884 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1885 | - { m_unregistered, m_info, ms_info, mo_info, m_ignore } | |
1886 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1887 | + { m_unregistered, m_info, ms_info, mo_info, m_ignore, mh_info } | |
1888 | }, | |
1889 | { | |
1890 | MSG_MOTD, | |
1891 | TOK_MOTD, | |
1892 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1893 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1894 | - { m_unregistered, m_motd, m_motd, m_motd, m_ignore } | |
1895 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1896 | + { m_unregistered, m_motd, m_motd, m_motd, m_ignore, mh_motd } | |
1897 | }, | |
1898 | { | |
1899 | MSG_CLOSE, | |
1900 | TOK_CLOSE, | |
1901 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1902 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1903 | - { m_unregistered, m_not_oper, m_ignore, mo_close, m_ignore } | |
1904 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1905 | + { m_unregistered, m_not_oper, m_ignore, mo_close, m_ignore, mh_close } | |
1906 | }, | |
1907 | { | |
1908 | MSG_SILENCE, | |
1909 | TOK_SILENCE, | |
1910 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1911 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1912 | - { m_unregistered, m_silence, ms_silence, m_silence, m_ignore } | |
1913 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1914 | + { m_unregistered, m_silence, ms_silence, m_silence, m_ignore, mh_silence } | |
1915 | }, | |
1916 | { | |
1917 | MSG_GLINE, | |
1918 | TOK_GLINE, | |
1919 | 0, MAXPARA, 0, 0, NULL, | |
1920 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1921 | - { m_unregistered, m_gline, ms_gline, mo_gline, m_ignore } | |
1922 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1923 | + { m_unregistered, m_gline, ms_gline, mo_gline, m_ignore, mh_gline } | |
1924 | }, | |
1925 | { | |
1926 | MSG_JUPE, | |
1927 | TOK_JUPE, | |
1928 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1929 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1930 | - { m_unregistered, m_not_oper, ms_jupe, mo_jupe, m_ignore } | |
1931 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1932 | + { m_unregistered, m_not_oper, ms_jupe, mo_jupe, m_ignore, mh_jupe } | |
1933 | }, | |
1934 | { | |
1935 | MSG_OPMODE, | |
1936 | TOK_OPMODE, | |
1937 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1938 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1939 | - { m_unregistered, m_not_oper, ms_opmode, mo_opmode, m_ignore } | |
1940 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1941 | + { m_unregistered, m_not_oper, ms_opmode, mo_opmode, m_ignore, mh_opmode } | |
1942 | }, | |
1943 | { | |
1944 | MSG_CLEARMODE, | |
1945 | TOK_CLEARMODE, | |
1946 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1947 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1948 | - { m_unregistered, m_not_oper, ms_clearmode, mo_clearmode, m_ignore } | |
1949 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1950 | + { m_unregistered, m_not_oper, ms_clearmode, mo_clearmode, m_ignore, mh_clearmode } | |
1951 | }, | |
1952 | { | |
1953 | MSG_UPING, | |
1954 | TOK_UPING, | |
1955 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1956 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1957 | - { m_unregistered, m_not_oper, ms_uping, mo_uping, m_ignore } | |
1958 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1959 | + { m_unregistered, m_not_oper, ms_uping, mo_uping, m_ignore, mh_uping } | |
1960 | }, | |
1961 | { | |
1962 | MSG_END_OF_BURST, | |
1963 | TOK_END_OF_BURST, | |
1964 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1965 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1966 | - { m_ignore, m_ignore, ms_end_of_burst, m_ignore, m_ignore } | |
1967 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1968 | + { m_ignore, m_ignore, ms_end_of_burst, m_ignore, m_ignore, mh_not_server } | |
1969 | }, | |
1970 | { | |
1971 | MSG_END_OF_BURST_ACK, | |
1972 | TOK_END_OF_BURST_ACK, | |
1973 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1974 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1975 | - { m_ignore, m_ignore, ms_end_of_burst_ack, m_ignore, m_ignore } | |
1976 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1977 | + { m_ignore, m_ignore, ms_end_of_burst_ack, m_ignore, m_ignore, mh_not_server } | |
1978 | }, | |
1979 | { | |
1980 | MSG_REBURST, | |
1981 | TOK_REBURST, | |
1982 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1983 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1984 | - { m_ignore, m_ignore, ms_reburst, m_ignore, m_ignore } | |
1985 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1986 | + { m_ignore, m_ignore, ms_reburst, m_ignore, m_ignore, mh_not_server } | |
1987 | }, | |
1988 | { | |
1989 | MSG_HASH, | |
1990 | TOK_HASH, | |
1991 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
1992 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
1993 | - { m_unregistered, m_not_oper, m_hash, m_hash, m_ignore } | |
1994 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
1995 | + { m_unregistered, m_not_oper, m_hash, m_hash, m_ignore, mh_hash } | |
1996 | }, | |
1997 | { | |
1998 | MSG_REHASH, | |
1999 | TOK_REHASH, | |
2000 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2001 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2002 | - { m_unregistered, m_not_oper, m_ignore, mo_rehash, m_ignore } | |
2003 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2004 | + { m_unregistered, m_not_oper, m_ignore, mo_rehash, m_ignore, mh_rehash } | |
2005 | }, | |
2006 | { | |
2007 | MSG_RESTART, | |
2008 | TOK_RESTART, | |
2009 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2010 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2011 | - { m_unregistered, m_not_oper, m_ignore, mo_restart, m_ignore } | |
2012 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2013 | + { m_unregistered, m_not_oper, m_ignore, mo_restart, m_ignore, mh_restart } | |
2014 | }, | |
2015 | { | |
2016 | MSG_DIE, | |
2017 | TOK_DIE, | |
2018 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2019 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2020 | - { m_unregistered, m_not_oper, m_ignore, mo_die, m_ignore } | |
2021 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2022 | + { m_unregistered, m_not_oper, m_ignore, mo_die, m_ignore, mh_die } | |
2023 | }, | |
2024 | { | |
2025 | MSG_PROTO, | |
2026 | TOK_PROTO, | |
2027 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2028 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2029 | - { m_proto, m_proto, m_proto, m_proto, m_ignore } | |
2030 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2031 | + { m_proto, m_proto, m_proto, m_proto, m_ignore, mh_nohelp } | |
2032 | }, | |
2033 | { | |
2034 | MSG_SET, | |
2035 | TOK_SET, | |
2036 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2037 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2038 | - { m_unregistered, m_not_oper, m_ignore, mo_set, m_ignore } | |
2039 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2040 | + { m_unregistered, m_not_oper, m_ignore, mo_set, m_ignore, mh_set } | |
2041 | }, | |
2042 | { | |
2043 | MSG_RESET, | |
2044 | TOK_RESET, | |
2045 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2046 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2047 | - { m_unregistered, m_not_oper, m_ignore, mo_reset, m_ignore } | |
2048 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2049 | + { m_unregistered, m_not_oper, m_ignore, mo_reset, m_ignore, mh_reset } | |
2050 | }, | |
2051 | { | |
2052 | MSG_GET, | |
2053 | TOK_GET, | |
2054 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2055 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2056 | - { m_unregistered, m_not_oper, m_ignore, mo_get, m_ignore } | |
2057 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2058 | + { m_unregistered, m_not_oper, m_ignore, mo_get, m_ignore, mh_get } | |
2059 | }, | |
2060 | { | |
2061 | MSG_PRIVS, | |
2062 | TOK_PRIVS, | |
2063 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2064 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2065 | - { m_unregistered, m_not_oper, ms_privs, mo_privs, m_ignore } | |
2066 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2067 | + { m_unregistered, m_not_oper, ms_privs, mo_privs, m_ignore, mh_privs } | |
2068 | }, | |
2069 | { | |
2070 | MSG_ACCOUNT, | |
2071 | TOK_ACCOUNT, | |
2072 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2073 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2074 | - { m_ignore, m_ignore, ms_account, m_ignore, m_ignore } | |
2075 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2076 | + { m_ignore, m_ignore, ms_account, m_ignore, m_ignore, mh_not_server } | |
2077 | }, | |
2078 | { | |
2079 | MSG_ASLL, | |
2080 | TOK_ASLL, | |
2081 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2082 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2083 | - { m_ignore, m_not_oper, ms_asll, mo_asll, m_ignore } | |
2084 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2085 | + { m_ignore, m_not_oper, ms_asll, mo_asll, m_ignore, mh_asll } | |
2086 | }, | |
2087 | { | |
2088 | MSG_SETHOST, | |
2089 | TOK_SETHOST, | |
2090 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2091 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2092 | - { m_unregistered, m_sethost, ms_sethost, m_sethost, m_ignore } | |
2093 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2094 | + { m_unregistered, m_sethost, ms_sethost, m_sethost, m_ignore, mh_sethost } | |
2095 | }, | |
2096 | #if WE_HAVE_A_REAL_CAPABILITY_NOW | |
2097 | { | |
2098 | MSG_CAP, | |
2099 | TOK_CAP, | |
2100 | 0, MAXPARA, 0, 0, NULL, | |
2101 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2102 | - { m_cap, m_cap, m_ignore, m_cap, m_ignore } | |
2103 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2104 | + { m_cap, m_cap, m_ignore, m_cap, m_ignore, mh_nohelp } | |
2105 | }, | |
2106 | #endif | |
2107 | ||
2108 | @@ -654,7 +654,7 @@ | |
2109 | MSG_CHECK, | |
2110 | TOK_CHECK, | |
2111 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2112 | - { m_unregistered, m_not_oper, m_check, m_check, m_ignore } | |
2113 | + { m_unregistered, m_not_oper, m_check, m_check, m_ignore, mh_check } | |
2114 | }, | |
2115 | ||
2116 | /* | |
2117 | @@ -664,8 +664,8 @@ | |
2118 | MSG_OPKICK, | |
2119 | TOK_OPKICK, | |
2120 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2121 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2122 | - { m_unregistered, m_not_oper, ms_opkick, mo_opkick, m_ignore } | |
2123 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2124 | + { m_unregistered, m_not_oper, ms_opkick, mo_opkick, m_ignore, mh_nohelp } | |
2125 | }, | |
2126 | ||
2127 | /* This command is an alias for QUIT during the unregistered part of | |
2128 | @@ -678,8 +678,8 @@ | |
2129 | MSG_POST, | |
2130 | TOK_POST, | |
2131 | 0, MAXPARA, MFLG_SLOW, 0, NULL, | |
2132 | - /* UNREG, CLIENT, SERVER, OPER, SERVICE */ | |
2133 | - { m_quit, m_ignore, m_ignore, m_ignore, m_ignore } | |
2134 | + /* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */ | |
2135 | + { m_quit, m_ignore, m_ignore, m_ignore, m_ignore, mh_nohelp } | |
2136 | }, | |
2137 | { 0 } | |
2138 | }; | |
2139 | @@ -779,6 +779,14 @@ | |
2140 | return NULL; | |
2141 | } | |
2142 | ||
2143 | +/** Look up a command in the message trie. | |
2144 | + * @param cmd Text of command to look up. | |
2145 | + * @return Pointer to matching message, or NULL if non exists. | |
2146 | + */ | |
2147 | +struct Message *find_message_by_cmd(char *cmd) { | |
2148 | + return msg_tree_parse(cmd, &msg_tree); | |
2149 | +} | |
2150 | + | |
2151 | /** Registers a service mapping to the pseudocommand handler. | |
2152 | * @param[in] map Service mapping to add. | |
2153 | * @return Non-zero on success; zero if a command already used the name. | |
2154 | @@ -806,6 +814,7 @@ | |
2155 | msg->handlers[SERVER_HANDLER] = m_ignore; | |
2156 | msg->handlers[OPER_HANDLER] = m_pseudo; | |
2157 | msg->handlers[SERVICE_HANDLER] = m_ignore; | |
2158 | + msg->handlers[HELP_HANDLER] = mh_nohelp; | |
2159 | ||
2160 | add_msg_element(&msg_tree, msg, msg->cmd); | |
2161 | map->msg = msg; | |
a037f551 | 2162 | diff -r 3fc56aefcea6 ircd/s_err.c |
2163 | --- a/ircd/s_err.c Tue Jan 27 18:27:54 2009 +0100 | |
2164 | +++ b/ircd/s_err.c Tue Jan 27 20:49:11 2009 +0100 | |
2165 | @@ -786,9 +786,9 @@ | |
2166 | /* 376 */ | |
2167 | { RPL_ENDOFMOTD, ":End of /MOTD command.", "376" }, | |
2168 | /* 377 */ | |
2169 | - { 0 }, | |
2170 | + { RPL_HELP, 0, "377" }, | |
2171 | /* 378 */ | |
2172 | - { 0 }, | |
2173 | + { RPL_ENDOFHELP, "%s :End of /HELP report.", "378" }, | |
2174 | /* 379 */ | |
cddf800b | 2175 | { 0 }, |
a037f551 | 2176 | /* 380 */ |
2177 | @@ -868,7 +868,7 @@ | |
2178 | /* 417 */ | |
2179 | { ERR_INPUTTOOLONG, ":Input line was too long", "417" }, | |
2180 | /* 418 */ | |
2181 | - { 0 }, | |
2182 | + { ERR_NOHELP, "%s :No help found.", "418" }, | |
2183 | /* 419 */ | |
2184 | { 0 }, | |
2185 | /* 420 */ |