ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_info.c
(Generate patch)

Comparing ircd-hybrid/trunk/modules/m_info.c (file contents):
Revision 3742 by michael, Sun Jun 1 16:38:45 2014 UTC vs.
Revision 7006 by michael, Fri Jan 1 00:07:54 2016 UTC

# Line 1 | Line 1
1   /*
2   *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3   *
4 < *  Copyright (c) 1997-2014 ircd-hybrid development team
4 > *  Copyright (c) 1997-2016 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
# Line 15 | Line 15
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
18 > *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19   *  USA
20   */
21  
# Line 66 | Line 66 | static const struct InfoStruct info_tabl
66    {
67      "DPATH",
68      OUTPUT_STRING,
69 <    &ConfigFileEntry.dpath,
69 >    &ConfigGeneral.dpath,
70      "Root directory of installation"
71    },
72    {
73      "SPATH",
74      OUTPUT_STRING,
75 <    &ConfigFileEntry.spath,
75 >    &ConfigGeneral.spath,
76      "Path to server executable"
77    },
78    {
79      "MPATH",
80      OUTPUT_STRING,
81 <    &ConfigFileEntry.mpath,
81 >    &ConfigGeneral.mpath,
82      "Path to main motd (Message of the Day) file"
83    },
84    {
85      "CPATH",
86      OUTPUT_STRING,
87 <    &ConfigFileEntry.configfile,
87 >    &ConfigGeneral.configfile,
88      "Path to main configuration file"
89    },
90    {
91      "DLPATH",
92      OUTPUT_STRING,
93 <    &ConfigFileEntry.dlinefile,
93 >    &ConfigGeneral.dlinefile,
94      "Path to D-line database file"
95    },
96    {
97      "KPATH",
98      OUTPUT_STRING,
99 <    &ConfigFileEntry.klinefile,
99 >    &ConfigGeneral.klinefile,
100      "Path to K-line database file"
101    },
102    {
103    "GPATH",
104    OUTPUT_STRING,
105    &ConfigFileEntry.glinefile,
106    "Path to G-line database file"
107  },
108  {
103      "XPATH",
104      OUTPUT_STRING,
105 <    &ConfigFileEntry.xlinefile,
105 >    &ConfigGeneral.xlinefile,
106      "Path to X-line database file"
107    },
108    {
109      "RESVPATH",
110      OUTPUT_STRING,
111 <    &ConfigFileEntry.resvfile,
111 >    &ConfigGeneral.resvfile,
112      "Path to resv database file"
113    },
114    {
115      "network_name",
116      OUTPUT_STRING,
117 <    &ServerInfo.network_name,
117 >    &ConfigServerInfo.network_name,
118      "Network name"
119    },
120    {
121      "network_desc",
122      OUTPUT_STRING,
123 <    &ServerInfo.network_desc,
123 >    &ConfigServerInfo.network_desc,
124      "Network description"
125    },
126    {
127      "hub",
128      OUTPUT_BOOLEAN_YN,
129 <    &ServerInfo.hub,
129 >    &ConfigServerInfo.hub,
130      "Server is a hub"
131    },
132    {
133 <    "max_clients",
133 >    "default_max_clients",
134      OUTPUT_DECIMAL,
135 <    &ServerInfo.max_clients,
136 <    "Maximum number of clients permitted simultaneously on this server"
135 >    &ConfigServerInfo.default_max_clients,
136 >    "The default maximum number of clients permitted simultaneously on this server"
137    },
138    {
139      "max_nick_length",
140      OUTPUT_DECIMAL,
141 <    &ServerInfo.max_nick_length,
141 >    &ConfigServerInfo.max_nick_length,
142      "Maximum nickname length"
143    },
144    {
145      "max_topic_length",
146      OUTPUT_DECIMAL,
147 <    &ServerInfo.max_topic_length,
147 >    &ConfigServerInfo.max_topic_length,
148      "Maximum topic length"
149    },
150    {
151      "use_logging",
152      OUTPUT_BOOLEAN_YN,
153 <    &ConfigLoggingEntry.use_logging,
153 >    &ConfigLog.use_logging,
154      "Enable logging"
155    },
156    {
# Line 166 | Line 160 | static const struct InfoStruct info_tabl
160      "Forbids channels with special ASCII characters in their name"
161    },
162    {
163 <    "knock_delay",
163 >    "invite_client_count",
164      OUTPUT_DECIMAL,
165 <    &ConfigChannel.knock_delay,
166 <    "Delay between a users KNOCK attempts"
165 >    &ConfigChannel.invite_client_count,
166 >    "How many INVITE attempts are permitted in invite_client_time"
167    },
168    {
169 <    "knock_delay_channel",
169 >    "invite_client_time",
170      OUTPUT_DECIMAL,
171 <    &ConfigChannel.knock_delay_channel,
172 <    "Delay between KNOCK attempts to a channel"
171 >    &ConfigChannel.invite_client_time,
172 >    "How many invite_client_count invites are allowed in this time"
173    },
174 +
175    {
176 <    "max_chans_per_user",
176 >    "invite_delay_channel",
177      OUTPUT_DECIMAL,
178 <    &ConfigChannel.max_chans_per_user,
179 <    "Maximum number of channels a user can join"
178 >    &ConfigChannel.invite_delay_channel,
179 >    "Delay between INVITE attempts to a channel"
180    },
181    {
182 <    "max_chans_per_oper",
182 >    "knock_client_count",
183      OUTPUT_DECIMAL,
184 <    &ConfigChannel.max_chans_per_oper,
185 <    "Maximum number of channels an oper can join"
184 >    &ConfigChannel.knock_client_count,
185 >    "How many KNOCK attempts are permitted in knock_client_time"
186    },
187    {
188 <    "max_bans",
188 >    "knock_client_time",
189      OUTPUT_DECIMAL,
190 <    &ConfigChannel.max_bans,
191 <    "Total +b/e/I modes allowed in a channel"
190 >    &ConfigChannel.knock_client_time,
191 >    "How many knock_client_count knocks are allowed in this time"
192    },
193    {
194 <    "default_split_user_count",
194 >    "knock_delay_channel",
195      OUTPUT_DECIMAL,
196 <    &ConfigChannel.default_split_user_count,
197 <    "Startup value of SPLITUSERS"
196 >    &ConfigChannel.knock_delay_channel,
197 >    "Delay between KNOCK attempts to a channel"
198    },
199    {
200 <    "default_split_server_count",
200 >    "max_channels",
201      OUTPUT_DECIMAL,
202 <    &ConfigChannel.default_split_server_count,
203 <    "Startup value of SPLITNUM"
209 <  },
210 <  {
211 <    "no_create_on_split",
212 <    OUTPUT_BOOLEAN_YN,
213 <    &ConfigChannel.no_create_on_split,
214 <    "Disallow creation of channels when split"
202 >    &ConfigChannel.max_channels,
203 >    "Maximum number of channels a user can join"
204    },
205    {
206 <    "no_join_on_split",
207 <    OUTPUT_BOOLEAN_YN,
208 <    &ConfigChannel.no_join_on_split,
209 <    "Disallow joining channels when split"
206 >    "max_bans",
207 >    OUTPUT_DECIMAL,
208 >    &ConfigChannel.max_bans,
209 >    "Total +b/e/I modes allowed in a channel"
210    },
211    {
212      "flatten_links",
# Line 226 | Line 215 | static const struct InfoStruct info_tabl
215      "Flatten /links list"
216    },
217    {
218 <    "links_delay",
218 >    "flatten_links_delay",
219      OUTPUT_DECIMAL,
220 <    &ConfigServerHide.links_delay,
220 >    &ConfigServerHide.flatten_links_delay,
221      "Links rehash delay"
222    },
223    {
224 +    "flatten_links_file",
225 +    OUTPUT_STRING,
226 +    &ConfigServerHide.flatten_links_file,
227 +    "Path to the flatten links cache file"
228 +  },
229 +  {
230      "hidden",
231      OUTPUT_BOOLEAN_YN,
232      &ConfigServerHide.hidden,
# Line 262 | Line 257 | static const struct InfoStruct info_tabl
257      "Prevent people from seeing server IP addresses"
258    },
259    {
260 <    "gline_min_cidr",
260 >    "away_count",
261 >    OUTPUT_DECIMAL,
262 >    &ConfigGeneral.away_count,
263 >    "How many AWAY attempts are permitted in away_time"
264 >  },
265 >  {
266 >    "away_time",
267 >    OUTPUT_DECIMAL,
268 >    &ConfigGeneral.away_time,
269 >    "How many away_count aways are allowed in this time"
270 >  },
271 >  {
272 >    "dline_min_cidr",
273      OUTPUT_DECIMAL,
274 <    &ConfigFileEntry.gline_min_cidr,
275 <    "Minimum required length of a CIDR bitmask for IPv4 G-Lines"
274 >    &ConfigGeneral.dline_min_cidr,
275 >    "Minimum required length of a CIDR bitmask for IPv4 D-Lines"
276    },
277    {
278 <    "gline_min_cidr6",
278 >    "dline_min_cidr6",
279      OUTPUT_DECIMAL,
280 <    &ConfigFileEntry.gline_min_cidr6,
281 <    "Minimum required length of a CIDR bitmask for IPv6 G-Lines"
280 >    &ConfigGeneral.dline_min_cidr6,
281 >    "Minimum required length of a CIDR bitmask for IPv6 D-Lines"
282 >  },
283 >  {
284 >    "kline_min_cidr",
285 >    OUTPUT_DECIMAL,
286 >    &ConfigGeneral.kline_min_cidr,
287 >    "Minimum required length of a CIDR bitmask for IPv4 K-Lines"
288 >  },
289 >  {
290 >    "kline_min_cidr6",
291 >    OUTPUT_DECIMAL,
292 >    &ConfigGeneral.kline_min_cidr6,
293 >    "Minimum required length of a CIDR bitmask for IPv6 K-Lines"
294    },
295    {
296      "invisible_on_connect",
297      OUTPUT_BOOLEAN_YN,
298 <    &ConfigFileEntry.invisible_on_connect,
298 >    &ConfigGeneral.invisible_on_connect,
299      "Automatically set mode +i on connecting users"
300    },
301    {
302      "kill_chase_time_limit",
303      OUTPUT_DECIMAL,
304 <    &ConfigFileEntry.kill_chase_time_limit,
304 >    &ConfigGeneral.kill_chase_time_limit,
305      "Nick Change Tracker for KILL"
306    },
307    {
289    "hide_spoof_ips",
290    OUTPUT_BOOLEAN_YN,
291    &ConfigFileEntry.hide_spoof_ips,
292    "Hide spoofed IP addresses"
293  },
294  {
308      "ignore_bogus_ts",
309      OUTPUT_BOOLEAN_YN,
310 <    &ConfigFileEntry.ignore_bogus_ts,
310 >    &ConfigGeneral.ignore_bogus_ts,
311      "Ignore bogus timestamps from other servers"
312    },
313    {
314      "cycle_on_host_change",
315      OUTPUT_BOOLEAN_YN,
316 <    &ConfigFileEntry.cycle_on_host_change,
316 >    &ConfigGeneral.cycle_on_host_change,
317      "Send a fake QUIT/JOIN combination on host change"
318    },
319    {
320      "disable_auth",
321      OUTPUT_BOOLEAN_YN,
322 <    &ConfigFileEntry.disable_auth,
322 >    &ConfigGeneral.disable_auth,
323      "Completely disable ident lookups"
324    },
325    {
# Line 318 | Line 331 | static const struct InfoStruct info_tabl
331    {
332      "tkline_expire_notices",
333      OUTPUT_BOOLEAN_YN,
334 <    &ConfigFileEntry.tkline_expire_notices,
334 >    &ConfigGeneral.tkline_expire_notices,
335      "Show temporary kline/xline expire notices"
336    },
337    {
338      "default_floodcount",
339      OUTPUT_DECIMAL,
340 <    &ConfigFileEntry.default_floodcount,
340 >    &ConfigGeneral.default_floodcount,
341      "Startup value of FLOODCOUNT"
342    },
343    {
344      "failed_oper_notice",
345      OUTPUT_BOOLEAN_YN,
346 <    &ConfigFileEntry.failed_oper_notice,
346 >    &ConfigGeneral.failed_oper_notice,
347      "Inform opers if someone tries to /oper with the wrong password"
348    },
349    {
350      "dots_in_ident",
351      OUTPUT_DECIMAL,
352 <    &ConfigFileEntry.dots_in_ident,
352 >    &ConfigGeneral.dots_in_ident,
353      "Number of permissable dots in an ident"
354    },
355    {
356      "min_nonwildcard",
357      OUTPUT_DECIMAL,
358 <    &ConfigFileEntry.min_nonwildcard,
359 <    "Minimum non-wildcard chars in K/G lines"
358 >    &ConfigGeneral.min_nonwildcard,
359 >    "Minimum non-wildcard chars in K/D lines"
360    },
361    {
362      "min_nonwildcard_simple",
363      OUTPUT_DECIMAL,
364 <    &ConfigFileEntry.min_nonwildcard_simple,
364 >    &ConfigGeneral.min_nonwildcard_simple,
365      "Minimum non-wildcards in gecos bans"
366    },
367    {
368 +    "max_watch",
369 +    OUTPUT_DECIMAL,
370 +    &ConfigGeneral.max_watch,
371 +    "Maximum nicknames on watch list"
372 +  },
373 +  {
374      "max_accept",
375      OUTPUT_DECIMAL,
376 <    &ConfigFileEntry.max_accept,
376 >    &ConfigGeneral.max_accept,
377      "Maximum nicknames on accept list"
378    },
379    {
380      "anti_nick_flood",
381      OUTPUT_BOOLEAN_YN,
382 <    &ConfigFileEntry.anti_nick_flood,
382 >    &ConfigGeneral.anti_nick_flood,
383      "NICK flood protection"
384    },
385    {
386      "max_nick_time",
387      OUTPUT_DECIMAL,
388 <    &ConfigFileEntry.max_nick_time,
388 >    &ConfigGeneral.max_nick_time,
389      "NICK flood protection time interval"
390    },
391    {
392      "max_nick_changes",
393      OUTPUT_DECIMAL,
394 <    &ConfigFileEntry.max_nick_changes,
394 >    &ConfigGeneral.max_nick_changes,
395      "NICK change threshhold setting"
396    },
397    {
398      "anti_spam_exit_message_time",
399      OUTPUT_DECIMAL,
400 <    &ConfigFileEntry.anti_spam_exit_message_time,
400 >    &ConfigGeneral.anti_spam_exit_message_time,
401      "Duration a client must be connected for to have an exit message"
402    },
403    {
404      "ts_warn_delta",
405      OUTPUT_DECIMAL,
406 <    &ConfigFileEntry.ts_warn_delta,
406 >    &ConfigGeneral.ts_warn_delta,
407      "Maximum permitted TS delta before displaying a warning"
408    },
409    {
410      "ts_max_delta",
411      OUTPUT_DECIMAL,
412 <    &ConfigFileEntry.ts_max_delta,
412 >    &ConfigGeneral.ts_max_delta,
413      "Maximum permitted TS delta from another server"
414    },
415    {
416      "warn_no_connect_block",
417      OUTPUT_BOOLEAN_YN,
418 <    &ConfigFileEntry.warn_no_connect_block,
418 >    &ConfigGeneral.warn_no_connect_block,
419      "Display warning if connecting server lacks a connect{} block"
420    },
421    {
422      "stats_e_disabled",
423      OUTPUT_BOOLEAN_YN,
424 <    &ConfigFileEntry.stats_e_disabled,
424 >    &ConfigGeneral.stats_e_disabled,
425      "Whether or not STATS e is disabled"
426    },
427    {
428 +    "stats_m_oper_only",
429 +    OUTPUT_BOOLEAN_YN,
430 +    &ConfigGeneral.stats_m_oper_only,
431 +    "STATS m output is only shown to operators"
432 +  },
433 +  {
434      "stats_o_oper_only",
435      OUTPUT_BOOLEAN_YN,
436 <    &ConfigFileEntry.stats_o_oper_only,
436 >    &ConfigGeneral.stats_o_oper_only,
437      "STATS O output is only shown to operators"
438    },
439    {
440      "stats_P_oper_only",
441      OUTPUT_BOOLEAN_YN,
442 <    &ConfigFileEntry.stats_P_oper_only,
443 <    "STATS P is only shown to operators"
442 >    &ConfigGeneral.stats_P_oper_only,
443 >    "STATS P output is only shown to operators"
444    },
445    {
446      "stats_u_oper_only",
447      OUTPUT_BOOLEAN_YN,
448 <    &ConfigFileEntry.stats_u_oper_only,
449 <    "STATS u is only shown to operators"
448 >    &ConfigGeneral.stats_u_oper_only,
449 >    "STATS u output is only shown to operators"
450    },
451    {
452      "stats_i_oper_only",
453      OUTPUT_BOOLEAN2,
454 <    &ConfigFileEntry.stats_i_oper_only,
454 >    &ConfigGeneral.stats_i_oper_only,
455      "STATS I output is only shown to operators"
456    },
457    {
458      "stats_k_oper_only",
459      OUTPUT_BOOLEAN2,
460 <    &ConfigFileEntry.stats_k_oper_only,
460 >    &ConfigGeneral.stats_k_oper_only,
461      "STATS K output is only shown to operators"
462    },
463    {
464      "caller_id_wait",
465      OUTPUT_DECIMAL,
466 <    &ConfigFileEntry.caller_id_wait,
466 >    &ConfigGeneral.caller_id_wait,
467      "Minimum delay between notifying UMODE +g users of messages"
468    },
469    {
470      "opers_bypass_callerid",
471      OUTPUT_BOOLEAN_YN,
472 <    &ConfigFileEntry.opers_bypass_callerid,
472 >    &ConfigGeneral.opers_bypass_callerid,
473      "Allows IRC operators to message users who are +g (callerid)"
474    },
475    {
476      "pace_wait_simple",
477      OUTPUT_DECIMAL,
478 <    &ConfigFileEntry.pace_wait_simple,
478 >    &ConfigGeneral.pace_wait_simple,
479      "Minimum delay between less intensive commands"
480    },
481    {
482      "pace_wait",
483      OUTPUT_DECIMAL,
484 <    &ConfigFileEntry.pace_wait,
484 >    &ConfigGeneral.pace_wait,
485      "Minimum delay between uses of certain commands"
486    },
487    {
488      "short_motd",
489      OUTPUT_BOOLEAN_YN,
490 <    &ConfigFileEntry.short_motd,
490 >    &ConfigGeneral.short_motd,
491      "Do not show MOTD; only tell clients they should read it"
492    },
493    {
494      "ping_cookie",
495      OUTPUT_BOOLEAN_YN,
496 <    &ConfigFileEntry.ping_cookie,
496 >    &ConfigGeneral.ping_cookie,
497      "Require ping cookies to connect"
498    },
499    {
500      "no_oper_flood",
501      OUTPUT_BOOLEAN_YN,
502 <    &ConfigFileEntry.no_oper_flood,
502 >    &ConfigGeneral.no_oper_flood,
503      "Reduce flood control for operators"
504    },
505    {
481    "true_no_oper_flood",
482    OUTPUT_BOOLEAN_YN,
483    &ConfigFileEntry.true_no_oper_flood,
484    "Completely disable flood control for operators"
485  },
486  {
487    "oper_pass_resv",
488    OUTPUT_BOOLEAN_YN,
489    &ConfigFileEntry.oper_pass_resv,
490    "Opers can over-ride RESVs"
491  },
492  {
506      "max_targets",
507      OUTPUT_DECIMAL,
508 <    &ConfigFileEntry.max_targets,
508 >    &ConfigGeneral.max_targets,
509      "The maximum number of PRIVMSG/NOTICE targets"
510    },
511    {
512 <    "throttle_time",
500 <    OUTPUT_DECIMAL,
501 <    &ConfigFileEntry.throttle_time,
502 <    "Minimum time between client reconnects"
503 <  },
504 <  {
505 <    "gline_enable",
506 <    OUTPUT_BOOLEAN_YN,
507 <    &ConfigFileEntry.glines,
508 <    "G-line (network-wide K-line) support"
509 <  },
510 <  {
511 <    "gline_duration",
512 >    "throttle_count",
513      OUTPUT_DECIMAL,
514 <    &ConfigFileEntry.gline_time,
515 <    "Expiry time for G-lines"
514 >    &ConfigGeneral.throttle_count,
515 >    "Number of connects in throttle_time before connections are blocked"
516    },
517    {
518 <    "gline_request_duration",
518 >    "throttle_time",
519      OUTPUT_DECIMAL,
520 <    &ConfigFileEntry.gline_request_time,
521 <    "Expiry time for pending G-lines"
520 >    &ConfigGeneral.throttle_time,
521 >    "Minimum time between client reconnects"
522    },
523  
524    /* --[  END OF TABLE  ]---------------------------------------------- */
# Line 525 | Line 526 | static const struct InfoStruct info_tabl
526      NULL,
527      0,
528      NULL,
529 <    0
529 >    NULL
530    }
531   };
532  
# Line 538 | Line 539 | static const struct InfoStruct info_tabl
539   static void
540   send_birthdate_online_time(struct Client *source_p)
541   {
542 <  sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
542 >  sendto_one_numeric(source_p, &me, RPL_INFO | SND_EXPLICIT,
543                       ":On-line since %s",
544 <                     myctime(me.localClient->firsttime));
544 >                     date(me.connection->firsttime));
545   }
546  
547   /* send_conf_options()
# Line 564 | Line 565 | send_conf_options(struct Client *source_
565        {
566          const char *option = *((const char *const *)iptr->option);
567  
568 <        sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
569 <                           ":%-30s %-5s [%-30s]",
568 >        sendto_one_numeric(source_p, &me, RPL_INFO | SND_EXPLICIT,
569 >                           ":%-30s %-5s [%s]",
570                             iptr->name, option ? option : "NONE",
571                             iptr->desc ? iptr->desc : "<none>");
572          break;
# Line 576 | Line 577 | send_conf_options(struct Client *source_
577        {
578          const char *option = iptr->option;
579  
580 <        sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
581 <                           ":%-30s %-5s [%-30s]",
580 >        sendto_one_numeric(source_p, &me, RPL_INFO | SND_EXPLICIT,
581 >                           ":%-30s %-5s [%s]",
582                             iptr->name, option ? option : "NONE",
583                             iptr->desc ? iptr->desc : "<none>");
584          break;
# Line 586 | Line 587 | send_conf_options(struct Client *source_
587        /* Output info_table[i].option as a decimal value. */
588        case OUTPUT_DECIMAL:
589        {
590 <        const int option = *((const int *const)iptr->option);
590 >        const unsigned int option = *((const unsigned int *const)iptr->option);
591  
592 <        sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
593 <                           ":%-30s %-5d [%-30s]",
592 >        sendto_one_numeric(source_p, &me, RPL_INFO | SND_EXPLICIT,
593 >                           ":%-30s %-5u [%s]",
594                             iptr->name, option, iptr->desc ? iptr->desc : "<none>");
595          break;
596        }
# Line 597 | Line 598 | send_conf_options(struct Client *source_
598        /* Output info_table[i].option as "ON" or "OFF" */
599        case OUTPUT_BOOLEAN:
600        {
601 <        const int option = *((const int *const)iptr->option);
601 >        const unsigned int option = *((const unsigned int *const)iptr->option);
602  
603 <        sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
604 <                           ":%-30s %-5s [%-30s]",
603 >        sendto_one_numeric(source_p, &me, RPL_INFO | SND_EXPLICIT,
604 >                           ":%-30s %-5s [%s]",
605                             iptr->name, option ? "ON" : "OFF",
606                             iptr->desc ? iptr->desc : "<none>");
607  
# Line 610 | Line 611 | send_conf_options(struct Client *source_
611        /* Output info_table[i].option as "YES" or "NO" */
612        case OUTPUT_BOOLEAN_YN:
613        {
614 <        const int option = *((const int *const)iptr->option);
614 >        const unsigned int option = *((const unsigned int *const)iptr->option);
615  
616 <        sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
617 <                           ":%-30s %-5s [%-30s]",
616 >        sendto_one_numeric(source_p, &me, RPL_INFO | SND_EXPLICIT,
617 >                           ":%-30s %-5s [%s]",
618                             iptr->name, option ? "YES" : "NO",
619                             iptr->desc ? iptr->desc : "<none>");
620          break;
# Line 621 | Line 622 | send_conf_options(struct Client *source_
622  
623        case OUTPUT_BOOLEAN2:
624        {
625 <        const int option = *((const int *const)iptr->option);
625 >        const unsigned int option = *((const unsigned int *const)iptr->option);
626  
627 <        sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
628 <                           ":%-30s %-5s [%-30s]",
627 >        sendto_one_numeric(source_p, &me, RPL_INFO | SND_EXPLICIT,
628 >                           ":%-30s %-5s [%s]",
629                             iptr->name, option ? ((option == 1) ? "MASK" : "YES") : "NO",
630                             iptr->desc ? iptr->desc : "<none>");
631          break;
# Line 644 | Line 645 | send_conf_options(struct Client *source_
645   static void
646   send_info_text(struct Client *source_p)
647   {
647  const char **text = infotext;
648
648    sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
649                         "INFO requested by %s (%s@%s) [%s]",
650                         source_p->name, source_p->username,
651                         source_p->host, source_p->servptr->name);
652  
653 <  while (*text)
653 >  for (const char **text = infotext; *text; ++text)
654    {
655 <    const char *line = *text++;
655 >    const char *line = *text;
656  
657      if (*line == '\0')
658        line = " ";
# Line 685 | Line 684 | m_info(struct Client *source_p, int parc
684   {
685    static time_t last_used = 0;
686  
687 <  if ((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
687 >  if ((last_used + ConfigGeneral.pace_wait) > CurrentTime)
688    {
689 <    sendto_one_numeric(source_p, &me, RPL_LOAD2HI);
689 >    sendto_one_numeric(source_p, &me, RPL_LOAD2HI, "INFO");
690      return 0;
691    }
692  
693    last_used = CurrentTime;
694  
695    if (!ConfigServerHide.disable_remote_commands)
696 <    if (hunt_server(source_p, ":%s INFO :%s", 1,
698 <                    parc, parv) != HUNTED_ISME)
696 >    if (hunt_server(source_p, ":%s INFO :%s", 1, parc, parv) != HUNTED_ISME)
697        return 0;
698  
699    send_info_text(source_p);
# Line 716 | Line 714 | m_info(struct Client *source_p, int parc
714   static int
715   ms_info(struct Client *source_p, int parc, char *parv[])
716   {
717 <  if (hunt_server(source_p, ":%s INFO :%s", 1,
720 <                  parc, parv) != HUNTED_ISME)
717 >  if (hunt_server(source_p, ":%s INFO :%s", 1, parc, parv) != HUNTED_ISME)
718      return 0;
719  
720    send_info_text(source_p);
# Line 726 | Line 723 | ms_info(struct Client *source_p, int par
723  
724   static struct Message info_msgtab =
725   {
726 <  "INFO", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
727 <  { m_unregistered, m_info, ms_info, m_ignore, ms_info, m_ignore }
726 >  .cmd = "INFO",
727 >  .args_max = MAXPARA,
728 >  .handlers[UNREGISTERED_HANDLER] = m_unregistered,
729 >  .handlers[CLIENT_HANDLER] = m_info,
730 >  .handlers[SERVER_HANDLER] = ms_info,
731 >  .handlers[ENCAP_HANDLER] = m_ignore,
732 >  .handlers[OPER_HANDLER] = ms_info
733   };
734  
735   static void
# Line 744 | Line 746 | module_exit(void)
746  
747   struct module module_entry =
748   {
747  .node    = { NULL, NULL, NULL },
748  .name    = NULL,
749    .version = "$Revision$",
750  .handle  = NULL,
750    .modinit = module_init,
751    .modexit = module_exit,
753  .flags   = 0
752   };

Diff Legend

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