ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/modules/m_info.c
Revision: 7952
Committed: Thu Mar 2 18:02:12 2017 UTC (8 years, 5 months ago) by michael
Content type: text/x-csrc
File size: 19826 byte(s)
Log Message:
- Rename hunt_server() to server_hunt()

File Contents

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

Properties

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