Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ChangeLog
1 2001-07-27  Kevin L. Mitchell  <klmitch@mit.edu>
2
3         * ircd/s_bsd.c: disable IP (*not* TCP) options to prevent
4         source-routed spoofing attacks; this is only available under
5         u2.10.11, so don't even bother, since no one but testers are using
6         the source base
7
8 2001-07-25  Kevin L. Mitchell  <klmitch@mit.edu>
9
10         * include/ircd_policy.h: enable HEAD_IN_SAND_REMOTE by default
11
12         * ircd/s_err.c: put in a . for reporting link version on /trace,
13         to match what /version does
14
15 2001-07-21  Kevin L. Mitchell  <klmitch@mit.edu>
16
17         * ircd/s_misc.c (exit_client): servers don't understand what the
18         numeric nick ERROR is supposed to mean, so they ignore error
19         messages, resulting in not knowing why we were rejected; use
20         sendcmdto_one for servers and sendrawto_one for clients
21
22 2001-07-17  Kevin L. Mitchell  <klmitch@mit.edu>
23
24         * ircd/m_burst.c (ms_burst): in the case of a modeless channel and
25         a nick collide, a bare BURST may be propagated; adjust the
26         enforced parameter count to accept the bare BURST
27
28 2001-07-12  Kevin L. Mitchell  <klmitch@mit.edu>
29
30         * ircd/s_bsd.c: mark a client as having been IP checked
31
32         * ircd/IPcheck.c (ip_registry_check_remote): remove unneeded
33         second call to SetIPChecked()
34
35 2001-07-11  Kevin L. Mitchell  <klmitch@mit.edu>
36
37         * ircd/engine_poll.c: deal with POLLHUP properly (hopefully)
38
39         * ircd/engine_devpoll.c: deal with POLLHUP properly (hopefully)
40
41 2001-07-09  Kevin L. Mitchell  <klmitch@mit.edu>
42
43         * ircd/os_bsd.c (os_get_rusage): move buf into the two ifdef'd
44         sections so that if neither is used, the declaration of buf will
45         not elicit an "unused variable" warning under NetBSD
46
47         * ircd/m_map.c: include string.h to declare strcpy (fix warnings
48         on alpha)
49
50         * ircd/m_away.c: include string.h to declare strcpy/strlen (fix
51         warnings on alpha)
52
53         * ircd/ircd_log.c: include string.h to declare strcpy/strlen (fix
54         warnings on alpha)
55
56         * ircd/client.c: include string.h to declare memset (fix warnings
57         on alpha)
58
59         * ircd/channel.c: remove unused functions next_overlapped_ban,
60         del_banid, and is_deopped (fix warnings under -O1)
61
62         * ircd/IPcheck.c: include string.h to declare memset/memcpy (fix
63         warnings on alpha)
64
65 2001-06-29  Kevin L. Mitchell  <klmitch@mit.edu>
66
67         * ircd/s_user.c (set_user_mode): clear the snomask if the user
68         isn't supposed to receive server notices anymore
69
70         * ircd/ircd_features.c: change CONFIG_OPERCMDS to default to FALSE
71
72         * configure.in: use AC_MSG_CHECKING/AC_MSG_RESULT when checking
73         installation prefix; default devpoll and kqueue to on (they get
74         turned off if the required headers aren't present)
75
76         * ircd/whocmds.c (do_who): use ircd_snprintf() instead of
77         sprintf_irc(); it's a bit hackish, but it'll do for now
78
79         * ircd/support.c: remove unused #include
80
81         * ircd/send.c: remove unused #include
82
83         * ircd/s_user.c: use ircd_snprintf() instead of sprintf_irc()
84
85         * ircd/s_serv.c: remove unused #include
86
87         * ircd/s_misc.c: use ircd_snprintf() and friends instead of
88         sprintf_irc() and friends
89
90         * ircd/s_err.c: moved atoi_tab[] from ircd/sprintf_irc.c to
91         ircd/s_err.c, which is the only other file to refer to it
92
93         * ircd/s_conf.c (conf_add_deny): use ircd_snprintf() instead of
94         sprintf_irc()
95
96         * ircd/s_bsd.c (connect_server): use ircd_snprintf() instead of
97         sprintf_irc()
98
99         * ircd/s_auth.c: use ircd_snprintf() instead of sprintf_irc()
100
101         * ircd/res.c: use ircd_snprintf() instead of sprintf_irc()
102
103         * ircd/m_version.c: use ircd_snprintf() instead of sprintf_irc()
104
105         * ircd/m_kill.c: use ircd_snprintf() instead of sprintf_irc()
106
107         * ircd/listener.c: use ircd_snprintf() instead of sprintf_irc()
108
109         * ircd/gline.c: use ircd_snprintf() instead of sprintf_irc()
110
111         * ircd/channel.c: don't include sprintf_irc.h; use ircd_snprintf()
112         instead of sprintf_irc()
113
114         * ircd/Makefile.in: remove sprintf_irc.c from sources list; run
115         make depend
116
117         * include/ircd_string.h: remove declaration of sprintf_irc() (what
118         was it doing here anyway?)
119
120         * include/sprintf_irc.h: removed unneeded source file
121
122         * ircd/sprintf_irc.c: removed unneeded source file
123
124         * ircd/s_debug.c (count_memory): remove some dead code
125
126         * ircd/s_auth.c: remove some dead code
127
128         * ircd/res.c (update_list): remove some dead code
129
130         * ircd/m_whowas.c: remove some dead code
131
132         * ircd/m_whois.c: remove some dead code
133
134         * ircd/m_who.c: remove some dead code
135
136         * ircd/m_wallusers.c: remove some dead code
137
138         * ircd/m_wallops.c: remove some dead code
139
140         * ircd/m_wallchops.c: remove some dead code
141
142         * ircd/m_version.c: remove some dead code
143
144         * ircd/m_userip.c: remove some dead code
145
146         * ircd/m_userhost.c: remove some dead code
147
148         * ircd/m_uping.c: remove some dead code
149
150         * ircd/m_trace.c: remove some dead code
151
152         * ircd/m_topic.c: remove some dead code
153
154         * ircd/m_tmpl.c: remove some dead code
155
156         * ircd/m_time.c: remove some dead code
157
158         * ircd/m_squit.c: remove some dead code
159
160         * ircd/m_silence.c: remove some dead code
161
162         * ircd/m_settime.c: remove some dead code
163
164         * ircd/m_set.c: remove some dead code
165
166         * ircd/m_server.c: remove some dead code
167
168         * ircd/m_rpong.c: remove some dead code
169
170         * ircd/m_rping.c: remove some dead code
171
172         * ircd/m_restart.c: remove some dead code
173
174         * ircd/m_reset.c: remove some dead code
175
176         * ircd/m_rehash.c: remove some dead code
177
178         * ircd/m_quit.c: remove some dead code
179
180         * ircd/m_proto.c: remove some dead code
181
182         * ircd/m_privs.c: remove some dead code
183
184         * ircd/m_privmsg.c: remove some dead code
185
186         * ircd/m_pong.c: remove some dead code
187
188         * ircd/m_ping.c: remove some dead code
189
190         * ircd/m_pass.c: remove some dead code
191
192         * ircd/m_part.c: remove some dead code
193
194         * ircd/m_opmode.c: remove some dead code
195
196         * ircd/m_oper.c: remove some dead code
197
198         * ircd/m_notice.c: remove some dead code
199
200         * ircd/m_nick.c: remove some dead code
201
202         * ircd/m_map.c: remove some dead code
203
204         * ircd/m_lusers.c: remove some dead code
205
206         * ircd/m_list.c: remove some dead code
207
208         * ircd/m_links.c: remove some dead code
209
210         * ircd/m_kill.c: remove some dead code
211
212         * ircd/m_kick.c: remove some dead code
213
214         * ircd/m_jupe.c: remove some dead code
215
216         * ircd/m_join.c: remove some dead code
217
218         * ircd/m_ison.c: remove some dead code
219
220         * ircd/m_invite.c: remove some dead code
221
222         * ircd/m_info.c: remove some dead code
223
224         * ircd/m_help.c: remove some dead code
225
226         * ircd/m_gline.c: remove some dead code
227
228         * ircd/m_get.c: remove some dead code
229
230         * ircd/m_error.c: remove some dead code
231
232         * ircd/m_endburst.c: remove some dead code
233
234         * ircd/m_die.c: remove some dead code
235
236         * ircd/m_desynch.c: remove some dead code
237
238         * ircd/m_destruct.c: remove some dead code
239
240         * ircd/m_defaults.c: remove some dead code
241
242         * ircd/m_create.c: remove some dead code, along with an #if 1
243
244         * ircd/m_cprivmsg.c: remove some dead code
245
246         * ircd/m_connect.c: remove some dead code
247
248         * ircd/m_close.c: remove some dead code
249
250         * ircd/m_clearmode.c: remove some dead code
251
252         * ircd/m_burst.c: remove some dead code
253
254         * ircd/m_away.c: remove some dead code
255
256         * ircd/m_admin.c: remove some dead code
257
258         * ircd/listener.c (accept_connection): remove some dead code
259
260         * ircd/ircd_reply.c (need_more_params): remove some dead code
261
262         * ircd/channel.c (add_banid): remove some dead code
263
264         * include/support.h: remove some dead code
265
266         * include/querycmds.h: remove some dead code
267
268         * doc/readme.chroot: document how to do chroot operation
269
270 2001-06-28  Kevin L. Mitchell  <klmitch@mit.edu>
271
272         * ircd/Makefile.in: tune for VPATH builds/installs; add a rule to
273         force bin directory to be created if necessary prior to
274         installation; run make depend
275
276         * doc/Makefile.in (install): tune for VPATH installs by cd'ing to
277         the ${srcdir}
278
279         * Makefile.in: tune to detect Makefile.in changes in
280         subdirectories and to create installation directory indicated by
281         ${prefix}
282
283         * ircd/whocmds.c (count_users): routine to count the number of
284         users matching a given user@host mask
285
286         * ircd/s_err.c: add error messages for ERR_LONGMASK,
287         ERR_TOOMANYUSERS, and ERR_MASKTOOWIDE
288
289         * ircd/m_gline.c: look for and advance past '!' flag on G-lines
290         from operators; only set GLINE_OPERFORCE flag if oper has the
291         PRIV_WIDE_GLINE privilege
292
293         * ircd/ircd_features.c: add GLINEMAXUSERCOUNT, which is the
294         maximum number of users a G-line can impact before it has to be
295         forced; OPER_WIDE_GLINE, to allow operators to use ! to force a
296         wide G-line to be set; and LOCOP_WIDE_GLINE, to allow local
297         operators to use ! to force a wide G-line to be set
298
299         * ircd/gline.c: make make_gline() be called with separate user and
300         host arguments, and not call canon_userhost() directly; implement
301         gline_checkmask() to verify that a host mask is acceptable; move
302         BADCHAN check up in gline_add(), and check passed-in mask under
303         certain circumstances for acceptability; fix call to
304         sendto_opmask_butone() to handle separation of userhost into user
305         and host in gline_add(); update call to make_gline()
306
307         * ircd/client.c: use FEAT_OPER_WIDE_GLINE and
308         FEAT_LOCOP_WIDE_GLINE to set PRIV_WIDE_GLINE for an operator; add
309         PRIV_WIDE_GLINE to privtab[] for client_report_privs()
310
311         * include/whocmds.h (count_users): declare routine to count users
312         matching a given user@host mask
313
314         * include/numeric.h: added three new error returns: ERR_LONGMASK
315         -- mask can't be formatted into a buffer; ERR_TOOMANYUSERS -- too
316         many users would be impacted by the mask; ERR_MASKTOOWIDE -- mask
317         contains wildcards in the wrong places
318
319         * include/ircd_features.h: add FEAT_GLINEMAXUSERCOUNT,
320         FEAT_OPER_WIDE_GLINE, and FEAT_LOCOP_WIDE_GLINE
321
322         * include/gline.h (GLINE_OPERFORCE): provides a way for m_gline()
323         to signal to gline_add() that the operator attempted to force the
324         G-line to be set
325
326         * include/client.h (PRIV_WIDE_GLINE): new privilege for operators
327
328         * doc/readme.gline: update to document new "!" prefix to a G-line
329         user@host mask
330
331         * doc/readme.features: document GLINEMAXUSERCOUNT,
332         OPER_WIDE_GLINE, and LOCOP_WIDE_GLINE
333
334         * doc/example.conf: update to mention new features along with
335         their defaults
336
337 2001-06-27  Kevin L. Mitchell  <klmitch@mit.edu>
338
339         * doc/example.conf: updated example.conf from Braden
340         <dbtem@yahoo.com>
341
342         * include/supported.h: forward-port from pl15
343
344 2001-06-25  Kevin L. Mitchell  <klmitch@mit.edu>
345
346         * ircd/whocmds.c: include ircd_policy.h and implement
347         HEAD_IN_SAND_WHO_OPCOUNT--forward-port from pl15
348
349         * ircd/m_whois.c: forward-port of the idle-time hiding code from
350         pl15; this also required passing parc into do_whois(), which also
351         meant passing parc into do_wilds()--*sigh*
352
353         * include/ircd_policy.h: add a couple more HEAD_IN_SAND
354         #define's--WHOIS_IDLETIME and WHO_HOPCOUNT
355
356 2001-06-22  Kevin L. Mitchell  <klmitch@mit.edu>
357
358         * tools/wrapper.c: add a wrapper program that can be used to
359         adjust file descriptor limits and root directories; program must
360         be run as root--NOT SETUID!--and given appropriate -u arguments
361
362         * doc/readme.log: documentation of how to configure logging
363
364         * doc/readme.features: documentation of each feature (except for
365         logging)
366
367 2001-06-21  Kevin L. Mitchell  <klmitch@mit.edu>
368
369         * Makefile.in (config): add a deprecation notice with a pointer to
370         tools/transition
371
372         * tools/transition: shell script to convert old compile-time
373         options into new compile-time options and appropriate F-lines
374
375         * tools/mkchroot: shell-script to prepare the chroot area by
376         copying over all the necessary libraries so they can be found
377
378 2001-06-20  Kevin L. Mitchell  <klmitch@mit.edu>
379
380         * INSTALL: partial update of INSTALL for u2.10.11 release...
381
382 2001-06-14  Kevin L. Mitchell  <klmitch@mit.edu>
383
384         * ircd/table_gen.c (makeTables): finally got tired of the
385         "overflow in implicit conversion" warning, so just got rid of it
386         by explicitly casting UCHAR_MAX to a (default) char; diffs show no
387         differences in the tables generated
388
389 2001-06-11  Kevin L. Mitchell  <klmitch@mit.edu>
390
391         * ircd/send.c (sendcmdto_match_butone): don't let the server crash
392         if a client is in the STAT_CONNECTING status
393
394 2001-06-10  Kevin L. Mitchell  <klmitch@mit.edu>
395
396         * ircd/send.c: remove unused vsendcmdto_one(), consolidating it
397         into sendcmdto_one(); define new sendcmdto_prio_one(), which
398         places the message into the priority queue
399
400         * ircd/s_user.c (hunt_server_prio_cmd): definition of
401         hunt_server_prio_cmd(), which simply calls sendcmdto_prio_one()
402         instead of sendcmdto_one()
403
404         * ircd/m_settime.c: use sendcmdto_prio_one() and
405         hunt_server_prio_cmd() to send SETTIME
406
407         * ircd/m_server.c: use sendcmdto_prio_one() to send SETTIME
408
409         * include/send.h: removed declaration for unused vsendcmdto_one();
410         added a declaration for sendcmdto_prio_one()
411
412         * include/s_user.h: declare hunt_server_prio_cmd(), which calls
413         sendcmdto_prio_one()
414
415         * ircd/send.c (sendcmdto_flag_butone): oops; /wallops should be
416         put in the server's priority queue, too...
417
418         * ircd/ircd.c: don't check LPATH for accessibility at all
419
420 2001-06-08  Kevin L. Mitchell  <klmitch@mit.edu>
421
422         * ircd/s_serv.c (server_estab): send a +h flag in our SERVER
423         command if we're configured as a hub; send individual server flags
424         in SERVER commands
425
426         * ircd/s_bsd.c (completed_connection): send a +h flag in our
427         SERVER command if we're configured as a hub
428
429         * ircd/m_server.c: implement parv[7] as a mode-like string; +h
430         sets the FLAGS_HUB flag for a server; +s sets the FLAGS_SERVICE
431         flag for a server; +hs sets both flags; also modify CMD_SERVER
432         format string to send the flags
433
434         * include/client.h: define two new flags, FLAGS_HUB and
435         FLAGS_SERVICE to mark services and hubs as such; define testing
436         macros, setting macros
437
438         * ircd/s_user.c: remove deprecated struct Gline* argument to
439         register_user(); remove GLINE rebroadcast; do not send GLINE
440         acknowledgement parameter to NICK; do not look for GLINE
441         acknowledgement parameter to NICK while parsing
442
443         * ircd/s_serv.c (server_estab): remove deprecated struct Jupe*
444         argument to server_estab(); do not send JUPE/GLINE acknowledgement
445         parameters for SERVER or NICK
446
447         * ircd/m_user.c (m_user): remove deprecated argument to
448         register_user()
449
450         * ircd/m_server.c: remove deprecated argument to server_estab();
451         remove documentation comment regarding JUPE acknowledgement
452         parameter to SERVER; remove JUPE rebroadcast
453
454         * ircd/m_pong.c (mr_pong): remove deprecated argument to
455         register_user()
456
457         * ircd/m_nick.c: remove documentation comment regarding GLINE
458         acknowledgement parameter to NICK
459
460         * ircd/jupe.c: use user's real name in JUPE server notices if
461         HEAD_IN_SAND_SNOTICES is defined
462
463         * ircd/ircd.c: remove deprecated chroot() code; remove deprecated
464         setuid code; correct ancient DEBUG vs DEBUGMODE typo
465
466         * ircd/gline.c: use user's real name in GLINE server notices if
467         HEAD_IN_SAND_SNOTICES is defined
468
469         * ircd/channel.c (modebuf_flush_int): make apparent source be
470         local server, not oper's server; use user's real name in hack
471         notices and DESYNC notices if HEAD_IN_SAND_SNOTICES is defined
472
473         * include/s_user.h: remove struct Gline pre-declaration; remove
474         deprecated struct Gline argument from register_user()
475
476         * include/s_serv.h: remove struct Jupe pre-declaration; remove
477         deprecated struct Jupe argument from server_estab()
478
479 2001-06-07  Kevin L. Mitchell  <klmitch@mit.edu>
480
481         * ircd/s_stats.c (hunt_stats): forward-port from pl15 of all the
482         changes required to control remote stats
483
484         * ircd/s_numeric.c (do_numeric): rewrite numeric origins if
485         recipient is not an operator and HEAD_IN_SAND_REWRITE is defined
486         [forward-port from pl15]
487
488         * ircd/m_whowas.c (m_whowas): report server name only if requester
489         is an operator [forward-port from pl15]
490
491         * ircd/m_whois.c (do_whois): /whois <mynick> now correctly reports
492         my server; if HEAD_IN_SAND_REMOTE is 1, ignore the middle argument
493         and obtain the report from the user's server [forward-port from
494         pl15]
495
496         * ircd/m_who.c: add missing include for ircd_policy.h
497         [forward-port from pl15]
498
499         * ircd/m_version.c (m_version): require oper access for remote
500         /version if HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15]
501
502         * ircd/m_time.c (m_time): require oper access for remote /time if
503         HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15]
504
505         * ircd/m_stats.c: pass extra argument to hunt_stats(); correct
506         missing semicolon [forward-port from pl15]
507
508         * ircd/m_nick.c (ms_nick): hide the origin of certain collision
509         kills [forward-port from pl15]
510
511         * ircd/m_motd.c (m_motd): require oper access for remote /motd if
512         HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15]
513
514         * ircd/m_lusers.c (m_lusers): require oper access for remote
515         /lusers if HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15]
516
517         * ircd/m_burst.c (ms_burst): server-added bans are stored using
518         local server name, to hide remote server names; modes also are to
519         originate from the local server [forward-port from pl15]
520
521         * ircd/m_admin.c (m_admin): require oper access for remote /admin
522         if HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15]
523
524         * ircd/channel.c (add_banid): if a server is adding a ban, use my
525         server name to hide the remote server's name [forward-port from
526         pl15]
527
528         * ircd/Makefile.in: ran make depend
529
530         * include/s_stats.h: hunt_stats() has to have an extra argument to
531         support the forward-port from pl15
532
533         * include/ircd_policy.h: #define HEAD_IN_SAND_STATS_P; add
534         HEAD_IN_SAND_{BANWHO,REWRITE,REMOTE} [forward-port from pl15]
535
536         * ircd/engine_poll.c (engine_loop): remove bogus assert that I
537         forgot to check in the events branch
538
539 2001-06-06  Kevin L. Mitchell  <klmitch@mit.edu>
540
541         * ircd/res.c (init_resolver): don't start DNS expires with a 0
542         relative timeout--if the server starts slow, timeouts could be
543         messy...there's probably a better solution, but this'll do for now
544
545         * ircd/os_solaris.c: _XOPEN_SOURCE doesn't get along with Solaris
546         headers very well; include stropts.h; define an os_set_tos()
547
548         * ircd/os_generic.c (os_set_tos): added an os_set_tos() for
549         os_generic.c
550
551         * ircd/ircd.c: if there are no C-lines, we don't want to have a
552         timer that expires at the absolute time of 0--it kinda blocks all
553         the other timers!
554
555         * ircd/engine_devpoll.c: some includes for open(); declare errcode
556         and codesize in engine_loop()
557
558         * ircd/list.c (free_client): remove bogus check on timer active
559         flag
560
561         * ircd/s_auth.c: pull out destruction code in
562         auth_timeout_request() into an externally-visible
563         destroy_auth_request(); manage cli_auth pointer in client
564         structure; use it for an extra assertion check
565
566         * ircd/list.c: include s_auth.h for destroy_auth_request(); add
567         debugging notices to show flow when deallocating
568         connections/clients; call destroy_auth_request() when free'ing a
569         client that has an auth outstanding; don't free the connection if
570         the process timer is unmarked but still active
571
572         * ircd/ircd_events.c: set GEN_ACTIVE when initializing a generator
573         and reset it before calling the event handler for an ET_DESTROY
574         event
575
576         * include/s_auth.h (destroy_auth_request): declare
577         destroy_auth_request(), which can be used to destroy an
578         outstanding auth request if a client socket goes away before the
579         auth exchange is completed
580
581         * include/ircd_events.h: add an active flag to keep track of
582         whether or not particular generators are active, for the
583         convenience of functions using the API
584
585         * include/client.h: add a pointer for auth requests to struct
586         Connection so we can kill outstanding auth requests if a client
587         socket closes unexpectedly
588
589         * ircd/s_bsd.c: cli_connect() could become 0 during the course of
590         the sock or timer callback; take that into account in the assert
591
592         * ircd/list.c: add magic number checking and setting--magic
593         numbers are zero'd on frees to detect double-frees; add back
594         setting of cli_from() to 0 to break the back-link from the struct
595         Connection (duh)
596
597         * ircd/ircd.c: set me's magic number correctly
598
599         * include/client.h: define magic numbers and accessor/verifier
600         macros
601
602         * ircd/list.c: assert that dealloc_client() is called with
603         cli_connect(cptr) == 0; set cli_connect(cptr) to 0 before calling
604         dealloc_client(); don't mess with cli_from(cptr)
605
606         * ircd/s_bsd.c: only attempt to dealloc a connection if the
607         associated client has already been destroyed, or at least delinked
608
609 2001-06-05  Kevin L. Mitchell  <klmitch@mit.edu>
610
611         * ircd/list.c (free_client): only try to delete the socket when
612         the fd hasn't already been closed, avoiding a double-free
613
614         * ircd/list.c (free_connection): make sure the client is really
615         gone before doing away with the connection
616
617         * ircd/s_bsd.c: record that socket has been added in con_freeflag
618         field; queue a socket_del() as soon as the socket is close()'d;
619         use con_freeflag & FREEFLAG_TIMER instead of con_timer; clear
620         FREEFLAG_SOCKET on ET_DESTROY event in client_sock_callback(),
621         then dealloc the connection if safe; mark socket as dead when
622         there's a read error or EOF; clear FREEFLAG_TIMER flag upon entry
623         to client_timer_callback(); dealloc connection if safe upon
624         ET_DESTROY event in client_timer_callback()
625
626         * ircd/list.c: use con_freeflag instead of con_timer; only dealloc
627         the connection if both socket and timer have been destroyed;
628         destroy both socket and timer explicitly and carefully
629
630         * include/client.h: replace the con_timer field with a
631         con_freeflag field, to indicate what still needs freeing; define
632         the freeflags
633
634         * ircd/engine_select.c (engine_loop): duh...sockList[i] could
635         become 0
636
637         * ircd/engine_devpoll.c (engine_loop): duh...sockList[i] could
638         become 0
639
640         * ircd/s_bsd.c: add some extra assertions to try to track down a
641         corruption problem
642
643         * ircd/engine_select.c (engine_loop): add an extra assert to try
644         to track down a corruption problem
645
646         * ircd/engine_poll.c (engine_loop): add an extra assert to try to
647         track down a corruption problem
648
649         * ircd/engine_kqueue.c (engine_loop): add an extra assert to try
650         to track down a corruption problem
651
652         * ircd/engine_devpoll.c (engine_loop): skip slots that have become
653         empty during processing; add an extra assert to try to track down
654         a corruption problem
655
656         * ircd/engine_kqueue.c (engine_delete): make sure to zero deleted
657         entries
658
659 2001-06-04  Kevin L. Mitchell  <klmitch@mit.edu>
660
661         * ircd/s_bsd.c (client_sock_callback): client is no longer
662         blocked, so we must mark it as unblocked
663
664         * ircd/engine_select.c: add Debug() calls galore; add handling for
665         SS_NOTSOCK; use a dummy sock variable to keep things from
666         disappearing on us; correct timeout calculation; update nfds for
667         efficiency
668
669         * ircd/engine_poll.c: use new debugging level (DEBUG_ENGINE);
670         remove a spurious "if (sock)" which will always be true; update
671         nfds for efficiency
672
673         * ircd/engine_kqueue.c: add Debug() calls galore; add handling for
674         SS_NOTSOCK (just in case); correct timeout calculation
675
676         * ircd/engine_devpoll.c: add Debug() calls galore; add handling
677         for SS_NOTSOCK; correct timeout calculation; add EAGAIN handling
678
679         * include/s_debug.h (DEBUG_ENGINE): add new debugging level;
680         pretty-indent numbers
681
682         * ircd/engine_poll.c (engine_loop): break out SS_NOTSOCK
683         case--it's not a socket; the check for writability is most likely
684         not needed, but present for completeness
685
686 2001-05-24  Kevin L. Mitchell  <klmitch@mit.edu>
687
688         * ircd/s_bsd.c: add Debug messages; call read_packet() even if the
689         no newline flag is set; call read_packet() when the timer expires,
690         regardless of what's in the buffer--read_packet() should be able
691         to deal properly
692
693         * ircd/IPcheck.c (ip_registry_connect_succeeded): correct a NOTICE
694         sent to clients to include the client nickname (duh)
695
696         * ircd/ircd_events.c: don't destroy a timer if it's already marked
697         for destruction; replace a missing ! in socket_del()
698
699         * ircd/engine_poll.c (engine_loop): reference a temporary variable
700         so we don't have to worry about sockList[i] going away
701
702         * ircd/s_bsd.c (client_sock_callback): add Debug messages
703
704         * ircd/s_auth.c: add Debug messages all over the place
705
706         * ircd/ircd_events.c: add and edit some Debug messages; add a list
707         of routines to convert some of the enums and flags from numbers
708         into human-readable strings for the Debug messages
709
710         * ircd/engine_poll.c: hack some Debug messages to use the new name
711         conversion routines in ircd_events.c; add an extra assert for a
712         condition that shouldn't ever happen; apparently recv() can return
713         EAGAIN when poll() returns readable--I wonder why...
714
715         * include/ircd_events.h: declare some helper routines under
716         DEBUGMODE
717
718 2001-05-23  Kevin L. Mitchell  <klmitch@mit.edu>
719
720         * ircd/s_bsd.c (client_sock_callback): add an extra assertion
721         check
722
723         * ircd/s_auth.c: add more Debug messages
724
725         * ircd/list.c (make_client): add an extra assertion check
726
727         * ircd/ircd_events.c (socket_events): don't call the engine events
728         changer if we haven't actually made any changes to the event mask
729
730         * ircd/uping.c: add some Debug messages
731
732         * ircd/s_stats.c: document new /STATS e
733
734         * ircd/s_err.c: add RPL_STATSENGINE to report the engine name
735
736         * ircd/s_bsd.c: remove static client_timer variable; in
737         read_packet(), if there's still data in the client's recvQ after
738         parsing, add a 2 second timer (con_proc); fix the ET_DESTROY case
739         of client_sock_callback to handle destroying the timer properly;
740         rewrote client_timer_callback from scratch to be called on an
741         individual client
742
743         * ircd/m_stats.c: add /STATS e to report the engine name
744
745         * ircd/list.c: deal with con_timer field in struct Connection
746         properly; correct a core-level bug in remove_client_from_list--if
747         the client is the only one in the list, we try to update
748         GlobalClientList's cli_prev pointer--not good
749
750         * ircd/ircd.c: remove call to init_client_timer()
751
752         * ircd/engine_poll.c: made Debug messages more uniform by
753         prepending "poll:" to them all; corrected an off-by-one error that
754         caused poll_count to be 1 less than the actual count and removed
755         my work-around; added Debug messages to indicate which socket is
756         being checked and what the results are
757
758         * ircd/Makefile.in: ran a make depend
759
760         * include/s_bsd.h: remove init_client_timer(), since we're doing
761         it differently now
762
763         * include/numeric.h (RPL_STATSENGINE): a stats reply to report the
764         engine name
765
766         * include/ircd_policy.h (HEAD_IN_SAND_STATS_E): turn off /stats e
767         reports for non-opers
768
769         * include/client.h: add con_timer and con_proc fields to struct
770         Connection and define accessor macros--con_timer marks that
771         con_proc contains a valid timer, and con_proc is used to pace user
772         data
773
774         * ircd/s_bsd.c (close_connection): let free_client() destroy the
775         socket
776
777         * ircd/s_auth.c (start_auth): add a Debug call to indicate when
778         auth has begun on a client
779
780         * ircd/ircd_events.c: ensure that event_execute() is called with a
781         non-NULL event; modify event_add() macro to properly zero list
782         bits; modify gen_dequeue() to not try to clip it out of a list
783         it's already been clipped out of; change signal socket
784         initialization to use state SS_NOTSOCK; permit timeout values of
785         0 in add_timer(); add many Debug calls; change socket_del() and
786         timer_del() to always set the GEN_DESTROY flag; use GEN_MARKED in
787         timer_run() instead of GEN_DESTROY so that event_generate() will
788         pass on the events; remove the switch and replace with a simpler
789         if-then-else tree in timer_run(); don't allow destroyed sockets to
790         be destroyed again, nor their states or event masks to be changed
791
792         * ircd/ircd.c: initialize "running" to 1
793
794         * ircd/engine_poll.c: deal with SS_NOTSOCK "sockets"; add Debug
795         messages all over the place; fix a counting problem in
796         engine_add(); turn wait into a signed integer and set it to -1
797         only if timer_next() returns 0; adjust wait time to be relative;
798         don't call gen_ref_dec() if socket disappeared while we were
799         processing it
800
801         * include/ircd_events.h: the pipe for signals is not a socket, so
802         we must mark it as such--added SS_NOTSOCK for that special socket;
803         events won't be generated if GEN_DESTROY is on, so add GEN_MARKED
804         for the benefit of timer_run()
805
806         * configure.in: add --enable-pedantic and --enable-warnings to
807         turn on (and off) -Wall -pedantic in CFLAGS
808
809 2001-05-21  Kevin L. Mitchell  <klmitch@mit.edu>
810
811         * ircd/s_conf.c: change "s_addr" element accesses to "address"
812         element accesses
813
814         * include/s_conf.h: on some systems, "s_addr" is a macro; use
815         "address" instead
816
817 2001-05-18  Kevin L. Mitchell  <klmitch@mit.edu>
818
819         * ircd/engine_kqueue.c: include ircd_alloc.h; set_or_clear returns
820         void in this file; add a missing semi-colon; declare errcode,
821         codesize
822
823         * ircd/uping.c (uping_sender_callback): it's pptr, not uping
824
825         * ircd/s_user.c (register_user): comment out spurious reference to
826         nextping
827
828         * ircd/s_serv.c (server_estab): comment out spurious reference to
829         nextping
830
831         * ircd/s_conf.c (read_configuration_file): comment out spurious
832         reference to nextping and nextconnect
833
834         * ircd/s_bsd.c: comment out some spurious references to formerly
835         global (now non-existant) variables; correct a couple of typos
836
837         * ircd/s_auth.c: pre-declare some functions referenced in the
838         callback; correct a typo
839
840         * ircd/res.c (start_resolver): pass errno value of ENFILE
841
842         * ircd/listener.c (accept_connection): you know your API is messed
843         up when...variables that shouldn't have been global crop up in
844         other files
845
846         * ircd/list.c (free_client): substitution of == for =
847
848         * ircd/ircd_signal.c: include assert.h for assertion checking;
849         check ev_data() to find out what signal generated event
850
851         * ircd/ircd_events.c: some references to the variable "timer"
852         should have been references to the variable "ptr"
853
854         * ircd/engine_select.c: it's struct fd_set, not struct fdset;
855         ev_timer(ev) is already a timer pointer; declare codesize as a
856         size_t to correct signedness issue; use timer_next(), not
857         time_next()
858
859         * ircd/engine_poll.c: ev_timer(ev) is already a timer pointer;
860         select fd out of struct pollfd in assertion checking; declare
861         errcode and codesize; use timer_next(), not time_next()
862
863         * ircd/engine_kqueue.c: ev_timer(ev) is already a timer pointer;
864         use function timer_next(), not time_next()
865
866         * ircd/engine_devpoll.c: ev_timer(ev) is already a timer pointer;
867         use function timer_next(), not time_next()
868
869         * ircd/Makefile.in (IRCD_SRC): add ircd_events.c to the list of
870         compiled sources; do make depend
871
872         * include/list.h: pre-declare struct Connection
873
874         * include/ircd_events.h (gen_ref_inc): cast to the right structure
875         name
876
877         * include/s_auth.h: duh; missing */
878
879 2001-05-10  Kevin L. Mitchell  <klmitch@mit.edu>
880
881         * ircd/send.c: update write events status after sending data or
882         accumulating data to be sent
883
884         * ircd/m_list.c (m_list): update write events status after
885         canceling a running /list
886
887         * ircd/channel.c (list_next_channels): update write events status
888         after listing a few channels
889
890         * ircd/s_bsd.c: extensive changes to update to new events model;
891         remove on_write_unblocked() and the two implementations of
892         read_message(), which have been deprecated by this change
893
894         * ircd/s_auth.c: set the socket events we're interested in for
895         clients; simplify some logic that does the connect_nonb followed
896         by the socket_add
897
898         * ircd/list.c: define free_connection() to free a connection
899         that's become freeable once the struct Socket has been
900         deallocated; fix up free_client() to take this new behavior into
901         account
902
903         * ircd/ircd.c: call init_client_timer()
904
905         * include/s_bsd.h: declare new REGISTER_ERROR_MESSAGE when unable
906         to register connect-in-progress with events system; declare
907         init_client_timer() (HACK!) to preserve rate-limiting behavior
908
909         * include/list.h: declare new free_connection()
910
911         * include/client.h: add a struct Socket to struct Connection
912
913 2001-05-09  Kevin L. Mitchell  <klmitch@mit.edu>
914
915         * ircd/ircd_signal.c: massage the handlers for SIGHUP, SIGINT, and
916         SIGTERM into event callbacks; perform the actions in the
917         callbacks, since they're not called in the context of the signal;
918         set up the signal callbacks in the event engine
919
920         * ircd/ircd_events.c (signal_callback): we're supposed to look for
921         a specific signal; don't generate an event if there is no signal
922         structure for it
923
924         * ircd/ircd.c: nuke nextconnect and nextping and replace them with
925         connect_timer and ping_timer; massage try_connections() and
926         check_pings() into timer callbacks that re-add themselves at the
927         right time; remove ircd.c's "event_loop()"; initialize the event
928         system and the connect_timer and ping_timer
929
930         * ircd/uping.c: correct a couple more typos
931
932         * ircd/s_auth.c: rework to use new events system
933
934         * ircd/os_solaris.c (os_connect_nonb): update to new interface
935
936         * ircd/os_openbsd.c (os_connect_nonb): update to new interface
937
938         * ircd/os_linux.c (os_connect_nonb): update to new interface
939
940         * ircd/os_generic.c (os_connect_nonb): update to new interface
941
942         * ircd/os_bsd.c (os_connect_nonb): update to new interface
943
944         * include/s_auth.h: remove deprecated members of struct
945         AuthRequest, replacing them with struct Socket and struct Timer
946         structures; add flags to indicate when these structures have been
947         released by the event system; remove the deprecated
948         timeout_auth_queries()
949
950         * include/ircd_osdep.h (os_connect_nonb): connect could complete
951         immediately, so change the interface to handle that possibility
952
953         * ircd/uping.c (uping_server): noticed and corrected a typo
954
955         * ircd/listener.c: set up to use ircd_event's struct Socket by
956         adding an socket_add() call to inetport(), replacing
957         free_listener() with socket_del() in close_listener(), and
958         reworking accept_connection to be called as the callback
959
960         * ircd/ircd.c: add a call to IPcheck_init()
961
962         * ircd/IPcheck.c: remove IPcheck_expire(); rework
963         ip_registry_expire() to be called from a timer; write
964         IPcheck_init() to set up the expiration timer (hard-coded for a
965         60-second expiration time)
966
967         * include/listener.h: add a struct Socket to the struct Listener;
968         remove accept_connection()
969
970         * include/IPcheck.h: add IPcheck_init(), remove IPcheck_expire()
971
972 2001-05-08  Kevin L. Mitchell  <klmitch@mit.edu>
973
974         * ircd/ircd_events.c: include config.h; use USE_KQUEUE and
975         USE_DEVPOLL instead of HAVE_KQUEUE and HAVE_DEVPOLL_H
976
977         * ircd/engine_select.c: include config.h; set FD_SETSIZE to
978         MAXCONNECTIONS, not IRCD_FD_SETSIZE...
979
980         * ircd/engine_poll.c: include config.h
981
982         * ircd/engine_kqueue.c: include config.h
983
984         * ircd/engine_devpoll.c: include config.h
985
986         * ircd/Makefile.in: include engine sources in compilation and make
987         depend steps
988
989         * configure.in: add checks for enabling the /dev/poll- and
990         kqueue-based engines
991
992         * acconfig.h: add lines for USE_DEVPOLL and USE_KQUEUE
993
994         * ircd/Makefile.in: work in the engine sources
995
996 2001-05-07  Kevin L. Mitchell  <klmitch@mit.edu>
997
998         * ircd/m_settime.c: include ircd_snprintf.h
999
1000         * ircd/ircd_relay.c: stomp a couple of gcc warnings suggesting
1001         parens around a construct that had both || and &&
1002
1003         * ircd/chkconf.c: #include "config.h" to get some important
1004         definitions
1005
1006         * ircd/Makefile.in: revamp ircd makefile for new build system
1007
1008         * doc/Makefile.in: revamp doc makefile for new build system
1009
1010         * config/*: Removed old build system files
1011
1012         * stamp-h.in: a stamp file
1013
1014         * install-sh: install-sh for new build system
1015
1016         * configure.in: configure.in for new build system
1017
1018         * configure: configure script for new build system (built by
1019         autoconf)
1020
1021         * config.sub: config.sub for new build system
1022
1023         * config.h.in: config.h.in for new build system (built by
1024         autoheader)
1025
1026         * config.guess: config.guess for new build system
1027
1028         * aclocal.m4: aclocal.m4 for new build system (built by aclocal
1029         1.4)
1030
1031         * acinclude.m4: aclocal.m4 macros for new build system
1032
1033         * acconfig.h: config.h skeleton for new build system
1034
1035         * Makefile.in: modify for new build system
1036
1037 2001-05-01  Kevin L. Mitchell  <klmitch@mit.edu>
1038
1039         * ircd/s_err.c: get rid of the last vestiges of TIME_T_FMT
1040
1041         * ircd/m_settime.c: get rid of the last vestiges of TIME_T_FMT
1042
1043         * ircd/m_server.c: get rid of the last vestiges of TIME_T_FMT
1044
1045 2001-05-01  Perry Lorier       <Isomer@coders.net>
1046         * doc/iauth.doc: Protocol for iauth server. (from hybrid).
1047         * doc/linux-poll.patch: Patch to make Linux under 2.2 not deadlock
1048                 when you have far far too many sockets in use.
1049         * {include,ircd}/iauth.c: A start on iauth support.
1050
1051 2001-05-01  Perry Lorier       <Isomer@coders.net>
1052         * ircd/s_err.c: Suggested wording change.
1053         * ircd/s_user.c: Users aren't target limited against +k users.
1054         * ircd/chkconf.c: Made it compile again, who knows if it works, but
1055                 now I can at least make install
1056         * various: Cleanups on m_*.c files.
1057
1058
1059 2001-04-23  Kevin L. Mitchell  <klmitch@mit.edu>
1060
1061         * ircd/s_misc.c (exit_client): make netsplit server notice say the
1062         right thing
1063
1064         * ircd/m_links.c (m_links_redirect): forward-port RPL_ENDOFLINKS
1065         change to make Khaled happy...
1066
1067         * ircd/m_whois.c (do_whois): pull-up of m_whois() fix
1068         (do_whois): duh...
1069
1070 2001-04-21  Kevin L. Mitchell  <klmitch@mit.edu>
1071
1072         * ircd/msgq.c: finally remove the msgq_integrity() hack, as it's
1073         turned up no more bugs
1074
1075         * ircd/ircd.c: use /* */ comments instead of // comments--all the
1076         world's not gcc :(
1077
1078         * ircd/s_conf.c (conf_add_server): use /* */ comments instead of
1079         // comments--all the world's not gcc :(
1080
1081         * ircd/runmalloc.c: finally garbage-collect unused file
1082
1083         * include/runmalloc.h: finally garbage-collect unused file
1084
1085         * ircd/<multiple files>: addition of '#include "config.h"' before
1086         all other includes in most .c files
1087
1088         * include/<multiple files>: remove includes of config.h, which are
1089         now going into the raw .c files
1090
1091 2001-04-20  Kevin L. Mitchell  <klmitch@mit.edu>
1092
1093         * ircd/m_whois.c (do_whois): display proper server name if the
1094         user is looking up himself
1095
1096         * ircd/m_who.c (m_who): disable match by servername or display of
1097         server names by non-opers
1098
1099         * include/ircd_policy.h: add define for
1100         HEAD_IN_SAND_WHO_SERVERNAME to cover full intent of sub-motion 15
1101         of CFV 165
1102
1103 2001-04-18  Kevin L. Mitchell  <klmitch@mit.edu>
1104
1105         * ircd/s_conf.c: keep the $R in memory so we can see it clearly
1106         when we do a /stats k
1107
1108         * ircd/s_user.c (set_user_mode): pull-up of changes to prevent
1109         users from turning on +s and +g
1110
1111         * ircd/s_misc.c (exit_client): pull-up of changes to turn off
1112         net.split notice
1113
1114         * ircd/parse.c: pull-up of changes to disable /trace, /links, and
1115         /map for users
1116
1117         * ircd/m_whois.c (do_whois): pull-up of server name masking for
1118         /whois
1119
1120         * ircd/m_user.c (m_user): removal of umode and snomask defaulting
1121         functions, pull-up
1122
1123         * ircd/m_stats.c (m_stats): pull-up of stats-disabling stuff
1124
1125         * ircd/m_map.c (m_map_redirect): pull-up of m_map_redirect()
1126
1127         * ircd/m_links.c (m_links_redirect): pull-up of m_links_redirect()
1128
1129         * ircd/channel.c (channel_modes): pull-up of channel key display
1130         as *
1131
1132         * include/ircd_policy.h: pull-up of ircd_policy.h
1133
1134         * include/client.h: pull-up of Set/ClearServNotice()
1135
1136         * ircd/gline.c (do_gline): report client name in G-line message
1137         (pull-up)
1138
1139         * ircd/s_user.c (register_user): pull-up--show IP address in some
1140         server notices dealing only with users; report which connection
1141         class has filled up
1142
1143         * ircd/s_stats.c (report_deny_list): use conf->flags &
1144         DENY_FLAGS_IP insteaf of conf->ip_kill
1145
1146         * ircd/m_stats.c (report_klines): use conf->flags & DENY_FLAGS_IP
1147         insteaf of conf->ip_kill
1148
1149         * ircd/s_conf.c: use flags field in struct DenyConf; pull-up of
1150         K-line by real name
1151
1152         * include/s_conf.h: use a flags field in struct DenyConf; define
1153         DENY_FLAGS_FILE, DENY_FLAGS_IP, and DENY_FLAGS_REALNAME for
1154         pull-up of K-line by real name
1155
1156         * ircd/m_trace.c: pull-up of IP show for user connections
1157
1158         * doc/example.conf: pull-up of the realname K-line documentation
1159
1160         * ircd/ircd.c: forward port of pid file advisory locking mechanism
1161
1162 2001-04-16  Kevin L. Mitchell  <klmitch@mit.edu>
1163
1164         * ircd/send.c (sendcmdto_flag_butone): recast to just broadcast to
1165         all servers, rather than to only servers that have +w/+g/whatever
1166         users on them; among other things, this removes that atrocity
1167         known as sentalong[] from this function
1168
1169         * ircd/m_admin.c: must include ircd.h to declare "me"; must
1170         include hash.h to declare FindUser()
1171
1172         * ircd/m_wallusers.c: implementation of WALLUSERS
1173
1174         * ircd/m_desynch.c (ms_desynch): only send DESYNCHs to opers
1175
1176         * ircd/m_wallops.c: only send WALLOPS to opers
1177
1178         * ircd/parse.c: add WALLUSERS command to parser table
1179
1180         * include/handlers.h: declare wallusers handlers
1181
1182         * include/msg.h: add WALLUSERS command
1183
1184         * ircd/send.c (sendcmdto_flag_butone): if FLAGS_OPER is or'd with
1185         flag, send only to appropriate opers
1186
1187 2001-04-13  Kevin L. Mitchell  <klmitch@mit.edu>
1188
1189         * ircd/uping.c: refit to use the new events interface
1190
1191         * ircd/res.c: refit to use the new events interface
1192
1193         * ircd/ircd_events.c: create timer_chg(), which permits a
1194         (non-periodic) timer's expire time to be modified; change the
1195         logic in timer_run() so that timers that were re-added while the
1196         event was being processed will not be destroyed prematurely
1197
1198         * include/uping.h: include the events header, declare some extra
1199         fields in struct UPing, remove timeout value, and define some
1200         flags for marking which cleanup items have yet to be done
1201
1202         * include/ircd_events.h: add a prototype for timer_chg() to change
1203         the expire time of a running timer
1204
1205 2001-03-13 Joseph Bongaarts <foxxe@wtfs.net>
1206         * ircd/os_openbsd.c: Tweaked the openbsd hack a bit.
1207         
1208 2001-03-07  Joseph Bongaarts  <foxxe@wtfs.net>
1209
1210         * config/configure.in: Add check for OpenBSD
1211
1212         * ircd/os_openbsd.c: Add seperate os dep file for openbsd which
1213         differs from generic BSD, particularly in its handling of
1214         _XOPEN_SOURCE.
1215         
1216 2001-02-12  Kevin L. Mitchell  <klmitch@mit.edu>
1217
1218         * ircd/m_gline.c (ms_gline): propagate a G-line that happened to
1219         have been added by a U-lined server, rather than going through the
1220         activate/deactivate logic; propagate G-line removals by U-lined
1221         servers as well
1222
1223         * ircd/gline.c: rename propagate_gline() to gline_propagate();
1224         make gline_propagate() return an int 0 (convenience return); only
1225         update lastmod in gline_activate() and gline_deactivate() if the
1226         current lastmod is non-zero, since 0 lastmod is our flag of a
1227         U-lined server having added a G-line
1228
1229         * include/gline.h (gline_propagate): exporting the G-line
1230         propagation function
1231
1232         * ircd/m_list.c (m_list): duh; permit explicit channel name
1233         specification only when /list gets two arguments ("Kev
1234         #wasteland") rather than when /list gets more than two
1235         arguments--nice braino
1236
1237 2001-01-29  Thomas Helvey <twhelvey1@home.com>
1238
1239         * ircd/ircd_reply.c (need_more_params): fix bug that allowed
1240         unregistered clients to spam opers with protocol violation
1241         messages. Note: the bugfix may have eliminated some useful
1242         protocol violation messages.
1243         Please send protocol violation messages explicitly from the
1244         functions they are discovered in, you have much better context
1245         for the error there and it helps to document the behavior of the
1246         server. This was also a design bug in that it violated the
1247         "A function should do one thing" heuristic. Patching this one
1248         would have resulted in a continuous spawning of other bugs over
1249         the next 3 years, so I killed it. Check around for stuff this
1250         broke and readd the calls to protocol_violation in the functions
1251         that need to send the message.
1252
1253 2001-01-29  Kevin L. Mitchell  <klmitch@mit.edu>
1254
1255         * ircd/channel.c (mode_parse_ban): stopper a tiny leak--if a ban
1256         already existed, then the logic would (attempt to) skip it, but
1257         would not free the ban string; now the ban string is free'd and
1258         the ban count is decremented, releasing the ban for use
1259
1260         * ircd/s_user.c: make send_umode_out() take a prop argument
1261         instead of testing for the PRIV_PROPAGATE privilege itself; fix
1262         set_umode() to use this new argument, calculating it before
1263         calculating the new privileges for a -o'd user
1264
1265         * ircd/m_oper.c (m_oper): pass the new prop argument to
1266         send_umode_out()
1267
1268         * ircd/channel.c (mode_parse_ban): turn off MODE_ADD bit in bans
1269         that we're not actually going to add because they already exist;
1270         test that particular bit before adding to the linked list
1271
1272         * include/s_user.h: add a prop argument to send_umode_out() to
1273         indicate whether or not to propagate the user mode
1274
1275 2001-01-24  Kevin L. Mitchell  <klmitch@mit.edu>
1276
1277         * ircd/msgq.c: ircd_vsnprintf() returns the number of bytes that
1278         it would have written; upper-bound the number to prevent overflows
1279         by proxy; also, tune buffer size given to ircd_vsnprintf() to take
1280         into account the fact that ircd_vsnprintf() already takes the
1281         terminal \0 into account
1282
1283 2001-01-22  Kevin L. Mitchell  <klmitch@mit.edu>
1284
1285         * ircd/msgq.c: add an incredibly ugly hack to attempt to track
1286         down an apparent buffer overflow; remove msgq_map(), since it's no
1287         longer used anywhere; slight tweaks to prevent off-by-one errors,
1288         but these can't explain the problems we've seen
1289
1290         * include/msgq.h: remove msgq_map(), since it's no longer used
1291         anywhere
1292
1293 2001-01-18  Kevin L. Mitchell  <klmitch@mit.edu>
1294
1295         * ircd/s_user.c (set_nick_name): call client_set_privs() after
1296         parsing user modes
1297
1298 2001-01-17  Kevin L. Mitchell  <klmitch@mit.edu>
1299
1300         * ircd/s_bsd.c (read_message): fix a typo in the select version of
1301         read_message()
1302
1303         * ircd/whowas.c (whowas_free): MyFree() is a macro that expects
1304         its argument to be an lvalue, which means we can't use
1305         whowas_clean()'s handy-dandy "return ww" feature
1306
1307         * ircd/ircd_features.c: default LOCOP_KILL to TRUE--oops...
1308
1309 2001-01-16  Kevin L. Mitchell  <klmitch@mit.edu>
1310
1311         * ircd/ircd_events.c (timer_run): it's possible that the timer got
1312         deleted during the callback processing, so don't go to the bother
1313         of requeuing it if the destroy flag is set
1314
1315         * ircd/engine_select.c: define FD_SETSIZE to be IRCD_FD_SETSIZE
1316         out of config.h if this is a *BSD; include errno.h (oops);
1317         decrement error count after an hour using a timer; use FD_SETSIZE
1318         constant instead of IRCD_FD_SETSIZE constant; fill in event
1319         processing code
1320
1321         * ircd/engine_poll.c: include errno.h (oops); decrement error
1322         count after an hour using a timer; fill in event processing code
1323
1324         * ircd/engine_kqueue.c: include errno.h (oops); decrement error
1325         count after an hour using a timer; assert events filter is either
1326         EVFILT_READ or EVFILT_WRITE; fill in event processing code
1327
1328         * ircd/engine_devpoll.c: include errno.h (oops); decrement error
1329         count after an hour using a timer; fill in event processing code
1330
1331 2001-01-15  Kevin L. Mitchell  <klmitch@mit.edu>
1332
1333         * ircd/client.c: fixed feattab; basically, when I changed features
1334         to use small integers specifying bit positions, instead of the
1335         bits themselves, I forgot to update feattab to not | these
1336         privileges together; also fixed a bug in the antiprivs masking
1337         loop in client_set_privs()--last index wouldn't get parsed
1338
1339 2001-01-11  Kevin L. Mitchell  <klmitch@mit.edu>
1340
1341         * ircd/ircd_events.c: call event_generate() with new data
1342         argument; make it set that field in struct Event; make
1343         socket_add() return the value of the eng_add callback
1344
1345         * ircd/engine_select.c: make engine_add() return a
1346         successful/unsuccessful status; add bounds-checking outside of an
1347         assert; use accessor macros; use log_write(), not the deprecated
1348         ircd_log(); add an assert to engine_loop() to double-check for
1349         data structure corruption
1350
1351         * ircd/engine_poll.c: make engine_add() return a
1352         successful/unsuccessful status; add bounds-checking outside of an
1353         assert; use accessor macros; use log_write(), not the deprecated
1354         ircd_log(); add an assert to engine_loop() to double-check for
1355         data structure corruption
1356
1357         * ircd/engine_kqueue.c: implementation of an engine for kqueue()
1358
1359         * ircd/engine_devpoll.c: implementation of an engine for /dev/poll
1360
1361         * include/ircd_events.h: define some accessor macros; add ev_data
1362         to struct Event for certain important data--errno values, for
1363         instance; make EngineAdd callback tell us if it was successful or
1364         not; add extra argument to event_generate(); make socket_add()
1365         return the status from EngineAdd
1366
1367 2001-01-10  Kevin L. Mitchell  <klmitch@mit.edu>
1368
1369         * ircd/ircd_events.c: pass initializer information about how many
1370         total _filedescriptors_ may be opened at once
1371
1372         * ircd/ircd.c: use exported "running" instead of unexported
1373         thisServer.running
1374
1375         * ircd/engine_select.c: implementation of an event engine based on
1376         select()
1377
1378         * ircd/engine_poll.c: implementation of an event engine based on
1379         poll()
1380
1381         * include/ircd_events.h: pass the engine initializer an integer
1382         specifing how many _filedescriptors_ may be opened at once
1383
1384         * include/ircd.h: running has to be exported for the engine_*
1385         event loops
1386
1387 2001-01-09  Kevin L. Mitchell  <klmitch@mit.edu>
1388
1389         * ircd/ircd_events.c: include some needed headers; add some
1390         comments; make evEngines[] const; bundle sig_sock and sig_fd into
1391         a struct named sigInfo; rework struct evInfo to have a queue of
1392         _generators_, and only when threaded; added a gen_init() function
1393         to centralize generator initialization; fix various compile-time
1394         errors; rework event_add() for new queueing scheme and checked for
1395         compile-time errors; add casts where needed; spell evEngines[]
1396         correctly; make engine_name() return const char*
1397
1398         * include/ircd_events.h: type EventCallBack depends on struct
1399         Event, so pre-declare it; put _event_ queue into generators, and
1400         only when threaded; give engine data a union to store both ints
1401         and pointers; make engine name a const; fix gen_ref_dec() macro;
1402         make engine_name() return a const char*
1403
1404         * ircd/ircd_events.c: gen_dequeue() is now exported, so move it
1405         down with the non-static functions; modify event_execute() to use
1406         the new gen_ref_dec() to simplify code; make sure event_generate()
1407         does not generate new events for generators marked for destruction
1408
1409         * include/ircd_events.h: the engines, at least, may need to modify
1410         reference counts to keep generators from going away while
1411         something still points at them, so add reference counter
1412         manipulators and export gen_dequeue() for them
1413
1414         * ircd/ircd_events.c: set up the list of engines to try; set up
1415         the signal struct Socket; rename netInfo to evInfo; move static
1416         functions near the beginning of the file; do away with
1417         signal_signal() (since we no longer keep a signal count ourselves)
1418         and call event_generate() directly from signal_callback--also
1419         renamed some functions; allow signal_callback() to read up to
1420         SIGS_PER_SOCK at once from the signal pipe; add event_init() to
1421         initialize the entire event system; add event_loop() to call the
1422         engine's event loop; initialize new struct GenHeader member,
1423         gh_engdata; remove timer_next(); add socket_add() function to add
1424         a socket; add socket_del() to mark a socket for deletion; add
1425         socket_state() to transition a socket between states; add
1426         socket_events() to set what events we're interested in on the
1427         socket; add engine_name() to retrieve event engine's name
1428
1429         * include/ircd_events.h: add engine data field to struct
1430         GenHeader; rename SOCK_ACTION_REMOVE to SOCK_ACTION_DEL; add a
1431         note about states vs s_events; remove signal count; fold union
1432         Generator back into struct Event; remove count members from struct
1433         Generators; redefine engine callbacks to not take a struct
1434         Engine*; add explanatory comments to callback definitions; add
1435         some engine callbacks to handle operations; remove struct Engine
1436         flag member--can detect single flag from eng_signal member; add
1437         event_init(), event_loop(), engine_name(), and the socket_*()
1438         functions; make timer_next() a macro to avoid a function call
1439
1440 2001-01-08  Kevin L. Mitchell  <klmitch@mit.edu>
1441
1442         * include/ircd_events.h: rename to ircd_events.h, since it handles
1443         events, not just networking stuff; add signal support; more
1444         structural rearrangement
1445
1446         * ircd/ircd_events.c: rename to ircd_events.c, since it handles
1447         events, not just networking stuff; add signal support; more
1448         structural rearrangement
1449
1450 2001-01-07  Kevin L. Mitchell  <klmitch@mit.edu>
1451
1452         * ircd/ircd_network.c: implement timer API; add reference counts
1453         appropriately
1454
1455         * include/ircd_network.h: firm up some pieces of the interface;
1456         split out members everything has into a separate structure; add
1457         reference counts; add timer API
1458
1459 2001-01-06  Kevin L. Mitchell  <klmitch@mit.edu>
1460
1461         * ircd/ircd_network.c: static data and event manipulation
1462         functions for new event processing system
1463
1464         * include/ircd_network.h: data structures for new event processing
1465         system
1466
1467 2001-01-03  Kevin L. Mitchell  <klmitch@mit.edu>
1468
1469         * ircd/whowas.c: Completely re-did the old allocation scheme by
1470         turning it into a linked list, permitting the
1471         NICKNAMEHISTORYLENGTH feature to be changed on the fly
1472
1473         * ircd/s_debug.c (count_memory): use FEAT_NICKNAMEHISTORYLENGTH
1474         feature instead of old #define
1475
1476         * ircd/ircd_features.c: add NICKNAMEHISTORYLENGTH feature as an
1477         integer feature with a notify callback (whowas_realloc)
1478
1479         * ircd/client.c (client_set_privs): second memset was supposed to
1480         be over antiprivs, not privs; thanks, Chris Behrens
1481         <cbehrens@xo.com> for pointing that out...
1482
1483         * include/whowas.h: new elements for an extra linked list in
1484         struct Whowas; a notify function for feature value changes
1485
1486         * include/ircd_features.h: new feature--FEAT_NICKNAMEHISTORYLENGTH
1487
1488         * config/config-sh.in: NICKNAMEHISTORYLENGTH is now a feature
1489
1490 2001-01-02  Kevin L. Mitchell  <klmitch@mit.edu>
1491
1492         * config/config-sh.in: get rid of DEFAULT_LIST_PARAMETER
1493         compile-time option--now in features subsystem
1494
1495         * ircd/motd.c (motd_init): rework motd_init() to be called as the
1496         notify function for MPATH and RPATH features (should probably
1497         split it up a bit, though...)
1498
1499         * ircd/m_privs.c (mo_privs): if called with no parameters, return
1500         privs of the caller, rather than an error
1501
1502         * ircd/m_list.c: pull usage message into its own function; pull
1503         list parameter processing into its own function that does not
1504         modify the contents of the parameter; add list_set_default() to
1505         set the default list parameter (uses the notify hook); rework
1506         m_list() to make use of these functions; removed dead code
1507
1508         * ircd/ircd_log.c (log_feature_mark): make sure to return 0, since
1509         we have no notify handler
1510
1511         * ircd/ircd_features.c: add notify callback for notification of
1512         value changes; give mark callback an int return value to indicate
1513         whether or not to call the notify callback; fix up feature macros
1514         for new notify callback; add DEFAULT_LIST_PARAM feature; rewrite
1515         string handling in feature_set() to deal with def_str being a null
1516         pointer; wrote feature_init() to set up all defaults appropriately
1517
1518         * ircd/ircd.c (main): call feature_init() instead of
1519         feature_mark(), to avoid calling notify functions while setting up
1520         defaults
1521
1522         * ircd/client.c: updated to deal with new privileges structure
1523
1524         * ircd/class.c: updated so init_class() can be called should one
1525         of PINGFREQUENCY, CONNECTFREQUENCY, MAXIMUM_LINKS, or
1526         DEFAULTMAXSENDQLENGTH be changed
1527
1528         * include/ircd_log.h: log_feature_mark() updated to fit with new
1529         API changes
1530
1531         * include/ircd_features.h: added DEFAULT_LIST_PARAM feature and
1532         feature_init() function (found necessary since adding the notify
1533         stuff and notifying motd.c during start-up...before we defined
1534         RPATH!)
1535
1536         * include/client.h: move privs around to enable addition of more
1537         bits if necessary; based on the FD_* macros
1538
1539         * include/channel.h: declare list_set_default (actually located in
1540         m_list.c *blanche*)
1541
1542         * ircd/s_user.c: retrieve MAXSILES and MAXSILELENGTH (now
1543         AVBANLEN*MAXSILES) from features subsystem
1544
1545         * ircd/s_debug.c (debug_serveropts): CMDLINE_CONFIG doesn't go to
1546         anything anymore
1547
1548         * ircd/s_bsd.c: retrieve HANGONGOODLINK and HANGONRETRYDELAY from
1549         the features subsystem
1550
1551         * ircd/s_auth.c (start_auth): NODNS migrated to the features
1552         subsystem
1553
1554         * ircd/random.c: created random_seed_set() function to set seed
1555         value, along with some stuff to make ircrandom() a little more
1556         random--state preserving, xor of time instead of direct usage,
1557         etc.; it's still a pseudo-random number generator, though, and
1558         hopefully I haven't broken the randomness
1559
1560         * ircd/m_version.c: FEATUREVALUES makes use of feature_int() calls
1561
1562         * ircd/m_join.c: use features interface to retrieve
1563         MAXCHANNELSPERUSER
1564
1565         * ircd/ircd_features.c: add NODISP flag for super-secret features;
1566         add a whole bunch of new features migrated over from make config
1567
1568         * ircd/ircd.c: use features interface to retrieve PINGFREQUENCY,
1569         CONNECTTIMEOUT, and TIMESEC
1570
1571         * ircd/client.c (client_get_ping): use features interface to
1572         retrieve PINGFREQUENCY
1573
1574         * ircd/class.c: use features interface to retrieve PINGFREQUENCY,
1575         CONNECTFREQUENCY, MAXIMUM_LINKS, and DEFAULTMAXSENDQLENGTH
1576
1577         * ircd/chkconf.c (DEFAULTMAXSENDQLENGTH): since it's now in the
1578         features subsystem, we have to add something explicit
1579
1580         * ircd/channel.c: use features interface to retrieve
1581         KILLCHASETIMELIMIT, MAXBANLENGTH, MAXBANS, and MAXCHANNELSPERUSER;
1582         note that MAXBANLENGTH is now calculated dynamically from MAXBANS
1583         and AVBANLEN
1584
1585         * ircd/Makefile.in: run make depend
1586
1587         * include/supported.h (FEATURESVALUES): update to reference
1588         feature settings
1589
1590         * include/random.h: add prototype for random_seed_set
1591
1592         * include/ircd_features.h: add several more features
1593
1594         * include/channel.h: move MAXBANS and MAXBANLENGTH into feature
1595         subsystem
1596
1597         * config/config-sh.in: feature-ized some more stuff
1598
1599         * include/motd.h: some new elements in motd.h for motd.c changes
1600
1601         * ircd/motd.c: motd_cache() now searches a list of already cached
1602         MOTD files; saves us from having duplicate caches in memory if
1603         there are two identical T-lines for two different sites...
1604
1605 2001-01-02  Perry Lorier <isomer@coders.net>
1606         * ircd/motd.c: don't core if the motd isn't found.  Bug found by
1607         Amarande.
1608
1609 2001-01-02  Perry Lorier <isomer@coders.net>
1610         * ircd/s_err.c: Added third param to 004 - the channel modes that tage params.  Used by hybrid/epic.
1611         * ircd/s_channels.c: Added fix for msg'ing a -n+m channel - thanks
1612                 to guppy for noticing, and hektik for providing the fix.
1613         * misc others: Minor cleanups, added more protocol_violations, ripped
1614                 out more P09 stuffs, bit more protocol neg stuff.
1615
1616 2000-12-19  Kevin L. Mitchell  <klmitch@mit.edu>
1617
1618         * ircd/m_ison.c (m_ison): Dianora says that ISON has to end with a
1619         space (*sigh* stupid clients...)
1620
1621         * ircd/s_user.c: make WALLOPS_OPER_ONLY a feature managed through
1622         ircd_features.[ch]
1623
1624         * ircd/s_err.c: get rid of GODMODE conditionals
1625
1626         * ircd/s_debug.c (debug_serveropts): switch to using appropriate
1627         calls into the features subsystem for various serveropts
1628         characters
1629
1630         * ircd/s_conf.c (find_conf_entry): get rid of USEONE conditional
1631
1632         * ircd/s_bsd.c: remove GODMODE conditional; use features subsystem
1633         to get value of VIRTUAL_HOST and CLIENT_FLOOD; remove
1634         NOFLOWCONTROL conditional
1635
1636         * ircd/s_auth.c: use features subsystem to determine value of
1637         KILL_IPMISMATCH
1638
1639         * ircd/parse.c: get rid of NOOPER and GODMODE conditionals; use
1640         features subsystem to determine the setting of IDLE_FROM_MSG
1641
1642         * ircd/numnicks.c: get rid of EXTENDED_NUMERICS conditionals
1643
1644         * ircd/motd.c: get value of NODEFAULTMOTD from features subsystem;
1645         use features subsystem to get motd file names
1646
1647         * ircd/m_settime.c: get value of RELIABLE_CLOCK from features
1648         subsystem
1649
1650         * ircd/m_server.c: get rid of CRYPT_LINK_PASSWORD, since it does
1651         us no good; use features subsystem to figure out if we need to do
1652         HUB-type stuff; make TESTNET debugging sendto_opmask_butone's use
1653         the Debug(()) macro instead; get value of RELIABLE_CLOCK from
1654         features subsystem
1655
1656         * ircd/m_privmsg.c: get IDLE_FROM_MSG from the features subsystem
1657
1658         * ircd/m_oper.c: get CRYPT_OPER_PASSWORD from the features
1659         subsystem
1660
1661         * ircd/m_connect.c: get SERVER_PORT from the features subsystem
1662
1663         * ircd/ircd_log.c (log_set_file): fix a bug that kept log files
1664         from getting marked if they were already set to something...
1665
1666         * ircd/ircd_features.c: add a flag to indicates read-only access;
1667         add several new features that used to be compile-time selected
1668
1669         * ircd/ircd.c: grab pidfile out of feature subsystem; don't check
1670         access to motd files (what the heck?); make sure to initialize the
1671         feature subsystem before trying to write the config file
1672
1673         * ircd/dbuf.c: use feature_int() to retrieve BUFFERPOOL settings;
1674         use feature_bool() to figure out if we're using the FERGUSON
1675         flusher
1676
1677         * ircd/Makefile.in: MPATH and RPATH are now done differently, so
1678         remove the clause that creates empty files of that name; also ran
1679         make depend
1680
1681         * include/sys.h: CLIENT_FLOOD is now a feature; unfortunately,
1682         there is no easy way to bounds-check it at present
1683
1684         * include/querycmds.h: make sure ircd_features.h is included; use
1685         feature_str(FEAT_DOMAINNAME) in calls to match()
1686
1687         * include/ircd_features.h: many new features that used to be
1688         compile-time selected
1689
1690         * config/config-sh.in: add * to DOMAINNAME; try also using first
1691         argument to search in /etc/resolv.conf; removed many compile-time
1692         options that now can be configured through the features system
1693
1694 2000-12-18  Kevin L. Mitchell  <klmitch@mit.edu>
1695
1696         * doc/api/log.txt: how to use the logging API
1697
1698         * doc/api/features.txt: how to use the features API
1699
1700         * doc/api/api.txt: how to write API documentation
1701
1702         * include/ircd_features.h: rearranged a couple of features for
1703         neatness purposes
1704
1705         * ircd/ircd_features.c: cleaned up the macros some; rearranged
1706         some code to all go into the switch; rearranged a couple of
1707         features for neatness purposes
1708
1709 2000-12-16  Greg Sikorski <gte@atomicrevs.demon.co.uk>
1710         * ircd/os_bsd.c: Added os_set_tos for BSD users.
1711
1712 2000-12-16  Kevin L. Mitchell  <klmitch@mit.edu>
1713
1714         * ircd/ircd_features.c: Isomer almost got it right; you need to
1715         use F_I(), since it's an integer value, not a boolean value.  The
1716         asserts in feature_int would catch you out...  Also made the F_*
1717         macros take flags
1718
1719         * ircd/s_err.c: define RPL_PRIVS reply
1720
1721         * ircd/parse.c: put new PRIVS command into command table
1722
1723         * ircd/m_privs.c (mo_privs): message handler to report operator
1724         privileges
1725
1726         * ircd/ircd_features.c: declare new features OPER_SET and
1727         LOCOP_SET; redo boolean testing routine to accept TRUE, YES, and
1728         ON for boolean TRUE, and FALSE, NO, and OFF for boolean FALSE
1729
1730         * ircd/client.c: simplify client_set_privs() with a table that
1731         defines what features to test for; add new client_report_privs()
1732
1733         * ircd/Makefile.in: compile new m_privs.c; run make depend
1734
1735         * include/numeric.h (RPL_PRIVS): new reply numeric for displaying
1736         an operator's privileges
1737
1738         * include/msg.h: define new command: PRIVS
1739
1740         * include/ircd_features.h: create new features OPER_SET and
1741         LOCOP_SET for controlling access to /set
1742
1743         * include/handlers.h (mo_privs): declare message handler for
1744         reporting oper privileges
1745
1746         * include/client.h (client_report_privs): declare function to
1747         report what privileges an oper has
1748
1749         * ircd/m_whois.c (do_whois): fix a bug that caused /whois to
1750         report that a user is an oper if the oper doing the /whois had
1751         PRIV_SEE_OPERS
1752
1753 2000-12-17  Isomer <Isomer@coders.net>
1754         * ircd/listener.c: added support for TOS twiddling as a 'feature'.
1755
1756 2000-12-17  Isomer <Isomer@coders.net>
1757         * ircd/os_linux.c: add TOS stuffs
1758
1759         * ircd/listener.c: add TOS stuffs
1760
1761 2000-12-16  Kevin L. Mitchell  <klmitch@mit.edu>
1762
1763         * ircd/whocmds.c (do_who): use HasPriv to determine whether or not
1764         to indicate a user is an oper
1765
1766         * ircd/s_user.c: clear privileges setting when deopping; don't
1767         propagate +o unless user has PRIV_PROPAGATE privilege
1768
1769         * ircd/s_debug.c (debug_serveropts): created debug_serveropts()
1770         function and replaced how the server option string is generated
1771
1772         * ircd/parse.c: remove conditional on CONFIG_OPERCMDS
1773
1774         * ircd/m_whois.c (do_whois): use HasPriv to determine whether or
1775         not to indicate the user is an operator
1776
1777         * ircd/m_who.c: use HasPriv to determine whether or not a user
1778         should be displayed in the list of opers
1779
1780         * ircd/m_version.c: call debug_serveropts() to get server option
1781         string
1782
1783         * ircd/m_userip.c (userip_formatter): use HasPriv to determine
1784         whether or not to show oper status
1785
1786         * ircd/m_userhost.c (userhost_formatter): use HasPriv to determine
1787         whether or not to show oper status
1788
1789         * ircd/m_restart.c (mo_restart): replace ugly #ifdef conditional
1790         checks with HasPriv check; remove dead code
1791
1792         * ircd/m_rehash.c (mo_rehash): replace ugly #ifdef conditional
1793         checks with HasPriv check
1794
1795         * ircd/m_opmode.c (mo_opmode): use HasPriv to check permissions;
1796         use feature_bool to check if disabled
1797
1798         * ircd/m_oper.c (m_oper): set oper priviliges
1799
1800         * ircd/m_mode.c (m_mode): replace #ifdef conditional with HasPriv
1801         check
1802
1803         * ircd/m_kill.c (mo_kill): use HasPriv checks to determine if we
1804         can kill
1805
1806         * ircd/m_kick.c (m_kick): replace #ifdef conditional with HasPriv
1807         check
1808
1809         * ircd/m_jupe.c (mo_jupe): rework permissions checking structure;
1810         use feature_bool to check if disabled
1811
1812         * ircd/m_join.c (m_join): remove BADCHAN conditional; replace
1813         #ifdef conditional with a HasPriv check
1814
1815         * ircd/m_gline.c (mo_gline): rework permissions checking
1816         structure; use feature_bool to check if any part is disabled
1817
1818         * ircd/m_die.c: replace ugly #ifdef conditionals with HasPriv
1819         check; remove dead code
1820
1821         * ircd/m_clearmode.c: use feature_bool() to detect if we're
1822         disabled; use HasPriv to figure out what we're permitted to do;
1823         only allow clearmode on moded channels
1824
1825         * ircd/ircd_features.c: define various features; use HasPriv to
1826         verify permissions to set/reset
1827
1828         * ircd/gline.c (gline_add): use HasPriv instead of #ifdef
1829         conditionals
1830
1831         * ircd/client.c (client_set_privs): function to set an oper's
1832         privileges
1833
1834         * ircd/channel.c: use HasPriv calls instead of #ifdef conditionals
1835
1836         * include/whocmds.h: deconditionalize several macros and
1837         substitute appropriate calls to HasPriv()
1838
1839         * include/s_debug.h: get rid of global serveropts[]; define new
1840         function debug_serveropts() to build that string on the fly
1841
1842         * include/ircd_features.h: define some features
1843
1844         * include/client.h: add privs member to struct Connection; define
1845         various priviledges
1846
1847         * include/channel.h: no longer using IsOperOnLocalChannel; remove
1848         conditional of MAGIC_OPER_OVERRIDE on OPER_WALK_THROUGH_LMODES
1849
1850         * doc/Configure.help: remove help information for deprecated
1851         options
1852
1853         * config/config-sh.in: remove certain deprecated options having to
1854         do with what opers can and cannot do--first stage in moving
1855         compile-time constants into the .conf
1856
1857 2000-12-16  Isomer <Isomer@coders.net>
1858         * ircd/parse.c: detect if the prefix is missing and try and recover
1859         instead of coring.
1860
1861 2000-12-15  Kevin L. Mitchell  <klmitch@mit.edu>
1862
1863         * ircd/ircd_log.c: found and fixed some bugs in the debug logging
1864         code that would sometimes result in the log file not being
1865         reopened--which meant that a user could connect and get the
1866         logging output--oops
1867
1868         * ircd/Makefile.in: run make depend...
1869
1870         * ircd/s_stats.c: get rid of report_feature_list()
1871
1872         * ircd/s_err.c: add the 'bad value' error message, shift error
1873         messages over somewhat
1874
1875         * ircd/s_debug.c (debug_init): call log_debug_init with the
1876         use_tty flag
1877
1878         * ircd/s_conf.c (read_configuration_file): unmark features before
1879         reading the config file, then reset unmarked features after
1880         reading the config file
1881
1882         * ircd/m_stats.c: use feature_report() instead of
1883         report_feature_list()
1884
1885         * ircd/ircd_log.c: fix log_debug_file (bogus assertion); add
1886         special 'mark' flags and use them; add the stuff needed by the
1887         features API
1888
1889         * ircd/ircd_features.c: rework the features API and add gobs of
1890         comments to try to explain what some of these complex functions
1891         are actually doing
1892
1893         * include/s_stats.h: get rid of report_feature_list(); use
1894         feature_report() instead
1895
1896         * include/numeric.h: added a new error message and shifted old
1897         values over some--this is, after all, an alpha
1898
1899         * include/ircd_log.h: log_debug_init now takes an integer to tell
1900         it if it should be using the tty; added a couple of functions
1901         required by the features API
1902
1903         * include/ircd_features.h: add an enum and some more functions to
1904         flesh out the feature API--it should now be possible to put all
1905         those compile-time constants in the config file!
1906
1907         * ircd/send.c: got the direction of the assert incorrect...
1908
1909         * ircd/send.c: implement the efficiency of flush_connections by
1910         creating a linked list of struct Connection's with queued data;
1911         also get rid of flush_sendq_except and make sure to yank
1912         connections out of the list when their sendQs become empty (notice
1913         the assertion in flush_connections!)
1914
1915         * ircd/s_bsd.c (close_connection): must yank the Connection out of
1916         the sendq list
1917
1918         * ircd/list.c (dealloc_connection): must yank the Connection out
1919         of the sendq list
1920
1921         * ircd/dbuf.c (dbuf_put): call flush_connections instead of the
1922         deprecated flush_sendq_except
1923
1924         * ircd/client.c: define a couple new helper functions for sendq
1925         threading--this will make the flush_connections function in send.c
1926         considerably more efficient by creating a linked list of
1927         Connections that have queued data to send
1928
1929         * include/send.h: remove flush_sendq_except, as it's not used
1930         anymore
1931
1932         * include/client.h: declare a couple new helper functions for the
1933         sendq threading system
1934
1935 2000-12-14  Kevin L. Mitchell  <klmitch@mit.edu>
1936
1937         * ircd/m_ison.c (m_ison): Apply Diane Bruce's patch to make ISON
1938         parse all arguments
1939
1940         * ircd/s_debug.c (count_memory): modify to report for clients and
1941         connections, not local clients and remote clients
1942
1943         * ircd/list.c: fiddle with the client-fiddling functions to take
1944         into account the divorce of struct Connection from struct Client
1945
1946         * ircd/ircd.c: define a struct Connection for me, initialize it,
1947         and link it into the right place (ewww, globals!)
1948
1949         * include/client.h: remove CLIENT_{LOCAL,REMOTE}_SIZE; split
1950         struct Client into struct Client and struct Connection; redefine
1951         local-portion accessor macros to go through struct Client to the
1952         struct Connection; define struct Connection accessor macros
1953
1954 2000-12-13  Kevin L. Mitchell  <klmitch@mit.edu>
1955
1956         * ircd/whowas.c: missed a couple of accesses to a struct Client
1957
1958         * ircd/uping.c: missed a couple of accesses to a struct Client
1959
1960         * ircd/send.c: missed a couple of accesses to a struct Client
1961
1962         * ircd/s_user.c: missed a couple of accesses to a struct Client
1963
1964         * ircd/s_misc.c: missed a couple of accesses to a struct Client
1965
1966         * ircd/s_conf.c: missed a couple of accesses to a struct Client
1967
1968         * ircd/s_bsd.c: missed a couple of accesses to a struct Client
1969
1970         * ircd/s_auth.c: missed a couple of accesses to a struct Client
1971
1972         * ircd/res.c: missed a couple of accesses to a struct Client
1973
1974         * ircd/parse.c: missed a couple of accesses to a struct Client
1975
1976         * ircd/m_whois.c: use new accessor macros for struct Client
1977
1978         * ircd/m_who.c: use new accessor macros for struct Client
1979
1980         * ircd/m_wallchops.c: use new accessor macros for struct Client
1981
1982         * ircd/m_version.c: use new accessor macros for struct Client
1983
1984         * ircd/m_userip.c: use new accessor macros for struct Client
1985
1986         * ircd/m_userhost.c: use new accessor macros for struct Client
1987
1988         * ircd/m_user.c: use new accessor macros for struct Client
1989
1990         * ircd/m_uping.c: use new accessor macros for struct Client
1991
1992         * ircd/m_trace.c: use new accessor macros for struct Client
1993
1994         * ircd/m_topic.c: use new accessor macros for struct Client
1995
1996         * ircd/m_time.c: use new accessor macros for struct Client
1997
1998         * ircd/m_stats.c: use new accessor macros for struct Client
1999
2000         * ircd/m_squit.c: use new accessor macros for struct Client
2001
2002         * ircd/m_silence.c: use new accessor macros for struct Client
2003
2004         * ircd/m_server.c: use new accessor macros for struct Client;
2005         remove dead code
2006
2007         * ircd/m_rpong.c: use new accessor macros for struct Client
2008
2009         * ircd/m_rping.c: use new accessor macros for struct Client
2010
2011         * ircd/m_quit.c: use new accessor macros for struct Client
2012
2013         * ircd/m_privmsg.c: use new accessor macros for struct Client
2014
2015         * ircd/m_pong.c: use new accessor macros for struct Client; remove
2016         dead code
2017
2018         * ircd/m_ping.c: use new accessor macros for struct Client
2019
2020         * ircd/m_pass.c: use new accessor macros for struct Client
2021
2022         * ircd/m_part.c: use new accessor macros for struct Client
2023
2024         * ircd/m_oper.c: use new accessor macros for struct Client
2025
2026         * ircd/m_notice.c: use new accessor macros for struct Client
2027
2028         * ircd/m_nick.c: use new accessor macros for struct Client
2029
2030         * ircd/m_names.c: use new accessor macros for struct Client
2031
2032         * ircd/m_mode.c: use new accessor macros for struct Client
2033
2034         * ircd/m_map.c: use new accessor macros for struct Client
2035
2036         * ircd/m_list.c: use new accessor macros for struct Client
2037
2038         * ircd/m_links.c: use new accessor macros for struct Client;
2039         remove some dead code
2040
2041         * ircd/m_kill.c: use new accessor macros for struct Client; remove
2042         some dead code
2043
2044         * ircd/m_kick.c: use new accessor macros for struct Client
2045
2046         * ircd/m_join.c: use new accessor macros for struct Client; remove
2047         some dead code
2048
2049         * ircd/m_ison.c: use new accessor macros for struct Client
2050
2051         * ircd/m_invite.c: use new accessor macros for struct Client
2052
2053         * ircd/m_info.c: use new accessor macros for struct Client
2054
2055         * ircd/m_gline.c: use new accessor macros for struct Client
2056
2057         * ircd/m_error.c: use new accessor macros for struct Client
2058
2059         * ircd/m_create.c: use new accessor macros for struct Client
2060
2061         * ircd/m_connect.c: use new accessor macros for struct Client;
2062         removed some dead code
2063
2064         * ircd/m_burst.c: use new accessor macros for struct Client
2065
2066         * ircd/m_away.c: use new accessor macros for struct Client
2067
2068         * ircd/m_admin.c: use new accessor macros for struct Client
2069
2070         * ircd/hash.c: missed a couple of accesses to a struct Client
2071
2072         * ircd/gline.c: missed a couple of accesses to a struct Client
2073
2074         * ircd/crule.c: missed a couple of accesses to a struct Client
2075
2076         * ircd/class.c: missed an access to a struct Client
2077
2078         * ircd/channel.c: missed a couple of accesses to a struct Client
2079
2080         * ircd/IPcheck.c: missed an access to a struct Client
2081
2082         * include/querycmds.h: fix a couple of stats macros to use
2083         structure accessor macros
2084
2085         * include/client.h: change structure member names to highlight any
2086         places in the code I've missed
2087
2088 2000-12-12  Kevin L. Mitchell  <klmitch@mit.edu>
2089
2090         * ircd/whowas.c: use new struct Client accessor macros
2091
2092         * ircd/whocmds.c: use new struct Client accessor macros
2093
2094         * ircd/send.c: use new struct Client accessor macros
2095
2096         * ircd/s_user.c: use new struct Client accessor macros; removed
2097         some dead code
2098
2099         * ircd/s_serv.c: use new struct Client accessor macros; removed
2100         some dead code
2101
2102         * ircd/s_numeric.c: use new struct Client accessor macros
2103
2104         * ircd/s_misc.c: use new struct Client accessor macros
2105
2106         * ircd/s_debug.c: use new struct Client accessor macros
2107
2108         * ircd/s_conf.c: use new struct Client accessor macros
2109
2110         * ircd/s_bsd.c: use new struct Client accessor macros
2111
2112         * ircd/s_auth.c: use new struct Client accessor macros
2113
2114         * ircd/parse.c: use new struct Client accessor macros
2115
2116         * ircd/packet.c: use new struct Client accessor macros
2117
2118         * ircd/numnicks.c: use new struct Client accessor macros
2119
2120         * ircd/motd.c: use new struct Client accessor macros
2121
2122         * ircd/listener.c: use new struct Client accessor macros
2123
2124         * ircd/list.c: use new struct Client accessor macros
2125
2126         * ircd/jupe.c: use new struct Client accessor macros
2127
2128         * ircd/ircd_snprintf.c: use new struct Client accessor macros
2129
2130         * ircd/ircd_reply.c: use new struct Client accessor macros
2131
2132         * ircd/ircd_relay.c: use new struct Client accessor macros
2133
2134         * ircd/ircd.c: use new struct Client accessor macros
2135
2136         * ircd/gline.c: catch some instances of me.<stuff> I missed
2137         previously
2138
2139         * ircd/client.c: use cli_ instead of con_
2140
2141         * ircd/class.c: use cli_ instead of con_
2142
2143         * ircd/channel.c: use cli_ instead of con_
2144
2145         * ircd/IPcheck.c: use cli_ instead of con_; catch some instances
2146         of me.<stuff> I missed previously
2147
2148         * include/client.h: use cli_ instead of con_...seemed like a good
2149         idea at the time *shrug*
2150
2151 2000-12-11  Kevin L. Mitchell  <klmitch@mit.edu>
2152
2153         * ircd/hash.c: use struct Client accessor macros
2154
2155         * ircd/gline.c: use struct Client accessor macros
2156
2157         * ircd/crule.c: use struct Client accessor macros
2158
2159         * ircd/client.c: use struct Client accessor macros; remove some
2160         dead code
2161
2162         * ircd/class.c: use struct Client accessor macros
2163
2164         * ircd/channel.c: use struct Client accessor macros; remove some
2165         dead code
2166
2167         * ircd/IPcheck.c: use struct Client accessor macros
2168
2169         * include/numnicks.h: use struct Client accessor macros
2170
2171         * include/client.h: first step to divorcing struct Client and
2172         struct Connection--define accessor macros and use them
2173
2174         * ircd/gline.c: When Uworld removed Uworld-set G-lines, only the
2175         uplink would remove them.  This is because the removal protocol
2176         message wasn't being sent to the uplinks.  This is fixed by fixing
2177         propagate_gline() to send the proper number of arguments depending
2178         on whether or not we're adding or deleting the Uworld gline, and
2179         by having gline_deactivate() make sure to turn off the active bit
2180         and call propagate_gline() if it's a Uworld gline
2181
2182 2000-12-10  Kevin L. Mitchell  <klmitch@mit.edu>
2183
2184         * ircd/os_generic.c: make sure IOV_MAX gets defined, just in case
2185
2186         * ircd/os_bsd.c: apparently BSD doesn't have IOV_MAX defined
2187         anywhere intelligent...
2188
2189 2000-12-09  Kevin L. Mitchell  <klmitch@mit.edu>
2190
2191         * ircd/send.c (send_queued): call deliver_it with appropriate
2192         arguments
2193
2194         * ircd/s_serv.c: reorder a couple of headers--cosmetic
2195
2196         * ircd/s_bsd.c (deliver_it): make deliver_it work with a struct
2197         MsgQ
2198
2199         * ircd/os_solaris.c (os_sendv_nonb): function for calling writev
2200         with appropriate iovec
2201
2202         * ircd/os_linux.c (os_sendv_nonb): function for calling writev
2203         with appropriate iovec
2204
2205         * ircd/os_generic.c (os_sendv_nonb): function for calling writev
2206         with appropriate iovec
2207
2208         * ircd/os_bsd.c (os_sendv_nonb): function for calling writev with
2209         appropriate iovec
2210
2211         * ircd/msgq.c (msgq_mapiov): add a len_p argument for totalling up
2212         exactly how much we're trying to write out to the fd
2213
2214         * include/s_bsd.h: make deliver_it take a struct MsgQ
2215
2216         * include/msgq.h: add a len_p argument to msgq_mapiov to help
2217         detect short writes that indicate possible socket blocking
2218
2219         * include/ircd_osdep.h: declare os_sendv_nonb()
2220
2221         * ircd/channel.c (modebuf_mode): don't add empty modes...
2222
2223 2000-12-08  Kevin L. Mitchell  <klmitch@mit.edu>
2224
2225         * include/send.h: add prio argument to send_buffer to select
2226         between normal and priority queues
2227
2228         * ircd/s_user.c (send_user_info): add prio argument to send_buffer
2229         call
2230
2231         * ircd/m_ison.c (m_ison): add prio argument to send_buffer call
2232
2233         * ircd/ircd_reply.c (send_reply): add prio argument to send_buffer
2234         call
2235
2236         * ircd/channel.c (send_channel_modes): add prio argument to
2237         send_buffer call
2238
2239         * ircd/send.c (send_buffer): add a prio argument to select the
2240         priority queue; update send.c functions to use it
2241
2242         * ircd/msgq.c (msgq_add): remove msgq_prio; fold msgq_link and
2243         msgq_add; add a prio argument to msgq_add to select the priority
2244         queue
2245
2246         * include/msgq.h: remove msgq_prio; add a prio argument to
2247         msgq_add
2248
2249         * ircd/send.c: remove sendbuf; remove GODMODE code; switch to
2250         using msgq functions instead of dbuf functions; remove old, dead
2251         sendto_* functions; redo send_buffer to take a struct MsgBuf;
2252         rework sendcmdto_* functions to make use of the new struct MsgBuf
2253
2254         * ircd/s_user.c: remove hunt_server; restructure send_user_info to
2255         make appropriate use of struct MsgBuf
2256
2257         * ircd/s_debug.c (count_memory): count memory used by the MsgQ
2258         system and report it
2259
2260         * ircd/s_conf.c (read_configuration_file): use
2261         sendto_opmask_butone instead of the now dead sendto_op_mask
2262
2263         * ircd/s_bsd.c: switch to using appropriate MsgQLength and other
2264         calls on sendQ
2265
2266         * ircd/parse.c (parse_server): get rid of a piece of GODMODE code
2267
2268         * ircd/msgq.c: add msgq_append and msgq_bufleft; fix a bug in
2269         msgq_clean
2270
2271         * ircd/m_version.c: fix spelling in comments marking dead code
2272
2273         * ircd/m_userip.c (userip_formatter): restructure to make use of
2274         struct MsgBuf
2275
2276         * ircd/m_userhost.c (userhost_formatter): restructure to make use
2277         of struct MsgBuf
2278
2279         * ircd/m_stats.c: use MsgQLength on a sendQ
2280
2281         * ircd/m_settime.c: use MsgQLength instead of DBufLength on a
2282         sendQ; mark a piece of dead code
2283
2284         * ircd/m_names.c: use send_reply instead of sendto_one
2285
2286         * ircd/m_mode.c: use new mode; remove old dead code
2287
2288         * ircd/m_ison.c (m_ison): restructure to make use of struct MsgBuf
2289
2290         * ircd/m_burst.c: use BUFSIZE instead of IRC_BUFSIZE; remove old
2291         dead code
2292
2293         * ircd/listener.c (accept_connection): use sendto_opmask_butone
2294         instead of sendto_op_mask
2295
2296         * ircd/list.c (free_client): use MsgQClear to clear sendQ
2297
2298         * ircd/ircd_reply.c: remove send_error_to_client; restructure
2299         send_reply to make use of struct MsgBuf
2300
2301         * ircd/dbuf.c (dbuf_put): remove argument to flush_sendq_except,
2302         since its no longer used (at least currently)
2303
2304         * ircd/channel.c: restructure send_channel_modes to make use of
2305         struct MsgBuf; remove set_mode, add_token_to_sendbuf, cancel_mode,
2306         and send_hack_notice; use BUFSIZE instead of IRC_BUFSIZE
2307
2308         * ircd/Makefile.in: add msgq.c to list of sources; run make depend
2309
2310         * ircd/IPcheck.c: use sendcmdto_one instead of sendto_one
2311
2312         * include/send.h: send_buffer now takes a struct MsgBuf * instead
2313         of a char *; flush_sendq_except now takes no arguments, as sendq
2314         flushing currently only happens in dbuf.h and sendQ is a struct
2315         MsgQ; remove prototypes for a lot of old sendto_* functions that
2316         aren't used anymore; remove sendbuf and IRC_BUFSIZE--the former is
2317         no longer needed, and the latter is identical to BUFSIZE in
2318         ircd_defs.h
2319
2320         * include/s_user.h: make InfoFormatter take a struct MsgBuf*
2321         instead of a char *; also make it return void, instead of char *
2322
2323         * include/msgq.h: add msgq_append and msgq_bufleft functions
2324
2325         * include/client.h: use a struct MsgQ instead of a struct DBuf for
2326         sendq
2327
2328         * doc/Configure.help: Remove help for compile-time options that
2329         have gone away
2330
2331         * config/config-sh.in: remove CONFIG_NEWMODE
2332
2333         * ircd/m_server.c (mr_server): don't send server IPs in any server
2334         notices
2335
2336         * ircd/msgq.c (msgq_vmake): add \r\n to messages
2337
2338 2000-12-07  Kevin L. Mitchell  <klmitch@mit.edu>
2339
2340         * include/msgq.h: declare the MsgQ API
2341
2342         * ircd/msgq.c: implementation of new MsgQ system
2343
2344 2000-12-06  Kevin L. Mitchell  <klmitch@mit.edu>
2345
2346         * ircd/ircd_features.c: #include was supposed to be for
2347           ircd_features.h, not features.h--missed when I had to do a
2348           rename because of namespace collision
2349
2350 2000-12-05  Greg Sikorski <gte@atomicrevs.demon.co.uk>
2351         * ircd/m_topic.c: Added missing braces that caused all remote
2352           topics to be ignored.
2353
2354 2000-12-04  Kevin L. Mitchell  <klmitch@mit.edu>
2355
2356         * ircd/m_create.c: I'm tired of the exit_client warning :)
2357         (ms_create): discovered that exit_client() was being called with
2358         too few arguments
2359
2360         * ircd/s_misc.c (exit_client): remove all dependance on
2361         FNAME_USERLOG, since that's now gone; log only to LS_USER
2362
2363         * ircd/s_debug.c: USE_SYSLOG no longer means anything
2364
2365         * ircd/m_oper.c (m_oper): no longer log to LS_OPERLOG--we already
2366         log to LS_OPER
2367
2368         * ircd/m_kill.c: no longer conditionalize on SYSLOG_KILL
2369
2370         * ircd/ircd_log.c: remove LS_OPERLOG, LS_USERLOG
2371
2372         * include/ircd_log.h: remove LS_OPERLOG, LS_USERLOG--they serve
2373         the same purpose as LS_USER and LS_OPER
2374
2375         * config/config-sh.in: remove no longer relevant log config
2376         variables
2377
2378         * ircd/uping.c (uping_init): use log_write instead of ircd_log
2379
2380         * ircd/s_misc.c (exit_client): use log_write instead of ircd_log
2381
2382         * ircd/s_conf.c: use log_write instead of ircd_log
2383
2384         * ircd/s_bsd.c (report_error): use log_write instead of ircd_log
2385
2386         * ircd/s_auth.c (timeout_auth_queries): use log_write instead of
2387         ircd_log
2388
2389         * ircd/res.c (send_res_msg): use log_write instead of ircd_log
2390
2391         * ircd/m_who.c: use log_write instead of write_log; no longer
2392         conditionalize on WPATH; mark dead ircd_log calls
2393
2394         * ircd/m_uping.c: mark dead ircd_log call
2395
2396         * ircd/m_server.c (mr_server): use log_write instead of ircd_log
2397
2398         * ircd/m_restart.c: use log_write instead of ircd_log; mark dead
2399         ircd_log calls
2400
2401         * ircd/m_rehash.c (mo_rehash): use log_write instead of ircd_log
2402
2403         * ircd/m_oper.c: use log_write instead of ircd_log; no longer
2404         conditionalize on FNAME_OPERLOG; mark dead ircd_log calls
2405
2406         * ircd/m_kill.c: mark dead ircd_log calls
2407
2408         * ircd/m_connect.c: use log_write instead of ircd_log; mark dead
2409         ircd_log
2410
2411         * ircd/m_clearmode.c: use log_write instead of write_log; no
2412         longer conditionalize on OPATH
2413
2414         * ircd/jupe.c: use log_write instead of write_log; no longer
2415         conditionalize on JPATH
2416
2417         * ircd/ircd_log.c: add USER subsystem; remove ircd_log() compat
2418         function; fix a couple of bugs
2419
2420         * ircd/ircd_alloc.c: fixed a comment
2421
2422         * ircd/ircd.c: use log_write instead of ircd_log; fold server
2423         notice generation in a couple of cases
2424
2425         * ircd/gline.c: use log_write instead of write_log; no longer
2426         conditionalize on GPATH
2427
2428         * ircd/channel.c (modebuf_flush_int): use log_write instead of
2429         write_log; no longer conditionalize on OPATH
2430
2431         * ircd/Makefile.in: run make depend, since dependencies have
2432         changed
2433
2434         * doc/example.conf: add system USER to documentation
2435
2436         * include/ircd_log.h: add system USER; remove old ircd_log()
2437         declarations
2438
2439 2000-12-04  Isomer <isomer@coders.net>
2440         * ircd/m_names.c: Add NAMES_EON to do_names to say add a
2441         'end_of_names' reply when done.
2442         * ircd/m_join.c: use NAMES_EON as mentioned above
2443
2444 2000-12-01  net  <simms@LUCIDA.QC.CA>
2445
2446         * ircd/motd.c: add a freelist for struct Motds
2447
2448 2000-11-30  Kevin L. Mitchell  <klmitch@mit.edu>
2449
2450         * ircd/s_stats.c (report_feature_list): report features--only
2451         local opers can see logging configuration, since it doesn't really
2452         mean anything to users
2453
2454         * ircd/s_err.c: add reply messages for new feature subsystem
2455
2456         * ircd/s_conf.c: add F lines to .conf
2457
2458         * ircd/parse.c: add the message descriptions for /set, /reset, and
2459         /get
2460
2461         * ircd/m_stats.c: add /stats f
2462
2463         * ircd/m_set.c (mo_set): implement /set
2464
2465         * ircd/m_reset.c (mo_reset): implement /reset
2466
2467         * ircd/m_rehash.c: /rehash m now flushes MOTD cache, and /rehash l
2468         reopens log files (for log file rotation)
2469
2470         * ircd/m_get.c (mo_get): implement /get
2471
2472         * ircd/ircd_log.c: use int instead of void return value; add
2473         log_report_features() and log_canon(); fix a function that
2474         disappears if DEBUGMODE not #define'd
2475
2476         * ircd/ircd_features.c: functions to manipulate feature settings
2477         either from the config file or with the new /set, /reset, and /get
2478         commands
2479
2480         * ircd/Makefile.in: add new .c files, run make depend
2481
2482         * include/s_stats.h: declare report_feature_list() (/stats f
2483         handler)
2484
2485         * include/numeric.h: add RPL_STATSFLINE, RPL_FEATURE,
2486         ERR_NOFEATURE, ERR_BADLOGTYPE, ERR_BADLOGSYS, and ERR_BADLOGVALUE
2487         reply numerics
2488
2489         * include/msg.h: add defines for SET, RESET, and GET
2490
2491         * include/ircd_log.h: add a function to canonicalize subsystem
2492         names; change some void return values to int
2493
2494         * include/ircd_features.h: new features subsystem handles all the
2495         manipulation of special features, like log files
2496
2497         * include/handlers.h: declare new mo_{s,res,g}et message handlers
2498         for fiddling with features run-time
2499
2500         * include/client.h (SNO_DEFAULT): don't set SNO_DEBUG by default;
2501         seemed like a good idea at the time...
2502
2503         * doc/example.conf: document new F lines
2504
2505 2000-11-29  Kevin L. Mitchell  <klmitch@mit.edu>
2506
2507         * ircd/s_debug.c: rewrite debug_init() and vdebug() in terms of
2508         new logging functions, which have special support for the debug
2509         log; added loop detection to vdebug(), so that I can
2510         sendto_opmask_butone() from log_vwrite() without incurring another
2511         call to vdebug()
2512
2513         * ircd/s_conf.c (rehash): call log_reopen() from rehash routine;
2514         this allows log file rotations
2515
2516         * ircd/m_kill.c: call log_write_kill() instead of ircd_log_kill()
2517
2518         * ircd/ircd_log.c: much more work fleshing out the interface;
2519         removed old interface; included backwards-compat ircd_log()
2520         function that logs to subsystem LS_OLDLOG
2521
2522         * ircd/ircd.c: switch to new log_init()/log_close()/log_reopen()
2523         functions
2524
2525         * include/ircd_log.h: include stdarg.h for va_list; move ordering
2526         warning to top of file; fill out LogSys enum; declare new
2527         log_debug_init(), log_vwrite(), log_write_kill(), and
2528         log_[sg]et_*() functions; add flags argument to log_write();
2529         defined flags to inhibit various logging actions
2530
2531         * include/client.h: added support for new SNO_DEBUG, enabled only
2532         if DEBUGMODE is defined
2533
2534 2000-11-28  Kevin L. Mitchell  <klmitch@mit.edu>
2535
2536         * ircd/ircd_log.c: make sure the various LOG_* constants are
2537         defined (probably not needed, since #include <syslog.h> isn't
2538         conditional); various static data needed for the new logging
2539         functions; definitions of new logging functions
2540
2541         * include/ircd_log.h: new LogSys enum, declarations for part of
2542         new logging API
2543
2544         * ircd/motd.c: we were setting type to MOTD_CLASS unconditionally,
2545         which was of course stupid; switched to using switch/case in
2546         initialization in motd_create(); zero the MotdList.other pointer
2547         from motd_clear()
2548
2549         * ircd/ircd.c (main): motd_init() has to come before init_conf(),
2550         or we overwrite init_conf()'s hard work with respect to T-lines
2551
2552 2000-11-27  Kevin L. Mitchell  <klmitch@mit.edu>
2553
2554         * ircd/s_stats.c: comment out report_motd_list and include a
2555         reference to motd_report()
2556
2557         * ircd/s_conf.c: rip out the old MOTD manipulation functions; call
2558         motd_add() from the conf parser; call motd_clear() from the rehash
2559         routine; remove the no longer needed memory clearing and reloading
2560         stuff from the rehash service routine
2561
2562         * ircd/motd.c: loads new API, including static internal functions
2563         to do allocation/deallocation, etc.
2564
2565         * ircd/m_stats.c: use new motd_report() instead of
2566         report_motd_list()
2567
2568         * ircd/m_motd.c: use new syntax for motd_send()
2569
2570         * ircd/ircd.c: use new motd_init() function
2571
2572         * ircd/Makefile.in (SRC): forgot to add motd.c to SRC in
2573         Makefile.(in); also ran make depend
2574
2575         * include/motd.h: don't need config.h, but now do need time.h;
2576         define new structures and constants; redefine old API and define
2577         new functions
2578
2579 2000-11-22  Kevin L. Mitchell  <klmitch@mit.edu>
2580
2581         * ircd/s_user.c (register_user): use motd_signon() instead of
2582         calling m_motd; much cleaner this way
2583
2584         * ircd/motd.c: write the new motd_* stuff to make MOTD handling
2585         less of a crock
2586
2587         * ircd/m_motd.c: rewrite m{,s}_motd to call out to new motd_*
2588         functions
2589
2590         * include/motd.h: define new MOTD API stuff
2591
2592 2000-11-20  Kevin L. Mitchell  <klmitch@mit.edu>
2593
2594         * ircd/ircd_reply.c (protocol_violation): rewrite
2595         protocol_violation so it'll actually work
2596
2597         oh, yeah, use %s -> cptr->name, instead of %c -> cptr, so we get
2598         the client's real name in there.
2599
2600         * ircd/m_motd.c (m_motd): Iso's addition of get_client_class(sptr)
2601         resulted in core dumps if NODEFAULTMOTD is defined, because m_motd
2602         gets called from register_user with a NULL sptr.  This is probably
2603         a design problem, but this bandaid will do for now...
2604
2605 2000-11-19  Isomer <isomer@coders.net>
2606         * ircd/ircd_reply.c: added 'protocol_violation', thus alerting us
2607         to problems in the server<->server protocol.
2608
2609         * ircd/m_connect.c: allow remote connects with a port of '0'
2610         meaning to use the port in the config file.
2611
2612         * ircd/m_create.c: Enable hacking protection, lets see how far we
2613         get.
2614
2615         * ircd/m_error.c: The RFC says never accept ERROR from unreg'd
2616         clients, so we don't any more.
2617
2618         * ircd/m_kill.c: The kill path is now made up of numnicks of servers,
2619         and the user@host is displayed of the victim.
2620
2621         * ircd/m_map.c: reloaded 'dump_map'.
2622
2623         * ircd/m_trace.c: allow per class T:
2624
2625         * ircd/m_stats.c: allow local opers /remote stats anywhere on the 'net.
2626
2627 2000-11-17  Isomer <isomer@coders.net>
2628
2629         * ircd/m_topic.c: Fixed bug where we'd only send to clients topics
2630         that were the *same* instead of different.  Oh the embarrasment!
2631
2632         * ircd/IPcheck.c: Merged net's fix.
2633
2634 2000-11-02  Kevin L. Mitchell  <klmitch@mit.edu>
2635
2636         * ircd/m_whois.c: remove compiler warning by adding a newline to
2637         end of file
2638
2639         * ircd/m_names.c: moved the flags up to s_user.h
2640
2641         * ircd/m_join.c: call do_names instead of m_names; restructure
2642         ms_join to never transmute a JOIN into a CREATE, but use the TS in
2643         the JOIN (if present) to timestamp the channel
2644
2645         * ircd/channel.c: send JOINs individually, instead of grouping
2646         them, so that we can send the channel's creation time
2647
2648         * include/s_user.h: declare do_names()
2649
2650 2000-10-30  Isomer <isomer@coders.net>
2651         * ircd/m_oper.c: Fixed warning
2652
2653 2000-10-30  Isomer <isomer@coders.net>
2654         * ircd/m_oper.c: Fixed over agressive cut and no paste
2655
2656 2000-10-30  Isomer <isomer@coders.net>
2657
2658         * ircd/m_topic.c: Restructured, fixed bug where topics on local
2659         channels are propergated (I forget who pointed this out to me, but
2660         thanks anyway).  Also to save bandwidth don't send the topic to
2661         users if the topic is already the same on the server (but still
2662         propergate to other servers).  X/W's "autotopic" feature must
2663         chew a lot of bandwidth, hopefully this will help reduce this.
2664
2665         * doc/rfc1459.rfc: Updated documentation on /topic.
2666
2667         * ircd/listener.c: snotice warnings about failed accept()'s
2668         potentially warning admins that they're running out of fd's.
2669
2670         * ircd/stats.c, ircd/class.c: Removed /stats v, added number of
2671         people in a class in /stats y
2672
2673         * ircd/m_create.c: Checks for timewarp hacking and squit's
2674         evil servers. (currently disabled)
2675         
2676
2677 2000-10-30  net <simms@lucida.qc.ca>
2678         
2679         * ircd/gline.c: Fixed various bugs Isomer left behind.
2680
2681 2000-10-26  Kevin L. Mitchell  <klmitch@mit.edu>
2682
2683         * ircd/m_join.c (m_join): reply on attempt to join a BADCHANed
2684         channel is now ERR_BANNEDFROMCHAN instead of ERR_BADCHANNAME
2685
2686 2000-10-24  Kevin L. Mitchell  <klmitch@mit.edu>
2687
2688         * ircd/channel.c: ok, now last mode rules; mode +ps will always
2689         result in +s (and won't send a mode if the channel is already +s);
2690         mode +sp will always result in +p; -n+n on a +n channel results in
2691         no mode change; -n+n on a -n channel results in a +n mode change;
2692         etc.
2693
2694 2000-10-23  Kevin L. Mitchell  <klmitch@mit.edu>
2695
2696         * ircd/channel.c: add "add" and "del" elements to ParseState to
2697         avoid not-too-pretty -p+s when +s is sufficient; fix a bug in
2698         mode_parse_limit that caused it to clear all channel modes
2699         prematurely; restructure mode_parse_mode to avoid calling
2700         modebuf_mode too early (ties in with first mentioned change);
2701         better logic for +p/+s mutual exclusivity; initialize "add" and
2702         "del" elements in mode_parse; send simple modes down to
2703         modebuf_mode after the loop in mode_parse
2704
2705 2000-09-28  Greg Sikorski <gte@atomicrevs.demon.co.uk>
2706         * ircd/m_names.c: Fixed a non-lethal logic error that 
2707         triggers an assert() in find_member_link while debugging.
2708         (Spotted by Maniac-).
2709 2000-09-19  Thomas Helvey <helveytw@home.com>
2710         * ircd/s_conf.c: move K:lines to their own list and data
2711         structures, add supporting code.
2712         * ircd/m_stats.c: cleanup stats processing a bit move
2713         kline listing code to a new function, haven't figured
2714         out where it goes yet tho'
2715         * ircd/s_stats.c: added K:line bulk lister
2716         * include/s_conf.h: added new DenyConf struct
2717         * *[ch]: fixeup code that depended on changes
2718
2719 2000-09-17  Thomas Helvey <helveytw@home.com>
2720         * ircd/class.c: encapsulate class list
2721         * include/class.h: clean up classes
2722         * * fixup code that depended on changes
2723
2724 2000-09-17  Thomas Helvey <helveytw@home.com>
2725         * ircd/s_conf.c: add me to local conf
2726         * include/s_conf.h: move CONF_ME macro to chkconf.c
2727         * ircd/s_bsd.c: cleanup initialization, allow virtual host
2728         to be changed by rehash
2729
2730 2000-09-17  Thomas Helvey <helveytw@home.com>
2731         * include/class.h: add missing prototype
2732         * ircd/class.c: make argument to get_conf_class const
2733
2734 2000-09-17  Thomas Helvey <helveytw@home.com>
2735         * ircd/*.c: merged in changes from 2.10.10.pl12, cleanup
2736         merge conflicts.
2737         * ircd/*.h: merged in changes from 2.10.10.pl12, cleanup
2738         merge conflicts
2739
2740 2000-09-16  Thomas Helvey <helveytw@home.com>
2741         * ircd/s_conf.c: add code for server struct
2742         * ircd/client.c: copy of class.c sort of, new file for client
2743         specific operations, will move things here as appropriate,
2744         currently only one function is exported from here.
2745         * ircd/*.c: general logic cleanups, convert negatives to
2746         positives in places.
2747
2748 2000-09-16  Thomas Helvey <helveytw@home.com>
2749         * ircd/s_conf.c: add code for new crule data structs, strip quotes
2750         * ircd/crule.c: clean up scary casting a bit, type safety stuff
2751         * include/s_conf.h: add CRuleConf struct and support, remove
2752         unused constants
2753         * include/crule.h: type safety cleanups
2754         * ircd/*.c: fixup code that depended on stuff I changed
2755
2756 2000-09-15  Thomas Helvey <helveytw@home.com>
2757         * ircd/s_conf.c: start adding code for new conf data structs, changed
2758         listeners, admin line, motd lines, class lines. Move validate_hostent
2759         to resolver. General mayhem.
2760         * include/s_conf.h: new data structs and accessors
2761         * ircd/res.c: move validate_hostent here, rewrite, use regular
2762         expression for validation.
2763         * doc/example.conf: update docs for port
2764
2765 2000-09-14  Thomas Helvey <helveytw@home.com>
2766         * ircd/s_conf.c (conf_init): rewrite conf file parser, start to break
2767         up conf_init into managable chunks.
2768         * ircd/listener.c (set_listener_mask): fix logic bug core dump.
2769         * include/s_conf.h: add new data struct for local info (unwinding the mess).
2770
2771 2000-09-13  Thomas Helvey <helveytw@home.com>
2772         * ircd/list.c: put Clients in free lists, pre-allocate MAXCONNECTIONS
2773         local clients.
2774         * ircd/list.c: put SLinks in free lists
2775         * ircd/channel.c: put Memberships in free lists
2776         * ircd/ircd.c: rearrange initializations a bit in main
2777         Note: With these changes, ircd NEVER frees Clients, SLinks or
2778         Memberships. It will also rarely need to allocate new
2779         ones during net bursts and other disruptions. This should
2780         cut down on memory fragmentation a bit as well.
2781
2782 2000-08-30  Kevin L. Mitchell  <klmitch@mit.edu>
2783
2784         * ircd/m_names.c (do_names): pull-up from do_names fix in
2785         u2.10.10.pl11
2786
2787 2000-07-15  Perry Lorier       <Isomer@coders.net>
2788         * various: IP only k:'s and G:'s now do bit tests instead of two(!) 
2789                  match()'s.  Major Major cpu savings.  Also speed up the
2790                  other case slightly.  As a side effect you can now
2791                  k/Gline *@10.0.0.0/8.  I'll do bans tomorrow, it's nearing
2792                  3am.
2793
2794 2000-07-15  Perry Lorier       <Isomer@coders.net>
2795         * various: Fixed warnings after compiling on an alpha.
2796 2000-07-09  Perry Lorier       <Isomer@coders.net>
2797         * doc/ircd.8: Applied grammitical changes by Liandrin, applied
2798                       changes suggested by various other people.
2799         * ircd/IPcheck.c: More bug fixes.  Current problem appears to be
2800                         that it gets a corrupt entry somehow.
2801 2000-07-09  Greg Sikorski <gte@atomicrevs.demon.co.uk>
2802         * ircd/m_oper.c: Clean up compiler warning.
2803
2804 2000-07-08  Perry Lorier       <Isomer@coders.net>
2805         * doc/ircd.8: Updated the documentation, it was slightly out of date
2806                       being updated around 1989.
2807         * ircd/m_whois.c: Rewrote for clarity, and probably a bit more speed.
2808                           fixed a few minor glitches.
2809         * doc/rfc1459.unet: Updated.
2810         * ircd/IPcheck.c: Fixed more bugs.
2811         * ircd/s_bsd.c: We now keep track of servers we've conected.
2812
2813 2000-07-02  Perry Lorier       <Isomer@coders.net>
2814         * ircd/s_misc.c: Fixed remote IPcheck bug.  Ok, I'm a moron, so sue
2815                         me.  Thanks to Hektik, thanks thanks thanks thanks
2816                         thanks thanks thanks thanks thank thanks thank thanks
2817
2818 2000-07-01  Perry Lorier       <Isomer@coders.net>
2819         * ircd/s_conf.c: "Fixed" the "bug" where people would "evade" K:'s.
2820         * ircd/s_conf.c, include/IPcheck.h: Fixed compile warnings.
2821
2822 2000-06-22  Perry Lorier       <Isomer@coders.net>
2823         * ircd/IPcheck.c: Large chunks redone.
2824         * ircd/s_conf.c: Changes due to IPcheck - ONE nolonger supported,
2825                         single AND double digit limits are allowed now.
2826         * misc other: Changes to IPcheck.
2827
2828 2000-06-30  Perry Lorier       <Isomer@coders.net>
2829         * ircd/ircd.c: Fix command line parameter bugs.
2830
2831 2000-06-30  Perry Lorier       <Isomer@coders.net>
2832         * ircd/m_kill.c: Fixed bug with LOCAL_KILL_ONLY
2833         * ircd/m_nick.c: Tidied things up.
2834
2835 2000-06-12 Joseph Bongaarts <foxxe@trms.com>
2836         * ircd/m_stats.c: Iso forgot mo_stats when he added /stats v
2837         
2838 2000-05-29  Perry Lorier       <Isomer@coders.net>
2839         * ircd/m_stats.c: add /stats v to do only the last part of the /trace
2840         * ircd/IPcheck.c: Cosmetic change, if we meddle with it enough do
2841                         you think it'll get bored and fix itself?
2842
2843 2000-06-09  Greg Sikorski <gte@atomicrevs.demon.co.uk>
2844
2845         * ircd/m_names.c: Clean up compiler warnings.
2846
2847 2000-06-09  Kevin L. Mitchell  <klmitch@mit.edu>
2848
2849         * ircd/channel.c (mode_parse_client): don't send warning if
2850         there's not enough arguments for a +/-o/v; means the habit of
2851         doing "/mode #channel +oooooo bob" doesn't result in a bunch of
2852         error messages
2853
2854 2000-06-04  Greg Sikorski <gte@atomicrevs.demon.co.uk>
2855
2856         * ircd/m_names.c: Re-factor code to remove unneccessary
2857         GlobalChannelList iteration every time someone joins a channel.
2858
2859 2000-06-02  Kevin L. Mitchell  <klmitch@mit.edu>
2860
2861         * ircd/s_user.c: add struct Gline * argument to register_user;
2862         look up global glines and repropagate them if necessary; send
2863         acknowledgement of gline to remote servers when registering users
2864
2865         * ircd/s_serv.c (server_estab): don't send acknowledgement of
2866         local glines to remote servers; do send gline acknowledgement of
2867         bursted users
2868
2869         * ircd/m_user.c (m_user): pass new struct Gline * argument to
2870         register_user
2871
2872         * ircd/m_pong.c: pass new struct Gline * argument to register_user
2873
2874         * ircd/m_nick.c (ms_nick): document protocol change
2875
2876         * ircd/gline.c: support GLINE_LASTMOD
2877
2878         * include/s_user.h: add struct Gline * argument to register_user
2879
2880         * include/gline.h: add GLINE_LASTMOD to look up non-zero lastmods
2881
2882         * ircd/s_conf.c (find_kill): add unsigned int argument to
2883         gline_lookup()
2884
2885         * ircd/gline.c: add GLINE_GLOBAL to lookup or find only global
2886         glines; add unsigned int argument to gline_lookup()
2887
2888         * include/gline.h: add GLINE_GLOBAL flag; add unsigned int
2889         argument to gline_lookup()
2890
2891         * ircd/m_server.c: Resend jupe only when there is no %<lastmod>
2892         parameter, or when it falls out of bounds: see comments prior to
2893         call to jupe_resend(); call server_estab with struct Jupe
2894         parameter, so that we place the appropriate %<lastmod> in the
2895         appropriate place.
2896
2897         * ircd/s_serv.c (server_estab): send %<lastmod> for introduced
2898         server, as well as for servers when we're sending the BURST
2899
2900         * include/s_serv.h: add a struct Jupe * to the arguments for
2901         server_estab() so that we can send the appropriate lastmod
2902         parameter
2903
2904         * ircd/m_gline.c (ms_gline): actually, this should be the
2905         slightest bit more efficient...
2906
2907         * ircd/m_jupe.c (ms_jupe): actually, this should be the slightest
2908         bit more efficient...
2909
2910         * ircd/m_gline.c (ms_gline): inhibit GLINE processing resends
2911         during netburst
2912
2913         * ircd/m_jupe.c (ms_jupe): inhibit JUPE processing resends during
2914         netburst
2915
2916         * ircd/channel.c (joinbuf_join): really remove user from local
2917         channels
2918
2919 2000-05-29  Perry Lorier       <Isomer@coders.net>
2920         * ircd/m_names.c: Removed redundant space. 
2921         * ircd/s_bsd.c: Fixed incorrect syntax on ERROR line.
2922
2923 2000-05-18  Kevin L. Mitchell  <klmitch@mit.edu>
2924
2925         * ircd/m_burst.c (ms_burst): er...that should have been a ",", not
2926         a " "
2927
2928 2000-05-04  Kevin L. Mitchell  <klmitch@mit.edu>
2929
2930         * ircd/channel.c: replace bogus assertions with returns, which is
2931         logically correct; only wipe out limit/key if they were originally
2932         set in the first place; remove user from channel when doing a
2933         PARTALL; only send MODE +o for user CREATEing channel if user is
2934         not MyUser--CREATE will only be used if the channel did not
2935         originally exist, therefore we can assume no one local is on the
2936         channel anyway, and we don't exactly need for the user to see an
2937         explicit +o for themselves
2938
2939         * doc/readme.gline: describe the syntax of the GLINE command
2940
2941         * doc/readme.jupe: update to reflect a couple of changes to JUPE
2942
2943         * ircd/gline.c: don't propagate local changes
2944
2945         * ircd/jupe.c: don't propagate local changes
2946
2947         * ircd/m_gline.c (mo_gline): force local flag when deactivating
2948         glines with 0 lastmod
2949
2950         * ircd/gline.c (gline_deactivate): G-lines with zero lastmod time
2951         are now removed instead of being deactivated
2952
2953         * ircd/m_gline.c (ms_gline): make G-lines of the form "GLINE *
2954         -<mask>" be accepted
2955
2956         * ircd/channel.c (send_channel_modes): deal with one of the last
2957         vestiges of sendbuf
2958
2959         * ircd/m_burst.c (ms_burst): debugged ban processing; removed
2960         debugging hooks
2961
2962         * ircd/channel.c (modebuf_extract): remove debugging
2963         sendto_opmask_butone calls
2964
2965 2000-05-03  Kevin L. Mitchell  <klmitch@mit.edu>
2966
2967         * ircd/channel.c: support a couple of new flags to support using
2968         mode_parse; fix some bugs with 0 struct ModeBuf *; implementation
2969         of modebuf_extract to extract added flags for use by ms_burst
2970
2971         * include/channel.h: a couple of new flags to support using
2972         mode_parse inside ms_burst
2973
2974         * ircd/m_burst.c (ms_burst): brand new implementation of BURST
2975
2976         * ircd/m_endburst.c: add loop to processing of end_of_burst to
2977         free empty channels after the BURST is over.
2978
2979         * ircd/m_server.c: convert to use new send.c functions--I wanted
2980         to rewrite it from scratch, but the logic's pretty complex; I may
2981         still rewrite it, though...
2982
2983 2000-05-02  Thomas Helvey <tomh@inxpress.net>
2984
2985         * ircd/ircd.c: fix broken header include ordering
2986
2987 2000-05-02  Thomas Helvey <tomh@inxpress.net>
2988         
2989         * ircd/IPcheck.c: cleanups for ZenShadow's cleanups
2990         review emailed privately
2991
2992         * include/IPcheck.h: removed unneeded include
2993
2994 2000-05-02  Kevin L. Mitchell  <klmitch@mit.edu>
2995
2996         * ircd/s_user.c (hunt_server): throw in a comment so I know what
2997         the sendto_one is for
2998
2999         * include/querycmds.h (Count_unknownbecomesclient): convert to
3000         sendto_opmask_butone
3001
3002         * ircd/send.c: start removing dead code
3003
3004         * include/send.h: start removing dead code
3005
3006         * ircd/m_rping.c: convert to sendcmdto_one / send_reply /
3007         hunt_server_cmd
3008
3009         * ircd/m_rpong.c: convert to sendcmdto_one / send_reply
3010
3011 2000-05-01  Kevin L. Mitchell  <klmitch@mit.edu>
3012
3013         * ircd/m_stats.c: convert to sendcmdto_one / send_reply
3014
3015         * ircd/m_kick.c: Completely reimplement m_kick
3016
3017         * ircd/channel.c: send_user_joins removed; it was dead code,
3018         anyway...
3019
3020 2000-05-01  Perry Lorier <isomer@coders.net>
3021         * ircd/m_invite.c: Fix for the rest of m_invite.c, and again.
3022         * ircd/channels.c: My fix for the part problem.  Untested, probably
3023                 won't work.  Can't be much worse than the current problem.
3024                 it'll either work or core, take your pick.
3025
3026
3027 2000-04-30  Perry Lorier <isomer@coders.net>
3028         * config/config-sh.in: Fix for CONNEXIT
3029         * ircd/s_{user,misc}.c: Fix for CONNEXIT
3030         * ircd/m_invite.c: Fix for incorrectly numnickified invite.
3031                         (Kev: Want to come talk to me about this?)
3032
3033 2000-04-30  Steven M. Doyle <steven@doyle.net>
3034         * ircd/ircd.c
3035           - general cleanups and readability enhancements
3036           - rewrite of setuid/chroot code.
3037           - server will no longer run as root
3038           - -DPROFIL compile option removed
3039           - Fixed IPcheck API calls
3040  
3041         * config/config-sh.in
3042           - Fixed up chroot compile options
3043           - Added options for debug and profile compiles
3044  
3045         * config/gen.ircd.Makefile
3046           - Support for new debug/profile options
3047  
3048         * ircd/Makefile.in
3049           - Support for new debug/profile options
3050  
3051         * ircd/ircd_signal.c
3052           - Removed -DPROFIL
3053
3054         * include/IPcheck.h
3055           - Removed old API prototypes, added new ones
3056         
3057         * ircd/IPcheck.c
3058           - Readability cleanups (well, I -think-...)
3059           - Changed IPRegistryEntry.last_connect to a time_t.  The previously
3060             used unsigned short was probably causing interesting things after
3061             a client had been connected longer than about 65,535 seconds...
3062           - Removed old API functions.
3063
3064         * ircd/whocmds.c
3065           - Removed IPcheck.h include
3066         
3067         * Additionally modified IPcheck API calls in:
3068           - ircd/m_nick.c
3069           - ircd/m_auth.c
3070           - ircd/s_bsd.c
3071           - ircd/s_conf.c
3072           - ircd/s_misc.c
3073           - ircd/s_serv.c
3074           - ircd/s_user.c
3075         
3076         
3077 2000-04-30  Perry Lorier <isomer@coders.net>
3078         * ircd/s_bsd.c: Sigh. :)
3079         * ircd/m_mode.c: fix for modeless channels by poptix.
3080
3081 2000-04-29  Kevin L. Mitchell  <klmitch@mit.edu>
3082
3083         * ircd/m_join.c: reimplement JOIN in terms of struct JoinBuf
3084
3085         * ircd/channel.c (clean_channelname): make clean_channelname also
3086         truncate long channel names
3087
3088 2000-04-28  Kevin L. Mitchell  <klmitch@mit.edu>
3089
3090         * ircd/m_create.c: reimplement CREATE in terms of struct JoinBuf
3091
3092         * ircd/channel.c: implemented joinbuf_init, joinbuf_join,
3093         joinbuf_flush
3094
3095         * include/channel.h: definitions and declarations for the struct
3096         JoinBuf abstraction
3097
3098 2000-04-29  Perry Lorier <isomer@coders.net>
3099         * ircd/s_bsd.c: Ok, so I thought I compiled and tested this...
3100
3101 2000-04-29  Perry Lorier <isomer@coders.net>
3102         * ircd/s_bsd.c: Add debugging code to IPcheck
3103
3104 2000-04-28  Kevin L. Mitchell  <klmitch@mit.edu>
3105
3106         * include/ircd_reply.h (SND_EXPLICIT): use instead of RPL_EXPLICIT
3107
3108         * ircd/ircd_reply.c (send_reply): use SND_EXPLICIT instead of
3109         RPL_EXPLICIT
3110
3111         * ircd/m_userhost.c (m_userhost): add a dead code comment
3112
3113         * ircd/m_desynch.c: forgot one...
3114
3115         * ircd/m_rehash.c (mo_rehash): er, duplicates :)
3116
3117         * ircd/m_proto.c (proto_send_supported): just change a comment so
3118         it doesn't show up in my scans
3119
3120         * ircd/ircd_reply.c (send_reply): fix a slight bug...
3121
3122         * ircd/s_numeric.c (do_numeric): use new sendcmdto_* functions,
3123         kinda hackish...
3124
3125         * ircd/parse.c (parse_server): argument wrangling to make
3126         processing in do_numeric a little easier to deal with
3127
3128         * ircd/s_serv.c (server_estab): SERVER should come from
3129         acptr->serv->up, not &me
3130
3131         * ircd/m_lusers.c: accidentally left out sptr for a %C
3132
3133         * ircd/send.c: hack to support doing wallchops...
3134
3135         * ircd/m_whowas.c: convert to new send functions
3136
3137         * ircd/m_whois.c: convert to new send functions
3138
3139         * ircd/m_who.c: convert to new send functions
3140
3141         * ircd/m_wallops.c: convert to new send functions
3142
3143         * ircd/m_wallchops.c: convert to new send functions
3144
3145         * ircd/m_version.c: convert to new send functions
3146
3147         * ircd/m_userip.c: convert to new send functions
3148
3149         * ircd/m_userhost.c: convert to new send functions
3150
3151         * ircd/m_uping.c: convert to new send functions
3152
3153         * ircd/m_trace.c: convert to new send functions
3154
3155         * ircd/m_topic.c: convert to new send functions
3156
3157         * ircd/m_time.c: convert to new send functions
3158
3159         * ircd/m_squit.c: convert to new send functions
3160
3161         * ircd/m_silence.c: convert to new send functions
3162
3163         * ircd/m_settime.c: convert to new send functions
3164
3165         * ircd/m_restart.c: convert to new send functions
3166
3167         * ircd/m_rehash.c: convert to new send functions
3168
3169         * ircd/m_privmsg.c: convert to new send functions
3170
3171         * ircd/m_pong.c: convert to new send functions
3172
3173         * ircd/m_ping.c: convert to new send functions
3174
3175         * ircd/m_pass.c: convert to new send functions
3176
3177         * ircd/m_opmode.c: convert to new send functions
3178
3179         * ircd/m_oper.c: convert to new send functions
3180
3181         * ircd/m_notice.c: convert to new send functions
3182
3183         * ircd/m_nick.c: convert to new send functions
3184
3185         * ircd/m_names.c: convert to new send functions
3186
3187         * ircd/m_motd.c: convert to new send functions
3188
3189         * ircd/m_mode.c: convert to new send functions
3190
3191         * ircd/m_map.c: convert to new send functions
3192
3193         * ircd/m_lusers.c: convert to new send functions
3194
3195         * ircd/m_list.c: convert to new send functions
3196
3197         * ircd/m_links.c: convert to new send functions
3198
3199         * ircd/m_kill.c: convert to new send functions
3200
3201         * ircd/m_jupe.c: convert to new send functions
3202
3203         * ircd/m_invite.c: convert to new send functions
3204
3205         * ircd/m_info.c: convert to new send functions
3206
3207         * ircd/m_help.c: convert to new send functions
3208
3209         * ircd/m_gline.c: convert to new send functions
3210
3211         * ircd/m_error.c: convert to new send functions
3212
3213         * ircd/m_endburst.c: convert to new send functions
3214
3215         * ircd/m_die.c: convert to new send functions
3216
3217         * ircd/m_destruct.c: convert to new send functions
3218
3219         * ircd/m_defaults.c: convert to new send functions
3220
3221         * ircd/m_connect.c: convert to new send functions
3222
3223 2000-04-28  Perry Lorier <isomer@coders.net>
3224         * RELEASE.NOTES: Describe a few more undocumented features.
3225         * config/config-sh.in: change the default paths for logging
3226         and the recommended number of channels.
3227         * include/supported.h: Rearrange slightly, added CHANTYPE's
3228
3229 2000-04-27  Kevin L. Mitchell  <klmitch@mit.edu>
3230
3231         * ircd/m_close.c: convert to send_reply
3232
3233         * ircd/m_clearmode.c: convert to send_reply, sendcmdto_serv_butone
3234
3235         * ircd/m_away.c: convert to send_reply and sendcmdto_serv_butone
3236
3237         * ircd/m_admin.c: convert to send_reply and hunt_server_cmd
3238
3239         * ircd/s_user.c (hunt_server_cmd): new hunt_server replacement
3240         that takes cmd and tok arguments, etc.  NOTE: THIS IMPLEMENTATION
3241         HAS A MAJOR HACK!!!  The whole hunt_server architecture should be
3242         carefully rethought...
3243
3244         * ircd/s_stats.c (hunt_stats): use new hunt_server_cmd
3245
3246         * include/s_user.h: hunt_server_cmd -- replacement for hunt_server
3247
3248         * ircd/s_misc.c: *sigh* 2.10.10 doesn't support squitting by
3249         numeric nick; therefore, we have to use the server name
3250
3251         * ircd/m_squit.c (ms_squit): allow to squit by server numeric nick
3252
3253         * ircd/send.c: fix minor bugs
3254
3255         * ircd/s_user.c (check_target_limit): mark dead code so I filter
3256         it when I grep
3257
3258         * ircd/s_serv.c (exit_new_server): mark dead code so I filter it
3259         when I grep
3260
3261         * ircd/parse.c: mark dead code so I filter it when I grep
3262
3263         * ircd/map.c: mark dead code so I filter it when I grep
3264
3265         * ircd/ircd.c: mark dead code so I filter it when I grep
3266
3267         * ircd/ircd_relay.c: convert over to new sendcmdto_*, send_reply
3268         functions
3269
3270         * ircd/channel.c: mark dead code so I filter it when I grep
3271
3272         * ircd/s_stats.c: use send_reply instead of sendto_one w/rpl_str;
3273         hope I'm not stepping on toes...
3274
3275         * ircd/s_conf.c: more sendto_opmask_butone / send_reply
3276         conversions; use ircd_snprintf in a couple of cases to negate the
3277         possibility of buffer overflow
3278
3279 2000-04-26  Kevin L. Mitchell  <klmitch@mit.edu>
3280
3281         * ircd/channel.c: convert as much as possible to new send
3282         semantics
3283
3284         * ircd/send.c (sendcmdto_common_channels): fix a subtle bug --
3285         test member->user->from->fd, not from->fd
3286
3287         * ircd/gline.c (gline_add): go ahead and add badchans; we just
3288         won't look for them in m_gline; this way, they always work...
3289
3290         * ircd/jupe.c: use ircd_vsnprintf conversion specifiers
3291
3292         * ircd/gline.c: since write_log now uses ircd_vsnprintf, use
3293         ircd_vsnprintf conversion specifiers
3294
3295         * ircd/support.c (write_log): use ircd_vsnprintf for write_log, so
3296         I have my conversion specifiers
3297
3298         * ircd/gline.c (do_gline): use send_reply for ERR_YOUREBANNEDCREEP
3299
3300         * ircd/send.c (sendcmdto_flag_butone): explicitly send WALLOPS to
3301         local users
3302
3303         * ircd/s_serv.c (exit_new_server): rewrite exit_new_server to be a
3304         little less brain-dead
3305
3306         * ircd/s_misc.c: use sendcmdto_one, sendrawto_one, and send_reply
3307
3308         * ircd/s_debug.c: use send_reply with RPL_EXPLICIT for
3309         RPL_STATSDEBUG
3310
3311         * ircd/res.c (cres_mem): use send_reply with RPL_EXPLICIT for
3312         RPL_STATSDEBUG
3313
3314         * ircd/list.c (send_listinfo): use send_reply with RPL_EXPLICIT
3315         for RPL_STATSDEBUG
3316
3317         * ircd/m_pong.c: use RPL_EXPLICIT for ERR_BADPING
3318
3319         * ircd/ircd.c: use RPL_EXPLICIT for ERR_BADPING
3320
3321         * ircd/s_user.c (register_user): use RPL_EXPLICIT for
3322         ERR_INVALIDUSERNAME
3323
3324         * ircd/ircd_reply.c (send_reply): support RPL_EXPLICIT
3325
3326         * include/ircd_reply.h (RPL_EXPLICIT): somewhat of a hack to mark
3327         a numeric as needing to use an explicit pattern, which will be the
3328         first argument in the variable argument list
3329
3330         * ircd/s_user.c: use sendrawto_one instead of sendto_one to send
3331         non-prefixed nospoof PING
3332
3333         * ircd/s_bsd.c: use sendrawto_one instead of sendto_one to send
3334         non-prefixed SERVER login
3335
3336         * ircd/ircd.c (check_pings): fix last sendto_one calls (except for
3337         a numeric usage further up)
3338
3339         * include/send.h: declare sendrawto_one
3340
3341         * ircd/send.c (sendrawto_one): new function to use ONLY for
3342         non-prefixed commands, like PING to client, or PASS/SERVER on
3343         server registration
3344
3345 2000-04-25  Kevin L. Mitchell  <klmitch@mit.edu>
3346
3347         * ircd/ircd_snprintf.c (doprintf): implement %H for possible
3348         future expansion (channel numerics?)
3349
3350         * include/ircd_snprintf.h: added documentation to # to explain use
3351         with %C; added documentation for : to explain use with %C; added
3352         documentation for %H for channels
3353
3354         * ircd/whocmds.c: use send_reply
3355
3356         * ircd/userload.c: use sendcmdto_one
3357
3358         * ircd/uping.c: use sendcmdto_one
3359
3360         * ircd/send.c: use new flags to %C format string; ':' prefixes
3361         client name with a colon for local connects, '#' uses
3362         nick!user@host form for local connects
3363
3364         * ircd/s_user.c: use send_reply, sendto_opmask_butone,
3365         sendcmdto_one, sendcmdto_serv_butone, sendcmdto_flag_butone
3366
3367         * ircd/s_serv.c: use sendcmdto_one, sendto_opmask_butone
3368
3369         * ircd/s_bsd.c: use sendto_opmask_butone, send_reply,
3370         sendcmdto_one
3371
3372         * ircd/s_auth.c: use sendto_opmask_butone
3373
3374         * ircd/res.c: use sendcmdto_one
3375
3376         * ircd/ircd_snprintf.c (doprintf): minor bug fixes and some
3377         debugging assertions
3378
3379 2000-04-24  Kevin L. Mitchell  <klmitch@mit.edu>
3380
3381         * ircd/support.c: dumpcore is no longer used, so get rid of it
3382
3383         * ircd/parse.c: use send_reply, sendcmdto_one
3384
3385         * ircd/map.c: use send_reply
3386
3387         * ircd/listener.c: use send_reply
3388
3389         * ircd/jupe.c: use sendto_opmask_butone, send_reply
3390
3391         * ircd/ircd_reply.c: use send_reply
3392
3393         * ircd/ircd.c: use sendto_opmask_butone
3394
3395         * ircd/gline.c: use sendto_opmask_butone, send_reply
3396
3397         * ircd/ircd_snprintf.c (doprintf): make it deal with incompletely
3398         registered clients; make FLAG_ALT print nick!user@host; make
3399         FLAG_COLON print :blah
3400
3401         * ircd/class.c (report_classes): use send_reply instead of
3402         sendto_one
3403
3404         * ircd/hash.c (m_hash): replace sendto_one with sendcmdto_one
3405
3406         * ircd/IPcheck.c (ip_registry_connect_succeeded): replace
3407         sendto_one with sendcmdto_one
3408
3409 2000-04-21  Kevin L. Mitchell  <klmitch@mit.edu>
3410
3411         * ircd/send.c: clean up logic in sendcmdto_channel_butone; use
3412         MyConnect() instead of IsServer() in sendcmdto_flag_butone; define
3413         sendcmdto_match_butone
3414
3415         * include/send.h: declare sendcmdto_match_butone
3416
3417 2000-04-20  Kevin L. Mitchell  <klmitch@mit.edu>
3418
3419         * ircd/jupe.c: update to use send_reply()
3420
3421         * ircd/gline.c: update to use send_reply()
3422
3423         * include/ircd_reply.h: declare send_reply
3424
3425         * ircd/ircd_reply.c (send_reply): send_error_to_client, but for
3426         replies; uses ircd_snprintf
3427
3428         * ircd/send.c: added comments to redirect searchers to appropriate
3429         sendcmdto_* function; moved new functions to end of file; added
3430         explanatory comments; reordered arguments; defined new functions
3431         mentioned below
3432
3433         * ircd/m_jupe.c: reorder arguments to sendcmdto_* functions
3434
3435         * ircd/m_gline.c: reorder arguments to sendcmdto_* functions
3436
3437         * ircd/jupe.c: reorder arguments to sendcmdto_* functions
3438
3439         * ircd/gline.c: reorder arguments to sendcmdto_* functions
3440
3441         * include/send.h: reorder arguments, add explanatory comments,
3442         declare new functions sendcmdto_flag_butone, sendto_opmask_butone,
3443         and vsendto_opmask_butone
3444
3445 2000-04-19  Kevin L. Mitchell  <klmitch@mit.edu>
3446
3447         * ircd/send.c: define sendcmdto_channel_butone, wrote a simplified
3448         vsendto_op_mask that uses '*' instead of the receiving client
3449         nickname
3450
3451         * include/send.h: declare sendcmdto_channel_butone; takes a skip
3452         argument that allows you to skip (or not to skip) deaf users,
3453         users behind bursting servers, and non channel operators
3454
3455 2000-04-17  Kevin L. Mitchell  <klmitch@mit.edu>
3456
3457         * ircd/send.c: new sendcmdto_channel_butserv -- note that old
3458         sendto_channel_butserv has a subtle bug; also wrote
3459         sendcmdto_common_channels.
3460
3461         * include/send.h: declare new sendcmdto_* functions
3462
3463         * ircd/jupe.c: support local deactivations of jupes
3464
3465         * ircd/gline.c: support local deactivations of glines
3466
3467         * include/jupe.h: JUPE_LDEACT allows jupes to be locally
3468         deactivated; if they aren't locally deactivated, then it slaves to
3469         the net-wide activation status; JupeIsRemActive() tests only
3470         whether the jupe is active everywhere else
3471
3472         * include/gline.h: GLINE_LDEACT allows glines to be locally
3473         deactivated; if they aren't locally deactivated, then it slaves to
3474         the net-wide activation status; GlineIsRemActive() tests only
3475         whether the gline is active everywhere else
3476
3477         * ircd/gline.c: detect overlapping G-lines; if an existing, wider
3478         gline expires after the new one will, we drop the new one,
3479         otherwise we add the G-line after that one (so the wide one will
3480         apply first); if the new one contains an existing G-line and if it
3481         will expire after the existing one, we drop the existing one to
3482         save memory
3483
3484         * ircd/m_gline.c (mo_gline): opers could issue remote local
3485         glines when CONFIG_OPERCMDS was off; fixed
3486
3487 2000-04-16  Kevin L. Mitchell  <klmitch@mit.edu>
3488
3489         * ircd/m_jupe.c (mo_jupe): allow target argument to be dropped if
3490         this is a local JUPE
3491
3492         * ircd/gline.c: add flags argument to gline_activate and
3493         gline_deactivate for future expansion
3494
3495         * ircd/m_gline.c: pass flags to gline_activate and
3496         gline_deactivate
3497
3498         * include/gline.h: add flags argument to gline_activate and
3499         gline_deactivate
3500
3501         * ircd/jupe.c: add flags argument to jupe_activate and
3502         jupe_deactivate for future expansion
3503
3504         * include/jupe.h: add flags argument to jupe_activate and
3505         jupe_deactivate
3506
3507         * ircd/m_jupe.c: pass a flags argument to jupe_add instead of
3508         local, active; pass flags to jupe_activate and jupe_deactivate
3509
3510         * include/gline.h: remove dead code
3511
3512         * ircd/gline.c: make gline expire times relative to CurrentTime,
3513         since that should be monotonically increasing, instead of
3514         TStime(), which can be set backwards, and which can therefore
3515         cause an expire time to increase; make local glines be removed
3516         instead of just deactivated; don't let gline_find() look for
3517         user@host glines if the mask being looked up is a channel mask
3518
3519         * ircd/send.c (vsendcmdto_one): forgot to account for the case
3520         where origin is a server and destination is a user
3521
3522         * ircd/jupe.c: make jupe expire times relative to CurrentTime,
3523         since that should be monotonically increasing, instead of
3524         TStime(), which can be set backwards, and which can therefore
3525         cause an expire time to increase; make local jupes be removed
3526         instead of just deactivated
3527
3528         * ircd/ircd_snprintf.c: d'oh, thanks for catching that; short for
3529         limit is fine.  any other warnings I should know about?
3530
3531 2000-04-15  Thomas Helvey <tomh@inxpress.net>
3532
3533         * ircd/*.c: const correctness and type safety cleanups to
3534         get code to compile with C++ compiler. Still has
3535         signed/unsigned comparison warnings.
3536
3537 2000-04-15  Greg Sikorski <gte@atomicrevs.demon.co.uk>
3538
3539         * ircd/userload.c: change <sys/time.h> include to <time.h> for
3540           portability.
3541
3542 2000-04-14  Kevin L. Mitchell  <klmitch@mit.edu>
3543
3544         * ircd/m_gline.c (mo_gline): d'oh, target isn't a numeric; use %C
3545         and convert acptr...
3546
3547         * ircd/s_user.c: move gline_lookup function call into
3548         register_user, where it'll have a username to lookup!
3549
3550         * ircd/m_gline.c: modify to utilize new sendcmdto_* series of
3551         functions; also stuff send_error_to_client into return clauses
3552
3553         * ircd/m_jupe.c: modify to utilize new sendcmdto_* series of
3554         functions; also use send_error_to_client where that makes sense
3555
3556         * ircd/jupe.c: modify to utilize new sendcmdto_* series of
3557         functions; also use send_error_to_client where that makes sense
3558
3559         * ircd/gline.c: modify to utilize new sendcmdto_* series of
3560         functions; also fix gline_lookup() to deal properly with remote
3561         clients--boy, do struct Client and struct User need to be cleaned
3562         up!
3563
3564         * ircd/ircd_snprintf.c (doprintf): a dest of &me is a server,
3565         too...
3566
3567         * ircd/send.c: wrote sendcmdto_one(), vsendcmdto_one(), and
3568         sendcmdto_serv_butone(), all utilizing the %v conversion of
3569         ircd_snprintf()
3570
3571         * include/send.h: define IRC_BUFSIZE, max size of a message;
3572         declare sendcmdto_one(), vsendcmdto_one(), and
3573         sendcmdto_serv_butone()
3574
3575         * include/msg.h: define all the CMD_* constants needed to utilize
3576         the new sendcmdto_* series of functions
3577
3578         * ircd/Makefile.in (SRC): list ircd_snprintf.c; run make depend
3579
3580         * ircd/gline.c: remove old, dead code.
3581
3582         * ircd/m_gline.c (mo_gline): disallow setting of global G-lines
3583         unless CONFIG_OPERCMDS is enabled; disallow listing of all G-lines
3584         (don't advertise proxies); remove dead code
3585
3586         * ircd/parse.c: oper handler for JUPE only lists jupes unless
3587         CONFIG_OPERCMDS is enabled
3588
3589         * ircd/m_jupe.c (mo_jupe): don't compile mo_jupe() if
3590         CONFIG_OPERCMDS is not enabled; we'll disable it in parse.c
3591
3592         * ircd/m_opmode.c (mo_opmode): if CONFIG_OPERCMDS is not enabled,
3593         always return ERR_DISABLED
3594
3595         * ircd/m_clearmode.c (mo_clearmode): if CONFIG_OPERCMDS is not
3596         enabled, always return ERR_DISABLED
3597
3598         * ircd/s_err.c: add error message to indicate disabled commands
3599
3600         * include/numeric.h (ERR_DISABLED): to indicate disabled commands
3601
3602         * doc/Configure.help: add documentation for CONFIG_OPERCMDS
3603
3604         * config/config-sh.in: add CONFIG_OPERCMDS, default both it and
3605         CONFIG_NEW_MODE to 'y' for now
3606
3607         * ircd/gline.c (gline_list): fix a minor formatting bogon
3608
3609         * BUGS: since I fixed that bug, might as well mark it fixed.
3610
3611         * ircd/m_join.c: look up badchans with GLINE_EXACT
3612
3613         * ircd/m_gline.c: fix parc count problems; look up existing
3614         G-lines with GLINE_EXACT; only set new lastmod when
3615         activating/deactivating existing glines if old lastmod was not 0
3616
3617         * ircd/gline.c: forgot to copy the gline reason over; don't
3618         propagate a gline with 0 lastmod if origin is user; add
3619         GLINE_EXACT to force exact matching of gline mask
3620
3621         * ircd/ircd_snprintf.c (doprintf): forgot to deal with the zero
3622         flag properly
3623
3624         * ircd/s_conf.c (find_kill): gline_find() takes a char *userhost,
3625         but gline_lookup() actually takes a client--d'oh.
3626
3627 2000-04-13  Thomas Helvey <tomh@inxpress.net>
3628         * ircd/IPcheck.c: Back port BLMet's bugfix from 2.10.10
3629
3630 2000-04-13  Greg Sikorski <gte@atomicrevs.demon.co.uk>
3631
3632         * ircd/whocmds.c: Don't make idle flag default in /who, to prevent:
3633           "/who * x"
3634           "Gte3 H*iwg Gte@212.49.240.217 :1 :0 I am the one that was."
3635           (Found by Plexus).
3636
3637         * ircd/whocmds.c: Change idle time calc from socket idle to user
3638           idle.
3639
3640 2000-04-13  Kevin L. Mitchell  <klmitch@mit.edu>
3641
3642         * config/aclocal.m4 (unet_CHECK_TYPE_SIZES): check size of void *,
3643         too, for ircd_snprintf.c
3644
3645         * include/ircd_snprintf.h: documentation for ircd_(v)snprintf, in
3646         comments; mostly descended from the Linux manpage for printf, but
3647         also documenting the extensions.
3648
3649         * ircd/ircd_snprintf.c: NULL dest is equivalent to going to a
3650         client; make 'q' be the same as 'L'; remove __inline__; only
3651         define EXTENSION if HAVE_LONG_LONG is defined
3652
3653         * include/handlers.h: declare m_gline()
3654
3655         * ircd/parse.c: gline can be called by users, but it only lists
3656         the glines.
3657
3658         * ircd/s_user.c (set_nick_name): resend gline if a remote server
3659         introduces a glined client
3660
3661         * ircd/s_serv.c (server_estab): burst glines, too
3662
3663         * ircd/gline.c: fix up all the expire times to be offsets;
3664         simplify gline_resend()
3665
3666         * ircd/m_gline.c: begin coding replacements for ms_gline(),
3667         mo_gline(), and m_gline()
3668
3669         * ircd/gline.c (gline_add): allow *@#channel to work correctly;
3670         also, prohibit local BADCHANs if LOCAL_BADCHAN not defined
3671
3672 2000-04-13  Greg Sikorski <gte@atomicrevs.demon.co.uk>
3673
3674         * tools/Bouncer/*: Add comments/documentation/tags.
3675         * tools/Bouncer/*: Add debug defines, make task fork().
3676
3677 2000-04-12  Thomas Helvey <tomh@inxpress.net>
3678         * ircd/s_err.c: Cleanup s_err.c make one table so we
3679         don't have to do anything tricky to get an error string.
3680
3681 2000-04-12  Greg Sikorski <gte@atomicrevs.demon.co.uk>
3682         * Add port bouncer for http (x/w)
3683
3684 2000-04-12  Kevin L. Mitchell  <klmitch@mit.edu>
3685
3686         * ircd/s_conf.c (find_kill): replaced call to find_gline() with a
3687         call to gline_find(); also used GlineReason() instead of direct
3688         reference to structure member
3689
3690         * ircd/m_join.c (m_join): replace bad_channel() calls with calls
3691         to gline_find(name, GLINE_BADCHAN), and also check to see if gline
3692         is active
3693
3694         * ircd/channel.c: nothing seems to be called anywhere...
3695
3696         * ircd/s_err.c: update a couple of replies to dovetail with new
3697         semantics
3698
3699         * ircd/gline.c: begin complete re-implementation of gline.c along
3700         the lines of the final design of jupe.c
3701
3702         * include/gline.h: begin complete re-implementation of gline.c
3703         along the lines of the final design of jupe.c
3704
3705         * ircd/channel.c (mode_process_clients): fix "Deop of +k user on
3706         %s by %s" message...
3707
3708         * ircd/ircd_snprintf.c: my new snprintf()-like functions
3709
3710         * include/ircd_snprintf.h: my new snprintf()-like functions
3711
3712 2000-04-11  Thomas Helvey <tomh@inxpress.net>
3713         * ircd/IPcheck.c: removed old dead code
3714         * ircd/s_user.c (send_user_info): removed non-standard
3715           user not found message for userhost/userip
3716
3717 2000-04-11  Greg Sikorski <gte@atomicrevs.demon.co.uk>
3718
3719         * ircd/s_err.c: Added missing quotes to ERR_DONTCHEAT numeric.
3720         * doc/p10.html: Work on chapter 4.
3721
3722 2000-04-10  Kevin L. Mitchell  <klmitch@mit.edu>
3723
3724         * ircd/channel.c (mode_parse_client): fix coredump on /mode
3725         #foobar +o nosuchnick
3726
3727 2000-04-10  Perry Lorier  <Isomer@coders.net>
3728         * BUGS: Added bug.
3729
3730 2000-04-09  Thomas Helvey <tomh@inxpress.net>
3731         * include/IPcheck.h: fix prototype
3732         * ircd/s_user.c: fix usage of IPcheck_remote_connect
3733         * ircd/IPcheck.c: removed unused args
3734
3735 2000-04-09  Thomas Helvey <tomh@inxpress.net>
3736         * include/IPcheck.h: add proto for IPcheck_expire
3737
3738         * ircd/IPcheck.c: Rewrote
3739
3740         * ircd/ircd.c: Add IPcheck_expire to main message loop
3741
3742         * ircd/s_user.c: Redo target hashing, refactor target code
3743
3744         * include/numeric.h: Cleaned up numerics, added which ones are
3745         in use by other networks and what they are in use for.
3746
3747         * ircd/channel.c: cleaned can_join(), allow anyone through anything
3748         if /invited, simplified the function.  Opers overusing OPEROVERRIDE
3749         will get a message explaining to them not to cheat.
3750
3751         * ircd/m_join.c: cleaned up the various join functions, should be
3752         a lot more efficient.  Still needs work.  Now assumes that s<->s
3753         won't send it a JOIN 0.  Service coders - note this and tread with
3754         care.
3755
3756         * ircd/m_stats.c: added Gte-'s stats doc patch.
3757
3758         * ircd/m_version.c: /version now returns the 005 numeric as well.
3759         as requested by Liandrin.
3760
3761
3762 2000-04-07  Kevin L. Mitchell  <klmitch@mit.edu>
3763
3764         * ircd/m_clearmode.c: add include for support.h for write_log()
3765
3766         * configure: move ircd/crypt/* to tools/*
3767
3768 2000-04-06  Thomas Helvey <tomh@inxpress.net>
3769         * ircd/s_auth.c: Shorten auth connect timeout to 60 seconds
3770           set client host to server alias if connection from localhost
3771
3772 2000-04-06  Perry Lorier <isomer@coders.net>
3773         * ircd/ircd.c: Fix core during pinging (oops)
3774         
3775 2000-04-06  Perry Lorier <isomer@coders.net>
3776         * ircd/send.c: fixed wrong ident being sent to channels bug.
3777         * include/numerics.h: Updated some of the numerics from other
3778         networks.  Flagged some as 'unused' by undernet.
3779
3780 2000-03-30  Perry Lorier <isomer@coders.net>
3781         * ircd/ircd.c: Lets see if this helps the ping problem at all.
3782         * ircd/whocmds.c, /doc/readme.who: Added %l specifier to get idle
3783         time for local clients. (as requested), extended who now returns all
3784         the flags (@+!) so you can tell the complete state of a client.
3785
3786 2000-03-30  Thomas Helvey <tomh@inxpress.net>
3787         * m_rping.c m_rpong.c: add Gte's rping/rpong fixes
3788
3789 2000-03-30  Perry Lorier <isomer@coders.net>
3790         * ircd/parse.c: oops, missed opers.
3791
3792 2000-03-30  Perry Lorier <isomer@coders.net>
3793         * ircd/parse.c: fixed mystifying ping bug thats been plaguing us
3794         for so long.  Remember: m_ping MUST be in the parse array. :)
3795
3796 2000-03-30  Perry Lorier <isomer@coders.net>
3797         * ircd/ircd.c: test in check_pings was wrong.  I move that we
3798         disallow cvs commit after 10pm localtime....
3799
3800 2000-03-30  Perry Lorier <isomer@coders.net>
3801         * ircd/m_pong.c: Fix it for servers too.
3802
3803 2000-03-30  Perry Lorier <isomer@coders.net>
3804         * ircd/m_pong.c: Fix ping timeout bugs
3805
3806 2000-03-30  Perry Lorier <isomer@coders.net>
3807         * ircd/channel.c: Bans had CurrentTime in their when field instead
3808         of TStime()
3809
3810 2000-03-31  Thomas Helvey <tomh@ixpress.net>
3811         * ircd/numnicks.c (SetXYYCapacity): fix for extended
3812         numerics.
3813
3814 2000-03-30  Perry Lorier <isomer@coders.net>
3815         * ircd/m_nick.c: send kills both ways so when we add nick change
3816         on collision we don't desync the network.
3817
3818         * ircd/map.c: Fixup the map a bit more.
3819
3820 2000-03-31  Kevin L. Mitchell  <klmitch@mit.edu>
3821
3822         * ircd/m_clearmode.c (do_clearmode): Log the CLEARMODE to OPATH
3823
3824         * ircd/m_opmode.c: Log the mode changes to OPATH
3825
3826         * ircd/channel.c (modebuf_flush_int): Log the mode changes to
3827         OPATH
3828
3829         * include/channel.h (MODEBUF_DEST_LOG): Log the mode changes to
3830         OPATH
3831
3832         * doc/Configure.help: help text for CONFIG_LOG_OPMODE / OPATH
3833
3834         * config/config-sh.in: added OPATH for opmode log file
3835
3836         * ircd/m_clearmode.c (do_clearmode): updated uses of
3837         modebuf_mode_string() for the new usage
3838
3839         * ircd/channel.c: added flag MODE_FREE and an int argument to
3840         modebuf_mode_string() to indicate that the string must be free'd;
3841         updated calls to modebuf_mode_string() for the new usage; called
3842         collapse(pretty_mask()) on the ban string and use allocated memory
3843         for it; added ban list length accounting; fixed a number of small
3844         bugs in ban processing
3845
3846         * include/channel.h: added flag MODE_FREE and an int argument to
3847         modebuf_mode_string() to indicate that the string must be free'd
3848
3849         * ircd/m_clearmode.c (do_clearmode): made sure clearmode removed
3850         keys and limits that are set
3851
3852 2000-03-30  Perry Lorier <isomer@coders.net>
3853         * ircd/ircd.c: rewrote check_pings() for maintainability
3854         and speed.  Also changed quit msg's so they don't have
3855         redundant nick[host] info in them.
3856
3857         * ircd/send.c: Changed write errors to report what error
3858         occured (if possible).
3859
3860         * ircd/gline.c: added gline comment to the quit.
3861
3862         * ircd/m_server.c: Added suggestions to server quits mentioning
3863         what went wrong so the admin can fix it earlier instead of asking
3864         questions...
3865
3866         * ircd/map.c: Changed m_map() to hide numerics, show a * beside
3867         servers that aren't fully burst yet.  And show '(--s)' for servers
3868         where its not sure.
3869
3870         * doc/example.conf: Fixed wrapped U:
3871
3872 2000-03-30  Kevin L. Mitchell  <klmitch@mit.edu>
3873
3874         * ircd/m_mode.c (ms_mode): implemented a new m_mode in terms of
3875         mode_parse() (version selectable at compile time)
3876
3877         * ircd/m_clearmode.c (mo_clearmode): clean_channelname(parv[1])
3878
3879         * ircd/m_opmode.c (mo_opmode): clean_channelname(parv[1])
3880
3881         * config/config-sh.in: add new config option to enable new m_mode
3882         implementation
3883
3884         * doc/Configure.help: add documentation for new config option
3885         CONFIG_NEW_MODE
3886
3887         * ircd/channel.c (mode_parse_client): /opmode #foobar -o -- 461
3888         MODE -v : Not enough parameters
3889
3890         * ircd/m_clearmode.c (do_clearmode): do_clearmode() would remove
3891         +k and +l even if they weren't set...
3892
3893         * ircd/m_opmode.c: implement the OPMODE command using mode_parse()
3894
3895         * ircd/channel.c: make mode_process_clients() clear the DEOPPED
3896         flag; fix +s+p exclusivity; add MODE_ADD/MODE_DEL to flag list
3897         for; test the 0-th member, not the i-th member, of the client
3898         change state stuff
3899
3900         * ircd/m_clearmode.c (do_clearmode): use the new
3901         mode_invite_clear() function
3902
3903         * ircd/channel.c: cleared up all the compile-time warnings and
3904         errors
3905
3906         * include/channel.h: added declarations for mode_ban_invalidate()
3907         and mode_invite_clear()
3908
3909         * ircd/channel.c: finished mode_parse(), then broke it up into a
3910         dozen or so helper functions to make the code easier to read
3911
3912 2000-03-29  Thomas Helvey <tomh@inxpress.net>
3913         * ircd/ircd.c: refactor server initialization a bit, use
3914         getopt for parsing command line, refactor init_sys, main,
3915         and other bits.
3916
3917         * ircd/s_bsd.c: add functions for initialization to clean
3918         up logic a bit and remove duplicated code.
3919
3920         * include/ircd.h: add struct for server process related
3921         variables.
3922
3923 2000-03-29  Kevin L. Mitchell  <klmitch@mit.edu>
3924
3925         * ircd/channel.c: initial definition of mode_parse(); flags to
3926         prevent doing the same thing multiple times; helper method
3927         send_notoper() to send a "Not oper"/"Not on channel" notice
3928
3929         * include/channel.h: declare mode_parse() and helper flags
3930
3931         * ircd/channel.c (modebuf_flush_int): fiddled with timestamp
3932         sending to match the current action of set_mode() closely enough
3933         that hopefully there won't be major conflicts
3934
3935         * ircd/channel.c (modebuf_flush_int): consolidated the mode string
3936         building logic, reversed the order of the arguments to mode
3937         commands to have '-' preceed '+'
3938
3939 2000-03-29  Thomas Helvey <tomh@inxpress.net>
3940         * ircd/s_bsd.c (add_connection): don't disable socket options
3941         let OS tune itself and allow important performance tweaks to 
3942         work.
3943
3944 2000-03-28  Kevin L. Mitchell  <klmitch@mit.edu>
3945
3946         * ircd/channel.c (modebuf_flush_int): use %d, not %-15d; I got
3947         confused by set_mode, which is doing some really weird logic;
3948         guess what I'm going to rewrite next?  ;)
3949
3950 2000-03-28  Kevin L. Mitchell  <klmitch@emc.com>
3951
3952         * include/channel.h: added MODE_SAVE for the bounds checking stuff
3953         in modebuf_flush
3954
3955         * ircd/channel.c: make modebuf_flush into modebuf_flush_int and
3956         make it do bounds checking on the buffer; all modes are sent only
3957         if the all parameter is 1; modebuf_flush is the exported wrapper
3958
3959         * include/channel.h: add BOUNCE, renumber flags to get a little
3960         more space
3961
3962         * ircd/channel.c (modebuf_flush): don't overload HACK2, add
3963         BOUNCE; send DESYNCH message
3964
3965 2000-03-27  Kevin L. Mitchell  <klmitch@emc.com>
3966
3967         * ircd/m_clearmode.c (do_clearmode): only mark the modes the
3968         channel actually has in effect for deletion
3969
3970         * ircd/channel.c: added explanatory comments to all added
3971         functions; made flushing take place at the correct place even if
3972         the MODEBUF_DEST_DEOP flag is set; rewrote build_string() helper
3973         to bash some stupid bugs; made modebuf_flush() return if ModeBuf
3974         is empty, fixed the apparent source, removed some bogus string
3975         termination code, properly terminate the mode strings, add support
3976         for HACK2 and HACK3, made limit strings not be sent if the limit
3977         is being removed, changed where '+' and '-' come from in sent
3978         strings, added support for DEOP flag, set up bouncing code for
3979         HACK2
3980
3981         * ircd/Makefile.in: ran make depend
3982
3983         * include/channel.h: added new defines for future functionality,
3984         made modebuf_flush() return int so I can use tail recursion
3985
3986         * ircd/m_clearmode.c: add msg.h to includes; other misc cleanups
3987         to make it all compile
3988
3989         * ircd/m_opmode.c: add msg.h to includes...
3990
3991         * ircd/m_clearmode.c: implemented mo_clearchan()/ms_clearchan()
3992
3993         * ircd/channel.c (modebuf_flush): realized I forgot to
3994         nul-terminate addbuf/rembuf properly...
3995
3996         * ircd/m_clearmode.c (do_clearmode): wrote do_clearmode()...
3997
3998         * ircd/channel.c (modebuf_flush): correct sendto_server_butone to
3999         sendto_serv_butone--blah^2
4000
4001         * ircd/send.c (sendto_serv_butone): stupid comments confused me
4002
4003         * ircd/channel.c (modebuf_flush): if there are no mode changes to
4004         propagate, we're done...
4005
4006         * ircd/channel.c (modebuf_flush): duh; it's sendto_server_butone,
4007         not sendto_all_butone
4008
4009         * ircd/m_clearmode.c: define skeleton for m{o,s}_clearmode
4010
4011         * ircd/m_opmode.c: define skeleton for m{o,s}_opmode
4012
4013         * ircd/Makefile.in (SRC): added m_opmode() and m_clearmode() to
4014         the list
4015
4016         * ircd/parse.c: added messages for opmode and clearmode
4017
4018         * include/handlers.h: added declarations for mo_opmode(),
4019         ms_opmode(), mo_clearmode(), and ms_clearmode()
4020
4021         * include/msg.h: define MSG_OPMODE, TOK_OPMODE, MSG_CLEARMODE, and
4022         TOK_CLEARMODE
4023
4024         * include/channel.h (MODEBUF_DEST_OPMODE): Define the
4025         MODEBUF_DEST_OPMODE flag
4026
4027         * ircd/channel.c (modebuf_flush): added new flag,
4028         MODEBUF_DEST_OPMODE; causes channel MODE/HACK(4) notice to appear
4029         to originate from source's server (or source itself, if
4030         IsServer(source)); also causes a server-level MODE to be sent as
4031         OPMODE instead
4032
4033         * include/channel.h: defined MODEBUF_DEST_SERVER,
4034         MODEBUF_DEST_HACK4
4035
4036         * ircd/channel.c: Add another argument to build_string() to handle
4037         numeric nicks; implemented MODEBUF_DEST_SERVER to send MODEs to
4038         servers; implemented MODEBUF_DEST_HACK4 to cause HACK(4) notices
4039         to be sent out
4040
4041 2000-03-27  Perry Lorier <isomer@coders.net>
4042
4043         * ircd/s_bsd.c: fixed missing 'u' typo.
4044
4045 2000-03-26  Kevin L. Mitchell  <klmitch@emc.com>
4046
4047         * ircd/channel.c: implement modebuf_init(), _mode(), _mode_uint(),
4048         _mode_string(), _mode_client(), _flush(); also implemented a
4049         simple build_string()
4050
4051         * include/channel.h: added definition of ModeBuf, modebuf_*
4052         manipulation functions, and a couple of helper macros
4053
4054 2000-03-24 Thomas Helvey <tomh@inxpress.net>
4055   * numicks.c: convert extended numerics to use original mask version
4056   * numnicks.h: ""
4057   * s_user.c:
4058 2000-03-23 Thomas Helvey <tomh@inxpress.net>
4059   * Merge in changes from production
4060 2000-03-22 Thomas Helvey <tomh@inxpress.net>
4061   * numicks.c: Tweak to numnick generator to reduce possibility of duplicates.
4062   * rfc1459.unet: Add Maniac's documentation for /names 0
4063 * Fix misc. jupe bugs that somehow made it into the tree
4064 * Escape /names 0 to mean /names --Maniac
4065 * Don't core when server asks for info --Maniac 
4066 * Add Kev's jupe patch --Bleep
4067 * Add Maniacs squit patch --Bleep
4068 * Merge in u2_10_10_beta07 changes --Bleep
4069 * Merge in u2_10_10_beta06 changes --Bleep
4070 * Start ircu2.10.11 development, beta branch u2_10_10 --Bleep
4071 #-----------------------------------------------------------------------------