ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_info.c
Revision: 3473
Committed: Sun May 4 15:40:26 2014 UTC (11 years, 3 months ago) by michael
Content type: text/x-csrc
File size: 18733 byte(s)
Log Message:
- Renamed general::warn_no_nline to warn_no_connect_block

File Contents

# User Rev Content
1 adx 30 /*
2 michael 2820 * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3 adx 30 *
4 michael 2820 * Copyright (c) 1997-2014 ircd-hybrid development team
5 adx 30 *
6     * This program is free software; you can redistribute it and/or modify
7     * it under the terms of the GNU General Public License as published by
8     * the Free Software Foundation; either version 2 of the License, or
9     * (at your option) any later version.
10     *
11     * This program is distributed in the hope that it will be useful,
12     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     * GNU General Public License for more details.
15     *
16     * You should have received a copy of the GNU General Public License
17     * along with this program; if not, write to the Free Software
18     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19     * USA
20     */
21    
22 michael 2820 /*! \file m_info.c
23     * \brief Includes required functions for processing the INFO command.
24     * \version $Id$
25     */
26    
27 adx 30 #include "stdinc.h"
28 michael 1011 #include "list.h"
29 adx 30 #include "client.h"
30     #include "ircd.h"
31     #include "numeric.h"
32 michael 3347 #include "misc.h"
33     #include "server.h"
34 adx 30 #include "send.h"
35 michael 1309 #include "conf.h"
36 adx 30 #include "parse.h"
37     #include "modules.h"
38    
39 michael 1230
40 adx 30 /*
41     * jdc -- Structure for our configuration value table
42     */
43     struct InfoStruct
44     {
45     const char *name; /* Displayed variable name */
46 michael 3343 const unsigned int output_type; /* See below #defines */
47     const void *option; /* Pointer reference to the value */
48 adx 30 const char *desc; /* ASCII description of the variable */
49     };
50    
51     /* Types for output_type in InfoStruct */
52 michael 1827 #define OUTPUT_STRING 0x0001 /* Output option as %s w/ dereference */
53     #define OUTPUT_STRING_PTR 0x0002 /* Output option as %s w/out deference */
54     #define OUTPUT_DECIMAL 0x0004 /* Output option as decimal (%d) */
55     #define OUTPUT_BOOLEAN 0x0008 /* Output option as "ON" or "OFF" */
56     #define OUTPUT_BOOLEAN_YN 0x0010 /* Output option as "YES" or "NO" */
57     #define OUTPUT_BOOLEAN2 0x0020 /* Output option as "YES/NO/MASKED" */
58 adx 30
59     static const struct InfoStruct info_table[] =
60     {
61     /* --[ START OF TABLE ]-------------------------------------------- */
62 michael 1318
63 adx 30 {
64 michael 3236 "DPATH",
65     OUTPUT_STRING,
66     &ConfigFileEntry.dpath,
67     "Root directory of installation"
68     },
69     {
70 michael 3239 "SPATH",
71     OUTPUT_STRING,
72     &ConfigFileEntry.spath,
73     "Path to server executable"
74     },
75     {
76     "MPATH",
77     OUTPUT_STRING,
78     &ConfigFileEntry.mpath,
79     "Path to main motd (Message of the Day) file"
80     },
81     {
82 michael 1318 "CPATH",
83     OUTPUT_STRING,
84     &ConfigFileEntry.configfile,
85 michael 1702 "Path to main configuration file"
86 michael 1318 },
87     {
88     "DLPATH",
89     OUTPUT_STRING,
90     &ConfigFileEntry.dlinefile,
91 michael 1702 "Path to D-line database file"
92 michael 1318 },
93     {
94     "KPATH",
95     OUTPUT_STRING,
96     &ConfigFileEntry.klinefile,
97 michael 1702 "Path to K-line database file"
98 michael 1318 },
99     {
100 michael 1702 "GPATH",
101     OUTPUT_STRING,
102     &ConfigFileEntry.glinefile,
103     "Path to G-line database file"
104     },
105     {
106     "XPATH",
107     OUTPUT_STRING,
108     &ConfigFileEntry.xlinefile,
109     "Path to X-line database file"
110     },
111     {
112     "RESVPATH",
113     OUTPUT_STRING,
114 michael 1841 &ConfigFileEntry.resvfile,
115 michael 1702 "Path to resv database file"
116     },
117     {
118 adx 30 "network_name",
119     OUTPUT_STRING,
120     &ServerInfo.network_name,
121     "Network name"
122     },
123     {
124     "network_desc",
125     OUTPUT_STRING,
126     &ServerInfo.network_desc,
127     "Network description"
128     },
129     {
130     "hub",
131     OUTPUT_BOOLEAN_YN,
132     &ServerInfo.hub,
133     "Server is a hub"
134     },
135     {
136 michael 1754 "max_clients",
137     OUTPUT_DECIMAL,
138     &ServerInfo.max_clients,
139     "Maximum number of clients permitted simultaneously on this server"
140     },
141     {
142     "max_nick_length",
143     OUTPUT_DECIMAL,
144     &ServerInfo.max_nick_length,
145     "Maximum nickname length"
146     },
147     {
148     "max_topic_length",
149     OUTPUT_DECIMAL,
150     &ServerInfo.max_topic_length,
151     "Maximum topic length"
152     },
153     {
154 adx 30 "use_logging",
155     OUTPUT_BOOLEAN_YN,
156     &ConfigLoggingEntry.use_logging,
157     "Enable logging"
158     },
159     {
160 michael 1767 "disable_fake_channels",
161     OUTPUT_BOOLEAN_YN,
162     &ConfigChannel.disable_fake_channels,
163     "Forbids channels with special ASCII characters in their name"
164     },
165     {
166 adx 30 "knock_delay",
167     OUTPUT_DECIMAL,
168     &ConfigChannel.knock_delay,
169     "Delay between a users KNOCK attempts"
170     },
171     {
172     "knock_delay_channel",
173     OUTPUT_DECIMAL,
174     &ConfigChannel.knock_delay_channel,
175     "Delay between KNOCK attempts to a channel"
176     },
177     {
178     "max_chans_per_user",
179     OUTPUT_DECIMAL,
180     &ConfigChannel.max_chans_per_user,
181     "Maximum number of channels a user can join"
182     },
183     {
184 michael 1432 "max_chans_per_oper",
185     OUTPUT_DECIMAL,
186     &ConfigChannel.max_chans_per_oper,
187     "Maximum number of channels an oper can join"
188     },
189     {
190 adx 30 "max_bans",
191     OUTPUT_DECIMAL,
192     &ConfigChannel.max_bans,
193     "Total +b/e/I modes allowed in a channel"
194     },
195     {
196     "default_split_user_count",
197     OUTPUT_DECIMAL,
198     &ConfigChannel.default_split_user_count,
199     "Startup value of SPLITUSERS"
200     },
201     {
202     "default_split_server_count",
203     OUTPUT_DECIMAL,
204     &ConfigChannel.default_split_server_count,
205     "Startup value of SPLITNUM"
206     },
207     {
208     "no_create_on_split",
209     OUTPUT_BOOLEAN_YN,
210     &ConfigChannel.no_create_on_split,
211     "Disallow creation of channels when split"
212     },
213     {
214     "no_join_on_split",
215     OUTPUT_BOOLEAN_YN,
216     &ConfigChannel.no_join_on_split,
217     "Disallow joining channels when split"
218     },
219     {
220     "flatten_links",
221     OUTPUT_BOOLEAN_YN,
222     &ConfigServerHide.flatten_links,
223     "Flatten /links list"
224     },
225     {
226     "links_delay",
227     OUTPUT_DECIMAL,
228     &ConfigServerHide.links_delay,
229     "Links rehash delay"
230     },
231     {
232     "hidden",
233     OUTPUT_BOOLEAN_YN,
234     &ConfigServerHide.hidden,
235     "Hide this server from a flattened /links on remote servers"
236     },
237     {
238     "hide_servers",
239     OUTPUT_BOOLEAN_YN,
240     &ConfigServerHide.hide_servers,
241     "Hide servernames from users"
242     },
243     {
244 michael 1854 "hide_services",
245     OUTPUT_BOOLEAN_YN,
246     &ConfigServerHide.hide_services,
247     "Hides the location of services server"
248     },
249     {
250 adx 30 "hidden_name",
251     OUTPUT_STRING,
252     &ConfigServerHide.hidden_name,
253     "Server name users see if hide_servers = yes"
254     },
255     {
256     "hide_server_ips",
257     OUTPUT_BOOLEAN_YN,
258     &ConfigServerHide.hide_server_ips,
259 michael 1936 "Prevent people from seeing server IP addresses"
260 adx 30 },
261     {
262     "gline_min_cidr",
263     OUTPUT_DECIMAL,
264     &ConfigFileEntry.gline_min_cidr,
265     "Minimum required length of a CIDR bitmask for IPv4 G-Lines"
266     },
267     {
268     "gline_min_cidr6",
269     OUTPUT_DECIMAL,
270     &ConfigFileEntry.gline_min_cidr6,
271     "Minimum required length of a CIDR bitmask for IPv6 G-Lines"
272     },
273     {
274     "invisible_on_connect",
275     OUTPUT_BOOLEAN_YN,
276     &ConfigFileEntry.invisible_on_connect,
277     "Automatically set mode +i on connecting users"
278     },
279     {
280     "kill_chase_time_limit",
281     OUTPUT_DECIMAL,
282     &ConfigFileEntry.kill_chase_time_limit,
283     "Nick Change Tracker for KILL"
284     },
285     {
286     "hide_spoof_ips",
287     OUTPUT_BOOLEAN_YN,
288     &ConfigFileEntry.hide_spoof_ips,
289 michael 1936 "Hide spoofed IP addresses"
290 adx 30 },
291     {
292     "ignore_bogus_ts",
293     OUTPUT_BOOLEAN_YN,
294     &ConfigFileEntry.ignore_bogus_ts,
295     "Ignore bogus timestamps from other servers"
296     },
297     {
298 michael 2283 "cycle_on_host_change",
299     OUTPUT_BOOLEAN_YN,
300     &ConfigFileEntry.cycle_on_host_change,
301     "Send a fake QUIT/JOIN combination on host change"
302     },
303     {
304 adx 30 "disable_auth",
305     OUTPUT_BOOLEAN_YN,
306     &ConfigFileEntry.disable_auth,
307     "Completely disable ident lookups"
308     },
309     {
310     "disable_remote_commands",
311     OUTPUT_BOOLEAN_YN,
312 michael 2196 &ConfigServerHide.disable_remote_commands,
313 adx 30 "Prevent users issuing commands on remote servers"
314     },
315     {
316     "tkline_expire_notices",
317     OUTPUT_BOOLEAN_YN,
318     &ConfigFileEntry.tkline_expire_notices,
319     "Show temporary kline/xline expire notices"
320     },
321     {
322     "default_floodcount",
323     OUTPUT_DECIMAL,
324     &ConfigFileEntry.default_floodcount,
325     "Startup value of FLOODCOUNT"
326     },
327     {
328     "failed_oper_notice",
329     OUTPUT_BOOLEAN,
330     &ConfigFileEntry.failed_oper_notice,
331 michael 1702 "Inform opers if someone tries to /oper with the wrong password"
332 adx 30 },
333     {
334     "dots_in_ident",
335     OUTPUT_DECIMAL,
336     &ConfigFileEntry.dots_in_ident,
337     "Number of permissable dots in an ident"
338     },
339     {
340     "min_nonwildcard",
341     OUTPUT_DECIMAL,
342     &ConfigFileEntry.min_nonwildcard,
343     "Minimum non-wildcard chars in K/G lines"
344     },
345     {
346     "min_nonwildcard_simple",
347     OUTPUT_DECIMAL,
348     &ConfigFileEntry.min_nonwildcard_simple,
349     "Minimum non-wildcards in gecos bans"
350     },
351     {
352     "max_accept",
353     OUTPUT_DECIMAL,
354     &ConfigFileEntry.max_accept,
355     "Maximum nicknames on accept list"
356     },
357     {
358     "anti_nick_flood",
359     OUTPUT_BOOLEAN,
360     &ConfigFileEntry.anti_nick_flood,
361     "NICK flood protection"
362     },
363     {
364     "max_nick_time",
365     OUTPUT_DECIMAL,
366     &ConfigFileEntry.max_nick_time,
367     "NICK flood protection time interval"
368     },
369     {
370     "max_nick_changes",
371     OUTPUT_DECIMAL,
372     &ConfigFileEntry.max_nick_changes,
373     "NICK change threshhold setting"
374     },
375     {
376     "anti_spam_exit_message_time",
377     OUTPUT_DECIMAL,
378     &ConfigFileEntry.anti_spam_exit_message_time,
379     "Duration a client must be connected for to have an exit message"
380     },
381     {
382     "ts_warn_delta",
383     OUTPUT_DECIMAL,
384     &ConfigFileEntry.ts_warn_delta,
385     "Maximum permitted TS delta before displaying a warning"
386     },
387     {
388     "ts_max_delta",
389     OUTPUT_DECIMAL,
390     &ConfigFileEntry.ts_max_delta,
391     "Maximum permitted TS delta from another server"
392     },
393     {
394 michael 3473 "warn_no_connect_block",
395 adx 30 OUTPUT_BOOLEAN,
396 michael 3473 &ConfigFileEntry.warn_no_connect_block,
397     "Display warning if connecting server lacks a connect{} block"
398 adx 30 },
399     {
400 michael 1767 "stats_e_disabled",
401     OUTPUT_BOOLEAN_YN,
402     &ConfigFileEntry.stats_e_disabled,
403     "Whether or not STATS e is disabled"
404     },
405     {
406 adx 30 "stats_o_oper_only",
407     OUTPUT_BOOLEAN_YN,
408     &ConfigFileEntry.stats_o_oper_only,
409     "STATS O output is only shown to operators"
410     },
411     {
412     "stats_P_oper_only",
413     OUTPUT_BOOLEAN_YN,
414     &ConfigFileEntry.stats_P_oper_only,
415     "STATS P is only shown to operators"
416     },
417     {
418 michael 2269 "stats_u_oper_only",
419     OUTPUT_BOOLEAN_YN,
420     &ConfigFileEntry.stats_u_oper_only,
421     "STATS u is only shown to operators"
422     },
423     {
424 adx 30 "stats_i_oper_only",
425     OUTPUT_BOOLEAN2,
426     &ConfigFileEntry.stats_i_oper_only,
427     "STATS I output is only shown to operators"
428     },
429     {
430     "stats_k_oper_only",
431     OUTPUT_BOOLEAN2,
432     &ConfigFileEntry.stats_k_oper_only,
433     "STATS K output is only shown to operators"
434     },
435     {
436     "caller_id_wait",
437     OUTPUT_DECIMAL,
438     &ConfigFileEntry.caller_id_wait,
439     "Minimum delay between notifying UMODE +g users of messages"
440     },
441     {
442     "opers_bypass_callerid",
443     OUTPUT_BOOLEAN_YN,
444     &ConfigFileEntry.opers_bypass_callerid,
445     "Allows IRC operators to message users who are +g (callerid)"
446     },
447     {
448     "pace_wait_simple",
449     OUTPUT_DECIMAL,
450     &ConfigFileEntry.pace_wait_simple,
451     "Minimum delay between less intensive commands"
452     },
453     {
454     "pace_wait",
455     OUTPUT_DECIMAL,
456     &ConfigFileEntry.pace_wait,
457     "Minimum delay between uses of certain commands"
458     },
459     {
460     "short_motd",
461     OUTPUT_BOOLEAN_YN,
462     &ConfigFileEntry.short_motd,
463     "Do not show MOTD; only tell clients they should read it"
464     },
465     {
466     "ping_cookie",
467     OUTPUT_BOOLEAN,
468     &ConfigFileEntry.ping_cookie,
469     "Require ping cookies to connect"
470     },
471     {
472     "no_oper_flood",
473     OUTPUT_BOOLEAN,
474     &ConfigFileEntry.no_oper_flood,
475     "Reduce flood control for operators"
476     },
477     {
478     "true_no_oper_flood",
479     OUTPUT_BOOLEAN,
480     &ConfigFileEntry.true_no_oper_flood,
481     "Completely disable flood control for operators"
482     },
483     {
484     "oper_pass_resv",
485     OUTPUT_BOOLEAN_YN,
486     &ConfigFileEntry.oper_pass_resv,
487     "Opers can over-ride RESVs"
488     },
489     {
490     "max_targets",
491     OUTPUT_DECIMAL,
492     &ConfigFileEntry.max_targets,
493     "The maximum number of PRIVMSG/NOTICE targets"
494     },
495     {
496     "throttle_time",
497     OUTPUT_DECIMAL,
498     &ConfigFileEntry.throttle_time,
499     "Minimum time between client reconnects"
500     },
501     {
502     "glines",
503     OUTPUT_BOOLEAN,
504     &ConfigFileEntry.glines,
505     "G-line (network-wide K-line) support"
506     },
507     {
508 michael 1459 "gline_duration",
509 adx 30 OUTPUT_DECIMAL,
510     &ConfigFileEntry.gline_time,
511     "Expiry time for G-lines"
512     },
513 michael 1459 {
514     "gline_request_duration",
515     OUTPUT_DECIMAL,
516     &ConfigFileEntry.gline_request_time,
517     "Expiry time for pending G-lines"
518     },
519    
520 adx 30 /* --[ END OF TABLE ]---------------------------------------------- */
521     {
522     NULL,
523     0,
524     NULL,
525     0
526     }
527     };
528    
529     /* send_birthdate_online_time()
530     *
531     * inputs - client pointer to send to
532     * output - NONE
533     * side effects - birthdate and online time are sent
534     */
535     static void
536     send_birthdate_online_time(struct Client *source_p)
537     {
538 michael 3115 sendto_one(source_p, ":%s %d %s :On-line since %s",
539     ID_or_name(&me, source_p), RPL_INFO,
540     ID_or_name(source_p, source_p),
541     myctime(me.localClient->firsttime));
542 adx 30 }
543    
544     /* send_conf_options()
545     *
546     * inputs - client pointer to send to
547     * output - NONE
548     * side effects - send config options to client
549     */
550     static void
551     send_conf_options(struct Client *source_p)
552     {
553     /*
554     * Parse the info_table[] and do the magic.
555     */
556 michael 3459 for (const struct InfoStruct *iptr = info_table; iptr->name; ++iptr)
557 adx 30 {
558     switch (iptr->output_type)
559     {
560     /* For "char *" references */
561     case OUTPUT_STRING:
562     {
563 michael 3343 const char *option = *((const char *const *)iptr->option);
564 adx 30
565     sendto_one(source_p, ":%s %d %s :%-30s %-5s [%-30s]",
566 michael 3115 ID_or_name(&me, source_p), RPL_INFO, ID_or_name(source_p, source_p),
567 adx 30 iptr->name, option ? option : "NONE",
568     iptr->desc ? iptr->desc : "<none>");
569     break;
570     }
571    
572     /* For "char foo[]" references */
573     case OUTPUT_STRING_PTR:
574     {
575     const char *option = iptr->option;
576    
577     sendto_one(source_p, ":%s %d %s :%-30s %-5s [%-30s]",
578 michael 3115 ID_or_name(&me, source_p), RPL_INFO, ID_or_name(source_p, source_p),
579 adx 30 iptr->name, option ? option : "NONE",
580     iptr->desc ? iptr->desc : "<none>");
581     break;
582     }
583    
584     /* Output info_table[i].option as a decimal value. */
585     case OUTPUT_DECIMAL:
586     {
587 michael 3343 const int option = *((const int *const)iptr->option);
588 adx 30
589     sendto_one(source_p, ":%s %d %s :%-30s %-5d [%-30s]",
590 michael 3115 ID_or_name(&me, source_p), RPL_INFO, ID_or_name(source_p, source_p),
591 michael 3237 iptr->name, option, iptr->desc ? iptr->desc : "<none>");
592 adx 30 break;
593     }
594    
595     /* Output info_table[i].option as "ON" or "OFF" */
596     case OUTPUT_BOOLEAN:
597     {
598 michael 3343 const int option = *((const int *const)iptr->option);
599 adx 30
600     sendto_one(source_p, ":%s %d %s :%-30s %-5s [%-30s]",
601 michael 3115 ID_or_name(&me, source_p), RPL_INFO, ID_or_name(source_p, source_p),
602 adx 30 iptr->name, option ? "ON" : "OFF",
603     iptr->desc ? iptr->desc : "<none>");
604    
605     break;
606     }
607    
608     /* Output info_table[i].option as "YES" or "NO" */
609     case OUTPUT_BOOLEAN_YN:
610     {
611 michael 3343 const int option = *((const int *const)iptr->option);
612 adx 30
613     sendto_one(source_p, ":%s %d %s :%-30s %-5s [%-30s]",
614 michael 3115 ID_or_name(&me, source_p), RPL_INFO, ID_or_name(source_p, source_p),
615 adx 30 iptr->name, option ? "YES" : "NO",
616     iptr->desc ? iptr->desc : "<none>");
617     break;
618     }
619    
620     case OUTPUT_BOOLEAN2:
621     {
622 michael 3343 const int option = *((const int *const)iptr->option);
623 adx 30
624     sendto_one(source_p, ":%s %d %s :%-30s %-5s [%-30s]",
625 michael 3115 ID_or_name(&me, source_p), RPL_INFO, ID_or_name(source_p, source_p),
626 adx 30 iptr->name, option ? ((option == 1) ? "MASK" : "YES") : "NO",
627     iptr->desc ? iptr->desc : "<none>");
628     break;
629     }
630     }
631     }
632    
633 michael 3109 sendto_one_numeric(source_p, &me, RPL_INFO, "");
634 adx 30 }
635 michael 1230
636 michael 1827 /* send_info_text()
637     *
638     * inputs - client pointer to send info text to
639     * output - NONE
640     * side effects - info text is sent to client
641     */
642 michael 3156 static void
643 michael 1827 send_info_text(struct Client *source_p)
644     {
645     const char **text = infotext;
646    
647     sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
648     "INFO requested by %s (%s@%s) [%s]",
649     source_p->name, source_p->username,
650     source_p->host, source_p->servptr->name);
651    
652     while (*text)
653     {
654     const char *line = *text++;
655    
656     if (*line == '\0')
657     line = " ";
658    
659 michael 3109 sendto_one_numeric(source_p, &me, RPL_INFO, line);
660 michael 1827 }
661    
662     if (HasUMode(source_p, UMODE_OPER))
663     send_conf_options(source_p);
664    
665     send_birthdate_online_time(source_p);
666    
667 michael 3109 sendto_one_numeric(source_p, &me, RPL_ENDOFINFO);
668 michael 1827 }
669    
670 michael 3275 /*! \brief INFO command handler
671     *
672     * \param source_p Pointer to allocated Client struct from which the message
673     * originally comes from. This can be a local or remote client.
674     * \param parc Integer holding the number of supplied arguments.
675     * \param parv Argument vector where parv[0] .. parv[parc-1] are non-NULL
676     * pointers.
677     * \note Valid arguments for this command are:
678     * - parv[0] = command
679 michael 3300 * - parv[1] = nickname/servername
680 michael 3275 */
681 michael 2820 static int
682 michael 3156 m_info(struct Client *source_p, int parc, char *parv[])
683 michael 1827 {
684     static time_t last_used = 0;
685    
686     if ((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
687     {
688 michael 3109 sendto_one_numeric(source_p, &me, RPL_LOAD2HI);
689 michael 2820 return 0;
690 michael 1827 }
691    
692     last_used = CurrentTime;
693    
694 michael 2196 if (!ConfigServerHide.disable_remote_commands)
695 michael 3156 if (hunt_server(source_p, ":%s INFO :%s", 1,
696 michael 1827 parc, parv) != HUNTED_ISME)
697 michael 2820 return 0;
698 michael 1827
699 michael 3156 send_info_text(source_p);
700     return 0;
701 michael 1827 }
702    
703 michael 3275 /*! \brief INFO command handler
704     *
705     * \param source_p Pointer to allocated Client struct from which the message
706     * originally comes from. This can be a local or remote client.
707     * \param parc Integer holding the number of supplied arguments.
708     * \param parv Argument vector where parv[0] .. parv[parc-1] are non-NULL
709     * pointers.
710     * \note Valid arguments for this command are:
711     * - parv[0] = command
712 michael 3300 * - parv[1] = nickname/servername
713 michael 3275 */
714 michael 2820 static int
715 michael 3156 ms_info(struct Client *source_p, int parc, char *parv[])
716 michael 1827 {
717 michael 3156 if (hunt_server(source_p, ":%s INFO :%s", 1,
718 michael 1827 parc, parv) != HUNTED_ISME)
719 michael 2820 return 0;
720 michael 1827
721 michael 3156 send_info_text(source_p);
722     return 0;
723 michael 1827 }
724    
725 michael 2820 static struct Message info_msgtab =
726     {
727 michael 1230 "INFO", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
728 michael 1827 { m_unregistered, m_info, ms_info, m_ignore, ms_info, m_ignore }
729 michael 1230 };
730    
731     static void
732     module_init(void)
733     {
734     mod_add_cmd(&info_msgtab);
735     }
736    
737     static void
738     module_exit(void)
739     {
740     mod_del_cmd(&info_msgtab);
741     }
742    
743 michael 2820 struct module module_entry =
744     {
745 michael 1230 .node = { NULL, NULL, NULL },
746     .name = NULL,
747     .version = "$Revision$",
748     .handle = NULL,
749     .modinit = module_init,
750     .modexit = module_exit,
751     .flags = 0
752     };

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision