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 4588 by michael, Tue Aug 26 15:59:07 2014 UTC

# 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,
105 >    &ConfigGeneral.glinefile,
106      "Path to G-line database file"
107    },
108    {
109      "XPATH",
110      OUTPUT_STRING,
111 <    &ConfigFileEntry.xlinefile,
111 >    &ConfigGeneral.xlinefile,
112      "Path to X-line database file"
113    },
114    {
115      "RESVPATH",
116      OUTPUT_STRING,
117 <    &ConfigFileEntry.resvfile,
117 >    &ConfigGeneral.resvfile,
118      "Path to resv database file"
119    },
120    {
121      "network_name",
122      OUTPUT_STRING,
123 <    &ServerInfo.network_name,
123 >    &ConfigServerInfo.network_name,
124      "Network name"
125    },
126    {
127      "network_desc",
128      OUTPUT_STRING,
129 <    &ServerInfo.network_desc,
129 >    &ConfigServerInfo.network_desc,
130      "Network description"
131    },
132    {
133      "hub",
134      OUTPUT_BOOLEAN_YN,
135 <    &ServerInfo.hub,
135 >    &ConfigServerInfo.hub,
136      "Server is a hub"
137    },
138    {
139      "max_clients",
140      OUTPUT_DECIMAL,
141 <    &ServerInfo.max_clients,
141 >    &ConfigServerInfo.max_clients,
142      "Maximum number of clients permitted simultaneously on this server"
143    },
144    {
145      "max_nick_length",
146      OUTPUT_DECIMAL,
147 <    &ServerInfo.max_nick_length,
147 >    &ConfigServerInfo.max_nick_length,
148      "Maximum nickname length"
149    },
150    {
151      "max_topic_length",
152      OUTPUT_DECIMAL,
153 <    &ServerInfo.max_topic_length,
153 >    &ConfigServerInfo.max_topic_length,
154      "Maximum topic length"
155    },
156    {
157      "use_logging",
158      OUTPUT_BOOLEAN_YN,
159 <    &ConfigLoggingEntry.use_logging,
159 >    &ConfigLog.use_logging,
160      "Enable logging"
161    },
162    {
# Line 166 | Line 166 | static const struct InfoStruct info_tabl
166      "Forbids channels with special ASCII characters in their name"
167    },
168    {
169 <    "knock_delay",
169 >    "invite_client_count",
170      OUTPUT_DECIMAL,
171 <    &ConfigChannel.knock_delay,
172 <    "Delay between a users KNOCK attempts"
171 >    &ConfigChannel.invite_client_count,
172 >    "How many INVITE attempts are permitted in invite_client_time"
173 >  },
174 >
175 >  {
176 >    "invite_client_time",
177 >    OUTPUT_DECIMAL,
178 >    &ConfigChannel.invite_client_time,
179 >    "How many invite_client_count invites are allowed in this time"
180 >  },
181 >  {
182 >    "knock_client_count",
183 >    OUTPUT_DECIMAL,
184 >    &ConfigChannel.knock_client_count,
185 >    "How many KNOCK attempts are permitted in knock_client_time"
186 >  },
187 >  {
188 >    "knock_client_time",
189 >    OUTPUT_DECIMAL,
190 >    &ConfigChannel.knock_client_time,
191 >    "How many knock_client_count knocks are allowed in this time"
192    },
193    {
194      "knock_delay_channel",
# Line 178 | Line 197 | static const struct InfoStruct info_tabl
197      "Delay between KNOCK attempts to a channel"
198    },
199    {
200 <    "max_chans_per_user",
200 >    "max_channels",
201      OUTPUT_DECIMAL,
202 <    &ConfigChannel.max_chans_per_user,
202 >    &ConfigChannel.max_channels,
203      "Maximum number of channels a user can join"
204    },
205    {
187    "max_chans_per_oper",
188    OUTPUT_DECIMAL,
189    &ConfigChannel.max_chans_per_oper,
190    "Maximum number of channels an oper can join"
191  },
192  {
206      "max_bans",
207      OUTPUT_DECIMAL,
208      &ConfigChannel.max_bans,
# Line 262 | Line 275 | static const struct InfoStruct info_tabl
275      "Prevent people from seeing server IP addresses"
276    },
277    {
278 +    "away_count",
279 +    OUTPUT_DECIMAL,
280 +    &ConfigGeneral.away_count,
281 +    "How many AWAY attempts are permitted in away_time"
282 +  },
283 +  {
284 +    "away_time",
285 +    OUTPUT_DECIMAL,
286 +    &ConfigGeneral.away_time,
287 +    "How many away_count aways are allowed in this time"
288 +  },
289 +  {
290      "gline_min_cidr",
291      OUTPUT_DECIMAL,
292 <    &ConfigFileEntry.gline_min_cidr,
292 >    &ConfigGeneral.gline_min_cidr,
293      "Minimum required length of a CIDR bitmask for IPv4 G-Lines"
294    },
295    {
296      "gline_min_cidr6",
297      OUTPUT_DECIMAL,
298 <    &ConfigFileEntry.gline_min_cidr6,
298 >    &ConfigGeneral.gline_min_cidr6,
299      "Minimum required length of a CIDR bitmask for IPv6 G-Lines"
300    },
301    {
302      "invisible_on_connect",
303      OUTPUT_BOOLEAN_YN,
304 <    &ConfigFileEntry.invisible_on_connect,
304 >    &ConfigGeneral.invisible_on_connect,
305      "Automatically set mode +i on connecting users"
306    },
307    {
308      "kill_chase_time_limit",
309      OUTPUT_DECIMAL,
310 <    &ConfigFileEntry.kill_chase_time_limit,
310 >    &ConfigGeneral.kill_chase_time_limit,
311      "Nick Change Tracker for KILL"
312    },
313    {
314      "hide_spoof_ips",
315      OUTPUT_BOOLEAN_YN,
316 <    &ConfigFileEntry.hide_spoof_ips,
316 >    &ConfigGeneral.hide_spoof_ips,
317      "Hide spoofed IP addresses"
318    },
319    {
320      "ignore_bogus_ts",
321      OUTPUT_BOOLEAN_YN,
322 <    &ConfigFileEntry.ignore_bogus_ts,
322 >    &ConfigGeneral.ignore_bogus_ts,
323      "Ignore bogus timestamps from other servers"
324    },
325    {
326      "cycle_on_host_change",
327      OUTPUT_BOOLEAN_YN,
328 <    &ConfigFileEntry.cycle_on_host_change,
328 >    &ConfigGeneral.cycle_on_host_change,
329      "Send a fake QUIT/JOIN combination on host change"
330    },
331    {
332      "disable_auth",
333      OUTPUT_BOOLEAN_YN,
334 <    &ConfigFileEntry.disable_auth,
334 >    &ConfigGeneral.disable_auth,
335      "Completely disable ident lookups"
336    },
337    {
# Line 318 | Line 343 | static const struct InfoStruct info_tabl
343    {
344      "tkline_expire_notices",
345      OUTPUT_BOOLEAN_YN,
346 <    &ConfigFileEntry.tkline_expire_notices,
346 >    &ConfigGeneral.tkline_expire_notices,
347      "Show temporary kline/xline expire notices"
348    },
349    {
350      "default_floodcount",
351      OUTPUT_DECIMAL,
352 <    &ConfigFileEntry.default_floodcount,
352 >    &ConfigGeneral.default_floodcount,
353      "Startup value of FLOODCOUNT"
354    },
355    {
356      "failed_oper_notice",
357      OUTPUT_BOOLEAN_YN,
358 <    &ConfigFileEntry.failed_oper_notice,
358 >    &ConfigGeneral.failed_oper_notice,
359      "Inform opers if someone tries to /oper with the wrong password"
360    },
361    {
362      "dots_in_ident",
363      OUTPUT_DECIMAL,
364 <    &ConfigFileEntry.dots_in_ident,
364 >    &ConfigGeneral.dots_in_ident,
365      "Number of permissable dots in an ident"
366    },
367    {
368      "min_nonwildcard",
369      OUTPUT_DECIMAL,
370 <    &ConfigFileEntry.min_nonwildcard,
370 >    &ConfigGeneral.min_nonwildcard,
371      "Minimum non-wildcard chars in K/G lines"
372    },
373    {
374      "min_nonwildcard_simple",
375      OUTPUT_DECIMAL,
376 <    &ConfigFileEntry.min_nonwildcard_simple,
376 >    &ConfigGeneral.min_nonwildcard_simple,
377      "Minimum non-wildcards in gecos bans"
378    },
379    {
380      "max_accept",
381      OUTPUT_DECIMAL,
382 <    &ConfigFileEntry.max_accept,
382 >    &ConfigGeneral.max_accept,
383      "Maximum nicknames on accept list"
384    },
385    {
386      "anti_nick_flood",
387      OUTPUT_BOOLEAN_YN,
388 <    &ConfigFileEntry.anti_nick_flood,
388 >    &ConfigGeneral.anti_nick_flood,
389      "NICK flood protection"
390    },
391    {
392      "max_nick_time",
393      OUTPUT_DECIMAL,
394 <    &ConfigFileEntry.max_nick_time,
394 >    &ConfigGeneral.max_nick_time,
395      "NICK flood protection time interval"
396    },
397    {
398      "max_nick_changes",
399      OUTPUT_DECIMAL,
400 <    &ConfigFileEntry.max_nick_changes,
400 >    &ConfigGeneral.max_nick_changes,
401      "NICK change threshhold setting"
402    },
403    {
404      "anti_spam_exit_message_time",
405      OUTPUT_DECIMAL,
406 <    &ConfigFileEntry.anti_spam_exit_message_time,
406 >    &ConfigGeneral.anti_spam_exit_message_time,
407      "Duration a client must be connected for to have an exit message"
408    },
409    {
410      "ts_warn_delta",
411      OUTPUT_DECIMAL,
412 <    &ConfigFileEntry.ts_warn_delta,
412 >    &ConfigGeneral.ts_warn_delta,
413      "Maximum permitted TS delta before displaying a warning"
414    },
415    {
416      "ts_max_delta",
417      OUTPUT_DECIMAL,
418 <    &ConfigFileEntry.ts_max_delta,
418 >    &ConfigGeneral.ts_max_delta,
419      "Maximum permitted TS delta from another server"
420    },
421    {
422      "warn_no_connect_block",
423      OUTPUT_BOOLEAN_YN,
424 <    &ConfigFileEntry.warn_no_connect_block,
424 >    &ConfigGeneral.warn_no_connect_block,
425      "Display warning if connecting server lacks a connect{} block"
426    },
427    {
428      "stats_e_disabled",
429      OUTPUT_BOOLEAN_YN,
430 <    &ConfigFileEntry.stats_e_disabled,
430 >    &ConfigGeneral.stats_e_disabled,
431      "Whether or not STATS e is disabled"
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,
442 >    &ConfigGeneral.stats_P_oper_only,
443      "STATS P is only shown to operators"
444    },
445    {
446      "stats_u_oper_only",
447      OUTPUT_BOOLEAN_YN,
448 <    &ConfigFileEntry.stats_u_oper_only,
448 >    &ConfigGeneral.stats_u_oper_only,
449      "STATS u 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    {
506      "true_no_oper_flood",
507      OUTPUT_BOOLEAN_YN,
508 <    &ConfigFileEntry.true_no_oper_flood,
508 >    &ConfigGeneral.true_no_oper_flood,
509      "Completely disable flood control for operators"
510    },
511    {
512      "oper_pass_resv",
513      OUTPUT_BOOLEAN_YN,
514 <    &ConfigFileEntry.oper_pass_resv,
514 >    &ConfigGeneral.oper_pass_resv,
515      "Opers can over-ride RESVs"
516    },
517    {
518      "max_targets",
519      OUTPUT_DECIMAL,
520 <    &ConfigFileEntry.max_targets,
520 >    &ConfigGeneral.max_targets,
521      "The maximum number of PRIVMSG/NOTICE targets"
522    },
523    {
524 +    "throttle_count",
525 +    OUTPUT_DECIMAL,
526 +    &ConfigGeneral.throttle_count,
527 +    "Number of connects in throttle_time before connections are blocked"
528 +  },
529 +  {
530      "throttle_time",
531      OUTPUT_DECIMAL,
532 <    &ConfigFileEntry.throttle_time,
532 >    &ConfigGeneral.throttle_time,
533      "Minimum time between client reconnects"
534    },
535    {
536      "gline_enable",
537      OUTPUT_BOOLEAN_YN,
538 <    &ConfigFileEntry.glines,
538 >    &ConfigGeneral.glines,
539      "G-line (network-wide K-line) support"
540    },
541    {
542      "gline_duration",
543      OUTPUT_DECIMAL,
544 <    &ConfigFileEntry.gline_time,
544 >    &ConfigGeneral.gline_time,
545      "Expiry time for G-lines"
546    },
547    {
548      "gline_request_duration",
549      OUTPUT_DECIMAL,
550 <    &ConfigFileEntry.gline_request_time,
550 >    &ConfigGeneral.gline_request_time,
551      "Expiry time for pending G-lines"
552    },
553  
# Line 540 | Line 571 | send_birthdate_online_time(struct Client
571   {
572    sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
573                       ":On-line since %s",
574 <                     myctime(me.localClient->firsttime));
574 >                     myctime(me.connection->firsttime));
575   }
576  
577   /* send_conf_options()
# Line 565 | Line 596 | send_conf_options(struct Client *source_
596          const char *option = *((const char *const *)iptr->option);
597  
598          sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
599 <                           ":%-30s %-5s [%-30s]",
599 >                           ":%-30s %-5s [%s]",
600                             iptr->name, option ? option : "NONE",
601                             iptr->desc ? iptr->desc : "<none>");
602          break;
# Line 577 | Line 608 | send_conf_options(struct Client *source_
608          const char *option = iptr->option;
609  
610          sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
611 <                           ":%-30s %-5s [%-30s]",
611 >                           ":%-30s %-5s [%s]",
612                             iptr->name, option ? option : "NONE",
613                             iptr->desc ? iptr->desc : "<none>");
614          break;
# Line 589 | Line 620 | send_conf_options(struct Client *source_
620          const int option = *((const int *const)iptr->option);
621  
622          sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
623 <                           ":%-30s %-5d [%-30s]",
623 >                           ":%-30s %-5d [%s]",
624                             iptr->name, option, iptr->desc ? iptr->desc : "<none>");
625          break;
626        }
# Line 600 | Line 631 | send_conf_options(struct Client *source_
631          const int option = *((const int *const)iptr->option);
632  
633          sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
634 <                           ":%-30s %-5s [%-30s]",
634 >                           ":%-30s %-5s [%s]",
635                             iptr->name, option ? "ON" : "OFF",
636                             iptr->desc ? iptr->desc : "<none>");
637  
# Line 613 | Line 644 | send_conf_options(struct Client *source_
644          const int option = *((const int *const)iptr->option);
645  
646          sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
647 <                           ":%-30s %-5s [%-30s]",
647 >                           ":%-30s %-5s [%s]",
648                             iptr->name, option ? "YES" : "NO",
649                             iptr->desc ? iptr->desc : "<none>");
650          break;
# Line 624 | Line 655 | send_conf_options(struct Client *source_
655          const int option = *((const int *const)iptr->option);
656  
657          sendto_one_numeric(source_p, &me, RPL_INFO|SND_EXPLICIT,
658 <                           ":%-30s %-5s [%-30s]",
658 >                           ":%-30s %-5s [%s]",
659                             iptr->name, option ? ((option == 1) ? "MASK" : "YES") : "NO",
660                             iptr->desc ? iptr->desc : "<none>");
661          break;
# Line 644 | Line 675 | send_conf_options(struct Client *source_
675   static void
676   send_info_text(struct Client *source_p)
677   {
647  const char **text = infotext;
648
678    sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
679                         "INFO requested by %s (%s@%s) [%s]",
680                         source_p->name, source_p->username,
681                         source_p->host, source_p->servptr->name);
682  
683 <  while (*text)
683 >  for (const char **text = infotext; *text; ++text)
684    {
685 <    const char *line = *text++;
685 >    const char *line = *text;
686  
687      if (*line == '\0')
688        line = " ";
# Line 685 | Line 714 | m_info(struct Client *source_p, int parc
714   {
715    static time_t last_used = 0;
716  
717 <  if ((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
717 >  if ((last_used + ConfigGeneral.pace_wait) > CurrentTime)
718    {
719      sendto_one_numeric(source_p, &me, RPL_LOAD2HI);
720      return 0;
# Line 726 | Line 755 | ms_info(struct Client *source_p, int par
755  
756   static struct Message info_msgtab =
757   {
758 <  "INFO", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
758 >  "INFO", NULL, 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
759    { m_unregistered, m_info, ms_info, m_ignore, ms_info, m_ignore }
760   };
761  

Diff Legend

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