diff -uNrd -x CVS ircd-hybrid-7rc5/.indent.pro ircd-hybrid-7-bg/.indent.pro
--- ircd-hybrid-7rc5/.indent.pro	Mon Jun 18 02:09:42 2001
+++ ircd-hybrid-7-bg/.indent.pro	Mon Dec 30 23:07:23 2002
@@ -1,4 +1,4 @@
-/* $Id: .indent.pro,v 1.3 2001/06/18 06:09:42 a1kmm Exp $ */
+/* $Id: .indent.pro,v 1.1.1.1 2002/12/31 04:07:23 demond Exp $ */
 /* copy this file to the source dir then run indent file.c */
 
 --gnu-style
diff -uNrd -x CVS ircd-hybrid-7rc5/BUGS ircd-hybrid-7-bg/BUGS
--- ircd-hybrid-7rc5/BUGS	Sat Jul  6 16:14:28 2002
+++ ircd-hybrid-7-bg/BUGS	Mon Dec 30 23:07:23 2002
@@ -60,4 +60,4 @@
  with any report  (with passwords and other sensitive information masked).
 
 --------------------------------------------------------------------------------
-$Id: BUGS,v 7.50 2002/07/06 20:14:28 leeh Exp $
+$Id: BUGS,v 1.1.1.1 2002/12/31 04:07:23 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/ChangeLog ircd-hybrid-7-bg/ChangeLog
--- ircd-hybrid-7rc5/ChangeLog	Thu Oct 31 00:31:41 2002
+++ ircd-hybrid-7-bg/ChangeLog	Sat May 24 23:27:07 2003
@@ -1,3 +1,1028 @@
+2003-05-24 21:31  demond
+
+	* ircd-hybrid-7-bg/: include/config.h (1.6),
+	modules/core/m_message.c (1.10), src/parse.c (1.4), src/s_misc.c
+	(1.5) (utags: rel-1-4): do_numeric() fixup, cluster_prefix() case 3
+
+2003-05-23 23:41  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.18): blah
+
+2003-05-23 23:38  demond
+
+	* ircd-hybrid-7-bg/: include/config.h (1.5), messages/bg.po (1.2):
+	forgot about that...
+
+2003-05-23 23:10  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.17): blah
+
+2003-05-23 20:07  demond
+
+	* ircd-hybrid-7-bg/: doc/example.conf (1.4), help/opers/stats
+	(1.2), include/config.h (1.4), include/numeric.h (1.5),
+	include/patchlevel.h (1.5), include/s_conf.h (1.4),
+	include/s_misc.h (1.2), include/serno.h (1.8), messages/ayb.po
+	(1.6), messages/custom.po (1.6), modules/m_admin.c (1.3),
+	modules/m_away.c (1.3), modules/m_conf.c (1.5), modules/m_connect.c
+	(1.3), modules/m_gline.c (1.2), modules/m_info.c (1.5),
+	modules/m_invite.c (1.3), modules/m_join.c (1.4), modules/m_kline.c
+	(1.3), modules/m_knock.c (1.3), modules/m_links.c (1.3),
+	modules/m_lusers.c (1.3), modules/m_motd.c (1.3),
+	modules/m_operwall.c (1.4), modules/m_ping.c (1.3),
+	modules/m_pong.c (1.3), modules/m_stats.c (1.3),
+	modules/m_svshint.c (1.6), modules/m_svshost.c (1.10),
+	modules/m_svsmisc.c (1.4), modules/m_svsnick.c (1.3),
+	modules/m_time.c (1.3), modules/m_topic.c (1.4), modules/m_trace.c
+	(1.3), modules/m_unkline.c (1.4), modules/m_users.c (1.4),
+	modules/m_version.c (1.3), modules/m_wallops.c (1.4),
+	modules/m_whois.c (1.4), modules/core/m_kick.c (1.3),
+	modules/core/m_kill.c (1.3), modules/core/m_message.c (1.9),
+	modules/core/m_mode.c (1.3), modules/core/m_nick.c (1.4),
+	modules/core/m_part.c (1.5), modules/core/m_quit.c (1.4),
+	modules/core/m_sjoin.c (1.3), modules/core/m_squit.c (1.3),
+	src/ircd.c (1.6), src/ircd_lexer.l (1.4), src/ircd_parser.y (1.8),
+	src/match.c (1.2), src/messages.tab (1.5), src/parse.c (1.3),
+	src/s_conf.c (1.5), src/s_misc.c (1.4): implemented cluster bridges
+
+2003-03-13 20:09  demond
+
+	* ircd-hybrid-7-bg/modules/m_svshint.c (1.5): grrr minpara beats me
+
+2003-03-13 11:34  demond
+
+	* ircd-hybrid-7-bg/: messages/Makefile.in (1.2), messages/bg.po
+	(1.1), modules/m_conf.c (1.4), modules/m_svshint.c (1.4),
+	modules/m_svshost.c (1.9), modules/m_svsnick.c (1.2),
+	src/channel_mode.c (1.3): minor bug fixes, added bg po-file
+
+2003-03-10 01:51  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.16): blah
+
+2003-03-10 01:08  demond
+
+	* ircd-hybrid-7-bg/: contrib/m_clearchan.c (1.2), contrib/m_force.c
+	(1.2), contrib/m_ltrace.c (1.2), contrib/m_map.c (1.2),
+	contrib/m_mkpasswd.c (1.2), contrib/m_ojoin.c (1.2),
+	contrib/m_operspy.c (1.2), contrib/m_opme.c (1.2),
+	contrib/m_whois.c (1.2), doc/example.conf (1.3), doc/modes.txt
+	(1.2), help/opers/umode (1.2), help/users/umode (1.2),
+	include/channel.h (1.2), include/channel_mode.h (1.2),
+	include/client.h (1.2), include/defaults.h (1.2), include/numeric.h
+	(1.4), include/s_conf.h (1.3), include/s_serv.h (1.2),
+	include/serno.h (1.7), include/supported.h (1.3), messages/ayb.po
+	(1.5), messages/custom.po (1.5), modules/m_accept.c (1.2),
+	modules/m_admin.c (1.2), modules/m_away.c (1.2), modules/m_cburst.c
+	(1.2), modules/m_challenge.c (1.2), modules/m_cjoin.c (1.2),
+	modules/m_close.c (1.2), modules/m_connect.c (1.2),
+	modules/m_help.c (1.2), modules/m_info.c (1.4), modules/m_invite.c
+	(1.2), modules/m_ison.c (1.2), modules/m_join.c (1.3),
+	modules/m_kline.c (1.2), modules/m_knock.c (1.2), modules/m_links.c
+	(1.2), modules/m_list.c (1.2), modules/m_lljoin.c (1.2),
+	modules/m_llnick.c (1.2), modules/m_locops.c (1.2),
+	modules/m_lusers.c (1.2), modules/m_motd.c (1.2), modules/m_names.c
+	(1.2), modules/m_oper.c (1.2), modules/m_operwall.c (1.3),
+	modules/m_pass.c (1.2), modules/m_ping.c (1.2), modules/m_pong.c
+	(1.2), modules/m_rehash.c (1.2), modules/m_restart.c (1.2),
+	modules/m_stats.c (1.2), modules/m_svshost.c (1.8),
+	modules/m_svsmisc.c (1.3), modules/m_time.c (1.2),
+	modules/m_topic.c (1.3), modules/m_trace.c (1.2),
+	modules/m_unkline.c (1.3), modules/m_user.c (1.2),
+	modules/m_userhost.c (1.2), modules/m_users.c (1.3),
+	modules/m_version.c (1.2), modules/m_wallops.c (1.3),
+	modules/m_watch.c (1.3), modules/m_who.c (1.2), modules/m_whois.c
+	(1.3), modules/m_whowas.c (1.3), modules/core/m_kick.c (1.2),
+	modules/core/m_kill.c (1.2), modules/core/m_message.c (1.8),
+	modules/core/m_mode.c (1.2), modules/core/m_nick.c (1.3),
+	modules/core/m_part.c (1.4), modules/core/m_sjoin.c (1.2),
+	modules/core/m_squit.c (1.2), src/adns.c (1.2), src/channel.c
+	(1.4), src/channel_mode.c (1.2), src/class.c (1.2), src/client.c
+	(1.4), src/hash.c (1.4), src/hostmask.c (1.2), src/ircd.c (1.5),
+	src/ircd_lexer.l (1.3), src/ircd_parser.y (1.7), src/ircdauth.c
+	(1.2), src/listener.c (1.4), src/messages.tab (1.4), src/modules.c
+	(1.4), src/motd.c (1.2), src/numeric.c (1.2), src/parse.c (1.2),
+	src/resv.c (1.2), src/s_conf.c (1.4), src/s_debug.c (1.2),
+	src/s_serv.c (1.3), src/s_user.c (1.7), src/send.c (1.4),
+	src/vchannel.c (1.2) (utags: rel-1-3): implemented altlang server
+	replies... DOH
+
+2003-03-07 11:13  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.15, rel-1-3): blah
+
+2003-03-07 11:05  demond
+
+	* ircd-hybrid-7-bg/modules/m_svsmisc.c (1.2): fixed SVSPART handler
+
+2003-03-07 00:43  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.14): blah
+
+2003-03-07 00:39  demond
+
+	* ircd-hybrid-7-bg/modules/m_svsmisc.c (1.1): implemented SVSJOIN,
+	SVSPART & SVSMODE
+
+2003-03-07 00:36  demond
+
+	* ircd-hybrid-7-bg/: include/config.h (1.3, rel-1-3),
+	include/config.h.dist (1.2, rel-1-3), include/hash.h (1.2,
+	rel-1-3), include/modules.h (1.3, rel-1-3), include/patchlevel.h
+	(1.4, rel-1-3), include/serno.h (1.6), modules/.depend (1.3,
+	rel-1-3), modules/Makefile.in (1.3, rel-1-3), modules/core/m_part.c
+	(1.3), src/hash.c (1.3), src/modules.c (1.3): implemented SVSJOIN,
+	SVSPART & SVSMODE
+
+2003-03-02 17:41  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.13): blah
+
+2003-03-02 15:08  demond
+
+	* ircd-hybrid-7-bg/: include/supported.h (1.2), modules/m_info.c
+	(1.3), src/channel.c (1.3), src/ircd_signal.c (1.2, rel-1-3),
+	src/s_misc.c (1.3, rel-1-3): myevents fixes, waitpid fix
+
+2003-02-04 11:14  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.12, rel-1-2): blah
+
+2003-02-04 11:13  demond
+
+	* ircd-hybrid-7-bg/: include/fdlist.h (1.3, rel-1-3),
+	include/numeric.h (1.3), messages/ayb.po (1.4), messages/custom.po
+	(1.4), modules/m_svshost.c (1.7), modules/m_whois.c (1.2),
+	modules/core/m_message.c (1.7), src/fdlist.c (1.3, rel-1-3),
+	src/linebuf.c (1.4, rel-1-3), src/listener.c (1.3),
+	src/messages.tab (1.3), src/packet.c (1.4, rel-1-3), src/s_auth.c
+	(1.2, rel-1-3), src/s_bsd.c (1.4, rel-1-3), src/s_user.c (1.6)
+	(utags: rel-1-2): finished SSL-ifying
+
+2003-02-02 03:07  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.11): blah
+
+2003-02-02 02:37  demond
+
+	* ircd-hybrid-7-bg/: Hybrid-team (1.2, rel-1-3, rel-1-2),
+	include/config.h (1.2, rel-1-2), include/serno.h (1.5, rel-1-2),
+	modules/m_unkline.c (1.2, rel-1-2), modules/core/m_nick.c (1.2,
+	rel-1-2), modules/core/m_part.c (1.2, rel-1-2),
+	modules/core/m_quit.c (1.3, rel-1-3, rel-1-2), src/linebuf.c (1.3),
+	src/packet.c (1.3), src/s_bsd.c (1.3), src/s_user.c (1.5): added
+	remote unkline
+
+2003-01-30 10:32  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.10): blah
+
+2003-01-30 10:28  demond
+
+	* ircd-hybrid-7-bg/: configure (1.2, rel-1-3, rel-1-2),
+	autoconf/configure.in (1.2, rel-1-3, rel-1-2), doc/example.conf
+	(1.2, rel-1-2), include/fdlist.h (1.2), include/listener.h (1.2,
+	rel-1-3, rel-1-2), include/s_bsd.h (1.2, rel-1-3, rel-1-2),
+	include/s_conf.h (1.2, rel-1-2), include/stdinc.h (1.3, rel-1-3,
+	rel-1-2), src/balloc.c (1.2, rel-1-3, rel-1-2), src/fdlist.c (1.2),
+	src/fileio.c (1.2, rel-1-3, rel-1-2), src/ircd.c (1.4, rel-1-2),
+	src/ircd_lexer.l (1.2, rel-1-2), src/ircd_parser.y (1.6, rel-1-2),
+	src/linebuf.c (1.2), src/listener.c (1.2), src/packet.c (1.2),
+	src/s_bsd.c (1.2), src/s_misc.c (1.2, rel-1-2), src/s_serv.c (1.2,
+	rel-1-2), src/tools.c (1.2, rel-1-3, rel-1-2): cosmetic additions,
+	started client SSL support
+
+2003-01-24 01:37  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.9, intm1): blah
+
+2003-01-24 01:35  demond
+
+	* ircd-hybrid-7-bg/src/hash.c (1.2, rel-1-2, intm1):
+	Count.identified decrement on services shutdown
+
+2003-01-23 23:14  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.8): blah
+
+2003-01-23 23:08  demond
+
+	* ircd-hybrid-7-bg/: include/patchlevel.h (1.3, rel-1-2),
+	include/serno.h (1.4), include/whowas.h (1.5, rel-1-3, rel-1-2),
+	modules/m_conf.c (1.3, rel-1-3, rel-1-2), modules/m_svshint.c (1.3,
+	rel-1-3, rel-1-2), modules/m_svshost.c (1.6), modules/m_whowas.c
+	(1.2, rel-1-2), src/client.c (1.3, rel-1-2), src/s_user.c (1.4),
+	src/whowas.c (1.2, rel-1-3, rel-1-2) (utags: intm1): whowas
+	realhost, numerous bugfixes
+
+2003-01-14 01:57  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.7, rel-1-1): blah
+
+2003-01-14 01:35  demond
+
+	* ircd-hybrid-7-bg/: modules/m_operwall.c (1.2),
+	modules/m_wallops.c (1.2), src/send.c (1.3) (utags: intm1, rel-1-1,
+	rel-1-2): changed OPERWALL to [W] and [O]
+
+2003-01-14 01:19  demond
+
+	* ircd-hybrid-7-bg/: modules/m_svshost.c (1.5, rel-1-1), src/send.c
+	(1.2): cyr translation fixes... at last :)
+
+2003-01-13 23:08  demond
+
+	* ircd-hybrid-7-bg/modules/m_svshost.c (1.4): LL fix
+
+2003-01-13 13:18  demond
+
+	* ircd-hybrid-7-bg/modules/m_svshost.c (1.3): implemented SVSHOST
+	handler
+
+2003-01-13 11:03  demond
+
+	* ircd-hybrid-7-bg/: modules/m_svshost.c (1.2), src/s_user.c (1.3,
+	rel-1-1): implemented SVSHOST handler
+
+2003-01-13 10:30  demond
+
+	* ircd-hybrid-7-bg/include/serno.h (1.3, rel-1-1): implemented
+	SVSHOST handler
+
+2003-01-13 10:26  demond
+
+	* ircd-hybrid-7-bg/: include/modules.h (1.2, rel-1-2, intm1,
+	rel-1-1), include/patchlevel.h (1.2, rel-1-1), modules/.depend
+	(1.2, rel-1-2, intm1, rel-1-1), modules/Makefile.in (1.2, rel-1-2,
+	intm1, rel-1-1), modules/m_svshost.c (1.1), src/channel.c (1.2,
+	rel-1-2, intm1, rel-1-1), src/modules.c (1.2, rel-1-2, intm1,
+	rel-1-1), src/s_conf.c (1.3, rel-1-2, intm1, rel-1-1): implemented
+	SVSHOST handler
+
+2003-01-07 22:26  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.6): blah
+
+2003-01-07 21:50  demond
+
+	* ircd-hybrid-7-bg/: modules/m_set.c (1.3, rel-1-3, rel-1-2),
+	src/ircd.c (1.3), src/ircd_parser.y (1.5) (utags: intm1, rel-1-1):
+	last gettext() fixes, putenv() must not use auto buf, ewwwww
+
+2003-01-07 02:22  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.5): blah
+
+2003-01-07 02:20  demond
+
+	* ircd-hybrid-7-bg/src/ircd_parser.y (1.4): grr... bison 1.875
+	complained
+
+2003-01-07 02:01  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.4): blah
+
+2003-01-07 01:52  demond
+
+	* ircd-hybrid-7-bg/include/whowas.h (1.4, rel-1-1): re-added
+
+2003-01-07 01:48  demond
+
+	* ircd-hybrid-7-bg/include/whowas.h (1.3): removed for re-add
+
+2003-01-07 01:28  demond
+
+	* ircd-hybrid-7-bg/: include/stdinc.h (1.2, intm1, rel-1-1),
+	include/whowas.h (1.2), modules/m_set.c (1.2),
+	modules/core/m_message.c (1.6, intm1, rel-1-1),
+	modules/core/m_quit.c (1.2, intm1, rel-1-1), src/ircd.c (1.2),
+	src/ircd_parser.y (1.3): more gettext() fixes, now SET MSGLOCALE
+	should be functional...
+
+2003-01-06 01:45  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.3): blah
+
+2003-01-06 01:33  demond
+
+	* ircd-hybrid-7-bg/modules/core/m_message.c (1.5): fixed +w drop
+
+2003-01-06 00:26  demond
+
+	* ircd-hybrid-7-bg/: modules/m_join.c (1.2, rel-1-2, intm1,
+	rel-1-1), modules/m_topic.c (1.2, rel-1-2, intm1, rel-1-1),
+	modules/core/m_message.c (1.4), src/ircd_parser.y (1.2): fixed
+	gettext(), implemented topic translation & +w subst line drop
+
+2003-01-05 01:36  demond
+
+	* ircd-hybrid-7-bg/ChangeLog (1.2): blah
+
+2003-01-05 01:11  demond
+
+	* ircd-hybrid-7-bg/messages/: ayb.po (1.3), custom.po (1.3) (utags:
+	intm1, rel-1-1): fixed CHARSET
+
+2003-01-05 00:50  demond
+
+	* ircd-hybrid-7-bg/modules/core/m_message.c (1.3): silence compiler
+	warning
+
+2003-01-05 00:20  demond
+
+	* ircd-hybrid-7-bg/: include/ircd.h (1.2, rel-1-3, rel-1-2, intm1,
+	rel-1-1), include/numeric.h (1.2, intm1, rel-1-1), include/serno.h
+	(1.2), messages/ayb.po (1.2), messages/custom.po (1.2),
+	modules/m_conf.c (1.2, rel-1-1), modules/m_info.c (1.2, rel-1-2,
+	intm1, rel-1-1), modules/m_svshint.c (1.2, rel-1-1),
+	modules/m_users.c (1.2, rel-1-2, intm1, rel-1-1), modules/m_watch.c
+	(1.2, rel-1-2, intm1, rel-1-1), modules/core/m_message.c (1.2),
+	src/client.c (1.2, rel-1-1), src/messages.tab (1.2, intm1,
+	rel-1-1), src/s_conf.c (1.2), src/s_user.c (1.2): numerous bug
+	fixes, +g exempt for services, current/max identified users
+	indication
+
+2002-12-30 23:07  demond
+
+	* ircd-hybrid-7-bg/: .cvsignore (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), .indent.pro (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	BUGS (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), ChangeLog
+	(1.1.1.1), Hybrid-team (1.1.1.1, intm1, rel-1-1), INSTALL (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), LICENSE (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), Makefile.in (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), README.FIRST (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), README.PLATFORMS (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), README.VMS (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	RELNOTES (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), TODO
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), clean.com (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), configure (1.1.1.1, intm1,
+	rel-1-1), make.com (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/.cvsignore (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/COPYING (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/GPL-vs-LGPL (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/Makefile.in (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/README (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/README.ircd (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/adns.h (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/check.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/descrip.mms (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/dlist.h (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/event.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/general.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/internal.h (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/parse.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/query.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/reply.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/setup.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/transmit.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/tvarith.h (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	adns/types.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	autoconf/acconfig.h (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	autoconf/configure.in (1.1.1.1, intm1, rel-1-1),
+	autoconf/install-sh (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	contrib/.cvsignore (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	contrib/Makefile.in (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	contrib/README (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	contrib/README.disable_identd (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), contrib/disable_identd.diff (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), contrib/example_module.c (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), contrib/m_clearchan.c (1.1.1.1, rel-1-2,
+	intm1, rel-1-1), contrib/m_flags.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), contrib/m_force.c (1.1.1.1, rel-1-2, intm1,
+	rel-1-1), contrib/m_jupe.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), contrib/m_ltrace.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	contrib/m_map.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	contrib/m_mkpasswd.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	contrib/m_ojoin.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	contrib/m_operspy.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	contrib/m_opme.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	contrib/m_tburst.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	contrib/m_whois.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	contrib/spy_admin_notice.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), contrib/spy_info_notice.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), contrib/spy_links_notice.c (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), contrib/spy_motd_notice.c (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), contrib/spy_stats_notice.c
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	contrib/spy_stats_p_notice.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), contrib/spy_trace_notice.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), contrib/spy_whois_notice.c (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), doc/.cvsignore (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), doc/CIDR.txt (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), doc/LazyLinks.txt (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), doc/Makefile.in (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), doc/README.cidr_bans (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), doc/Tao-of-IRC.940110 (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), doc/challenge.txt (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), doc/convertconf-example.conf (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), doc/dline.conf (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), doc/example.conf (1.1.1.1, intm1, rel-1-1),
+	doc/example.efnet.conf (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/guidelines.txt (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/index.txt (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/ircd.8 (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/ircd.motd (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/kline.conf (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/kline.txt (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/messages.txt (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/modeg.txt (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/modes.txt (1.1.1.1, rel-1-2, intm1, rel-1-1), doc/operguide.txt
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), doc/opermyth.txt
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), doc/resv.txt (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), doc/server-version-info
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), doc/serverhide.txt
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), doc/simple.conf
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), doc/vchans.txt
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), doc/whats-new.txt
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), doc/old/Authors
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), doc/old/Etiquette
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), doc/old/README
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/old/example.conf.trillian (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), doc/old/example_old.conf (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), doc/old/ircd.8 (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), doc/old/simple.conf (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), doc/old/US-Admin/Networking (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), doc/old/US-Admin/Operators (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), doc/old/US-Admin/README (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/technical/Persistent_Clients.txt (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), doc/technical/README.TSora (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), doc/technical/README.openssl (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), doc/technical/cryptlink.txt
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/technical/debug_api.txt (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), doc/technical/event.txt (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), doc/technical/fd-management.txt (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), doc/technical/file-management.txt
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/technical/hostmask.txt (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), doc/technical/iauth.txt (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), doc/technical/index.txt (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), doc/technical/linebuf.txt (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1),
+	doc/technical/message-customisation.txt (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), doc/technical/network.txt (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), doc/technical/rfc1459.txt (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), doc/technical/send.txt (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), doc/technical/ts5.txt (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), doc/technical/whats-new-code.txt
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/.cvsignore
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/Makefile.in
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/accept
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/admin
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/away
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/capab
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/cburst
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/challenge
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/cjoin
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/client
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/close
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/cmode
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/connect
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/credits
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/cryptlink
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/die
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/dline
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/dmem
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/drop
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/eob
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/error
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/gline
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/help
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/index
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/info
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/invite
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/ison
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/join
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/kick
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/kill
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/kline
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/knock
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/knockll
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/links
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/list
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/lljoin
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/llnick
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/locops
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/lusers
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/modlist
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/modload
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/modrestart
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/modunload
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/motd
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/names
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/nburst
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/nick
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/notice
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/oper
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/operwall
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/part
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/pass
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/ping
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/pong
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/post
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/privmsg
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/quit
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/rehash
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/restart
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/resv
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/server
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/set
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/sjoin
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/squit
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/stats
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/svinfo
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/testline
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/time
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/topic
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/trace
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/uhelp
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/umode
+	(1.1.1.1, rel-1-2, intm1, rel-1-1), help/opers/undline (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/ungline (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/unkline (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/unresv (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/user (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/userhost (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/users (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/version (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/wallops (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/who (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/whois (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/opers/whowas (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/users/index (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/users/info (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/users/notice (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/users/privmsg (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/users/stats (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), help/users/umode (1.1.1.1,
+	rel-1-2, intm1, rel-1-1), iauth/.cvsignore (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), iauth/Makefile.in (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), iauth/include/auth.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), iauth/include/class.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), iauth/include/commands.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), iauth/include/conf.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), iauth/include/iauth.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), iauth/include/log.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), iauth/include/match.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), iauth/include/misc.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), iauth/include/mtree.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), iauth/include/res.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), iauth/include/setup.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), iauth/include/sock.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), iauth/source/.cvsignore
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), iauth/source/.depend
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	iauth/source/Makefile.in (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), iauth/source/auth.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), iauth/source/class.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), iauth/source/commands.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), iauth/source/conf.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), iauth/source/iauth.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), iauth/source/log.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), iauth/source/match.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), iauth/source/misc.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), iauth/source/mtree.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), iauth/source/res.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), iauth/source/sock.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), include/.cvsignore (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), include/Makefile.in (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), include/balloc.h (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), include/channel.h (1.1.1.1, rel-1-2, intm1,
+	rel-1-1), include/channel_mode.h (1.1.1.1, rel-1-2, intm1,
+	rel-1-1), include/class.h (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), include/client.h (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	include/common.h (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	include/config.h (1.1.1.1, intm1, rel-1-1), include/config.h.dist
+	(1.1.1.1, rel-1-2, intm1, rel-1-1), include/defaults.h (1.1.1.1,
+	rel-1-2, intm1, rel-1-1), include/event.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), include/fdlist.h (1.1.1.1, intm1,
+	rel-1-1), include/fileio.h (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), include/handlers.h (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), include/hash.h (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	include/hook.h (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	include/hostmask.h (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	include/irc_string.h (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	include/ircd.h (1.1.1.1), include/ircd_defs.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), include/ircd_getopt.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), include/ircd_handler.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), include/ircd_signal.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), include/ircdauth.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), include/linebuf.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), include/list.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), include/listener.h (1.1.1.1, intm1,
+	rel-1-1), include/m_info.h (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), include/m_kline.h (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), include/md5.h (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), include/memory.h (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), include/modules.h (1.1.1.1), include/motd.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), include/msg.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), include/numeric.h (1.1.1.1),
+	include/packet.h (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	include/parse.h (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	include/patchlevel.h (1.1.1.1), include/res.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), include/restart.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), include/resv.h (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), include/rsa.h (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), include/s_auth.h (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), include/s_bsd.h (1.1.1.1, intm1, rel-1-1),
+	include/s_conf.h (1.1.1.1, intm1, rel-1-1), include/s_debug.h
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), include/s_gline.h
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), include/s_log.h
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), include/s_misc.h
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), include/s_serv.h
+	(1.1.1.1, rel-1-2, intm1, rel-1-1), include/s_stats.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), include/s_user.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), include/s_zip.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), include/scache.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), include/send.h (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), include/serno.h (1.1.1.1),
+	include/setup.h.in (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	include/setup.h_vms (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	include/sprintf_irc.h (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	include/stdinc.h (1.1.1.1), include/supported.h (1.1.1.1, rel-1-2,
+	intm1, rel-1-1), include/tools.h (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), include/vchannel.h (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), include/whowas.h (1.1.1.1), messages/.cvsignore (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), messages/Makefile.in (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), messages/ayb.po (1.1.1.1),
+	messages/build_one (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	messages/create_po (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	messages/custom.po (1.1.1.1), messages/translations/.cvsignore
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	messages/translations/Makefile.in (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), messages/translations/README (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), messages/translations/ircd-croatian.po
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	messages/translations/ircd-danish.po (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), messages/translations/ircd-dutch.po (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1),
+	messages/translations/ircd-german.po (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), messages/translations/ircd-norwegian.po (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1),
+	messages/translations/ircd-spanish.po (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), messages/translations/ircd-swedish.po (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), modules/.cvsignore (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), modules/.depend (1.1.1.1),
+	modules/Makefile.in (1.1.1.1), modules/descrip.mms (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), modules/m_accept.c (1.1.1.1,
+	rel-1-2, intm1, rel-1-1), modules/m_admin.c (1.1.1.1, rel-1-2,
+	intm1, rel-1-1), modules/m_away.c (1.1.1.1, rel-1-2, intm1,
+	rel-1-1), modules/m_capab.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), modules/m_cburst.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_challenge.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_cjoin.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_close.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_conf.c (1.1.1.1), modules/m_connect.c (1.1.1.1, rel-1-2,
+	intm1, rel-1-1), modules/m_cryptlink.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), modules/m_dmem.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), modules/m_drop.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), modules/m_eob.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), modules/m_gline.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), modules/m_help.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_info.c (1.1.1.1), modules/m_invite.c (1.1.1.1, rel-1-2,
+	intm1, rel-1-1), modules/m_ison.c (1.1.1.1, rel-1-2, intm1,
+	rel-1-1), modules/m_join.c (1.1.1.1), modules/m_kline.c (1.1.1.1,
+	rel-1-2, intm1, rel-1-1), modules/m_knock.c (1.1.1.1, rel-1-2,
+	intm1, rel-1-1), modules/m_links.c (1.1.1.1, rel-1-2, intm1,
+	rel-1-1), modules/m_list.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_lljoin.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_llnick.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_locops.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_lusers.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_motd.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_names.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_nburst.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	modules/m_oper.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_operwall.c (1.1.1.1), modules/m_pass.c (1.1.1.1, rel-1-2,
+	intm1, rel-1-1), modules/m_ping.c (1.1.1.1, rel-1-2, intm1,
+	rel-1-1), modules/m_pong.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_post.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	modules/m_rehash.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_restart.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_resv.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	modules/m_set.c (1.1.1.1), modules/m_stats.c (1.1.1.1, rel-1-2,
+	intm1, rel-1-1), modules/m_svinfo.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), modules/m_svshint.c (1.1.1.1), modules/m_svsnick.c
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), modules/m_testline.c
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), modules/m_time.c
+	(1.1.1.1, rel-1-2, intm1, rel-1-1), modules/m_topic.c (1.1.1.1),
+	modules/m_trace.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_unkline.c (1.1.1.1, intm1, rel-1-1), modules/m_user.c
+	(1.1.1.1, rel-1-2, intm1, rel-1-1), modules/m_userhost.c (1.1.1.1,
+	rel-1-2, intm1, rel-1-1), modules/m_users.c (1.1.1.1),
+	modules/m_version.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_wallops.c (1.1.1.1), modules/m_watch.c (1.1.1.1),
+	modules/m_who.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	modules/m_whois.c (1.1.1.1, intm1, rel-1-1), modules/m_whowas.c
+	(1.1.1.1, rel-1-1), servlink/.cvsignore (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), servlink/Makefile.in (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), servlink/README (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), servlink/TODO (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), servlink/control.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), servlink/control.h (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), servlink/descrip.mms (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), servlink/io.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), servlink/io.h (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), servlink/servlink.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), servlink/servlink.h (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), servlink/setup.h.in (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), src/.cvsignore (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), src/.depend (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/Makefile.in (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/adns.c (1.1.1.1, rel-1-2, intm1, rel-1-1), src/balloc.c
+	(1.1.1.1, intm1, rel-1-1), src/channel.c (1.1.1.1),
+	src/channel_mode.c (1.1.1.1, rel-1-2, intm1, rel-1-1), src/class.c
+	(1.1.1.1, rel-1-2, intm1, rel-1-1), src/client.c (1.1.1.1),
+	src/crypt.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/descrip.mms (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/dynlink.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/event.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/fdlist.c (1.1.1.1, intm1, rel-1-1), src/fileio.c (1.1.1.1,
+	intm1, rel-1-1), src/getopt.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), src/hash.c (1.1.1.1, rel-1-1), src/hook.c (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), src/hostmask.c (1.1.1.1,
+	rel-1-2, intm1, rel-1-1), src/irc_string.c (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), src/ircd.c (1.1.1.1), src/ircd_lexer.l
+	(1.1.1.1, intm1, rel-1-1), src/ircd_parser.y (1.1.1.1),
+	src/ircd_signal.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	src/ircdauth.c (1.1.1.1, rel-1-2, intm1, rel-1-1), src/kdparse.c
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), src/linebuf.c
+	(1.1.1.1, intm1, rel-1-1), src/list.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), src/listener.c (1.1.1.1, intm1, rel-1-1),
+	src/m_error.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/match.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), src/md5.c
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), src/memory.c (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), src/messages.tab (1.1.1.1),
+	src/modules.c (1.1.1.1), src/motd.c (1.1.1.1, rel-1-2, intm1,
+	rel-1-1), src/numeric.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	src/packet.c (1.1.1.1, intm1, rel-1-1), src/parse.c (1.1.1.1,
+	rel-1-2, intm1, rel-1-1), src/restart.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), src/resv.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	src/rsa.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), src/s_auth.c
+	(1.1.1.1, intm1, rel-1-1), src/s_bsd.c (1.1.1.1, intm1, rel-1-1),
+	src/s_bsd_devpoll.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/s_bsd_kqueue.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/s_bsd_poll.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/s_bsd_select.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/s_bsd_sigio.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/s_conf.c (1.1.1.1), src/s_debug.c (1.1.1.1, rel-1-2, intm1,
+	rel-1-1), src/s_gline.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), src/s_log.c (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/s_misc.c (1.1.1.1, intm1, rel-1-1), src/s_serv.c (1.1.1.1,
+	intm1, rel-1-1), src/s_stats.c (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), src/s_user.c (1.1.1.1), src/scache.c (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), src/send.c (1.1.1.1), src/snprintf.c
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), src/sprintf_irc.c
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1), src/tools.c (1.1.1.1,
+	intm1, rel-1-1), src/vchannel.c (1.1.1.1, rel-1-2, intm1, rel-1-1),
+	src/version.c.SH (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/version.com (1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	src/whowas.c (1.1.1.1, rel-1-1), tools/.cvsignore (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), tools/Makefile.in (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), tools/README (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), tools/README.mkpasswd (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), tools/convertconf.c (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), tools/convertilines.c (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), tools/convertklines.c (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), tools/descrip.mms (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), tools/encspeed.c (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), tools/mkkeypair (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), tools/mkpasswd.c (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), tools/untabify (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), tools/viconf.c (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), tools/rsa_respond/.cvsignore (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), tools/rsa_respond/Makefile
+	(1.1.1.1, rel-1-3, rel-1-2, intm1, rel-1-1),
+	tools/rsa_respond/README (1.1.1.1, rel-1-3, rel-1-2, intm1,
+	rel-1-1), tools/rsa_respond/respond.c (1.1.1.1, rel-1-3, rel-1-2,
+	intm1, rel-1-1), modules/core/descrip.mms (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), modules/core/m_die.c (1.1.1.1, rel-1-3,
+	rel-1-2, intm1, rel-1-1), modules/core/m_kick.c (1.1.1.1, rel-1-2,
+	intm1, rel-1-1), modules/core/m_kill.c (1.1.1.1, rel-1-2, intm1,
+	rel-1-1), modules/core/m_message.c (1.1.1.1), modules/core/m_mode.c
+	(1.1.1.1, rel-1-2, intm1, rel-1-1), modules/core/m_nick.c (1.1.1.1,
+	intm1, rel-1-1), modules/core/m_part.c (1.1.1.1, intm1, rel-1-1),
+	modules/core/m_quit.c (1.1.1.1), modules/core/m_server.c (1.1.1.1,
+	rel-1-3, rel-1-2, intm1, rel-1-1), modules/core/m_sjoin.c (1.1.1.1,
+	rel-1-2, intm1, rel-1-1), modules/core/m_squit.c (1.1.1.1, rel-1-2,
+	intm1, rel-1-1) (utags: rel-1-0): imported sources
+
+2002-12-30 23:07  demond
+
+	* ircd-hybrid-7-bg/: .cvsignore (1.1), .indent.pro (1.1), BUGS
+	(1.1), ChangeLog (1.1), Hybrid-team (1.1), INSTALL (1.1), LICENSE
+	(1.1), Makefile.in (1.1), README.FIRST (1.1), README.PLATFORMS
+	(1.1), README.VMS (1.1), RELNOTES (1.1), TODO (1.1), clean.com
+	(1.1), configure (1.1), make.com (1.1), adns/.cvsignore (1.1),
+	adns/COPYING (1.1), adns/GPL-vs-LGPL (1.1), adns/Makefile.in (1.1),
+	adns/README (1.1), adns/README.ircd (1.1), adns/adns.h (1.1),
+	adns/check.c (1.1), adns/descrip.mms (1.1), adns/dlist.h (1.1),
+	adns/event.c (1.1), adns/general.c (1.1), adns/internal.h (1.1),
+	adns/parse.c (1.1), adns/query.c (1.1), adns/reply.c (1.1),
+	adns/setup.c (1.1), adns/transmit.c (1.1), adns/tvarith.h (1.1),
+	adns/types.c (1.1), autoconf/acconfig.h (1.1),
+	autoconf/configure.in (1.1), autoconf/install-sh (1.1),
+	contrib/.cvsignore (1.1), contrib/Makefile.in (1.1), contrib/README
+	(1.1), contrib/README.disable_identd (1.1),
+	contrib/disable_identd.diff (1.1), contrib/example_module.c (1.1),
+	contrib/m_clearchan.c (1.1), contrib/m_flags.c (1.1),
+	contrib/m_force.c (1.1), contrib/m_jupe.c (1.1), contrib/m_ltrace.c
+	(1.1), contrib/m_map.c (1.1), contrib/m_mkpasswd.c (1.1),
+	contrib/m_ojoin.c (1.1), contrib/m_operspy.c (1.1),
+	contrib/m_opme.c (1.1), contrib/m_tburst.c (1.1), contrib/m_whois.c
+	(1.1), contrib/spy_admin_notice.c (1.1), contrib/spy_info_notice.c
+	(1.1), contrib/spy_links_notice.c (1.1), contrib/spy_motd_notice.c
+	(1.1), contrib/spy_stats_notice.c (1.1),
+	contrib/spy_stats_p_notice.c (1.1), contrib/spy_trace_notice.c
+	(1.1), contrib/spy_whois_notice.c (1.1), doc/.cvsignore (1.1),
+	doc/CIDR.txt (1.1), doc/LazyLinks.txt (1.1), doc/Makefile.in (1.1),
+	doc/README.cidr_bans (1.1), doc/Tao-of-IRC.940110 (1.1),
+	doc/challenge.txt (1.1), doc/convertconf-example.conf (1.1),
+	doc/dline.conf (1.1), doc/example.conf (1.1),
+	doc/example.efnet.conf (1.1), doc/guidelines.txt (1.1),
+	doc/index.txt (1.1), doc/ircd.8 (1.1), doc/ircd.motd (1.1),
+	doc/kline.conf (1.1), doc/kline.txt (1.1), doc/messages.txt (1.1),
+	doc/modeg.txt (1.1), doc/modes.txt (1.1), doc/operguide.txt (1.1),
+	doc/opermyth.txt (1.1), doc/resv.txt (1.1), doc/server-version-info
+	(1.1), doc/serverhide.txt (1.1), doc/simple.conf (1.1),
+	doc/vchans.txt (1.1), doc/whats-new.txt (1.1), doc/old/Authors
+	(1.1), doc/old/Etiquette (1.1), doc/old/README (1.1),
+	doc/old/example.conf.trillian (1.1), doc/old/example_old.conf
+	(1.1), doc/old/ircd.8 (1.1), doc/old/simple.conf (1.1),
+	doc/old/US-Admin/Networking (1.1), doc/old/US-Admin/Operators
+	(1.1), doc/old/US-Admin/README (1.1),
+	doc/technical/Persistent_Clients.txt (1.1),
+	doc/technical/README.TSora (1.1), doc/technical/README.openssl
+	(1.1), doc/technical/cryptlink.txt (1.1),
+	doc/technical/debug_api.txt (1.1), doc/technical/event.txt (1.1),
+	doc/technical/fd-management.txt (1.1),
+	doc/technical/file-management.txt (1.1), doc/technical/hostmask.txt
+	(1.1), doc/technical/iauth.txt (1.1), doc/technical/index.txt
+	(1.1), doc/technical/linebuf.txt (1.1),
+	doc/technical/message-customisation.txt (1.1),
+	doc/technical/network.txt (1.1), doc/technical/rfc1459.txt (1.1),
+	doc/technical/send.txt (1.1), doc/technical/ts5.txt (1.1),
+	doc/technical/whats-new-code.txt (1.1), help/.cvsignore (1.1),
+	help/Makefile.in (1.1), help/opers/accept (1.1), help/opers/admin
+	(1.1), help/opers/away (1.1), help/opers/capab (1.1),
+	help/opers/cburst (1.1), help/opers/challenge (1.1),
+	help/opers/cjoin (1.1), help/opers/client (1.1), help/opers/close
+	(1.1), help/opers/cmode (1.1), help/opers/connect (1.1),
+	help/opers/credits (1.1), help/opers/cryptlink (1.1),
+	help/opers/die (1.1), help/opers/dline (1.1), help/opers/dmem
+	(1.1), help/opers/drop (1.1), help/opers/eob (1.1),
+	help/opers/error (1.1), help/opers/gline (1.1), help/opers/help
+	(1.1), help/opers/index (1.1), help/opers/info (1.1),
+	help/opers/invite (1.1), help/opers/ison (1.1), help/opers/join
+	(1.1), help/opers/kick (1.1), help/opers/kill (1.1),
+	help/opers/kline (1.1), help/opers/knock (1.1), help/opers/knockll
+	(1.1), help/opers/links (1.1), help/opers/list (1.1),
+	help/opers/lljoin (1.1), help/opers/llnick (1.1), help/opers/locops
+	(1.1), help/opers/lusers (1.1), help/opers/modlist (1.1),
+	help/opers/modload (1.1), help/opers/modrestart (1.1),
+	help/opers/modunload (1.1), help/opers/motd (1.1), help/opers/names
+	(1.1), help/opers/nburst (1.1), help/opers/nick (1.1),
+	help/opers/notice (1.1), help/opers/oper (1.1), help/opers/operwall
+	(1.1), help/opers/part (1.1), help/opers/pass (1.1),
+	help/opers/ping (1.1), help/opers/pong (1.1), help/opers/post
+	(1.1), help/opers/privmsg (1.1), help/opers/quit (1.1),
+	help/opers/rehash (1.1), help/opers/restart (1.1), help/opers/resv
+	(1.1), help/opers/server (1.1), help/opers/set (1.1),
+	help/opers/sjoin (1.1), help/opers/squit (1.1), help/opers/stats
+	(1.1), help/opers/svinfo (1.1), help/opers/testline (1.1),
+	help/opers/time (1.1), help/opers/topic (1.1), help/opers/trace
+	(1.1), help/opers/uhelp (1.1), help/opers/umode (1.1),
+	help/opers/undline (1.1), help/opers/ungline (1.1),
+	help/opers/unkline (1.1), help/opers/unresv (1.1), help/opers/user
+	(1.1), help/opers/userhost (1.1), help/opers/users (1.1),
+	help/opers/version (1.1), help/opers/wallops (1.1), help/opers/who
+	(1.1), help/opers/whois (1.1), help/opers/whowas (1.1),
+	help/users/index (1.1), help/users/info (1.1), help/users/notice
+	(1.1), help/users/privmsg (1.1), help/users/stats (1.1),
+	help/users/umode (1.1), iauth/.cvsignore (1.1), iauth/Makefile.in
+	(1.1), iauth/include/auth.h (1.1), iauth/include/class.h (1.1),
+	iauth/include/commands.h (1.1), iauth/include/conf.h (1.1),
+	iauth/include/iauth.h (1.1), iauth/include/log.h (1.1),
+	iauth/include/match.h (1.1), iauth/include/misc.h (1.1),
+	iauth/include/mtree.h (1.1), iauth/include/res.h (1.1),
+	iauth/include/setup.h (1.1), iauth/include/sock.h (1.1),
+	iauth/source/.cvsignore (1.1), iauth/source/.depend (1.1),
+	iauth/source/Makefile.in (1.1), iauth/source/auth.c (1.1),
+	iauth/source/class.c (1.1), iauth/source/commands.c (1.1),
+	iauth/source/conf.c (1.1), iauth/source/iauth.c (1.1),
+	iauth/source/log.c (1.1), iauth/source/match.c (1.1),
+	iauth/source/misc.c (1.1), iauth/source/mtree.c (1.1),
+	iauth/source/res.c (1.1), iauth/source/sock.c (1.1),
+	include/.cvsignore (1.1), include/Makefile.in (1.1),
+	include/balloc.h (1.1), include/channel.h (1.1),
+	include/channel_mode.h (1.1), include/class.h (1.1),
+	include/client.h (1.1), include/common.h (1.1), include/config.h
+	(1.1), include/config.h.dist (1.1), include/defaults.h (1.1),
+	include/event.h (1.1), include/fdlist.h (1.1), include/fileio.h
+	(1.1), include/handlers.h (1.1), include/hash.h (1.1),
+	include/hook.h (1.1), include/hostmask.h (1.1),
+	include/irc_string.h (1.1), include/ircd.h (1.1),
+	include/ircd_defs.h (1.1), include/ircd_getopt.h (1.1),
+	include/ircd_handler.h (1.1), include/ircd_signal.h (1.1),
+	include/ircdauth.h (1.1), include/linebuf.h (1.1), include/list.h
+	(1.1), include/listener.h (1.1), include/m_info.h (1.1),
+	include/m_kline.h (1.1), include/md5.h (1.1), include/memory.h
+	(1.1), include/modules.h (1.1), include/motd.h (1.1), include/msg.h
+	(1.1), include/numeric.h (1.1), include/packet.h (1.1),
+	include/parse.h (1.1), include/patchlevel.h (1.1), include/res.h
+	(1.1), include/restart.h (1.1), include/resv.h (1.1), include/rsa.h
+	(1.1), include/s_auth.h (1.1), include/s_bsd.h (1.1),
+	include/s_conf.h (1.1), include/s_debug.h (1.1), include/s_gline.h
+	(1.1), include/s_log.h (1.1), include/s_misc.h (1.1),
+	include/s_serv.h (1.1), include/s_stats.h (1.1), include/s_user.h
+	(1.1), include/s_zip.h (1.1), include/scache.h (1.1),
+	include/send.h (1.1), include/serno.h (1.1), include/setup.h.in
+	(1.1), include/setup.h_vms (1.1), include/sprintf_irc.h (1.1),
+	include/stdinc.h (1.1), include/supported.h (1.1), include/tools.h
+	(1.1), include/vchannel.h (1.1), include/whowas.h (1.1),
+	messages/.cvsignore (1.1), messages/Makefile.in (1.1),
+	messages/ayb.po (1.1), messages/build_one (1.1), messages/create_po
+	(1.1), messages/custom.po (1.1), messages/translations/.cvsignore
+	(1.1), messages/translations/Makefile.in (1.1),
+	messages/translations/README (1.1),
+	messages/translations/ircd-croatian.po (1.1),
+	messages/translations/ircd-danish.po (1.1),
+	messages/translations/ircd-dutch.po (1.1),
+	messages/translations/ircd-german.po (1.1),
+	messages/translations/ircd-norwegian.po (1.1),
+	messages/translations/ircd-spanish.po (1.1),
+	messages/translations/ircd-swedish.po (1.1), modules/.cvsignore
+	(1.1), modules/.depend (1.1), modules/Makefile.in (1.1),
+	modules/descrip.mms (1.1), modules/m_accept.c (1.1),
+	modules/m_admin.c (1.1), modules/m_away.c (1.1), modules/m_capab.c
+	(1.1), modules/m_cburst.c (1.1), modules/m_challenge.c (1.1),
+	modules/m_cjoin.c (1.1), modules/m_close.c (1.1), modules/m_conf.c
+	(1.1), modules/m_connect.c (1.1), modules/m_cryptlink.c (1.1),
+	modules/m_dmem.c (1.1), modules/m_drop.c (1.1), modules/m_eob.c
+	(1.1), modules/m_gline.c (1.1), modules/m_help.c (1.1),
+	modules/m_info.c (1.1), modules/m_invite.c (1.1), modules/m_ison.c
+	(1.1), modules/m_join.c (1.1), modules/m_kline.c (1.1),
+	modules/m_knock.c (1.1), modules/m_links.c (1.1), modules/m_list.c
+	(1.1), modules/m_lljoin.c (1.1), modules/m_llnick.c (1.1),
+	modules/m_locops.c (1.1), modules/m_lusers.c (1.1),
+	modules/m_motd.c (1.1), modules/m_names.c (1.1), modules/m_nburst.c
+	(1.1), modules/m_oper.c (1.1), modules/m_operwall.c (1.1),
+	modules/m_pass.c (1.1), modules/m_ping.c (1.1), modules/m_pong.c
+	(1.1), modules/m_post.c (1.1), modules/m_rehash.c (1.1),
+	modules/m_restart.c (1.1), modules/m_resv.c (1.1), modules/m_set.c
+	(1.1), modules/m_stats.c (1.1), modules/m_svinfo.c (1.1),
+	modules/m_svshint.c (1.1), modules/m_svsnick.c (1.1),
+	modules/m_testline.c (1.1), modules/m_time.c (1.1),
+	modules/m_topic.c (1.1), modules/m_trace.c (1.1),
+	modules/m_unkline.c (1.1), modules/m_user.c (1.1),
+	modules/m_userhost.c (1.1), modules/m_users.c (1.1),
+	modules/m_version.c (1.1), modules/m_wallops.c (1.1),
+	modules/m_watch.c (1.1), modules/m_who.c (1.1), modules/m_whois.c
+	(1.1), modules/m_whowas.c (1.1), servlink/.cvsignore (1.1),
+	servlink/Makefile.in (1.1), servlink/README (1.1), servlink/TODO
+	(1.1), servlink/control.c (1.1), servlink/control.h (1.1),
+	servlink/descrip.mms (1.1), servlink/io.c (1.1), servlink/io.h
+	(1.1), servlink/servlink.c (1.1), servlink/servlink.h (1.1),
+	servlink/setup.h.in (1.1), src/.cvsignore (1.1), src/.depend (1.1),
+	src/Makefile.in (1.1), src/adns.c (1.1), src/balloc.c (1.1),
+	src/channel.c (1.1), src/channel_mode.c (1.1), src/class.c (1.1),
+	src/client.c (1.1), src/crypt.c (1.1), src/descrip.mms (1.1),
+	src/dynlink.c (1.1), src/event.c (1.1), src/fdlist.c (1.1),
+	src/fileio.c (1.1), src/getopt.c (1.1), src/hash.c (1.1),
+	src/hook.c (1.1), src/hostmask.c (1.1), src/irc_string.c (1.1),
+	src/ircd.c (1.1), src/ircd_lexer.l (1.1), src/ircd_parser.y (1.1),
+	src/ircd_signal.c (1.1), src/ircdauth.c (1.1), src/kdparse.c (1.1),
+	src/linebuf.c (1.1), src/list.c (1.1), src/listener.c (1.1),
+	src/m_error.c (1.1), src/match.c (1.1), src/md5.c (1.1),
+	src/memory.c (1.1), src/messages.tab (1.1), src/modules.c (1.1),
+	src/motd.c (1.1), src/numeric.c (1.1), src/packet.c (1.1),
+	src/parse.c (1.1), src/restart.c (1.1), src/resv.c (1.1), src/rsa.c
+	(1.1), src/s_auth.c (1.1), src/s_bsd.c (1.1), src/s_bsd_devpoll.c
+	(1.1), src/s_bsd_kqueue.c (1.1), src/s_bsd_poll.c (1.1),
+	src/s_bsd_select.c (1.1), src/s_bsd_sigio.c (1.1), src/s_conf.c
+	(1.1), src/s_debug.c (1.1), src/s_gline.c (1.1), src/s_log.c (1.1),
+	src/s_misc.c (1.1), src/s_serv.c (1.1), src/s_stats.c (1.1),
+	src/s_user.c (1.1), src/scache.c (1.1), src/send.c (1.1),
+	src/snprintf.c (1.1), src/sprintf_irc.c (1.1), src/tools.c (1.1),
+	src/vchannel.c (1.1), src/version.c.SH (1.1), src/version.com
+	(1.1), src/whowas.c (1.1), tools/.cvsignore (1.1),
+	tools/Makefile.in (1.1), tools/README (1.1), tools/README.mkpasswd
+	(1.1), tools/convertconf.c (1.1), tools/convertilines.c (1.1),
+	tools/convertklines.c (1.1), tools/descrip.mms (1.1),
+	tools/encspeed.c (1.1), tools/mkkeypair (1.1), tools/mkpasswd.c
+	(1.1), tools/untabify (1.1), tools/viconf.c (1.1),
+	tools/rsa_respond/.cvsignore (1.1), tools/rsa_respond/Makefile
+	(1.1), tools/rsa_respond/README (1.1), tools/rsa_respond/respond.c
+	(1.1), modules/core/descrip.mms (1.1), modules/core/m_die.c (1.1),
+	modules/core/m_kick.c (1.1), modules/core/m_kill.c (1.1),
+	modules/core/m_message.c (1.1), modules/core/m_mode.c (1.1),
+	modules/core/m_nick.c (1.1), modules/core/m_part.c (1.1),
+	modules/core/m_quit.c (1.1), modules/core/m_server.c (1.1),
+	modules/core/m_sjoin.c (1.1), modules/core/m_squit.c (1.1): Initial
+	revision
+
 lusky       2002/10/31 00:31:38 EST	(20021031_2)
 
   Modified files:
@@ -32944,4 +33969,4 @@
 * Restarted changelog
 -Rodder
 
-$Id: ChangeLog,v 7.4094 2002/10/31 05:31:41 lusky Exp $
+$Id: ChangeLog,v 1.19 2003/05/25 01:41:11 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/Hybrid-team ircd-hybrid-7-bg/Hybrid-team
--- ircd-hybrid-7rc5/Hybrid-team	Tue Oct 29 17:53:09 2002
+++ ircd-hybrid-7-bg/Hybrid-team	Sun Feb  2 02:37:29 2003
@@ -1,17 +1,17 @@
-$Id: Hybrid-team,v 7.53 2002/10/29 22:53:09 wiz Exp $
-
+$Id: Hybrid-team,v 1.2 2003/02/02 07:37:29 demond Exp $
+   
 The hybrid team is a group of ircd coders who were frustrated
 with the instability and all-out "dirtiness" of the EFnet ircd's
 available. "hybrid" is the name for the collective efforts of a group
 of people, all of us.
- 
+   
 Anyone is welcome to contribute to this effort.  You are encouraged
 to participate in the Hybrid mailing list.  To subscribe to the
 Hybrid List, send email to listmanager@the-project.org with the
 subject "subscribe hybrid".
- 
+   
 The core team as, of this major release:
- 
+   
 A1kmm, Andrew Miller <a1kmm@mware.virtualave.net>
 adrian, Adrian Chadd <adrian@creative.net.au>
 AndroSyn, Aaron Sethman <androsyn@ratbox.org>
@@ -31,10 +31,10 @@
 wiz, Jason Dambrosio <jason@wiz.cx>
 Wohali, Joan Touzet <joant@ieee.org>
 xyst, Greg Prosser <gnp@arrogant.org>
- 
+   
 The following people have contributed blood, sweat, and/or code to
 this release of hybrid, in nick alphabetical order:
- 
+   
 adx, Piotr Nizynski <adx@crashnet.pl>
 bysin, Ben Kittridge <bkittridge@cfl.rr.com>
 desrt, Ryan Lortie <desertangel@mindless.com>
@@ -50,10 +50,14 @@
 vulture, Sean Stanek <vulture@cs.iastate.edu>
 vx0, Mark Miller <mark@vx0.net>
 zb^3, Alfred Perlstein <alfred@freebsd.org>
- 
+   
 Others are welcome.  Always.  And if we left anyone off the above list,
 be sure to let us know that too.  Many others have contributed to
 previous versions of this ircd and it's ancestors, too many to list
 here.
- 
+   
 Send bug fixes/complaints/rotten tomatoes to ircd-hybrid@the-project.org.
+   
+This particular hybrid7 version was developed by demond <demond@gmx.net>
+and is dedicated to BulgariaNet's PR girl ylith, sweet and compassionate.
+   
diff -uNrd -x CVS ircd-hybrid-7rc5/INSTALL ircd-hybrid-7-bg/INSTALL
--- ircd-hybrid-7rc5/INSTALL	Thu Sep 19 12:14:30 2002
+++ ircd-hybrid-7-bg/INSTALL	Mon Dec 30 23:07:23 2002
@@ -1,6 +1,6 @@
                             Hybrid INSTALL Document
 
-   $Id: INSTALL,v 7.31 2002/09/19 16:14:30 bill Exp $
+   $Id: INSTALL,v 1.1.1.1 2002/12/31 04:07:23 demond Exp $
 
    Copyright (c) 2001 by ircd-hybrid team
 
diff -uNrd -x CVS ircd-hybrid-7rc5/LICENSE ircd-hybrid-7-bg/LICENSE
--- ircd-hybrid-7rc5/LICENSE	Sat Jan  5 04:14:20 2002
+++ ircd-hybrid-7-bg/LICENSE	Mon Dec 30 23:07:23 2002
@@ -1,4 +1,4 @@
-# $Id: LICENSE,v 7.3 2002/01/05 09:14:20 a1kmm Exp $
+# $Id: LICENSE,v 1.1.1.1 2002/12/31 04:07:23 demond Exp $
 		    GNU GENERAL PUBLIC LICENSE
 		       Version 2, June 1991
 
diff -uNrd -x CVS ircd-hybrid-7rc5/Makefile.in ircd-hybrid-7-bg/Makefile.in
--- ircd-hybrid-7rc5/Makefile.in	Sun Jan 13 13:31:43 2002
+++ ircd-hybrid-7-bg/Makefile.in	Mon Dec 30 23:07:23 2002
@@ -16,7 +16,7 @@
 #*   along with this program; if not, write to the Free Software
 #*   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 #*
-#*   $Id: Makefile.in,v 7.38 2002/01/13 18:31:43 wcampbel Exp $
+#*   $Id: Makefile.in,v 1.1.1.1 2002/12/31 04:07:23 demond Exp $
 #*/
 
 RM=@RM@
diff -uNrd -x CVS ircd-hybrid-7rc5/README.FIRST ircd-hybrid-7-bg/README.FIRST
--- ircd-hybrid-7rc5/README.FIRST	Sat Apr 27 20:26:01 2002
+++ ircd-hybrid-7-bg/README.FIRST	Mon Dec 30 23:07:23 2002
@@ -112,4 +112,4 @@
 - Other files recommended for reading: BUGS, INSTALL
 
 --------------------------------------------------------------------------------
-$Id: README.FIRST,v 7.33 2002/04/28 00:26:01 leeh Exp $
+$Id: README.FIRST,v 1.1.1.1 2002/12/31 04:07:23 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/README.PLATFORMS ircd-hybrid-7-bg/README.PLATFORMS
--- ircd-hybrid-7rc5/README.PLATFORMS	Tue Jun 18 15:15:59 2002
+++ ircd-hybrid-7-bg/README.PLATFORMS	Mon Dec 30 23:07:24 2002
@@ -33,4 +33,4 @@
 SPARC        NeXTGCC          NEXTSTEP      Juli Mallett <jmallett@FreeBSD.org>
 m68k         NeXTGCC          NEXTSTEP      Juli Mallett <jmallett@FreeBSD.org>
 
-$Id: README.PLATFORMS,v 7.14 2002/06/18 19:15:59 leeh Exp $
+$Id: README.PLATFORMS,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/README.VMS ircd-hybrid-7-bg/README.VMS
--- ircd-hybrid-7rc5/README.VMS	Tue Feb  5 16:33:54 2002
+++ ircd-hybrid-7-bg/README.VMS	Mon Dec 30 23:07:24 2002
@@ -44,4 +44,4 @@
 binary distributions are available on the FTP site.
 (actually, they aren't yet, but at some time in the future they should be)
 
-$Id: README.VMS,v 1.11 2002/02/05 21:33:54 ejb Exp $
+$Id: README.VMS,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/RELNOTES ircd-hybrid-7-bg/RELNOTES
--- ircd-hybrid-7rc5/RELNOTES	Thu Oct 31 00:30:36 2002
+++ ircd-hybrid-7-bg/RELNOTES	Mon Dec 30 23:07:24 2002
@@ -108,4 +108,4 @@
 Other files recommended for reading: BUGS, README.FIRST, INSTALL
 
 --------------------------------------------------------------------------------
-$Id: RELNOTES,v 1.44 2002/10/31 05:30:36 db Exp $
+$Id: RELNOTES,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/TODO ircd-hybrid-7-bg/TODO
--- ircd-hybrid-7rc5/TODO	Wed Aug 21 01:58:03 2002
+++ ircd-hybrid-7-bg/TODO	Mon Dec 30 23:07:24 2002
@@ -1,4 +1,4 @@
-$Id: TODO,v 7.74 2002/08/21 05:58:03 lusky Exp $
+$Id: TODO,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 - add more stderr debugging (ircd -s)... one for every place we syslog()
 - ircd -s doesn't work through a restart
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/Makefile.in ircd-hybrid-7-bg/adns/Makefile.in
--- ircd-hybrid-7rc5/adns/Makefile.in	Fri May 24 19:34:01 2002
+++ ircd-hybrid-7-bg/adns/Makefile.in	Mon Dec 30 23:07:24 2002
@@ -1,7 +1,7 @@
 #
 # Makefile.in for ircd/src
 #
-# $Id: Makefile.in,v 1.13 2002/05/24 23:34:01 androsyn Exp $
+# $Id: Makefile.in,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 #
 CC		= @CC@
 INSTALL		= @INSTALL@
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/adns.h ircd-hybrid-7-bg/adns/adns.h
--- ircd-hybrid-7rc5/adns/adns.h	Tue Oct 29 21:56:16 2002
+++ ircd-hybrid-7-bg/adns/adns.h	Mon Dec 30 23:07:24 2002
@@ -51,7 +51,7 @@
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  *
- *  $Id: adns.h,v 1.8 2002/10/30 02:56:16 androsyn Exp $
+ *  $Id: adns.h,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #ifndef ADNS_H_INCLUDED
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/check.c ircd-hybrid-7-bg/adns/check.c
--- ircd-hybrid-7rc5/adns/check.c	Fri May 24 19:34:01 2002
+++ ircd-hybrid-7-bg/adns/check.c	Mon Dec 30 23:07:24 2002
@@ -24,7 +24,7 @@
  *  along with this program; if not, write to the Free Software Foundation,
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
  *
- * $Id: check.c,v 1.6 2002/05/24 23:34:01 androsyn Exp $
+ * $Id: check.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/descrip.mms ircd-hybrid-7-bg/adns/descrip.mms
--- ircd-hybrid-7rc5/adns/descrip.mms	Mon Feb  4 16:07:44 2002
+++ ircd-hybrid-7-bg/adns/descrip.mms	Mon Dec 30 23:07:24 2002
@@ -8,7 +8,7 @@
 # $ COPY [.include]setup.h_vms [.include]setup.h
 # $ MMS IRCD.EXE
 #
-# $Id: descrip.mms,v 1.2 2002/02/04 21:07:44 ejb Exp $
+# $Id: descrip.mms,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 CC=	CC
 CFLAGS=	/INCLUDE_DIRECTORY=([-.INCLUDE],[])/STANDARD=ISOC94
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/dlist.h ircd-hybrid-7-bg/adns/dlist.h
--- ircd-hybrid-7rc5/adns/dlist.h	Fri Jan  4 00:02:21 2002
+++ ircd-hybrid-7-bg/adns/dlist.h	Mon Dec 30 23:07:24 2002
@@ -24,7 +24,7 @@
  *  along with this program; if not, write to the Free Software Foundation,
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
  *
- * $Id: dlist.h,v 1.5 2002/01/04 05:02:21 db Exp $
+ * $Id: dlist.h,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #ifndef ADNS_DLIST_H_INCLUDED
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/event.c ircd-hybrid-7-bg/adns/event.c
--- ircd-hybrid-7rc5/adns/event.c	Mon Jun  3 15:24:12 2002
+++ ircd-hybrid-7-bg/adns/event.c	Mon Dec 30 23:07:24 2002
@@ -26,7 +26,7 @@
  *  along with this program; if not, write to the Free Software Foundation,
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
  *
- * $Id: event.c,v 1.17 2002/06/03 19:24:12 androsyn Exp $
+ * $Id: event.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/general.c ircd-hybrid-7-bg/adns/general.c
--- ircd-hybrid-7rc5/adns/general.c	Fri May 24 19:34:01 2002
+++ ircd-hybrid-7-bg/adns/general.c	Mon Dec 30 23:07:24 2002
@@ -25,7 +25,7 @@
  *  along with this program; if not, write to the Free Software Foundation,
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
  *
- * $Id: general.c,v 1.11 2002/05/24 23:34:01 androsyn Exp $
+ * $Id: general.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/internal.h ircd-hybrid-7-bg/adns/internal.h
--- ircd-hybrid-7rc5/adns/internal.h	Tue Oct 29 21:56:16 2002
+++ ircd-hybrid-7-bg/adns/internal.h	Mon Dec 30 23:07:24 2002
@@ -26,7 +26,7 @@
  *  along with this program; if not, write to the Free Software Foundation,
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
- * $Id: internal.h,v 1.11 2002/10/30 02:56:16 androsyn Exp $
+ * $Id: internal.h,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #ifndef ADNS_INTERNAL_H_INCLUDED
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/parse.c ircd-hybrid-7-bg/adns/parse.c
--- ircd-hybrid-7rc5/adns/parse.c	Fri May 24 19:34:01 2002
+++ ircd-hybrid-7-bg/adns/parse.c	Mon Dec 30 23:07:24 2002
@@ -24,7 +24,7 @@
  *  along with this program; if not, write to the Free Software Foundation,
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
  *
- * $Id: parse.c,v 1.5 2002/05/24 23:34:01 androsyn Exp $
+ * $Id: parse.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/query.c ircd-hybrid-7-bg/adns/query.c
--- ircd-hybrid-7rc5/adns/query.c	Tue Oct 29 21:56:17 2002
+++ ircd-hybrid-7-bg/adns/query.c	Mon Dec 30 23:07:24 2002
@@ -26,7 +26,7 @@
  *  along with this program; if not, write to the Free Software Foundation,
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
  *
- * $Id: query.c,v 1.14 2002/10/30 02:56:17 androsyn Exp $
+ * $Id: query.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/reply.c ircd-hybrid-7-bg/adns/reply.c
--- ircd-hybrid-7rc5/adns/reply.c	Fri May 24 19:34:01 2002
+++ ircd-hybrid-7-bg/adns/reply.c	Mon Dec 30 23:07:24 2002
@@ -24,7 +24,7 @@
  *  along with this program; if not, write to the Free Software Foundation,
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
  *
- * $Id: reply.c,v 1.8 2002/05/24 23:34:01 androsyn Exp $
+ * $Id: reply.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/setup.c ircd-hybrid-7-bg/adns/setup.c
--- ircd-hybrid-7rc5/adns/setup.c	Sat May 25 02:52:49 2002
+++ ircd-hybrid-7-bg/adns/setup.c	Mon Dec 30 23:07:24 2002
@@ -25,7 +25,7 @@
  *  along with this program; if not, write to the Free Software Foundation,
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
  *
- * $Id: setup.c,v 1.27 2002/05/25 06:52:49 androsyn Exp $
+ * $Id: setup.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/transmit.c ircd-hybrid-7-bg/adns/transmit.c
--- ircd-hybrid-7rc5/adns/transmit.c	Sat Jun  1 01:28:03 2002
+++ ircd-hybrid-7-bg/adns/transmit.c	Mon Dec 30 23:07:24 2002
@@ -25,7 +25,7 @@
  *  along with this program; if not, write to the Free Software Foundation,
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
  *
- * $Id: transmit.c,v 1.11 2002/06/01 05:28:03 androsyn Exp $
+ * $Id: transmit.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/tvarith.h ircd-hybrid-7-bg/adns/tvarith.h
--- ircd-hybrid-7rc5/adns/tvarith.h	Fri Apr  6 05:30:37 2001
+++ ircd-hybrid-7-bg/adns/tvarith.h	Mon Dec 30 23:07:24 2002
@@ -24,7 +24,7 @@
  *  along with this program; if not, write to the Free Software Foundation,
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
- * $Id: tvarith.h,v 1.3 2001/04/06 09:30:37 a1kmm Exp $
+ * $Id: tvarith.h,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #ifndef ADNS_TVARITH_H_INCLUDED
diff -uNrd -x CVS ircd-hybrid-7rc5/adns/types.c ircd-hybrid-7-bg/adns/types.c
--- ircd-hybrid-7rc5/adns/types.c	Tue Oct 29 21:56:17 2002
+++ ircd-hybrid-7-bg/adns/types.c	Mon Dec 30 23:07:24 2002
@@ -24,7 +24,7 @@
  *  along with this program; if not, write to the Free Software Foundation,
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
  *
- * $Id: types.c,v 1.7 2002/10/30 02:56:17 androsyn Exp $
+ * $Id: types.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/autoconf/acconfig.h ircd-hybrid-7-bg/autoconf/acconfig.h
--- ircd-hybrid-7rc5/autoconf/acconfig.h	Thu Jul 11 20:43:17 2002
+++ ircd-hybrid-7-bg/autoconf/acconfig.h	Mon Dec 30 23:07:24 2002
@@ -1,5 +1,5 @@
 /*
- * $Id: acconfig.h,v 7.24 2002/07/12 00:43:17 androsyn Exp $
+ * $Id: acconfig.h,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 /* Define if you have the poll() system call.  */
diff -uNrd -x CVS ircd-hybrid-7rc5/autoconf/configure.in ircd-hybrid-7-bg/autoconf/configure.in
--- ircd-hybrid-7rc5/autoconf/configure.in	Wed Oct 30 16:31:21 2002
+++ ircd-hybrid-7-bg/autoconf/configure.in	Thu Jan 30 10:28:58 2003
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 7.148 2002/10/30 21:31:21 db Exp $
+dnl $Id: configure.in,v 1.2 2003/01/30 15:28:58 demond Exp $
 dnl Process this file with autoconf to produce a configure script.
 dnl AC_INIT(include/class.h) <- what is this ? -TimeMr14C
 
@@ -409,7 +409,7 @@
                 cf_openssl_ciphers="${cf_openssl_ciphers}DES/56 ")
         fi
         CPPFLAGS="$save_CPPFLAGS"
-        SSL_LIBS="$SSL_LIBS -lcrypto"
+        SSL_LIBS="$SSL_LIBS -lcrypto -lssl"
     else
         AC_MSG_RESULT(no - OpenSSL support disabled)
     fi
diff -uNrd -x CVS ircd-hybrid-7rc5/autoconf/install-sh ircd-hybrid-7-bg/autoconf/install-sh
--- ircd-hybrid-7rc5/autoconf/install-sh	Wed Aug 25 23:36:21 1999
+++ ircd-hybrid-7-bg/autoconf/install-sh	Mon Dec 30 23:07:24 2002
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $Id: install-sh,v 7.1 1999/08/26 03:36:21 lusky Exp $
+# $Id: install-sh,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 # install - install a program, script, or datafile
 # This comes from X11R5 (mit/util/scripts/install.sh).
 #
diff -uNrd -x CVS ircd-hybrid-7rc5/clean.com ircd-hybrid-7-bg/clean.com
--- ircd-hybrid-7rc5/clean.com	Tue Feb  5 22:37:52 2002
+++ ircd-hybrid-7-bg/clean.com	Mon Dec 30 23:07:24 2002
@@ -1,4 +1,4 @@
-$! $Id: clean.com,v 1.1 2002/02/06 03:37:52 ejb Exp $
+$! $Id: clean.com,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 $! yes, its a hack. this needs to be merged into make.com.
 $! (well, really, into a top-level descrip.mms.. one day).
 $
diff -uNrd -x CVS ircd-hybrid-7rc5/configure ircd-hybrid-7-bg/configure
--- ircd-hybrid-7rc5/configure	Wed Oct 30 16:31:18 2002
+++ ircd-hybrid-7-bg/configure	Thu Jan 30 10:28:57 2003
@@ -5840,7 +5840,7 @@
 
         fi
         CPPFLAGS="$save_CPPFLAGS"
-        SSL_LIBS="$SSL_LIBS -lcrypto"
+        SSL_LIBS="$SSL_LIBS -lcrypto -lssl"
     else
         echo "$as_me:$LINENO: result: no - OpenSSL support disabled" >&5
 echo "${ECHO_T}no - OpenSSL support disabled" >&6
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/Makefile.in ircd-hybrid-7-bg/contrib/Makefile.in
--- ircd-hybrid-7rc5/contrib/Makefile.in	Tue Sep  3 01:43:37 2002
+++ ircd-hybrid-7-bg/contrib/Makefile.in	Mon Dec 30 23:07:24 2002
@@ -1,7 +1,7 @@
 #
 # Makefile.in for ircd/contrib
 #
-# $Id: Makefile.in,v 1.35 2002/09/03 05:43:37 bill Exp $
+# $Id: Makefile.in,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 #
 CC		= @CC@
 RM		= @RM@
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/README ircd-hybrid-7-bg/contrib/README
--- ircd-hybrid-7rc5/contrib/README	Tue Sep 24 12:33:05 2002
+++ ircd-hybrid-7-bg/contrib/README	Mon Dec 30 23:07:24 2002
@@ -1,4 +1,4 @@
-$Id: README,v 1.24 2002/09/24 16:33:05 bill Exp $
+$Id: README,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 This directory contains modules and patches that have been contributed
 by other people, or aren't suitable for including into the 
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/README.disable_identd ircd-hybrid-7-bg/contrib/README.disable_identd
--- ircd-hybrid-7rc5/contrib/README.disable_identd	Sun Jul  7 20:10:32 2002
+++ ircd-hybrid-7-bg/contrib/README.disable_identd	Mon Dec 30 23:07:24 2002
@@ -1,4 +1,4 @@
-# $Id: README.disable_identd,v 1.1 2002/07/08 00:10:32 androsyn Exp $
+# $Id: README.disable_identd,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 #
 This diff adds a config option to the general {} block called disable_auth
 to hybrid 7.  To disable identd requests add something like this to your
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/example_module.c ircd-hybrid-7-bg/contrib/example_module.c
--- ircd-hybrid-7rc5/contrib/example_module.c	Fri May 24 19:48:33 2002
+++ ircd-hybrid-7-bg/contrib/example_module.c	Mon Dec 30 23:07:24 2002
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: example_module.c,v 1.6 2002/05/24 23:48:33 androsyn Exp $
+ *   $Id: example_module.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 /* List of ircd includes from ../include/ */
@@ -121,7 +121,7 @@
 
 /* When we last modified the file (shown in /modlist), this is usually:
  */
-const char *_version = "$Revision: 1.6 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 
 /*
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/m_clearchan.c ircd-hybrid-7-bg/contrib/m_clearchan.c
--- ircd-hybrid-7rc5/contrib/m_clearchan.c	Mon Jun 10 21:49:18 2002
+++ ircd-hybrid-7-bg/contrib/m_clearchan.c	Mon Mar 10 01:08:59 2003
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_clearchan.c,v 1.30 2002/06/11 01:49:18 androsyn Exp $
+ *   $Id: m_clearchan.c,v 1.2 2003/03/10 06:08:59 demond Exp $
  */
 #include "stdinc.h"
 #include "tools.h"
@@ -77,7 +77,7 @@
   mod_del_cmd(&clearchan_msgtab);
 }
 
-char *_version = "$Revision: 1.30 $";
+char *_version = "$Revision: 1.2 $";
 
 /*
 ** mo_clearchan
@@ -113,7 +113,7 @@
 
   if( chptr == NULL )
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
 		 me.name, parv[0], parv[1]);
       return;
     }
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/m_flags.c ircd-hybrid-7-bg/contrib/m_flags.c
--- ircd-hybrid-7rc5/contrib/m_flags.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7-bg/contrib/m_flags.c	Mon Dec 30 23:07:24 2002
@@ -27,7 +27,7 @@
  *  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  *  POSSIBILITY OF SUCH DAMAGE.
  *
- *  $Id: m_flags.c,v 1.9 2002/05/24 23:48:34 androsyn Exp $
+ *  $Id: m_flags.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 /* List of ircd includes from ../include/ */
@@ -77,7 +77,7 @@
   mod_del_cmd(&test_msgtab);
 }
 
-const char *_version = "$Revision: 1.9 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 
 /* FLAGS requires it's own mini parser, since the last parameter in it can
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/m_force.c ircd-hybrid-7-bg/contrib/m_force.c
--- ircd-hybrid-7rc5/contrib/m_force.c	Fri Oct 11 15:57:47 2002
+++ ircd-hybrid-7-bg/contrib/m_force.c	Mon Mar 10 01:08:59 2003
@@ -25,7 +25,7 @@
  *  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  *  POSSIBILITY OF SUCH DAMAGE.
  *
- * $Id: m_force.c,v 1.16 2002/10/11 19:57:47 db Exp $
+ * $Id: m_force.c,v 1.2 2003/03/10 06:08:59 demond Exp $
  */
 
 #include "stdinc.h"
@@ -78,7 +78,7 @@
   mod_del_cmd(&forcepart_msgtab);
 }
 
-char *_version = "$Revision: 1.16 $";
+char *_version = "$Revision: 1.2 $";
 #endif
 
 /*
@@ -108,7 +108,7 @@
    */
   if ((target_p = find_client(parv[1])) == NULL)
   {
-    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+    sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK), me.name,
 	       source_p->name, parv[1]);
     return;
   }
@@ -177,9 +177,9 @@
         
       if(chptr->topic != NULL)
       {
-	sendto_one(target_p, form_str(RPL_TOPIC), me.name,
+	sendto_one(target_p, form_str(target_p,RPL_TOPIC), me.name,
 	           target_p->name, chptr->chname, chptr->topic);
-        sendto_one(target_p, form_str(RPL_TOPICWHOTIME),
+        sendto_one(target_p, form_str(target_p,RPL_TOPICWHOTIME),
 	           me.name, source_p->name, chptr->chname,
 	           chptr->topic_info, chptr->topic_time);
       }
@@ -191,7 +191,7 @@
       newch = parv[2];
       if (!check_channel_name(newch))
       {
-        sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name,
+        sendto_one(source_p, form_str(source_p,ERR_BADCHANNAME), me.name,
 		   source_p->name, (unsigned char*)newch);
 	return;
       }
@@ -199,7 +199,7 @@
       /* channel name must begin with & or # */
       if (!IsChannelName(newch))
       {
-        sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name,
+        sendto_one(source_p, form_str(source_p,ERR_BADCHANNAME), me.name,
 		   source_p->name, (unsigned char*)newch);
         return;
       }
@@ -274,7 +274,7 @@
   /* if target_p == NULL then let the oper know */
   if ((target_p = find_client(parv[1])) == NULL)
   {
-    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+    sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK), me.name,
                source_p->name, parv[1]);
     return;
   }
@@ -287,14 +287,14 @@
 
   if((chptr = hash_find_channel(parv[2])) == NULL)
   {
-    sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+    sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
                me.name, parv[0], parv[1]);
     return;
   }
 
   if (!IsMember(target_p, chptr))
   {
-    sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL),
+    sendto_one(source_p, form_str(source_p,ERR_USERNOTINCHANNEL),
                me.name, parv[0], parv[2], parv[1]);
     return;
   }
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/m_jupe.c ircd-hybrid-7-bg/contrib/m_jupe.c
--- ircd-hybrid-7rc5/contrib/m_jupe.c	Thu Oct 17 13:06:32 2002
+++ ircd-hybrid-7-bg/contrib/m_jupe.c	Mon Dec 30 23:07:24 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_jupe.c,v 1.36 2002/10/17 17:06:32 bill Exp $
+ *  $Id: m_jupe.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #include "stdinc.h"
@@ -71,7 +71,7 @@
   mod_del_cmd(&jupe_msgtab);
 }
 
-const char *_version = "$Revision: 1.36 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 
 /*
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/m_ltrace.c ircd-hybrid-7-bg/contrib/m_ltrace.c
--- ircd-hybrid-7rc5/contrib/m_ltrace.c	Wed Jul 31 18:52:58 2002
+++ ircd-hybrid-7-bg/contrib/m_ltrace.c	Mon Mar 10 01:08:59 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_ltrace.c,v 1.4 2002/07/31 22:52:58 leeh Exp $
+ *  $Id: m_ltrace.c,v 1.2 2003/03/10 06:08:59 demond Exp $
  */
 
 #include "stdinc.h"
@@ -67,7 +67,7 @@
   mod_del_cmd(&ltrace_msgtab);
 }
 
-const char *_version = "$Revision: 1.4 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 
 static int report_this_status(struct Client *source_p, struct Client *target_p,int dow,
@@ -88,7 +88,7 @@
     tname = parv[1];
   else
     tname = me.name;
-  sendto_one(source_p, form_str(RPL_ENDOFTRACE), me.name, parv[0], tname);
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFTRACE), me.name, parv[0], tname);
 }
 
 /*
@@ -116,7 +116,7 @@
 
   if(!IsOper(source_p))
   {
-    sendto_one(source_p, form_str(RPL_ENDOFTRACE), me.name, parv[0], tname);
+    sendto_one(source_p, form_str(source_p,RPL_ENDOFTRACE), me.name, parv[0], tname);
     return;
   }
 
@@ -132,10 +132,10 @@
         
         ac2ptr = next_client_double(GlobalClientList, tname);
         if (ac2ptr)
-          sendto_one(source_p, form_str(RPL_TRACELINK), me.name, looking_for,
+          sendto_one(source_p, form_str(source_p,RPL_TRACELINK), me.name, looking_for,
                      ircd_version, debugmode, tname, ac2ptr->from->name);
         else
-          sendto_one(source_p, form_str(RPL_TRACELINK), me.name, looking_for,
+          sendto_one(source_p, form_str(source_p,RPL_TRACELINK), me.name, looking_for,
                      ircd_version, debugmode, tname, "ac2ptr_is_NULL!!");
         return;
       }
@@ -170,7 +170,7 @@
         class_name = get_client_class(target_p);
 
         if (IsOper(target_p))
-          sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
+          sendto_one(source_p, form_str(source_p,RPL_TRACEOPERATOR),
                      me.name, parv[0], class_name, name, 
 #ifndef HIDE_SPOOF_IPS
                      MyOper(source_p) ? ipaddr :
@@ -180,7 +180,7 @@
                      (target_p->user) ? (CurrentTime - target_p->user->last) : 0);
       }
       
-      sendto_one(source_p, form_str(RPL_ENDOFTRACE),me.name,
+      sendto_one(source_p, form_str(source_p,RPL_ENDOFTRACE),me.name,
                  parv[0], tname);
       return;
     }
@@ -238,7 +238,7 @@
                                link_s[target_p->localClient->fd]);
     }
 
-  sendto_one(source_p, form_str(RPL_ENDOFTRACE),me.name, parv[0],tname);
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFTRACE),me.name, parv[0],tname);
 }
 
 
@@ -268,14 +268,14 @@
   switch(target_p->status)
     {
     case STAT_CONNECTING:
-      sendto_one(source_p, form_str(RPL_TRACECONNECTING), me.name,
+      sendto_one(source_p, form_str(source_p,RPL_TRACECONNECTING), me.name,
                  source_p->name, class_name, 
 		 IsOperAdmin(source_p) ? name : target_p->name);
 		   
       break;
 
     case STAT_HANDSHAKE:
-      sendto_one(source_p, form_str(RPL_TRACEHANDSHAKE), me.name,
+      sendto_one(source_p, form_str(source_p,RPL_TRACEHANDSHAKE), me.name,
                  source_p->name, class_name, 
                  IsOperAdmin(source_p) ? name : target_p->name);
 		   
@@ -287,7 +287,7 @@
 
     case STAT_CLIENT:
       if (IsAdmin(target_p))
-	sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
+	sendto_one(source_p, form_str(source_p,RPL_TRACEOPERATOR),
                    me.name, source_p->name, class_name, name,
 #ifndef HIDE_SPOOF_IPS
                    IsOperAdmin(source_p) ? ip : 
@@ -297,7 +297,7 @@
                    (target_p->user) ? (CurrentTime - target_p->user->last) : 0);
 		       
       else if (IsOper(target_p))
-	sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
+	sendto_one(source_p, form_str(source_p,RPL_TRACEOPERATOR),
 		   me.name, source_p->name, class_name, name, 
 #ifndef HIDE_SPOOF_IPS
 		   MyOper(source_p) ? ip : 
@@ -311,7 +311,7 @@
       if(!IsOperAdmin(source_p))
         name = get_client_name(target_p, MASK_IP);
 
-      sendto_one(source_p, form_str(RPL_TRACESERVER),
+      sendto_one(source_p, form_str(source_p,RPL_TRACESERVER),
 		 me.name, source_p->name, class_name, link_s_p,
 		 link_u_p, name, *(target_p->serv->by) ?
 		 target_p->serv->by : "*", "*",
@@ -319,7 +319,7 @@
       break;
       
     default: /* ...we actually shouldn't come here... --msa */
-      sendto_one(source_p, form_str(RPL_TRACENEWTYPE), me.name,
+      sendto_one(source_p, form_str(source_p,RPL_TRACENEWTYPE), me.name,
 		 source_p->name, name);
       break;
     }
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/m_map.c ircd-hybrid-7-bg/contrib/m_map.c
--- ircd-hybrid-7rc5/contrib/m_map.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7-bg/contrib/m_map.c	Mon Mar 10 01:08:59 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_map.c,v 1.12 2002/05/24 23:48:34 androsyn Exp $
+ *  $Id: m_map.c,v 1.2 2003/03/10 06:08:59 demond Exp $
  */
 
 #include "stdinc.h"
@@ -54,7 +54,7 @@
   mod_del_cmd(&map_msgtab);
 }
 
-const char *_version = "$Revision: 1.12 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 
 static char buf[BUFSIZE];
@@ -68,7 +68,7 @@
   if (!ConfigServerHide.flatten_links)
   {
     dump_map(client_p,&me,buf);
-    sendto_one(client_p, form_str(RPL_MAPEND), me.name, client_p->name);
+    sendto_one(client_p, form_str(client_p,RPL_MAPEND), me.name, client_p->name);
     return;
   }
 
@@ -84,7 +84,7 @@
                     int parc, char *parv[])
 {
   dump_map(client_p,&me,buf);
-  sendto_one(client_p, form_str(RPL_MAPEND), me.name, client_p->name);
+  sendto_one(client_p, form_str(client_p,RPL_MAPEND), me.name, client_p->name);
 }
 
 /*
@@ -119,7 +119,7 @@
            " | Users: %5d (%4.1f%%)", users,
            100 * (float) users / (float) Count.total);
         
-  sendto_one(client_p, form_str(RPL_MAP),me.name,client_p->name,buf);
+  sendto_one(client_p, form_str(client_p,RPL_MAP),me.name,client_p->name,buf);
         
   if ((server_p = root_p->serv->servers))
   {
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/m_mkpasswd.c ircd-hybrid-7-bg/contrib/m_mkpasswd.c
--- ircd-hybrid-7rc5/contrib/m_mkpasswd.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7-bg/contrib/m_mkpasswd.c	Mon Mar 10 01:08:59 2003
@@ -6,7 +6,7 @@
  *
  *  You can use this code in any way as long as these names remain.
  *
- *  $Id: m_mkpasswd.c,v 1.9 2002/05/24 23:48:34 androsyn Exp $
+ *  $Id: m_mkpasswd.c,v 1.2 2003/03/10 06:08:59 demond Exp $
  */
 
 /* List of ircd includes from ../include/ */
@@ -56,7 +56,7 @@
   mod_del_cmd(&test_msgtab);
 }
 
-const char *_version = "$Revision: 1.9 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 
 static void m_mkpasswd(struct Client *client_p, struct Client *source_p,
@@ -68,7 +68,7 @@
   if ((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
     {
       /* safe enough to give this on a local connect only */
-      sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,parv[0]);
+      sendto_one(source_p,form_str(source_p,RPL_LOAD2HI),me.name,parv[0]);
       return;
     }
   else
@@ -97,7 +97,7 @@
   }
 
   if(parc == 1)
-    sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+    sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                me.name, parv[0], "MKPASSWD");
   else
     sendto_one(source_p, ":%s NOTICE %s :Encryption for [%s]:  %s",
@@ -136,7 +136,7 @@
   }
 
   if (parc == 1)
-    sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+    sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                me.name, parv[0], "MKPASSWD");
   else
     sendto_one(source_p, ":%s NOTICE %s :Encryption for [%s]:  %s",
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/m_ojoin.c ircd-hybrid-7-bg/contrib/m_ojoin.c
--- ircd-hybrid-7rc5/contrib/m_ojoin.c	Mon Jun 10 21:49:18 2002
+++ ircd-hybrid-7-bg/contrib/m_ojoin.c	Mon Mar 10 01:08:59 2003
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_ojoin.c,v 1.11 2002/06/11 01:49:18 androsyn Exp $
+ *   $Id: m_ojoin.c,v 1.2 2003/03/10 06:08:59 demond Exp $
  */
 
 #include "stdinc.h"
@@ -58,7 +58,7 @@
   mod_del_cmd(&ojoin_msgtab);
 }
 
-char *_version = "$Revision: 1.11 $";
+char *_version = "$Revision: 1.2 $";
 
 /*
 ** mo_ojoin
@@ -103,7 +103,7 @@
 
   if( chptr == NULL )
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
 		 me.name, parv[0], parv[1]);
       return;
     }
@@ -184,9 +184,9 @@
   /* send the topic... */
   if (chptr->topic != NULL)
   {
-    sendto_one(source_p, form_str(RPL_TOPIC), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_TOPIC), me.name,
 	       source_p->name, chptr->chname, chptr->topic);
-    sendto_one(source_p, form_str(RPL_TOPICWHOTIME), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_TOPICWHOTIME), me.name,
 	       source_p->name, chptr->chname, chptr->topic_info,
 	       chptr->topic_time);
   }
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/m_operspy.c ircd-hybrid-7-bg/contrib/m_operspy.c
--- ircd-hybrid-7rc5/contrib/m_operspy.c	Tue Oct 29 22:33:20 2002
+++ ircd-hybrid-7-bg/contrib/m_operspy.c	Mon Mar 10 01:08:59 2003
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_operspy.c,v 1.8 2002/10/30 03:33:20 bill Exp $
+ *   $Id: m_operspy.c,v 1.2 2003/03/10 06:08:59 demond Exp $
  */
 
 /***  PLEASE READ ME  ***/
@@ -124,7 +124,7 @@
 {
   mod_del_cmd(&operspy_msgtab);
 }
-const char *_version = "$Revision: 1.8 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 
 /*
@@ -210,18 +210,18 @@
 #ifdef OPERSPY_LIST
   if (strcasecmp(parv[1], "LIST") == 0)
   {
-    sendto_one(client_p, form_str(RPL_LISTSTART), me.name, client_p->name);
+    sendto_one(client_p, form_str(client_p,RPL_LISTSTART), me.name, client_p->name);
 
     for (chptr_list = GlobalChannelList; chptr_list; chptr_list = chptr_list->nextch)
     {
       if (match(parv[2], chptr_list->chname))
       {
-        sendto_one(client_p, form_str(RPL_LIST), me.name, client_p->name,
+        sendto_one(client_p, form_str(client_p,RPL_LIST), me.name, client_p->name,
                    chptr_list->chname, chptr_list->users, chptr_list->topic == NULL ? "" : chptr_list->topic);
       }
     }
 
-    sendto_one(client_p, form_str(RPL_LISTEND), me.name, client_p->name);
+    sendto_one(client_p, form_str(client_p,RPL_LISTEND), me.name, client_p->name);
     return;
   }
 #endif
@@ -231,7 +231,7 @@
   {
     if (!IsChanPrefix(parv[2][0]) || !check_channel_name(parv[2]))
     {
-      sendto_one(client_p, form_str(ERR_BADCHANNAME),
+      sendto_one(client_p, form_str(client_p,ERR_BADCHANNAME),
                  me.name, parv[0], (unsigned char *)parv[2]);
       return;
     }
@@ -243,7 +243,7 @@
        * but I don't see how.  Even if it does, we won't be able to spy without
        * info.
        */ 
-      sendto_one(client_p, form_str(ERR_NOSUCHCHANNEL),
+      sendto_one(client_p, form_str(client_p,ERR_NOSUCHCHANNEL),
                  me.name, parv[0], parv[2]);
       return;
     }
@@ -255,9 +255,9 @@
     channel_modes(chptr_mode, client_p, modebuf, parabuf);
     client_p->status = c_status;
 
-    sendto_one(client_p, form_str(RPL_CHANNELMODEIS),
+    sendto_one(client_p, form_str(client_p,RPL_CHANNELMODEIS),
                me.name, parv[0], parv[2], modebuf, parabuf);
-    sendto_one(client_p, form_str(RPL_CREATIONTIME),
+    sendto_one(client_p, form_str(client_p,RPL_CREATIONTIME),
                me.name, parv[0], parv[2], chptr_mode->channelts);
     return;
   }
@@ -268,14 +268,14 @@
   {
     if (!IsChanPrefix(parv[2][0]) || !check_channel_name(parv[2]))
     {
-      sendto_one(client_p, form_str(ERR_BADCHANNAME),
+      sendto_one(client_p, form_str(client_p,ERR_BADCHANNAME),
                  me.name, parv[0], (unsigned char *)parv[2]);
       return;
     }
 
     if ((chptr_names = (struct Channel *)hash_find_channel(parv[2])) == NULL)
     {
-      sendto_one(client_p, form_str(ERR_NOSUCHCHANNEL),
+      sendto_one(client_p, form_str(client_p,ERR_NOSUCHCHANNEL),
                  me.name, parv[0], parv[2]);
       return;
     }
@@ -300,19 +300,19 @@
   {
     if ((chptr_topic = (struct Channel *)hash_find_channel(parv[2])) == NULL)
     {
-      sendto_one(client_p, form_str(ERR_NOSUCHCHANNEL), me.name,
+      sendto_one(client_p, form_str(client_p,ERR_NOSUCHCHANNEL), me.name,
                  parv[0], parv[2]);
       return;
     }
 
     if (chptr_topic->topic == NULL)
-      sendto_one(client_p, form_str(RPL_NOTOPIC), me.name, parv[0],
+      sendto_one(client_p, form_str(client_p,RPL_NOTOPIC), me.name, parv[0],
                  parv[2]);
     else
     {
-      sendto_one(client_p, form_str(RPL_TOPIC), me.name, parv[0],
+      sendto_one(client_p, form_str(client_p,RPL_TOPIC), me.name, parv[0],
                  chptr_topic->chname, chptr_topic->topic);
-      sendto_one(client_p, form_str(RPL_TOPICWHOTIME), me.name,
+      sendto_one(client_p, form_str(client_p,RPL_TOPICWHOTIME), me.name,
                  parv[0], chptr_topic->chname, chptr_topic->topic_info,
                  chptr_topic->topic_time);
     }
@@ -328,14 +328,14 @@
       collapse(mask);
       if (*mask == '\0')
       {
-        sendto_one(client_p, form_str(RPL_ENDOFWHO), me.name, parv[0], "*");
+        sendto_one(client_p, form_str(client_p,RPL_ENDOFWHO), me.name, parv[0], "*");
         return;
       }
     }
     else
     {
       who_global(client_p, NULL, server_oper);
-      sendto_one(client_p, form_str(RPL_ENDOFWHO), me.name, parv[0], "*");
+      sendto_one(client_p, form_str(client_p,RPL_ENDOFWHO), me.name, parv[0], "*");
       return;
     }
 
@@ -346,7 +346,7 @@
       if ((chptr_who = (struct Channel *)hash_find_channel(mask)) != NULL)
         do_who_on_channel(client_p, chptr_who, chptr_who->chname, server_oper);
 
-      sendto_one(client_p, form_str(RPL_ENDOFWHO), me.name, parv[0], mask);
+      sendto_one(client_p, form_str(client_p,RPL_ENDOFWHO), me.name, parv[0], mask);
       return;
     }
 
@@ -373,7 +373,7 @@
       else
         do_who(client_p, target_p_who, NULL, "");
 
-      sendto_one(client_p, form_str(RPL_ENDOFWHO), me.name, parv[0], mask);
+      sendto_one(client_p, form_str(client_p,RPL_ENDOFWHO), me.name, parv[0], mask);
       return;
     }
 
@@ -385,7 +385,7 @@
       who_global(client_p, mask, server_oper);
 
     /* nothing else? end of /who. */
-    sendto_one(client_p, form_str(RPL_ENDOFWHO), me.name, parv[0], mask);
+    sendto_one(client_p, form_str(client_p,RPL_ENDOFWHO), me.name, parv[0], mask);
 
     return;
   }
@@ -402,16 +402,16 @@
 
     if ((target_p = (struct Client *)find_client(parv[2])) == NULL)
     {
-      sendto_one(client_p, form_str(ERR_NOSUCHNICK), me.name, parv[0], parv[2]);
+      sendto_one(client_p, form_str(client_p,ERR_NOSUCHNICK), me.name, parv[0], parv[2]);
       return;
     }
 
     a2client_p = (struct Client *)find_server(target_p->user->server);
 
-    sendto_one(client_p, form_str(RPL_WHOISUSER), me.name,
+    sendto_one(client_p, form_str(client_p,RPL_WHOISUSER), me.name,
                client_p->name, target_p->name, target_p->username,
                target_p->host, target_p->info);
-    ircsprintf(buf, form_str(RPL_WHOISCHANNELS), me.name,
+    ircsprintf(buf, form_str(client_p,RPL_WHOISCHANNELS), me.name,
                client_p->name, target_p->name, "");
 
     mlen = strlen(buf);
@@ -439,16 +439,16 @@
     if (reply_to_send == YES)
       sendto_one(client_p, "%s", buf);
 
-    sendto_one(client_p, form_str(RPL_WHOISSERVER), me.name,
+    sendto_one(client_p, form_str(client_p,RPL_WHOISSERVER), me.name,
                client_p->name, target_p->name, target_p->user->server,
                a2client_p ? a2client_p->info : "*Not On This Net*");
 
     if (IsOper(target_p))
-      sendto_one(client_p, form_str(RPL_WHOISOPERATOR), me.name,
+      sendto_one(client_p, form_str(client_p,RPL_WHOISOPERATOR), me.name,
                  client_p->name, target_p->name);
 
     if (MyConnect(target_p))
-      sendto_one(client_p, form_str(RPL_WHOISIDLE), me.name,
+      sendto_one(client_p, form_str(client_p,RPL_WHOISIDLE), me.name,
                  client_p->name, target_p->name, CurrentTime - target_p->user->last,
                  target_p->firsttime);
     return;
@@ -475,7 +475,7 @@
 #ifdef ANONOPS
   if(ConfigServerHide.hide_servers)
     {
-      sendto_one(source_p, form_str(RPL_WHOREPLY), me.name, source_p->name,
+      sendto_one(source_p, form_str(source_p,RPL_WHOREPLY), me.name, source_p->name,
                  (chname) ? (chname) : "*",
                  target_p->username,
                  target_p->host, IsOper(source_p) ? target_p->user->server : "*",
@@ -485,7 +485,7 @@
   else
 #endif
     {
-      sendto_one(source_p, form_str(RPL_WHOREPLY), me.name, source_p->name,
+      sendto_one(source_p, form_str(source_p,RPL_WHOREPLY), me.name, source_p->name,
                  (chname) ? (chname) : "*",
                  target_p->username,
                  target_p->host,  target_p->user->server, target_p->name,
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/m_opme.c ircd-hybrid-7-bg/contrib/m_opme.c
--- ircd-hybrid-7rc5/contrib/m_opme.c	Thu Sep 19 12:14:32 2002
+++ ircd-hybrid-7-bg/contrib/m_opme.c	Mon Mar 10 01:08:59 2003
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_opme.c,v 1.28 2002/09/19 16:14:32 bill Exp $
+ *   $Id: m_opme.c,v 1.2 2003/03/10 06:08:59 demond Exp $
  */
 #include "stdinc.h"
 #include "tools.h"
@@ -57,7 +57,7 @@
   mod_del_cmd(&opme_msgtab);
 }
 
-char *_version = "$Revision: 1.28 $";
+char *_version = "$Revision: 1.2 $";
 
 static int chan_is_opless(struct Channel *chptr)
 {
@@ -104,7 +104,7 @@
   
   if( chptr == NULL )
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
 		 me.name, parv[0], parv[1]);
       return;
     }
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/m_tburst.c ircd-hybrid-7-bg/contrib/m_tburst.c
--- ircd-hybrid-7rc5/contrib/m_tburst.c	Sat Jul  6 18:20:09 2002
+++ ircd-hybrid-7-bg/contrib/m_tburst.c	Mon Dec 30 23:07:24 2002
@@ -25,7 +25,7 @@
  *  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  *  POSSIBILITY OF SUCH DAMAGE.
  *
- *  $Id: m_tburst.c,v 1.11 2002/07/06 22:20:09 leeh Exp $
+ *  $Id: m_tburst.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 #include "stdinc.h"
@@ -81,7 +81,7 @@
   unset_tburst_capab();
 }
 
-const char *_version = "$Revision: 1.11 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 
 /* ms_tburst()
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/m_whois.c ircd-hybrid-7-bg/contrib/m_whois.c
--- ircd-hybrid-7rc5/contrib/m_whois.c	Tue Oct 29 22:33:20 2002
+++ ircd-hybrid-7-bg/contrib/m_whois.c	Mon Mar 10 01:08:59 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_whois.c,v 1.5 2002/10/30 03:33:20 bill Exp $
+ *  $Id: m_whois.c,v 1.2 2003/03/10 06:08:59 demond Exp $
  */
 
 #include "stdinc.h"
@@ -193,7 +193,7 @@
   mod_del_cmd(&whois_msgtab);
 }
 
-const char *_version = "$Revision: 1.5 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
 ** m_whois
@@ -209,7 +209,7 @@
   
   if (parc < 2)
     {
-      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+      sendto_one(source_p, form_str(source_p,ERR_NONICKNAMEGIVEN),
                  me.name, parv[0]);
       return;
     }
@@ -220,7 +220,7 @@
       if((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime)
         {             
           if(MyClient(source_p))
-            sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,source_p->name);
+            sendto_one(source_p,form_str(source_p,RPL_LOAD2HI),me.name,source_p->name);
           return;
         }
       else
@@ -256,7 +256,7 @@
 {
   if(parc < 2)
     {
-      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+      sendto_one(source_p, form_str(source_p,ERR_NONICKNAMEGIVEN),
                  me.name, parv[0]);
       return;
     }
@@ -351,9 +351,9 @@
     }
 
   if(found)
-    sendto_one(source_p, form_str(RPL_ENDOFWHOIS), me.name, parv[0], parv[1]);
+    sendto_one(source_p, form_str(source_p,RPL_ENDOFWHOIS), me.name, parv[0], parv[1]);
   else
-    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, parv[0], nick);
+    sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK), me.name, parv[0], nick);
 
   return 0;
 }
@@ -435,10 +435,10 @@
 
   if( target_p->user == NULL )
     {
-      sendto_one(source_p, form_str(RPL_WHOISUSER), me.name,
+      sendto_one(source_p, form_str(source_p,RPL_WHOISUSER), me.name,
 		 source_p->name, name,
 		 target_p->username, target_p->host, target_p->info);
-	  sendto_one(source_p, form_str(RPL_WHOISSERVER),
+	  sendto_one(source_p, form_str(source_p,RPL_WHOISSERVER),
 		 me.name, source_p->name, name, "<Unknown>",
 		 "*Not On This Net*");
       return 0;
@@ -500,12 +500,12 @@
   
   a2client_p = find_server(target_p->user->server);
           
-  sendto_one(source_p, form_str(RPL_WHOISUSER), me.name,
+  sendto_one(source_p, form_str(source_p,RPL_WHOISUSER), me.name,
 	 source_p->name, target_p->name,
 	 target_p->username, target_p->host, target_p->info);
   server_name = (char *)target_p->user->server;
 
-  ircsprintf(buf, form_str(RPL_WHOISCHANNELS),
+  ircsprintf(buf, form_str(source_p,RPL_WHOISCHANNELS),
 	       me.name, source_p->name, target_p->name, "");
 
   mlen = strlen(buf);
@@ -558,21 +558,21 @@
     sendto_one(source_p, "%s", buf);
           
   if ((IsOper(source_p) || !ConfigServerHide.hide_servers) || target_p == source_p)
-    sendto_one(source_p, form_str(RPL_WHOISSERVER),
+    sendto_one(source_p, form_str(source_p,RPL_WHOISSERVER),
 	       me.name, source_p->name, target_p->name, server_name,
 	       a2client_p?a2client_p->info:"*Not On This Net*");
   else
-    sendto_one(source_p, form_str(RPL_WHOISSERVER),
+    sendto_one(source_p, form_str(source_p,RPL_WHOISSERVER),
 	       me.name, source_p->name, target_p->name,
                ServerInfo.network_name,
 	       ServerInfo.network_desc);
 
   if (target_p->user->away)
-    sendto_one(source_p, form_str(RPL_AWAY), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_AWAY), me.name,
 	       source_p->name, target_p->name, target_p->user->away);
 
   if (IsOper(target_p))
-    sendto_one(source_p, form_str(RPL_WHOISOPERATOR),
+    sendto_one(source_p, form_str(source_p,RPL_WHOISOPERATOR),
                me.name, source_p->name, target_p->name);
 
   /* Don't show remote whois info if server is under
@@ -585,13 +585,13 @@
     if (glob || IsOper(source_p) ||
 	!ConfigServerHide.hide_servers || (target_p == source_p))
     {
-      sendto_one(source_p, form_str(RPL_WHOISACTUALLY), 
+      sendto_one(source_p, form_str(source_p,RPL_WHOISACTUALLY), 
 		 me.name, source_p->name, target_p->name,
 		 target_p->username, target_p->host, 
 		 show_ip(source_p, target_p) ? 
 		 target_p->localClient->sockhost : "255.255.255.255");
 
-      sendto_one(source_p, form_str(RPL_WHOISIDLE),
+      sendto_one(source_p, form_str(source_p,RPL_WHOISIDLE),
                  me.name, source_p->name, target_p->name,
                  CurrentTime - target_p->user->last,
                  target_p->firsttime);
@@ -627,7 +627,7 @@
   /* its a misconfigured server */
   if (parc < 2)
     {
-      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+      sendto_one(source_p, form_str(source_p,ERR_NONICKNAMEGIVEN),
                  me.name, parv[0]);
       return;
     }
@@ -650,7 +650,7 @@
       if((target_p = find_server(parv[1])) == NULL)
       {
         /* its not a server either.. theyve sent a bad whois */
-        sendto_one(source_p, form_str(ERR_NOSUCHSERVER), me.name,
+        sendto_one(source_p, form_str(source_p,ERR_NOSUCHSERVER), me.name,
 	           parv[0], parv[1]);
         return;
       }
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/spy_admin_notice.c ircd-hybrid-7-bg/contrib/spy_admin_notice.c
--- ircd-hybrid-7rc5/contrib/spy_admin_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7-bg/contrib/spy_admin_notice.c	Mon Dec 30 23:07:24 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: spy_admin_notice.c,v 1.6 2002/05/24 23:48:34 androsyn Exp $
+ *  $Id: spy_admin_notice.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 #include "stdinc.h"
 #include "modules.h"
@@ -42,7 +42,7 @@
   hook_del_hook("doing_admin", (hookfn *)show_admin);
 }
 
-const char *_version = "$Revision: 1.6 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 
 int show_admin(struct hook_spy_data *data)
 {
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/spy_info_notice.c ircd-hybrid-7-bg/contrib/spy_info_notice.c
--- ircd-hybrid-7rc5/contrib/spy_info_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7-bg/contrib/spy_info_notice.c	Mon Dec 30 23:07:24 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: spy_info_notice.c,v 1.6 2002/05/24 23:48:34 androsyn Exp $
+ *  $Id: spy_info_notice.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 #include "stdinc.h"
 #include "modules.h"
@@ -42,7 +42,7 @@
   hook_del_hook("doing_info", (hookfn *)show_info);
 }
 
-const char *_version = "$Revision: 1.6 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 
 int show_info(struct hook_spy_data *data)
 {
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/spy_links_notice.c ircd-hybrid-7-bg/contrib/spy_links_notice.c
--- ircd-hybrid-7rc5/contrib/spy_links_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7-bg/contrib/spy_links_notice.c	Mon Dec 30 23:07:24 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: spy_links_notice.c,v 1.11 2002/05/24 23:48:34 androsyn Exp $
+ *  $Id: spy_links_notice.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 #include "stdinc.h"
 #include "modules.h"
@@ -43,7 +43,7 @@
   hook_del_hook("doing_links", (hookfn *)show_links);
 }
 
-const char *_version = "$Revision: 1.11 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 
 int
 show_links(struct hook_links_data *data)
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/spy_motd_notice.c ircd-hybrid-7-bg/contrib/spy_motd_notice.c
--- ircd-hybrid-7rc5/contrib/spy_motd_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7-bg/contrib/spy_motd_notice.c	Mon Dec 30 23:07:24 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: spy_motd_notice.c,v 1.6 2002/05/24 23:48:34 androsyn Exp $
+ *  $Id: spy_motd_notice.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 #include "stdinc.h"
 #include "modules.h"
@@ -42,7 +42,7 @@
   hook_del_hook("doing_motd", (hookfn *)show_motd);
 }
 
-const char *_version = "$Revision: 1.6 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 
 int show_motd(struct hook_spy_data *data)
 {
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/spy_stats_notice.c ircd-hybrid-7-bg/contrib/spy_stats_notice.c
--- ircd-hybrid-7rc5/contrib/spy_stats_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7-bg/contrib/spy_stats_notice.c	Mon Dec 30 23:07:24 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: spy_stats_notice.c,v 1.12 2002/05/24 23:48:34 androsyn Exp $
+ *  $Id: spy_stats_notice.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 #include "stdinc.h"
 #include "modules.h"
@@ -43,7 +43,7 @@
 	hook_del_hook("doing_stats", (hookfn *)show_stats);
 }
 
-const char *_version = "$Revision: 1.12 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 
 /* show a stats request */
 int
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/spy_stats_p_notice.c ircd-hybrid-7-bg/contrib/spy_stats_p_notice.c
--- ircd-hybrid-7rc5/contrib/spy_stats_p_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7-bg/contrib/spy_stats_p_notice.c	Mon Dec 30 23:07:24 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: spy_stats_p_notice.c,v 1.4 2002/05/24 23:48:34 androsyn Exp $
+ *  $Id: spy_stats_p_notice.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 #include "stdinc.h"
 #include "modules.h"
@@ -43,7 +43,7 @@
   hook_del_hook("doing_stats_p", (hookfn *)show_stats_p);
 }
 
-const char *_version = "$Revision: 1.4 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 
 int show_stats_p(struct hook_stats_data *data)
 {
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/spy_trace_notice.c ircd-hybrid-7-bg/contrib/spy_trace_notice.c
--- ircd-hybrid-7rc5/contrib/spy_trace_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7-bg/contrib/spy_trace_notice.c	Mon Dec 30 23:07:24 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: spy_trace_notice.c,v 1.6 2002/05/24 23:48:34 androsyn Exp $
+ *  $Id: spy_trace_notice.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 #include "stdinc.h"
 #include "modules.h"
@@ -45,7 +45,7 @@
   hook_del_hook("doing_ltrace", (hookfn *)show_ltrace);
 }
 
-const char *_version = "$Revision: 1.6 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 
 int show_trace(struct hook_spy_data *data)
 {
diff -uNrd -x CVS ircd-hybrid-7rc5/contrib/spy_whois_notice.c ircd-hybrid-7-bg/contrib/spy_whois_notice.c
--- ircd-hybrid-7rc5/contrib/spy_whois_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7-bg/contrib/spy_whois_notice.c	Mon Dec 30 23:07:24 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: spy_whois_notice.c,v 1.10 2002/05/24 23:48:34 androsyn Exp $
+ *  $Id: spy_whois_notice.c,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 #include "stdinc.h"
 #include "modules.h"
@@ -43,7 +43,7 @@
   hook_del_hook("doing_whois", (hookfn *)show_notice);
 }
 
-const char *_version = "$Revision: 1.10 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 
 /* show a whois notice
    source_p does a /whois on client_p */
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/CIDR.txt ircd-hybrid-7-bg/doc/CIDR.txt
--- ircd-hybrid-7rc5/doc/CIDR.txt	Tue Oct 23 22:00:05 2001
+++ ircd-hybrid-7-bg/doc/CIDR.txt	Mon Dec 30 23:07:24 2002
@@ -1,4 +1,4 @@
-$Id: CIDR.txt,v 1.5 2001/10/24 02:00:05 wcampbel Exp $
+$Id: CIDR.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 CIDR Information
 ----------------
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/Makefile.in ircd-hybrid-7-bg/doc/Makefile.in
--- ircd-hybrid-7rc5/doc/Makefile.in	Tue Jul  9 20:05:48 2002
+++ ircd-hybrid-7-bg/doc/Makefile.in	Mon Dec 30 23:07:24 2002
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 7.17 2002/07/10 00:05:48 leeh Exp $
+# $Id: Makefile.in,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 CC		= @CC@
 INSTALL		= @INSTALL@
 INSTALL_BIN	= @INSTALL_PROGRAM@
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/README.cidr_bans ircd-hybrid-7-bg/doc/README.cidr_bans
--- ircd-hybrid-7rc5/doc/README.cidr_bans	Wed Aug 28 13:00:10 2002
+++ ircd-hybrid-7-bg/doc/README.cidr_bans	Mon Dec 30 23:07:24 2002
@@ -1,4 +1,4 @@
-$Id: README.cidr_bans,v 1.1 2002/08/28 17:00:10 androsyn Exp $ 
+$Id: README.cidr_bans,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $ 
 
 
 Basically what this patch does is allow for users to use cidr masks when
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/challenge.txt ircd-hybrid-7-bg/doc/challenge.txt
--- ircd-hybrid-7rc5/doc/challenge.txt	Tue Oct 29 15:14:36 2002
+++ ircd-hybrid-7-bg/doc/challenge.txt	Mon Dec 30 23:07:24 2002
@@ -1,6 +1,6 @@
                        Oper Challenge and Response System
 
-   $Id: challenge.txt,v 1.10 2002/10/29 20:14:36 db Exp $
+   $Id: challenge.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
    Copyright (c) 2001 by ircd-hybrid team
 
@@ -224,7 +224,7 @@
  # work, but gave me a framework for execing stuff and getting the response.
 
  # For Hybrid's cvs...
- # $Id: challenge.txt,v 1.10 2002/10/29 20:14:36 db Exp $
+ # $Id: challenge.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
  xecho ... Loading challenge.irc by xyst, feer.
 
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/convertconf-example.conf ircd-hybrid-7-bg/doc/convertconf-example.conf
--- ircd-hybrid-7rc5/doc/convertconf-example.conf	Mon Oct 28 16:09:17 2002
+++ ircd-hybrid-7-bg/doc/convertconf-example.conf	Mon Dec 30 23:07:24 2002
@@ -3,7 +3,7 @@
  *
  * Written by ejb, wcampbel, db, leeh and others
  *
- * $Id: convertconf-example.conf,v 7.7 2002/10/28 21:09:17 bill Exp $
+ * $Id: convertconf-example.conf,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 /* logging {}: contains information about logfiles. */
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/example.conf ircd-hybrid-7-bg/doc/example.conf
--- ircd-hybrid-7rc5/doc/example.conf	Wed Oct 30 12:44:51 2002
+++ ircd-hybrid-7-bg/doc/example.conf	Sat May 24 23:27:08 2003
@@ -3,7 +3,7 @@
  *
  * Written by ejb, wcampbel, db, leeh and others
  *
- * $Id: example.conf,v 7.169 2002/10/30 17:44:51 wiz Exp $
+ * $Id: example.conf,v 1.4 2003/05/24 00:07:44 demond Exp $
  */
 
 /* IMPORTANT NOTES:
@@ -23,22 +23,22 @@
  *
  * Times/durations are written as:
  *        12 hours 30 minutes 1 second
- *        
+ *
  * Valid units of time:
  *        month, week, day, hour, minute, second
  *
  * Valid units of size:
  *        megabyte/mbyte/mb, kilobyte/kbyte/kb, byte
  *
- * Sizes and times may be singular or plural.  
- */ 
+ * Sizes and times may be singular or plural.
+ */
 
 /* EFNET NOTE:
- * 
+ *
  * This config file is NOT suitable for EFNet.  EFNet admins should use
  * example.efnet.conf
  */
- 
+
  /* serverinfo {}:  Contains information about the server. (OLD M:) */
 serverinfo {
 	/* name: the name of our server */
@@ -60,6 +60,12 @@
 	 * LazyLink servers.
 	 */
 	hub = no;
+	
+	/* gateway: this server will prefix all nicks coming from servers
+	 * described in clusters{} block with the appropriate token
+	 *												-demond
+	 */
+	gateway = no;
 
 	/* vhost: the IP to bind to when we connect outward to ipv4 servers.
 	 * This should be an ipv4 IP only.
@@ -78,7 +84,7 @@
 	 *
 	 * Example command to store a 2048 bit RSA keypair in
 	 * rsa.key, and the public key in rsa.pub:
-	 * 
+	 *
 	 * 	openssl genrsa -out rsa.key 2048
 	 *	openssl rsa -in rsa.key -pubout -out rsa.pub
 	 *	chown <ircd-user>.<ircd.group> rsa.key rsa.pub
@@ -86,6 +92,20 @@
 	 *	chmod 0644 rsa.pub
 	 */
 	#rsa_private_key_file = "/usr/local/ircd/etc/rsa.key";
+	
+	/* SSL certificate file, used for client SSL connections
+	 *
+	 * Assuming your private RSA key is stored in rsa.key, you
+	 * must first create a certificate request, then sign it:
+	 *
+	 *  openssl req -new -key rsa.key -out cert.csr
+	 *  openssl x509 -req -in cert.csr -extensions v3_ca \
+	 *   -signkey rsa.key -out cert.pem -trustout
+	 *												-demond
+     *
+     * (see http://www.openssl.org//docs/HOWTO/certificates.txt)
+	 */
+	#ssl_certificate_file = "/usr/local/ircd/etc/cert.pem";
 };
 
 /* admin {}: contains admin information about the server. (OLD A:) */
@@ -166,23 +186,28 @@
 	 *
 	 * ports are seperated via a comma, a range may be specified using ".."
 	 */
-	
+
 	/* port: listen on all available IPs, ports 6665 to 6669 */
 	port = 6665 .. 6669;
+	
+	/* sslport: listen for client SSL connections ONLY!
+	 *											-demond
+	 */
+	sslport = 8181;
 
-	/* host: set a specific IP/host the ports after the line will listen 
+	/* host: set a specific IP/host the ports after the line will listen
 	 * on.  This may be ipv4 or ipv6.
 	 */
 	host = "1.2.3.4";
 	port = 7000, 7001;
 
 	host = "3ffe:1234:a:b:c::d";
-        port = 7002;
+    port = 7002;
 };
 
 /* auth {}: allow users to connect to the ircd (OLD I:) */
 auth {
-	/* user: the user@host allowed to connect.  multiple IPv4/IPv6 user 
+	/* user: the user@host allowed to connect.  multiple IPv4/IPv6 user
 	 * lines are permitted per auth block.
 	 */
 	user = "*@172.16.0.0/12";
@@ -190,7 +215,7 @@
 
 	/* password: an optional password that is required to use this block */
 	password = "letmein";
-	
+
 	/* spoof: fake the users host to be be this.  This is free-form,
 	 * just do everyone a favour and dont abuse it. (OLD I: = flag)
 	 */
@@ -210,9 +235,15 @@
 
 	/* no tilde: remove ~ from a user with no ident (OLD I: - flag) */
 	no_tilde = yes;
-	
+
 	/* class: the class the user is placed in */
 	class = "opers";
+
+	/* this will cause auth block matching
+	 * to continue if the password supplied
+	 * is incorrect               -demond
+	 */
+	skip_on_fail = yes;
 };
 
 auth {
@@ -222,7 +253,7 @@
 	 */
 	redirserv = "irc.fi";
 	redirport = 6667;
-	
+
 	user = "*.fi";
 
 	/* class: a class is required even though it is not used */
@@ -232,12 +263,17 @@
 auth {
 	user = "*@*";
 	class = "users";
-	
+
 	/* restricted: stop the client sending mode changes */
 	#restricted = yes;
 
 	/* have ident: require the user has identd to connect (OLD I: + flag) */
 	have_ident = yes;
+
+	/* this will cloak client host
+	 *                   -demond
+	 */
+	maskhost = yes;
 };
 
 /* operator {}: defines ircd operators. (OLD O:)
@@ -260,7 +296,7 @@
 	password = "etcnjl8juSU1E";
 
 	/* rsa key: the public key for this oper when using Challenge.
-	 * A password should not be defined when this is used, see 
+	 * A password should not be defined when this is used, see
 	 * doc/challenge.txt for more information.
 	 */
 	#rsa_public_key_file = "/usr/local/ircd/etc/oper.pub";
@@ -268,7 +304,7 @@
 	/* class: the class the oper joins when they successfully /oper */
 	class = "opers";
 
-	/* privileges: controls the activities and commands an oper are 
+	/* privileges: controls the activities and commands an oper are
 	 * allowed to do on the server.  All options default to no.
 	 * Available options:
 	 *
@@ -337,13 +373,13 @@
 	 * dependent on class limits.
 	 */
 	autoconn = yes;
-	
+
 	/* compressed: controls whether traffic is compressed via ziplinks.
 	 * By default this is disabled
 	 */
 	#compressed = yes;
 
-	/* lazylink: controls whether this server is a LazyLink.  LazyLink 
+	/* lazylink: controls whether this server is a LazyLink.  LazyLink
 	 * servers may NOT hub.  see doc/LazyLinks.as.implemented.txt
 	 */
 	#lazylink = yes;
@@ -370,12 +406,12 @@
 	/* cipher preference: set the preferred cipher for this link
 	 *
 	 * Available ciphers are:
-	 *      BF/256 BF/128 CAST/128 IDEA/128 RC5.16/128 
+	 *      BF/256 BF/128 CAST/128 IDEA/128 RC5.16/128
 	 *      RC5.12/128 RC5.8/128 3DES/168 DES/56
 	 *
 	 * NOTE:  Some ciphers may not be supported by your OpenSSL.
 	 *        Check the output from 'configure' for available ciphers.
-	 * 
+	 *
 	 * NOTE2: To help you decide what cipher to use, tools/encspeed
 	 *        will show you approximately how fast each cipher is.
 	 *        However, blowfish is fast and secure, and is probably
@@ -490,11 +526,21 @@
 	 */
 	use_except = yes;
 
-        /* halfops: Enable/disable channel mode "+h <nick>", this allows
+	/* subst: Enable/disable channel mode +w, word substitution list
+	 * (pairs of find-and-replace-with phrases)		-demond
+	 */
+	use_subst = yes;
+
+	/* denies: Enable/disable channel mode +d, extended gecos bans
+	 * (also matching channel name patterns)		-demond
+	 */
+	use_denies = yes;
+
+    /* halfops: Enable/disable channel mode "+h <nick>", this allows
 	 * users to perform all channel functions except +/-o and kick
 	 * opped users.
 	 */
-        use_halfops = yes;
+    use_halfops = yes;
 
 	/* anonops: Enable/disable channel mode +a.  This hides the people
 	 * who are opped in the channel from people who are unopped.
@@ -505,12 +551,12 @@
 	 */
 	use_anonops = no;
 
-        /* vchans: permit virtual channels, multiple copies of the same
+    /* vchans: permit virtual channels, multiple copies of the same
 	 * channel name.  read doc/vchans.txt for more details
 	 *
 	 * We advise against using this on production networks
-         */
-        use_vchans = yes;
+     */
+    use_vchans = yes;
 
 	/* vchans oper only: only allow opers to create vchans via /cjoin */
 	vchans_oper_only = yes;
@@ -540,12 +586,12 @@
         /* max bans: maximum number of +b/e/I modes in a channel */
         max_bans = 25;
 
-        /* splitcode: the ircd will check every 60s as to whether splitmode
+    /* splitcode: the ircd will check every 60s as to whether splitmode
 	 * should be disabled or not, so there may be a delay between a
 	 * netsplit ending and splitmode ending.
 	 *
 	 * both split users and split servers must be true to enter splitmode
-	 * 
+	 *
 	 * you may force splitmode to be permanent by /quote set splitmode on
 	 */
 
@@ -569,7 +615,6 @@
 	oper_pass_resv = yes;
 };
 
-
 /* The serverhide block contains the options regarding serverhiding */
 serverhide {
 	/* flatten links: this option will show all servers in /links appear
@@ -618,7 +663,7 @@
 	 */
         default_floodcount = 10;
 
-	/* failed oper notice: send a notice to all opers on the server when 
+	/* failed oper notice: send a notice to all opers on the server when
 	 * someone tries to OPER and uses the wrong password, host or ident.
 	 */
 	failed_oper_notice = yes;
@@ -628,12 +673,12 @@
 	 */
 	dots_in_ident=2;
 
-	/* dot in ipv6: ircd-hybrid-6.0 and earlier will disallow hosts 
+	/* dot in ipv6: ircd-hybrid-6.0 and earlier will disallow hosts
 	 * without a '.' in them.  this will add one to the end.  only needed
 	 * for older servers.
 	 */
         dot_in_ip6_addr = yes;
-        
+
         /* min nonwildcard: the minimum non wildcard characters in k/d/g lines
 	 * placed via the server.  klines hand placed are exempt from limits.
 	 * wildcard chars: '.' '*' '?' '@'
@@ -665,7 +710,7 @@
 	/* client exit: prepend a users quit message with "Client exit: " */
 	client_exit = yes;
 
-	/* kline reason: show the user the reason why they are k/d/glined 
+	/* kline reason: show the user the reason why they are k/d/glined
 	 * on exit.  may give away who set k/dline when set via tcm.
 	 */
 	kline_with_reason = yes;
@@ -679,7 +724,7 @@
 	non_redundant_klines = yes;
 
 	/* warn no nline: warn opers about servers that try to connect but
-	 * we dont have a connect {} block for.  Twits with misconfigured 
+	 * we dont have a connect {} block for.  Twits with misconfigured
 	 * servers can get really annoying with this enabled.
 	 */
 	warn_no_nline = yes;
@@ -703,7 +748,7 @@
 	 *     no:     show users all auth blocks.
 	 */
 	stats_k_oper_only=masked;
-                                    
+
 	/* caller id wait: time between notifying a +g user that somebody
 	 * is messaging them.
 	 */
@@ -755,7 +800,7 @@
 
 	/* REMOVE ME.  The following line checks you've been reading. */
 	havent_read_conf = 1;
-	
+
 	/* logfiles: the logfiles to use for user connects, /oper uses,
 	 * and failed /oper.  These files must exist for logging to be used.
 	 */
@@ -763,7 +808,7 @@
 	fname_operlog = "logs/operlog";
 	fname_foperlog = "logs/foperlog";
 
-	/* max targets: the maximum amount of targets in a single 
+	/* max targets: the maximum amount of targets in a single
 	 * PRIVMSG/NOTICE.  set to 999 NOT 0 for unlimited.
 	 */
 	max_targets = 4;
@@ -796,7 +841,7 @@
 	 * +d - debug      - See debugging notices
 	 * +f - full       - See I: line full notices
 	 * +g - callerid   - Server Side Ignore
-	 * +i - invisible  - Not shown in NAMES or WHO unless you share a 
+	 * +i - invisible  - Not shown in NAMES or WHO unless you share a
 	 *                   a channel
 	 * +k - skill      - See server generated KILL messages
 	 * +l - locops     - See LOCOPS messages
@@ -808,11 +853,12 @@
 	 * +x - external   - See remote server connection and split notices
 	 * +y - spy        - See LINKS, STATS, TRACE notices etc.
 	 * +z - operwall   - See oper generated WALLOPS
+         * +q - rconn      - See remote client connections
 	 */
-	 
+
 	/* oper only umodes: usermodes only opers may set */
-	oper_only_umodes = bots, cconn, debug, full, skill, nchange, 
-                     rej, spy, external, operwall, locops, unauth;
+	oper_only_umodes = bots, cconn, debug, full, skill, nchange,
+                     rej, spy, external, operwall, locops, unauth, rconn;
 
 	/* oper umodes: default usermodes opers get when they /oper */
 	oper_umodes = locops, servnotice, operwall, wallop;
@@ -840,9 +886,8 @@
 	 */
 	#egdpool_path = "/var/run/egd-pool";
 
-
 	/* compression level: level of compression for compressed links between
-	 * servers.  
+	 * servers.
 	 *
 	 * values are between: 1 (least compression, fastest)
 	 *                and: 9 (most compression, slowest).
@@ -851,14 +896,56 @@
 
 	/* throttle time: the minimum amount of time between connections from
 	 * the same ip.  exempt {} blocks are excluded from this throttling.
-	 * Offers protection against flooders who reconnect quickly.  
+	 * Offers protection against flooders who reconnect quickly.
 	 * Set to 0 to disable.
 	 */
 	throttle_time = 10;
+
+	/* Network identification string, for host cloaking
+	 *                                       -demond
+         */
+	netid = "bnet";
+
+	/* Allow cyrillic (Windows-1251) in nicks & usernames
+	 *                                       -demond
+	 */
+	cyrillic = no;
+
+	/* Translate all sendto_channel() stuff to umode +T/+Y users
+         * (WARNING: this may take clients out of sync!)
+	 *                                       -demond
+	 */
+	totaltrans = no;
+
+	/* maximum time allowed for client to issue USERHOST, WHO or MODE
+	 * before we mark them as pottential trojan drone
+	 *                                       -demond
+	 */
+	grace_time = 10 seconds;
+
+	/* the following deals with drone detection/kline
+	 *                                       -demond
+	 */
+	drone_kline = yes;
+	drone_batch = yes;
+	drone_rate_max = 3;
+	drone_rate_period = 20 seconds;
+	drone_kline_time = 300 minutes;
+	drone_reason = "possible trojan drone";
+
+	/* anti-spam onjoin/onleave muting period
+	 *                                       -demond
+	 */
+	spam_wait = 5 seconds;
+
+	/* repeat buffers purge period, don't set too low
+	 *                                       -demond
+	 */
+	repeat_grace = 20 seconds;
 };
 
 modules {
-	/* module path: paths to search for modules specified below and 
+	/* module path: paths to search for modules specified below and
 	 * in /modload.
 	 */
 	path = "/usr/local/ircd/modules";
@@ -866,4 +953,52 @@
 
 	/* module: the name of a module to load on startup/rehash */
 	#module = "some_module.so";
+};
+
+/* This will determine which servers are to be treated specially,
+ * as services. We now use this for SVSNICK handling.
+ *                                           -demond
+ */
+services {
+	name = "services.ca";
+};
+
+/* This will make the nick redirection we need on IRC Bulgaria
+ *                                           -demond
+ */
+equivalent {
+	nicks = "NS/NickServ";
+	nicks = "CS/ChanServ";
+	nicks = "OS/OperServ";
+};
+
+/* Describe which (pseudo) servers are to be treated specially
+ *                                           -demond
+ */
+relays {
+	name = "unibg-r.bulgaria.org";
+	name = "dalnet-r.bulgaria.org";
+	name = "under-r.bulgaria.org";
+};
+
+/* Defines USER host & server parameters of several known clients
+ *                                           -demond
+ */
+userpar {
+        param = "host/server";
+        param = "localhost";
+        param = "./.";
+        param = "0/0";
+        param = "blah/blah";
+        param = "php/html2";
+};
+
+/* These are external gateways which have the nicks they supply to
+ * us prefixed with the token following the slash; this allows for
+ * building heterogenous clusters of IRC networks - yet another
+ * unique feature brought to you by:         -demond	
+ */
+clusters {
+		bridge = "gate.abcirc.com/!";
+		bridge = "gate.xyzirc.net/&";
 };
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/example.efnet.conf ircd-hybrid-7-bg/doc/example.efnet.conf
--- ircd-hybrid-7rc5/doc/example.efnet.conf	Wed Oct 30 12:44:51 2002
+++ ircd-hybrid-7-bg/doc/example.efnet.conf	Mon Dec 30 23:07:24 2002
@@ -1,6 +1,6 @@
 /* doc/example.efnet.conf - ircd-hybrid-7 EFnet Example configuration file
  *
- * $Id: example.efnet.conf,v 7.9 2002/10/30 17:44:51 wiz Exp $
+ * $Id: example.efnet.conf,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 /* IMPORTANT NOTES:
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/guidelines.txt ircd-hybrid-7-bg/doc/guidelines.txt
--- ircd-hybrid-7rc5/doc/guidelines.txt	Fri Mar 16 20:34:50 2001
+++ ircd-hybrid-7-bg/doc/guidelines.txt	Mon Dec 30 23:07:24 2002
@@ -33,4 +33,4 @@
 
 8.  Don't forget to include a CVS Id.
 
-# $Id: guidelines.txt,v 1.1 2001/03/17 01:34:50 db Exp $
+# $Id: guidelines.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/index.txt ircd-hybrid-7-bg/doc/index.txt
--- ircd-hybrid-7rc5/doc/index.txt	Tue Jun 25 19:06:53 2002
+++ ircd-hybrid-7-bg/doc/index.txt	Mon Dec 30 23:07:24 2002
@@ -1,5 +1,5 @@
 
-# $Id: index.txt,v 1.17 2002/06/25 23:06:53 leeh Exp $
+# $Id: index.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 Here is the overview of the documents in the doc/ directory.
 
 CIDR.txt		- Description of CIDR in IPv4
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/ircd.8 ircd-hybrid-7-bg/doc/ircd.8
--- ircd-hybrid-7rc5/doc/ircd.8	Sun Jan 13 13:31:46 2002
+++ ircd-hybrid-7-bg/doc/ircd.8	Mon Dec 30 23:07:24 2002
@@ -1,5 +1,5 @@
 .\" @(#)ircd.8 7b10 25 Oct 2001
-.\" $Id: ircd.8,v 1.6 2002/01/13 18:31:46 wcampbel Exp $
+.\" $Id: ircd.8,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 .TH IRCD 8 "ircd-hybrid-7 25 Oct 2001
 .SH NAME
 ircd \- The Internet Relay Chat Program Server 
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/kline.txt ircd-hybrid-7-bg/doc/kline.txt
--- ircd-hybrid-7rc5/doc/kline.txt	Thu May  2 12:58:11 2002
+++ ircd-hybrid-7-bg/doc/kline.txt	Mon Dec 30 23:07:24 2002
@@ -2,7 +2,7 @@
  * 
  * Copyright (C) 2001-2002 Hybrid Development Team
  *
- * $Id: kline.txt,v 1.5 2002/05/02 16:58:11 leeh Exp $
+ * $Id: kline.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/messages.txt ircd-hybrid-7-bg/doc/messages.txt
--- ircd-hybrid-7rc5/doc/messages.txt	Sat Dec 15 00:10:41 2001
+++ ircd-hybrid-7-bg/doc/messages.txt	Mon Dec 30 23:07:24 2002
@@ -1,6 +1,6 @@
                          Message Customization Overview
 
-   $Id: messages.txt,v 1.3 2001/12/15 05:10:41 wcampbel Exp $
+   $Id: messages.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
    Copyright (c) 2001 by ircd-hybrid team
 
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/modeg.txt ircd-hybrid-7-bg/doc/modeg.txt
--- ircd-hybrid-7rc5/doc/modeg.txt	Tue Oct 23 22:00:05 2001
+++ ircd-hybrid-7-bg/doc/modeg.txt	Mon Dec 30 23:07:24 2002
@@ -137,4 +137,4 @@
 
 --
 W. Campbell
-$Id: modeg.txt,v 1.3 2001/10/24 02:00:05 wcampbel Exp $
+$Id: modeg.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/modes.txt ircd-hybrid-7-bg/doc/modes.txt
--- ircd-hybrid-7rc5/doc/modes.txt	Tue Apr 16 22:25:41 2002
+++ ircd-hybrid-7-bg/doc/modes.txt	Mon Mar 10 01:09:00 2003
@@ -22,6 +22,13 @@
 +x - external   - See remote server connection and split notices
 +y - spy        - See LINKS, STATS (if configured), TRACE notices
 +z - operwall   - See oper generated WALLOPS
+(usermodes by demond)
++T - cyrillic t.- Automatic PRIVMSG cyr->lat character translation (Win-1251)
++Y - cyrillic t.- Automatic PRIVMSG cyr->lat character translation (ISO-8859-5)
++R - reg accept.- Accept PRIVMSGs from registered nicks only
++q - rem notice - See remote client connection notices
++e - alt locale - Receive server numeric replies in alternative language
++S - SSL accept - Accept PRIVMSGs from SSL-connected clients only
 
 Channel Modes:
 
@@ -40,13 +47,24 @@
 +n - noexternal - Users must be in the channel to send text to it
 +o - chanop     - Full operator status
 +p - private    - Private is obsolete, this now restricts KNOCK, and can be
-                  set at the same time as +s.  This will also prevents 
-		  halfops from setting +/-h.
-+s - secret     - The channel does not show up on NAMES or LIST or in the 
+                  set at the same time as +s.  This will also prevents
+                  halfops from setting +/-h.
++s - secret     - The channel does not show up on NAMES or LIST or in the
                   WHOIS channel list unless you are a member of the channel
 +t - topic      - Only chanops can change the topic
-+v - voice      - Can speak in a moderated channel, and is exempt from flood 
++v - voice      - Can speak in a moderated channel, and is exempt from flood
                   restrictions
+(chanmodes by demond)
++c - no color   - Cloak color in chan msgs, topics and quits sent to channel
++r - registered - Channel is registered with services (set by services only)
++R - reg join   - Only registered nicks can join the channel
++M - reg speak  - Only registered nicks may speak on channel
++x - pacing     - Pace JOINs, PARTs, PRIVMSGs and QUITs on channel
++C - no cyrnicks- Clients w/ nicks in cyrillic are NOT allowed to join
++w - word subst - Substitutes word pairs given in the chan subst list
++z - no repeat  - Prohibites repeating of phrases
++S - SSL-only   - Allows only clients using SSL connection to join
++d - deny bans  - Extended gecos deny bans, also denying by channame pattern
 
 The third part of the 004 numeric lists channel modes that require arguments.
 Currently these are bkloveIh.
@@ -54,4 +72,4 @@
 Note that most of the channel modes can be disabled in the conf file for
 networks that do not wish to support them.
 
-# $Id: modes.txt,v 7.8 2002/04/17 02:25:41 leeh Exp $
+# $Id: modes.txt,v 1.2 2003/03/10 06:09:00 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/old/example_old.conf ircd-hybrid-7-bg/doc/old/example_old.conf
--- ircd-hybrid-7rc5/doc/old/example_old.conf	Fri Dec 22 22:32:23 2000
+++ ircd-hybrid-7-bg/doc/old/example_old.conf	Mon Dec 30 23:07:24 2002
@@ -2,7 +2,7 @@
 #   IRC - Internet Relay Chat, doc/example.conf
 #   Copyright (C) 1992, Bill Wisner
 #
-# $Id: example_old.conf,v 1.1 2000/12/23 03:32:23 db Exp $
+# $Id: example_old.conf,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 #
 # Example of an old style ircd.conf file, which h7 will not parse
 # but is kept here for historical interest
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/old/simple.conf ircd-hybrid-7-bg/doc/old/simple.conf
--- ircd-hybrid-7rc5/doc/old/simple.conf	Fri Dec 22 22:32:23 2000
+++ ircd-hybrid-7-bg/doc/old/simple.conf	Mon Dec 30 23:07:24 2002
@@ -1,7 +1,7 @@
 # IRC minimal example configuration file
 #
-# $Id: simple.conf,v 1.1 2000/12/23 03:32:23 db Exp $
-# $Id: simple.conf,v 1.1 2000/12/23 03:32:23 db Exp $
+# $Id: simple.conf,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
+# $Id: simple.conf,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 # 
 # This is a basic ircd.conf that will get you up and running with
 # little or no modifications.  See the example.conf file for more
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/operguide.txt ircd-hybrid-7-bg/doc/operguide.txt
--- ircd-hybrid-7rc5/doc/operguide.txt	Sat Feb 23 23:45:02 2002
+++ ircd-hybrid-7-bg/doc/operguide.txt	Mon Dec 30 23:07:24 2002
@@ -365,4 +365,4 @@
 
 And on the seventh day, He exited from append mode.
 
-# $Id: operguide.txt,v 1.8 2002/02/24 04:45:02 wcampbel Exp $
+# $Id: operguide.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/resv.txt ircd-hybrid-7-bg/doc/resv.txt
--- ircd-hybrid-7rc5/doc/resv.txt	Sat Aug 18 08:55:36 2001
+++ ircd-hybrid-7-bg/doc/resv.txt	Mon Dec 30 23:07:24 2002
@@ -4,7 +4,7 @@
  *
  * Copyright (C) 2001 Hybrid Development Team
  *
- * $Id: resv.txt,v 7.2 2001/08/18 12:55:36 leeh Exp $
+ * $Id: resv.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
  */
 
 				RESV
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/server-version-info ircd-hybrid-7-bg/doc/server-version-info
--- ircd-hybrid-7rc5/doc/server-version-info	Sat Dec 15 00:10:41 2001
+++ ircd-hybrid-7-bg/doc/server-version-info	Mon Dec 30 23:07:24 2002
@@ -1,6 +1,6 @@
                               Server VERSION Info
 
-   $Id: server-version-info,v 7.13 2001/12/15 05:10:41 wcampbel Exp $
+   $Id: server-version-info,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
    Copyright (c) 2001 by ircd-hybrid team
 
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/serverhide.txt ircd-hybrid-7-bg/doc/serverhide.txt
--- ircd-hybrid-7rc5/doc/serverhide.txt	Mon Apr 15 10:16:59 2002
+++ ircd-hybrid-7-bg/doc/serverhide.txt	Mon Dec 30 23:07:24 2002
@@ -1,6 +1,6 @@
                              Server Hide Reference
 
-   $Id: serverhide.txt,v 7.4 2002/04/15 14:16:59 db Exp $
+   $Id: serverhide.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
    Copyright (c) 2001 by ircd-hybrid team
 
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/simple.conf ircd-hybrid-7-bg/doc/simple.conf
--- ircd-hybrid-7rc5/doc/simple.conf	Wed Jan 24 09:58:45 2001
+++ ircd-hybrid-7-bg/doc/simple.conf	Mon Dec 30 23:07:24 2002
@@ -1,6 +1,6 @@
 # Hybrid 7 minimal example configuration file
 #
-# $Id: simple.conf,v 7.6 2001/01/24 14:58:45 wcampbel Exp $
+# $Id: simple.conf,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 #
 # This is a basic ircd.conf that will get your server running with
 # little modification.  See the example.conf for more specific 
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/Persistent_Clients.txt ircd-hybrid-7-bg/doc/technical/Persistent_Clients.txt
--- ircd-hybrid-7rc5/doc/technical/Persistent_Clients.txt	Wed Jan 24 09:58:41 2001
+++ ircd-hybrid-7-bg/doc/technical/Persistent_Clients.txt	Mon Dec 30 23:07:24 2002
@@ -105,6 +105,6 @@
 as possible, in order to eat up memory in a DDoS attempt. One of the
 same criticisms against vchans actually.
 
-$Id: Persistent_Clients.txt,v 1.3 2001/01/24 14:58:41 wcampbel Exp $
+$Id: Persistent_Clients.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/cryptlink.txt ircd-hybrid-7-bg/doc/technical/cryptlink.txt
--- ircd-hybrid-7rc5/doc/technical/cryptlink.txt	Thu Dec 13 13:31:51 2001
+++ ircd-hybrid-7-bg/doc/technical/cryptlink.txt	Mon Dec 30 23:07:24 2002
@@ -336,4 +336,4 @@
          administrators/IRCops on the server of the key mismatch.
     14.  Server #1 closes the socket.
 
-$Id: cryptlink.txt,v 7.7 2001/12/13 18:31:51 davidt Exp $
+$Id: cryptlink.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/debug_api.txt ircd-hybrid-7-bg/doc/technical/debug_api.txt
--- ircd-hybrid-7rc5/doc/technical/debug_api.txt	Sun Dec  2 10:16:39 2001
+++ ircd-hybrid-7-bg/doc/technical/debug_api.txt	Mon Dec 30 23:07:24 2002
@@ -1,4 +1,4 @@
-$Id: debug_api.txt,v 1.1 2001/12/02 15:16:39 ejb Exp $
+$Id: debug_api.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 This describes the debug (src/debug.c) debugging system in hybrid.
 
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/event.txt ircd-hybrid-7-bg/doc/technical/event.txt
--- ircd-hybrid-7rc5/doc/technical/event.txt	Wed Jan 24 09:58:41 2001
+++ ircd-hybrid-7-bg/doc/technical/event.txt	Mon Dec 30 23:07:24 2002
@@ -1,7 +1,7 @@
 Overview of the event subsystem
 Adrian Chadd <adrian@creative.net.au>
 
-$Id: event.txt,v 1.2 2001/01/24 14:58:41 wcampbel Exp $
+$Id: event.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 
 One of the things that immediately struck me whilst first looking at the
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/fd-management.txt ircd-hybrid-7-bg/doc/technical/fd-management.txt
--- ircd-hybrid-7rc5/doc/technical/fd-management.txt	Wed Nov  8 14:57:54 2000
+++ ircd-hybrid-7-bg/doc/technical/fd-management.txt	Mon Dec 30 23:07:24 2002
@@ -1,7 +1,7 @@
 Overview of the filedescriptor subsystem
 Adrian Chadd <adrian@creative.net.au>
 
-$Id: fd-management.txt,v 1.1 2000/11/08 19:57:54 adrian Exp $
+$Id: fd-management.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 
 Filedescriptor lists
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/file-management.txt ircd-hybrid-7-bg/doc/technical/file-management.txt
--- ircd-hybrid-7rc5/doc/technical/file-management.txt	Wed Nov  8 14:57:54 2000
+++ ircd-hybrid-7-bg/doc/technical/file-management.txt	Mon Dec 30 23:07:24 2002
@@ -1,7 +1,7 @@
 Overview of the file management subsystem
 Adrian Chadd <adrian@creative.net.au>
 
-$Id: file-management.txt,v 1.1 2000/11/08 19:57:54 adrian Exp $
+$Id: file-management.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 
 File operations
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/hostmask.txt ircd-hybrid-7-bg/doc/technical/hostmask.txt
--- ircd-hybrid-7rc5/doc/technical/hostmask.txt	Wed May  2 05:09:52 2001
+++ ircd-hybrid-7-bg/doc/technical/hostmask.txt	Mon Dec 30 23:07:24 2002
@@ -1,6 +1,6 @@
 The hostmask/netmask system.
 Copyright(C) 2001 by Andrew Miller(A1kmm)<a1kmm@mware.virtualave.net>
-$Id: hostmask.txt,v 1.1 2001/05/02 09:09:52 a1kmm Exp $
+$Id: hostmask.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 Contents
 ========
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/iauth.txt ircd-hybrid-7-bg/doc/technical/iauth.txt
--- ircd-hybrid-7rc5/doc/technical/iauth.txt	Sun Jan  9 22:21:37 2000
+++ ircd-hybrid-7-bg/doc/technical/iauth.txt	Mon Dec 30 23:07:24 2002
@@ -1,4 +1,4 @@
-$Id: iauth.txt,v 1.2 2000/01/10 03:21:37 wnder Exp $
+$Id: iauth.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 Patrick Alken <wnder@underworld.net>
 01/09/2000
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/index.txt ircd-hybrid-7-bg/doc/technical/index.txt
--- ircd-hybrid-7rc5/doc/technical/index.txt	Thu Oct 25 01:21:12 2001
+++ ircd-hybrid-7-bg/doc/technical/index.txt	Mon Dec 30 23:07:24 2002
@@ -19,4 +19,4 @@
 send.txt                  - Document on all of the send_to functions
 whats-new-code.txt        - Whats changed in the code
 
-# $Id: index.txt,v 1.2 2001/10/25 05:21:12 wcampbel Exp $
+# $Id: index.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/linebuf.txt ircd-hybrid-7-bg/doc/technical/linebuf.txt
--- ircd-hybrid-7rc5/doc/technical/linebuf.txt	Mon Nov 27 14:23:02 2000
+++ ircd-hybrid-7-bg/doc/technical/linebuf.txt	Mon Dec 30 23:07:24 2002
@@ -3,7 +3,7 @@
 
 By Adrian Chadd <adrian@creative.net.au>
 
-$Id: linebuf.txt,v 1.1 2000/11/27 19:23:02 adrian Exp $
+$Id: linebuf.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 
 History
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/message-customisation.txt ircd-hybrid-7-bg/doc/technical/message-customisation.txt
--- ircd-hybrid-7rc5/doc/technical/message-customisation.txt	Sun Apr  1 18:06:49 2001
+++ ircd-hybrid-7-bg/doc/technical/message-customisation.txt	Mon Dec 30 23:07:24 2002
@@ -1,7 +1,7 @@
 Message customization/localization system
 David Taylor <davidt@yadt.co.uk>
 
-$Id: message-customisation.txt,v 1.3 2001/04/01 22:06:49 ejb Exp $
+$Id: message-customisation.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 Please send any comments, questions, flames or suggestions to the
 above address :)
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/network.txt ircd-hybrid-7-bg/doc/technical/network.txt
--- ircd-hybrid-7rc5/doc/technical/network.txt	Wed Jan 24 09:58:43 2001
+++ ircd-hybrid-7-bg/doc/technical/network.txt	Mon Dec 30 23:07:24 2002
@@ -1,7 +1,7 @@
 Overview of the network subsystem
 Adrian Chadd <adrian@creative.net.au>
 
-$Id: network.txt,v 1.6 2001/01/24 14:58:43 wcampbel Exp $
+$Id: network.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 
 This document is an overview of the new and hopefully improved network
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/send.txt ircd-hybrid-7-bg/doc/technical/send.txt
--- ircd-hybrid-7rc5/doc/technical/send.txt	Sat Feb 10 13:24:30 2001
+++ ircd-hybrid-7-bg/doc/technical/send.txt	Mon Dec 30 23:07:24 2002
@@ -290,4 +290,4 @@
 
 -- Diane Bruce 
 
-$Id: send.txt,v 1.16 2001/02/10 18:24:30 fl_ Exp $
+$Id: send.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/ts5.txt ircd-hybrid-7-bg/doc/technical/ts5.txt
--- ircd-hybrid-7rc5/doc/technical/ts5.txt	Sun Jun  2 15:38:31 2002
+++ ircd-hybrid-7-bg/doc/technical/ts5.txt	Mon Dec 30 23:07:24 2002
@@ -1,7 +1,7 @@
   Overview of the TS5 system
   Lee H <lee@leeh.co.uk>
 
-$Id: ts5.txt,v 1.1 2002/06/02 19:38:31 leeh Exp $
+$Id: ts5.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 For the purposes of this document, ircd versions:
   hybrid6.0
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/technical/whats-new-code.txt ircd-hybrid-7-bg/doc/technical/whats-new-code.txt
--- ircd-hybrid-7rc5/doc/technical/whats-new-code.txt	Tue May 22 15:11:35 2001
+++ ircd-hybrid-7-bg/doc/technical/whats-new-code.txt	Mon Dec 30 23:07:24 2002
@@ -1,7 +1,7 @@
 
 Whats changed in the codebase
 
-# $Id: whats-new-code.txt,v 1.3 2001/05/22 19:11:35 davidt Exp $
+# $Id: whats-new-code.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
 First, please note one thing - a *LOT* has changed in hybrid-7.
 
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/vchans.txt ircd-hybrid-7-bg/doc/vchans.txt
--- ircd-hybrid-7rc5/doc/vchans.txt	Sat Apr 27 08:20:36 2002
+++ ircd-hybrid-7-bg/doc/vchans.txt	Mon Dec 30 23:07:24 2002
@@ -1,4 +1,4 @@
-$Id: vchans.txt,v 1.2 2002/04/27 12:20:36 leeh Exp $
+$Id: vchans.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
                   "Virtual Channels"
 		======================
diff -uNrd -x CVS ircd-hybrid-7rc5/doc/whats-new.txt ircd-hybrid-7-bg/doc/whats-new.txt
--- ircd-hybrid-7rc5/doc/whats-new.txt	Mon Oct 28 16:09:18 2002
+++ ircd-hybrid-7-bg/doc/whats-new.txt	Mon Dec 30 23:07:24 2002
@@ -265,5 +265,5 @@
     PARA    - Controls propogation of INVITE notices for +p (paranoid) channels
     ENC:a   - Encrypted link, where 'a' is the cipher being used
 
-# $Id: whats-new.txt,v 7.37 2002/10/28 21:09:18 bill Exp $
+# $Id: whats-new.txt,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 
diff -uNrd -x CVS ircd-hybrid-7rc5/help/Makefile.in ircd-hybrid-7-bg/help/Makefile.in
--- ircd-hybrid-7rc5/help/Makefile.in	Sat Feb  2 11:01:13 2002
+++ ircd-hybrid-7-bg/help/Makefile.in	Mon Dec 30 23:07:24 2002
@@ -1,5 +1,5 @@
 # Generated automatically from Makefile.in by configure.
-# $Id: Makefile.in,v 1.15 2002/02/02 16:01:13 leeh Exp $
+# $Id: Makefile.in,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 # makefile for include/
 
 INSTALL=	@INSTALL@
diff -uNrd -x CVS ircd-hybrid-7rc5/help/opers/stats ircd-hybrid-7-bg/help/opers/stats
--- ircd-hybrid-7rc5/help/opers/stats	Tue Nov 20 20:41:05 2001
+++ ircd-hybrid-7-bg/help/opers/stats	Sat May 24 23:27:09 2003
@@ -8,6 +8,7 @@
 LETTER (* = Oper only.)
 ------ (^ = Can be configured to be oper only.)
 X A - Shows the ADNS DNS servers in use
+X b - Shows cluster bridges
 * c - Shows connect blocks
 * d - Shows D lines
 * e - Shows exemptions to D lines
@@ -26,13 +27,17 @@
   p - Shows opers connected and their idle times
 * q - Shows resv'd nicks and channels
 * r - Shows resource usage by ircd
+* R - Shows configured relay servers
 * s - Shows the server cache
+* S - Shows services blocks
 * t - Shows generic server stats
 * U - Shows shared blocks (Old U: lines)
   u - Shows server uptime
 * v - Shows connected servers and their idle times
 * x - Shows gecos bans (Old X: lines)
+* X - Shows recognized USER parameters
 * y - Shows Y lines
+* Y - Shows equivalent nicks
 * z - Shows memory stats
-* Z - Show ziplinks stats
+* Z - Shows ziplinks stats
 * ? - Shows connected servers and sendq info about them
diff -uNrd -x CVS ircd-hybrid-7rc5/help/opers/umode ircd-hybrid-7-bg/help/opers/umode
--- ircd-hybrid-7rc5/help/opers/umode	Tue Nov 20 20:41:05 2001
+++ ircd-hybrid-7-bg/help/opers/umode	Mon Mar 10 01:09:00 2003
@@ -23,3 +23,9 @@
        * +b     - Can see possible bot warnings.
        * +a     - Is marked as a server admin in whois.
          +g     - "caller id" mode only allow accept clients to message you
+         +T     - Cyrillic to latin character translation (Windows-1251)
+         +Y     - Cyrillic to latin character translation (ISO-8859-5)
+         +R     - Accept PRIVMSGs from registered nicks only
+         +S     - Accept PRIVMSGs from SSL-connected clients only
+         +e     - Show server numeric replies in alternative language
+       * +q     - Can see remote client connection notices
diff -uNrd -x CVS ircd-hybrid-7rc5/help/users/umode ircd-hybrid-7-bg/help/users/umode
--- ircd-hybrid-7rc5/help/users/umode	Tue Nov 20 22:22:51 2001
+++ ircd-hybrid-7-bg/help/users/umode	Mon Mar 10 01:09:00 2003
@@ -8,3 +8,8 @@
                   Use the /oper command to attain this.
          +i     - Designates this client 'invisible'.
          +g     - "caller id" mode only allow accept clients to message you
+         +T     - Cyrillic to latin character translation (Windows-1251)
+         +Y     - Cyrillic to latin character translation (ISO-8859-5)
+         +R     - Accept PRIVMSGs from registered nicks only
+         +S     - Accept PRIVMSGs from SSL-connected clients only
+         +e     - Show server numeric replies in alternative language
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/Makefile.in ircd-hybrid-7-bg/iauth/Makefile.in
--- ircd-hybrid-7rc5/iauth/Makefile.in	Fri Aug 17 20:54:04 2001
+++ ircd-hybrid-7-bg/iauth/Makefile.in	Mon Dec 30 23:07:25 2002
@@ -1,5 +1,5 @@
 # IAuth Makefile (C) Patrick Alken 1999
-# $Id: Makefile.in,v 7.7 2001/08/18 00:54:04 jdc Exp $
+# $Id: Makefile.in,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
 
 CC	= @CC@
 CFLAGS	= @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\"
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/include/auth.h ircd-hybrid-7-bg/iauth/include/auth.h
--- ircd-hybrid-7rc5/iauth/include/auth.h	Tue Jan  4 19:20:01 2000
+++ ircd-hybrid-7-bg/iauth/include/auth.h	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: auth.h,v 7.5 2000/01/05 00:20:01 wnder Exp $
+ *   $Id: auth.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_auth_h
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/include/class.h ircd-hybrid-7-bg/iauth/include/class.h
--- ircd-hybrid-7rc5/iauth/include/class.h	Tue Jan  4 19:20:02 2000
+++ ircd-hybrid-7-bg/iauth/include/class.h	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: class.h,v 7.2 2000/01/05 00:20:02 wnder Exp $
+ *   $Id: class.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_class_h
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/include/commands.h ircd-hybrid-7-bg/iauth/include/commands.h
--- ircd-hybrid-7rc5/iauth/include/commands.h	Tue Jan  4 19:20:02 2000
+++ ircd-hybrid-7-bg/iauth/include/commands.h	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: commands.h,v 7.2 2000/01/05 00:20:02 wnder Exp $
+ *   $Id: commands.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_commands_h
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/include/conf.h ircd-hybrid-7-bg/iauth/include/conf.h
--- ircd-hybrid-7rc5/iauth/include/conf.h	Tue Jan  4 19:20:02 2000
+++ ircd-hybrid-7-bg/iauth/include/conf.h	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: conf.h,v 7.4 2000/01/05 00:20:02 wnder Exp $
+ *   $Id: conf.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_conf_h
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/include/iauth.h ircd-hybrid-7-bg/iauth/include/iauth.h
--- ircd-hybrid-7rc5/iauth/include/iauth.h	Sun Dec 17 21:01:39 2000
+++ ircd-hybrid-7-bg/iauth/include/iauth.h	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: iauth.h,v 7.5 2000/12/18 02:01:39 cosine Exp $
+ *   $Id: iauth.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_iauth_h
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/include/log.h ircd-hybrid-7-bg/iauth/include/log.h
--- ircd-hybrid-7rc5/iauth/include/log.h	Sun Dec 17 21:01:39 2000
+++ ircd-hybrid-7-bg/iauth/include/log.h	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: log.h,v 7.1 2000/12/18 02:01:39 cosine Exp $
+ *   $Id: log.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_log_h
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/include/match.h ircd-hybrid-7-bg/iauth/include/match.h
--- ircd-hybrid-7rc5/iauth/include/match.h	Sun Dec 17 21:01:39 2000
+++ ircd-hybrid-7-bg/iauth/include/match.h	Mon Dec 30 23:07:25 2002
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: match.h,v 7.1 2000/12/18 02:01:39 cosine Exp $
+ *   $Id: match.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 #ifndef INCLUDED_match_h
 #define INCLUDED_match_h
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/include/misc.h ircd-hybrid-7-bg/iauth/include/misc.h
--- ircd-hybrid-7rc5/iauth/include/misc.h	Mon Sep 13 15:16:09 1999
+++ ircd-hybrid-7-bg/iauth/include/misc.h	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: misc.h,v 7.3 1999/09/13 19:16:09 wnder Exp $
+ *   $Id: misc.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_misc_h
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/include/mtree.h ircd-hybrid-7-bg/iauth/include/mtree.h
--- ircd-hybrid-7rc5/iauth/include/mtree.h	Sun Jan  9 00:59:10 2000
+++ ircd-hybrid-7-bg/iauth/include/mtree.h	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: mtree.h,v 7.5 2000/01/09 05:59:10 wnder Exp $
+ *   $Id: mtree.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_mtree_h
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/include/res.h ircd-hybrid-7-bg/iauth/include/res.h
--- ircd-hybrid-7rc5/iauth/include/res.h	Fri Sep 10 14:14:30 1999
+++ ircd-hybrid-7-bg/iauth/include/res.h	Mon Dec 30 23:07:25 2002
@@ -1,7 +1,7 @@
 /*
  * iauth/res.h (C)opyright 1992 Darren Reed.
  *
- * $Id: res.h,v 7.2 1999/09/10 18:14:30 wnder Exp $
+ * $Id: res.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_res_h
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/include/sock.h ircd-hybrid-7-bg/iauth/include/sock.h
--- ircd-hybrid-7rc5/iauth/include/sock.h	Tue Jan  4 19:20:03 2000
+++ ircd-hybrid-7-bg/iauth/include/sock.h	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: sock.h,v 7.4 2000/01/05 00:20:03 wnder Exp $
+ *   $Id: sock.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_sock_h
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/source/Makefile.in ircd-hybrid-7-bg/iauth/source/Makefile.in
--- ircd-hybrid-7rc5/iauth/source/Makefile.in	Fri Aug 17 20:54:04 2001
+++ ircd-hybrid-7-bg/iauth/source/Makefile.in	Mon Dec 30 23:07:25 2002
@@ -1,7 +1,7 @@
 #
 # Makefile.in for ircd/iauth
 #
-# $Id: Makefile.in,v 7.11 2001/08/18 00:54:04 jdc Exp $
+# $Id: Makefile.in,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
 #
 CC	= @CC@
 RM	= @RM@
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/source/auth.c ircd-hybrid-7-bg/iauth/source/auth.c
--- ircd-hybrid-7rc5/iauth/source/auth.c	Thu Jan 10 15:45:13 2002
+++ ircd-hybrid-7-bg/iauth/source/auth.c	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: auth.c,v 7.9 2002/01/10 20:45:13 jmallett Exp $
+ *  $Id: auth.c,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #include <stdio.h>
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/source/class.c ircd-hybrid-7-bg/iauth/source/class.c
--- ircd-hybrid-7rc5/iauth/source/class.c	Tue Jan  4 19:20:06 2000
+++ ircd-hybrid-7-bg/iauth/source/class.c	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: class.c,v 7.2 2000/01/05 00:20:06 wnder Exp $
+ *   $Id: class.c,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #include <stdio.h>
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/source/commands.c ircd-hybrid-7-bg/iauth/source/commands.c
--- ircd-hybrid-7rc5/iauth/source/commands.c	Tue Jan  4 19:20:06 2000
+++ ircd-hybrid-7-bg/iauth/source/commands.c	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: commands.c,v 7.3 2000/01/05 00:20:06 wnder Exp $
+ *   $Id: commands.c,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #include <stdio.h>
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/source/conf.c ircd-hybrid-7-bg/iauth/source/conf.c
--- ircd-hybrid-7rc5/iauth/source/conf.c	Sat Jan  8 16:38:49 2000
+++ ircd-hybrid-7-bg/iauth/source/conf.c	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: conf.c,v 7.6 2000/01/08 21:38:49 wnder Exp $
+ *   $Id: conf.c,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #include <stdio.h>
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/source/iauth.c ircd-hybrid-7-bg/iauth/source/iauth.c
--- ircd-hybrid-7rc5/iauth/source/iauth.c	Sat May 26 11:45:37 2001
+++ ircd-hybrid-7-bg/iauth/source/iauth.c	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: iauth.c,v 7.5 2001/05/26 15:45:37 cosine Exp $
+ *   $Id: iauth.c,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #include <stdio.h>
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/source/log.c ircd-hybrid-7-bg/iauth/source/log.c
--- ircd-hybrid-7rc5/iauth/source/log.c	Sun Dec 17 21:01:40 2000
+++ ircd-hybrid-7-bg/iauth/source/log.c	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: log.c,v 1.1 2000/12/18 02:01:40 cosine Exp $
+ *   $Id: log.c,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #include <stdio.h>
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/source/match.c ircd-hybrid-7-bg/iauth/source/match.c
--- ircd-hybrid-7rc5/iauth/source/match.c	Sun Dec 17 21:01:40 2000
+++ ircd-hybrid-7-bg/iauth/source/match.c	Mon Dec 30 23:07:25 2002
@@ -22,7 +22,7 @@
  * Cleanup of collapse and match
  * Moved static calls variable to match
  * Added asserts for null pointers
- * $Id: match.c,v 1.1 2000/12/18 02:01:40 cosine Exp $
+ * $Id: match.c,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  *
  */
 
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/source/misc.c ircd-hybrid-7-bg/iauth/source/misc.c
--- ircd-hybrid-7rc5/iauth/source/misc.c	Sun Dec  9 22:15:02 2001
+++ ircd-hybrid-7-bg/iauth/source/misc.c	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: misc.c,v 7.5 2001/12/10 03:15:02 jdc Exp $
+ *   $Id: misc.c,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #include <stdio.h>
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/source/mtree.c ircd-hybrid-7-bg/iauth/source/mtree.c
--- ircd-hybrid-7rc5/iauth/source/mtree.c	Thu Jan 10 15:45:13 2002
+++ ircd-hybrid-7-bg/iauth/source/mtree.c	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: mtree.c,v 7.8 2002/01/10 20:45:13 jmallett Exp $
+ *   $Id: mtree.c,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 /*
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/source/res.c ircd-hybrid-7-bg/iauth/source/res.c
--- ircd-hybrid-7rc5/iauth/source/res.c	Tue Jan  9 20:00:22 2001
+++ ircd-hybrid-7-bg/iauth/source/res.c	Mon Dec 30 23:07:25 2002
@@ -4,7 +4,7 @@
  * shape or form. The author takes no responsibility for any damage or loss
  * of property which results from the use of this software.
  *
- * $Id: res.c,v 7.4 2001/01/10 01:00:22 toot Exp $
+ * $Id: res.c,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  *
  * July 1999 - Rewrote a bunch of stuff here. Change hostent builder code,
  *     added callbacks and reference counting of returned hostents.
diff -uNrd -x CVS ircd-hybrid-7rc5/iauth/source/sock.c ircd-hybrid-7-bg/iauth/source/sock.c
--- ircd-hybrid-7rc5/iauth/source/sock.c	Thu Jan 10 15:45:13 2002
+++ ircd-hybrid-7-bg/iauth/source/sock.c	Mon Dec 30 23:07:25 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: sock.c,v 7.10 2002/01/10 20:45:13 jmallett Exp $
+ *   $Id: sock.c,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #include <stdio.h>
diff -uNrd -x CVS ircd-hybrid-7rc5/include/Makefile.in ircd-hybrid-7-bg/include/Makefile.in
--- ircd-hybrid-7rc5/include/Makefile.in	Mon Apr 29 18:30:24 2002
+++ ircd-hybrid-7-bg/include/Makefile.in	Mon Dec 30 23:07:25 2002
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.5 2002/04/29 22:30:24 leeh Exp $
+# $Id: Makefile.in,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
 # makefile for include/
 
 INSTALL=	@INSTALL@
diff -uNrd -x CVS ircd-hybrid-7rc5/include/balloc.h ircd-hybrid-7-bg/include/balloc.h
--- ircd-hybrid-7rc5/include/balloc.h	Fri Jul 12 12:14:04 2002
+++ ircd-hybrid-7-bg/include/balloc.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: balloc.h,v 1.12 2002/07/12 16:14:04 androsyn Exp $
+ *  $Id: balloc.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_blalloc_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/channel.h ircd-hybrid-7-bg/include/channel.h
--- ircd-hybrid-7rc5/include/channel.h	Mon Oct 28 16:09:20 2002
+++ ircd-hybrid-7-bg/include/channel.h	Mon Mar 10 01:09:00 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: channel.h,v 7.120 2002/10/28 21:09:20 bill Exp $
+ *  $Id: channel.h,v 1.2 2003/03/10 06:09:00 demond Exp $
  */
 
 #ifndef INCLUDED_channel_h
@@ -43,6 +43,22 @@
   char  key[KEYLEN];
 };
 
+/* used for pacing JOINs, PARTs and PRIVMSGs/NOTICEs to channel
+ *                                                     -demond
+ */
+struct Pace
+{
+  struct Pace *next;
+  int shownames;            /* if nonzero, show names to client on JOIN */
+                            /* buffer len on NICK/QUIT notification */
+  char *text;               /* message text on chanmsg */
+                            /* send buffer on NICK/QUIT notification */
+  char nick[NICKLEN+1];     /* nick-originator on JOIN/PART or "command" */
+  char user[HOSTLEN+1];     /* username on JOIN/PART or "butone" on chanmsg */
+  char host[HOSTLEN+1];     /* host on JOIN/PART or originator on chanmsg */
+  char chan[1];
+};
+
 /* channel structure */
 
 struct Channel
@@ -86,19 +102,30 @@
 #endif
   dlink_list      locvoiced;
   dlink_list      locpeons;             /* ... */
-  
+
   dlink_list      invites;
   dlink_list      banlist;
   dlink_list      exceptlist;
   dlink_list      invexlist;
+  dlink_list      denylist;				/* gecos & channame deny list */
+
+  dlink_list      substlist;            /* word substitutions list */
 
   time_t          first_received_message_time; /* channel flood control */
   int             received_number_of_privmsgs;
   int             flood_noticed;
 
-  int             num_mask;              /* number of bans+exceptions+invite exceptions */
+  int             num_mask;             /* number of bans+exceptions+invite exceptions */
   time_t          channelts;
   char            chname[CHANNELLEN+1];
+
+  struct Pace     *joinh, *joint;       /* pace JOIN list head, tail */
+  struct Pace     *parth, *partt;       /* pace PART list head, tail */
+  int             joins, parts;         /* pace counters */
+
+  struct Pace     *msgh, *msgt;         /* pace chanmsg list head, tail */
+  struct Pace     *sendh, *sendt;       /* pace NICK/QUIT list head, tail */
+  int             msgs, sends;          /* pace counters */
 };
 
 extern  struct  Channel *GlobalChannelList;
@@ -106,6 +133,7 @@
 void init_channels(void);
 void cleanup_channels(void *);
 
+void pace_channels(void *);
 
 extern int     can_send (struct Channel *chptr, struct Client *who);
 extern int     is_banned (struct Channel *chptr, struct Client *who);
@@ -148,6 +176,11 @@
 
 extern void check_splitmode(void *);
 
+extern void add_pace(struct Channel *, struct Client *, char *, int, int);
+extern void add_pace_msg(struct Channel *, struct Client *, struct Client *, char *, char *);
+extern void add_pace_send(struct Channel *, char *, int);
+extern void sendto_chanlists_local(struct Channel *, char *, int);
+
 /*
 ** Channel Related macros follow
 */
@@ -161,15 +194,17 @@
 
 #define IsChannelName(name) ((name) && (*(name) == '#' || *(name) == '&'))
 
-struct Ban          /* also used for exceptions -orabidoo */
+struct Ban          						/* also used for exceptions -orabidoo */
 {
   char *banstr;
   char *who;
   time_t when;
 };
 
-#define CLEANUP_CHANNELS_TIME (30*60)
-#define MAX_VCHAN_TIME (60*60)
+#define CLEANUP_CHANNELS_TIME	(30*60)
+#define MAX_VCHAN_TIME			(60*60)
+#define PACE_CHANNELS_TIME		1           /* pace queue flush frequency */
+
 /* Number of chanops, peon, voiced, halfops sublists */
 #ifdef REQUIRE_OANDV
 #define NUMLISTS 5
@@ -181,8 +216,28 @@
 void do_channel_integrity_check(void);
 #endif
 
-void set_channel_topic(struct Channel *chptr, const char *topic, const char *topic_info, time_t topicts); 
+void set_channel_topic(struct Channel *chptr, const char *topic, const char *topic_info, time_t topicts);
 void free_topic(struct Channel *);
 int allocate_topic(struct Channel *);
+
+#define MAX_PACEJOIN 100					/* max number of events in pace queue */
+#define MAX_PACEMSG  100
+#define MAX_PACESEND 100
+
+extern char *strip_color(const char *, int);
+
+/*
+ * we don't need this anymore...   -demond
+ *
+#define strip_color(x) if (x) {\
+    char *p = x, *q = x;\
+    if (strchr(x, '\003') || strchr(x, '\033'))\
+      do {\
+        if ((*q == '\003') || (*q == '\033'))\
+          ++q;\
+      }\
+        while (*p++ = *q++);\
+    }
+*/
 
 #endif  /* INCLUDED_channel_h */
diff -uNrd -x CVS ircd-hybrid-7rc5/include/channel_mode.h ircd-hybrid-7-bg/include/channel_mode.h
--- ircd-hybrid-7rc5/include/channel_mode.h	Mon Oct 28 16:09:20 2002
+++ ircd-hybrid-7-bg/include/channel_mode.h	Mon Mar 10 01:09:00 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: channel_mode.h,v 7.13 2002/10/28 21:09:20 bill Exp $
+ *  $Id: channel_mode.h,v 1.2 2003/03/10 06:09:00 demond Exp $
  */
 
 
@@ -44,9 +44,9 @@
 #define MODEBUFLEN      200
 
 /* Maximum mode changes allowed per client, per server is different */
-#define MAXMODEPARAMS   4
+#define MAXMODEPARAMS   6
 
-extern void    set_channel_mode(struct Client *, struct Client *, 
+extern void    set_channel_mode(struct Client *, struct Client *,
                                 struct Channel *, int, char **, char *);
 
 #ifdef ANONOPS
@@ -65,41 +65,52 @@
 */
 
 /* can_send results */
-#define CAN_SEND_NO	0
+#define CAN_SEND_NO		0
 #define CAN_SEND_NONOP  1
 #define CAN_SEND_OPV	2
-
+#define CAN_SEND_NOTREG 3      /* nonreg nicks cannot send to +M chans */
 
 /* Channel related flags */
 
-#define CHFL_PEON	0x0000 /* normal member of channel */
+#define CHFL_PEON		0x0000 /* normal member of channel */
 #define CHFL_CHANOP     0x0001 /* Channel operator */
 #define CHFL_VOICE      0x0002 /* the power to speak */
 #define CHFL_DEOPPED    0x0004 /* deopped by us, modes need to be bounced */
 #define CHFL_HALFOP     0x0008 /* Channel half op */
 #define CHFL_BAN        0x0010 /* ban channel flag */
 #define CHFL_EXCEPTION  0x0020 /* exception to ban channel flag */
+#define CHFL_SUBST		0x0040 /* word subst flag */
 #define CHFL_INVEX      0x0080
+#define CHFL_DENY       0x0100 /* gecos & channame deny flag */
 
 /* Channel Visibility macros */
 
-#define MODE_PEON	CHFL_PEON
+#define MODE_PEON		CHFL_PEON
 #define MODE_CHANOP     CHFL_CHANOP
 #define MODE_VOICE      CHFL_VOICE
-#define MODE_HALFOP	CHFL_HALFOP
+#define MODE_HALFOP		CHFL_HALFOP
 #define MODE_DEOPPED	CHFL_DEOPPED
 
 /* channel modes ONLY */
+
+#define MODE_REGCHAN    0x0001  /* channel is registered with services */
+#define MODE_REGNICKS   0x0002  /* only registered nicknames can join  */
+#define MODE_REGSPEAK	0x0004  /* only registered nicknames may speak */
 #define MODE_PRIVATE    0x0008
 #define MODE_SECRET     0x0010
 #define MODE_MODERATED  0x0020
 #define MODE_TOPICLIMIT 0x0040
 #define MODE_INVITEONLY 0x0080
 #define MODE_NOPRIVMSGS 0x0100
+#define MODE_NOCOLOR    0x0200  /* strip mIRC & ANSI color */
 #define MODE_BAN        0x0400
 #define MODE_EXCEPTION  0x0800
-#define MODE_INVEX	0x2000
+#define MODE_PACE		0x1000  /* pacing JOIN, PART, PRIVMSG and QUIT */
+#define MODE_INVEX		0x2000
 #define MODE_HIDEOPS    0x4000
+#define MODE_CYRNICKS	0x8000  /* cyrillic nicks are NOT allowed to join */
+#define MODE_NOREPEAT  0x10000  /* no public repeating allowed */
+#define MODE_SSLONLY   0x20000	/* only SSL-connected clients allowed */
 
 /*
  * mode flags which take another parameter (With PARAmeterS)
@@ -118,6 +129,16 @@
 #define ParanoidChannel(x)	((x) && ((x)->mode.mode &\
 			        (MODE_PRIVATE|MODE_INVITEONLY))==\
 		                (MODE_PRIVATE|MODE_INVITEONLY))
+
+/* colors stripped from chanmsgs, notices, ctcps, quits */
+#define NoColorChannel(x)       ((x) && ((x)->mode.mode & MODE_NOCOLOR))
+#define RegNicksOnlyChannel(x)  ((x) && ((x)->mode.mode & MODE_REGNICKS))
+#define RegsMaySpeakChannel(x)  ((x) && ((x)->mode.mode & MODE_REGSPEAK))
+#define NoCyrNicksChannel(x)    ((x) && ((x)->mode.mode & MODE_CYRNICKS))
+/* we are pacing JOINs, PARTs, PRIVMSGs and QUITs sent to the channel */
+#define PaceChannel(x)			((x) && ((x)->mode.mode & MODE_PACE))
+#define NoRepeatChannel(x)		((x) && ((x)->mode.mode & MODE_NOREPEAT))
+#define SSLonlyChannel(x)		((x) && ((x)->mode.mode & MODE_SSLONLY))
 
 struct ChModeChange
 {
diff -uNrd -x CVS ircd-hybrid-7rc5/include/class.h ircd-hybrid-7-bg/include/class.h
--- ircd-hybrid-7rc5/include/class.h	Sat Mar  9 16:48:35 2002
+++ ircd-hybrid-7-bg/include/class.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: class.h,v 7.10 2002/03/09 21:48:35 androsyn Exp $
+ *  $Id: class.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_class_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/client.h ircd-hybrid-7-bg/include/client.h
--- ircd-hybrid-7rc5/include/client.h	Wed Oct 30 12:44:53 2002
+++ ircd-hybrid-7-bg/include/client.h	Mon Mar 10 01:09:00 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: client.h,v 7.153 2002/10/30 17:44:53 wiz Exp $
+ *  $Id: client.h,v 1.2 2003/03/10 06:09:00 demond Exp $
  */
 
 #ifndef INCLUDED_client_h
@@ -50,7 +50,6 @@
 
 #define CLIENT_BUFSIZE 512      /* must be at least 512 bytes */
 
-
 /*
  * pre declare structs
  */
@@ -61,6 +60,47 @@
 struct Client;
 struct LocalUser;
 
+struct Repeat
+{
+	struct Channel *chptr;		/* last phrase block */
+	char *text;
+	time_t lastphrase;
+};
+
+struct SLink;
+struct Watch;
+
+typedef struct Client 	aClient;
+typedef struct Channel 	aChannel;
+typedef struct ConfItem aConfItem;
+typedef struct Watch 	aWatch;
+typedef struct Ban 		aBan;
+
+typedef struct SLink Link;
+
+struct SLink
+{
+    struct SLink	*next;
+    union
+    {
+		aClient		*cptr;
+		aChannel	*chptr;
+		aConfItem	*aconf;
+		aBan		*banptr;
+		aWatch		*wptr;
+		char		*cp;
+    } value;
+    int				flags;
+};
+
+struct Watch
+{
+    aWatch	*hnext;
+    time_t	lasttime;
+    Link	*watch;
+    char	nick[1];
+};
+
 /*
  * Client structures
  */
@@ -68,19 +108,21 @@
 {
   dlink_list     channel;       /* chain of channel pointer blocks */
   dlink_list     invited;       /* chain of invite pointer blocks */
+  dlink_list	 repeat;		/* chain of last phrases per channel blocks */
   char*          away;          /* pointer to away message */
   time_t         last_away;     /* Away since... */
   time_t         last;
   int            refcnt;        /* Number of times this block is referenced */
   int            joined;        /* number of channels joined */
   const char*    server;        /* pointer to scached server name */
-  char*          response;  /* expected response from client */
-  char*          auth_oper; /* Operator to become if they supply the response.*/
-	/* client ID, unique ID per client */
+  char*          response;  	/* expected response from client */
+  char*          auth_oper; 	/* Operator to become if they supply the response.*/
+  /* client ID, unique ID per client */
   char id[IDLEN + 1];
   char id_key[IDLEN + 1];
   /* When did we detach from them, if they are detached... */
-  time_t            last_detach_time;
+  time_t         last_detach_time;
+  int            known;			/* USER came from particular type of client */
 };
 
 struct Server
@@ -127,7 +169,7 @@
   struct Client*    prev;
   struct Client*    hnext;
   struct Client*    idhnext;
-	
+
   struct Client*    lnext;      /* Used for Server->servers/users */
   struct Client*    lprev;      /* Used for Server->servers/users */
 
@@ -144,34 +186,35 @@
   unsigned int      umodes;     /* opers, normal users subset */
   unsigned int      flags;      /* client flags */
   unsigned int      flags2;     /* ugh. overflow */
+  unsigned int      svsflags;   /* services flags */
 
   int               slink_pid;  /* pid of servlink process if any */
   int               hopcount;   /* number of servers to this 0 = local */
-  int		    hidden_server;
+  int		    	hidden_server;
   unsigned short    status;     /* Client type */
   unsigned char     handler;    /* Handler index */
-  char              eob;	/* server eob has been received */
-  unsigned long     serial;	/* used to enforce 1 send per nick */
+  char              eob;		/* server eob has been received */
+  unsigned long     serial;		/* used to enforce 1 send per nick */
   unsigned long     lazyLinkClientExists; /* This client exists on the
-					   * bit mapped lazylink servers 
+					   * bit mapped lazylink servers
 					   * mapped here
 					   */
   /*
    * client->name is the unique name for a client nick or host
    */
-  char              name[HOSTLEN + 1]; 
+  char              name[HOSTLEN + 1];
   /*
    * client->llname is used to store the clients requested nick
    * temporarily for new connections.
    */
   char              llname[NICKLEN];
-  /* 
-   * client->username is the username from ident or the USER message, 
-   * If the client is idented the USER message is ignored, otherwise 
-   * the username part of the USER message is put here prefixed with a 
+  /*
+   * client->username is the username from ident or the USER message,
+   * If the client is idented the USER message is ignored, otherwise
+   * the username part of the USER message is put here prefixed with a
    * tilde depending on the I:line, Once a client has registered, this
    * field should be considered read-only.
-   */ 
+   */
   char              username[USERLEN + 1]; /* client's username */
   /*
    * client->host contains the resolved name or ip address
@@ -181,27 +224,38 @@
    */
   char              host[HOSTLEN + 1];     /* client's hostname */
   /*
-   * client->info for unix clients will normally contain the info from the 
+   * this contains client's real host, whereas host[] field
+   * is modified (in register_local_user) to store masked hostname
+   *                                                     -demond
+   */
+  char          	realhost[HOSTLEN + 1];
+  /*
+   * this contains client's IP, sent by CAP_IP-able server
+   *                                                     -demond
+   */
+  char          	ip[HOSTLEN + 1];
+  /*
+   * client->info for unix clients will normally contain the info from the
    * gcos field in /etc/passwd but anything can go here.
    */
   char              info[REALLEN + 1]; /* Free form additional client info */
 
-/* cache table of mappings between top level chan and sub vchan client
- * is on.
- */
-
-  dlink_list      vchan_map;
+  /* cache table of mappings between top level chan and sub vchan client
+   * is on.
+   */
+  dlink_list      	vchan_map;
 
   /* caller ID allow list */
   /* This has to be here, since a client on an on_allow_list could
    * be a remote client. simpler to keep both here.
    */
-  dlink_list	allow_list;	/* clients I'll allow to talk to me */
-  dlink_list	on_allow_list;	/* clients that have =me= on their allow list*/
-  
-  
-  struct LocalUser *localClient;
+  dlink_list		allow_list;		/* clients I'll allow to talk to me */
+  dlink_list		on_allow_list;	/* clients that have =me= on their allow list*/
+
+  Link 				*watch;
+  int 				watches;
 
+  struct LocalUser *localClient;
 };
 
 struct LocalUser
@@ -211,13 +265,13 @@
    * (directly connected to *this* server with a socket.
    */
   /* Anti flooding part, all because of lamers... */
-  time_t            last_join_time;   /* when this client last 
+  time_t            last_join_time;   /* when this client last
                                          joined a channel */
-  time_t            last_leave_time;  /* when this client last 
+  time_t            last_leave_time;  /* when this client last
                                        * left a channel */
-  int               join_leave_count; /* count of JOIN/LEAVE in less than 
+  int               join_leave_count; /* count of JOIN/LEAVE in less than
                                          MIN_JOIN_LEAVE_TIME seconds */
-  int               oper_warn_count_down; /* warn opers of this possible 
+  int               oper_warn_count_down; /* warn opers of this possible
                                           spambot every time this gets to 0 */
   time_t            last_caller_id_time;
   time_t            first_received_message_time;
@@ -231,10 +285,10 @@
    * we want to use unsigned int here so the sizes have a better chance of
    * staying the same on 64 bit machines. The current trend is to use
    * I32LP64, (32 bit ints, 64 bit longs and pointers) and since ircd
-   * will NEVER run on an operating system where ints are less than 32 bits, 
+   * will NEVER run on an operating system where ints are less than 32 bits,
    * it's a relatively safe bet to use ints. Since right shift operations are
-   * performed on these, it's not safe to allow them to become negative, 
-   * which is possible for long running server connections. Unsigned values 
+   * performed on these, it's not safe to allow them to become negative,
+   * which is possible for long running server connections. Unsigned values
    * generally overflow gracefully. --Bleep
    */
   unsigned int      sendM;      /* Statistics: protocol messages send */
@@ -250,8 +304,8 @@
 
   struct irc_inaddr ip;
   unsigned short    port;       /* and the remote port# too :-) */
-  int 		    aftype;	/* Makes life easier for DNS res in IPV6 */
-  struct DNSQuery   *dns_query;  /* result returned from resolver query */
+  int 		    	aftype;		/* Makes life easier for DNS res in IPV6 */
+  struct DNSQuery   *dns_query;	/* result returned from resolver query */
   unsigned long     serverMask; /* Only used for Lazy Links */
   time_t            last_nick_change;
   int               number_of_nick_changes;
@@ -260,7 +314,7 @@
    * string, this field should be considered read-only once the connection
    * has been made. (set in s_bsd.c only)
    */
-  char              sockhost[HOSTIPLEN + 1]; /* This is the host name from the 
+  char              sockhost[HOSTIPLEN + 1]; /* This is the host name from the
                                               socket ip address as string */
   /*
    * XXX - there is no reason to save this, it should be checked when it's
@@ -303,12 +357,11 @@
    * to avoid flooding.
    *   -- adrian
    */
-  int allow_read;	/* how many we're allowed to read in this second */
+  int allow_read;		/* how many we're allowed to read in this second */
   int actually_read;    /* how many we've actually read in this second */
   int sent_parsed;      /* how many messages we've parsed in this second */
   time_t last_knock;    /* time of last knock */
   unsigned long random_ping;
-
 };
 
 /*
@@ -337,25 +390,26 @@
 
 #define IsOper(x)		((x)->umodes & FLAGS_OPER)
 #define IsAdmin(x)		((x)->umodes & FLAGS_ADMIN)
+#define IsSSLaccept(x)	((x)->umodes & FLAGS_SSLACCEPT)
 
 #define SetConnecting(x)        {(x)->status = STAT_CONNECTING; \
-				 (x)->handler = UNREGISTERED_HANDLER; }
+				 				(x)->handler = UNREGISTERED_HANDLER; }
 
 #define SetHandshake(x)         {(x)->status = STAT_HANDSHAKE; \
-				 (x)->handler = UNREGISTERED_HANDLER; }
+				 				(x)->handler = UNREGISTERED_HANDLER; }
 
 #define SetMe(x)                {(x)->status = STAT_ME; \
-				 (x)->handler = UNREGISTERED_HANDLER; }
+				 				(x)->handler = UNREGISTERED_HANDLER; }
 
 #define SetUnknown(x)           {(x)->status = STAT_UNKNOWN; \
-				 (x)->handler = UNREGISTERED_HANDLER; }
+				 				(x)->handler = UNREGISTERED_HANDLER; }
 
 #define SetServer(x)            {(x)->status = STAT_SERVER; \
-				 (x)->handler = SERVER_HANDLER; }
+				 				(x)->handler = SERVER_HANDLER; }
 
 #define SetClient(x)            {(x)->status = STAT_CLIENT; \
-				 (x)->handler = IsOper((x)) ? \
-					OPER_HANDLER : CLIENT_HANDLER; }
+				 				(x)->handler = IsOper((x)) ? \
+								OPER_HANDLER : CLIENT_HANDLER; }
 
 #define STAT_CLIENT_PARSE (STAT_UNKNOWN | STAT_CLIENT)
 #define STAT_SERVER_PARSE (STAT_CONNECTING | STAT_HANDSHAKE | STAT_SERVER)
@@ -378,9 +432,7 @@
 #define TS_DOESTS       0x20000000
 #define DoesTS(x)       ((x)->tsinfo == TS_DOESTS)
 
-
 /* housekeeping flags */
-
 #define FLAGS_PINGSENT     0x0001 /* Unreplied ping sent */
 #define FLAGS_DEADSOCKET   0x0002 /* Local socket is dead--Exiting soon */
 #define FLAGS_KILLED       0x0004 /* Prevents "QUIT" from being sent for this*/
@@ -395,10 +447,10 @@
 #define FLAGS_CRYPTOUT     0x4000 /* outgoing data must be encrypted */
 #define FLAGS_WAITAUTH     0x8000 /* waiting for CRYPTLINK AUTH command */
 #define FLAGS_SERVLINK     0x10000 /* servlink has servlink process */
-#define FLAGS_MARK	   0x20000 /* marked client */
+#define FLAGS_MARK	   	   0x20000 /* marked client */
 #define FLAGS_CANFLOOD	   0x40000 /* client has the ability to flood */
-/* umodes, settable flags */
 
+/* umodes, settable flags */
 #define FLAGS_SERVNOTICE   0x0001 /* server notices such as kill */
 #define FLAGS_CCONN        0x0002 /* Client Connections */
 #define FLAGS_REJ          0x0004 /* Bot Rejections */
@@ -412,22 +464,30 @@
 #define FLAGS_INVISIBLE    0x0400 /* makes user invisible */
 #define FLAGS_BOTS         0x0800 /* shows bots */
 #define FLAGS_EXTERNAL     0x1000 /* show servers introduced and splitting */
+#define FLAGS_REMOTE       0x2000 /* Remote client registering */
 #define FLAGS_CALLERID     0x4000 /* block unless caller id's */
 #define FLAGS_UNAUTH       0x8000 /* show unauth connects here */
 #define FLAGS_LOCOPS       0x10000 /* show locops */
+#define FLAGS_TRANSWIN     0x100000 /* translate cyrillic Windows-1251 */
+#define FLAGS_TRANSISO     0x200000 /* translate cyrillic ISO-8859-5 */
+#define FLAGS_REGACCEPT    0x400000 /* accepting from reg nicks only */
+#define FLAGS_ALTLOCALE    0x800000 /* receiving numeric replies in alt textdomain */
 
 /* user information flags, only settable by remote mode or local oper */
 #define FLAGS_OPER         0x20000 /* Operator */
 #define FLAGS_ADMIN        0x40000 /* Admin on server */
+#define FLAGS_SSLACCEPT    0x80000 /* accepting from SSL-connected clients only */
 
 #define FLAGS_ALL	   FLAGS_SERVNOTICE
 
+#define FLAGS_SVS_IDENT    0x0001  /* client has identified with services */
+#define FLAGS_SVS_ADMIN    0x0002  /* client has identified as services admin */
 
 /* overflow flags */
 #define FLAGS2_EXEMPTGLINE  0x0001	/* client can't be G-lined */
-#define FLAGS2_EXEMPTKLINE  0x0002      /* client is exempt from kline */
-#define FLAGS2_NOLIMIT      0x0004      /* client is exempt from limits */
-#define FLAGS2_RESTRICTED   0x0008      /* client cannot op others */
+#define FLAGS2_EXEMPTKLINE  0x0002  /* client is exempt from kline */
+#define FLAGS2_NOLIMIT      0x0004  /* client is exempt from limits */
+#define FLAGS2_RESTRICTED   0x0008  /* client cannot op others */
 
 /* oper priv flags */
 #define FLAGS2_OPER_GLOBAL_KILL 0x0020  /* oper can global kill */
@@ -449,20 +509,20 @@
                                  FLAGS2_OPER_REHASH| \
                                  FLAGS2_OPER_ADMIN)
 
-#define FLAGS2_CBURST		0x10000  /* connection burst being sent */
-#define FLAGS2_PING_COOKIE	0x20000		/* PING Cookie */
+#define FLAGS2_CBURST			0x10000  	/* connection burst being sent */
+#define FLAGS2_PING_COOKIE		0x20000		/* PING Cookie */
 #define FLAGS2_IDLE_LINED       0x40000
-#define FLAGS2_IP_SPOOFING      0x80000        /* client IP is spoofed */
-#define FLAGS2_FLOODDONE        0x200000      /* Flood grace period has
-                                               * been ended. */
+#define FLAGS2_IP_SPOOFING      0x80000		/* client IP is spoofed */
+#define FLAGS2_FLOODDONE        0x200000	/* Flood grace period has been ended. */
 
 #define SEND_UMODES  (FLAGS_INVISIBLE | FLAGS_OPER | FLAGS_WALLOP | \
-                      FLAGS_ADMIN)
+                      FLAGS_ADMIN | FLAGS_ALTLOCALE | FLAGS_SSLACCEPT)
 #define ALL_UMODES   (SEND_UMODES | FLAGS_SERVNOTICE | FLAGS_CCONN | \
                       FLAGS_REJ | FLAGS_SKILL | FLAGS_FULL | FLAGS_SPY | \
                       FLAGS_NCHANGE | FLAGS_OPERWALL | FLAGS_DEBUG | \
                       FLAGS_BOTS | FLAGS_EXTERNAL | FLAGS_LOCOPS | \
- 		      FLAGS_ADMIN | FLAGS_UNAUTH | FLAGS_CALLERID)
+ 		      		  FLAGS_REMOTE | FLAGS_UNAUTH | FLAGS_CALLERID | \
+					  FLAGS_TRANSWIN | FLAGS_TRANSISO | FLAGS_REGACCEPT)
 
 #define FLAGS_ID     (FLAGS_NEEDID | FLAGS_GOTID)
 
@@ -474,8 +534,8 @@
 #define IsDead(x)               ((x)->flags & FLAGS_DEADSOCKET)
 #define SetDead(x)              ((x)->flags |= FLAGS_DEADSOCKET)
 #define SetAccess(x)            ((x)->flags |= FLAGS_CHKACCESS)
-#define IsClosing(x)		((x)->flags & FLAGS_CLOSING)
-#define SetClosing(x)		((x)->flags |= FLAGS_CLOSING)
+#define IsClosing(x)			((x)->flags & FLAGS_CLOSING)
+#define SetClosing(x)			((x)->flags |= FLAGS_CLOSING)
 #define ClearAccess(x)          ((x)->flags &= ~FLAGS_CHKACCESS)
 #define IsCryptIn(x)            ((x)->flags &  FLAGS_CRYPTIN)
 #define SetCryptIn(x)           ((x)->flags |= FLAGS_CRYPTIN)
@@ -488,22 +548,33 @@
 #define SetServlink(x)          ((x)->flags |= FLAGS_SERVLINK)
 #define MyConnect(x)            ((x)->localClient != NULL)
 #define MyClient(x)             (MyConnect(x) && IsClient(x))
-#define SetMark(x)		((x)->flags |= FLAGS_MARK)
+#define SetMark(x)			((x)->flags |= FLAGS_MARK)
 #define ClearMark(x)		((x)->flags &= ~FLAGS_MARK)
-#define IsMarked(x)		((x)->flags & FLAGS_MARK)
+#define IsMarked(x)			((x)->flags & FLAGS_MARK)
 #define SetCanFlood(x)		((x)->flags |= FLAGS_CANFLOOD)
 #define ClearCanFlood(x)	((x)->flags &= FLAGS_CANFLOOD)
 #define IsCanFlood(x)		((x)->flags & FLAGS_CANFLOOD)
+#define SendRemoteNotice(x)		((x)->umodes & FLAGS_REMOTE)
+#define SetTransWin(x)          ((x)->umodes |= FLAGS_TRANSWIN)
+#define IsSetTransWin(x)        ((x)->umodes & FLAGS_TRANSWIN)
+#define SetTransISO(x)          ((x)->umodes |= FLAGS_TRANSISO)
+#define IsSetTransISO(x)        ((x)->umodes & FLAGS_TRANSISO)
+#define SetRegAccept(x)         ((x)->umodes |= FLAGS_REGACCEPT)
+#define IsSetRegAccept(x)       ((x)->umodes & FLAGS_REGACCEPT)
+#define SetSSLaccept(x)         ((x)->umodes |= FLAGS_SSLACCEPT)
+#define IsSetSSLaccept(x)       ((x)->umodes & FLAGS_SSLACCEPT)
+#define SetAltLocale(x)         ((x)->umodes |= FLAGS_ALTLOCALE)
+#define IsSetAltLocale(x)       ((x)->umodes & FLAGS_ALTLOCALE)
 
 /* oper flags */
 #define MyOper(x)               (MyConnect(x) && IsOper(x))
 
 #define SetOper(x)              {(x)->umodes |= FLAGS_OPER; \
-				 if (!IsServer((x))) (x)->handler = OPER_HANDLER;}
+				 				if (!IsServer((x))) (x)->handler = OPER_HANDLER;}
 
 #define ClearOper(x)            {(x)->umodes &= ~(FLAGS_OPER|FLAGS_ADMIN); \
-				 if (!IsOper((x)) && !IsServer((x))) \
-				  (x)->handler = CLIENT_HANDLER; }
+				 				if (!IsOper((x)) && !IsServer((x))) \
+				  				(x)->handler = CLIENT_HANDLER; }
 
 #define IsPrivileged(x)         (IsOper(x) || IsServer(x))
 
@@ -524,8 +595,8 @@
 #define SendDebugNotice(x)      ((x)->umodes & FLAGS_DEBUG)
 #define SendNickChange(x)       ((x)->umodes & FLAGS_NCHANGE)
 #define SetWallops(x)           ((x)->umodes |= FLAGS_WALLOP)
-#define SetCallerId(x)		((x)->umodes |= FLAGS_CALLERID)
-#define IsSetCallerId(x)	((x)->umodes & FLAGS_CALLERID)
+#define SetCallerId(x)			((x)->umodes |= FLAGS_CALLERID)
+#define IsSetCallerId(x)		((x)->umodes & FLAGS_CALLERID)
 
 #define SetIpHash(x)            ((x)->flags |= FLAGS_IPHASH)
 #define ClearIpHash(x)          ((x)->flags &= ~FLAGS_IPHASH)
@@ -592,11 +663,11 @@
 extern void           free_client(struct Client* client);
 extern void           add_client_to_list(struct Client* client);
 extern void           remove_client_from_list(struct Client *);
-extern void           add_client_to_llist(struct Client** list, 
+extern void           add_client_to_llist(struct Client** list,
                                           struct Client* client);
-extern void           del_client_from_llist(struct Client** list, 
+extern void           del_client_from_llist(struct Client** list,
                                             struct Client* client);
-extern int            exit_client(struct Client*, struct Client*, 
+extern int            exit_client(struct Client*, struct Client*,
                                   struct Client*, const char*);
 
 
@@ -616,5 +687,17 @@
                              char *nick);
 extern void dead_link(struct Client *client_p);
 extern void exit_aborted_clients(void);
-#endif /* INCLUDED_client_h */
+extern char *translate(struct Client *client_p, char *buf);
+
+#define MAXWATCH		128
+#define WATCHHASHSIZE	U_MAX/16	/* reasonable for bnet i think... -demond */
+
+extern void 	  count_watch_memory(int *, u_long *);
+extern void    	  clear_watch_hash_table(void);
+extern int     	  add_to_watch_hash_table(char *, aClient *);
+extern int     	  del_from_watch_hash_table(char *, aClient *);
+extern int     	  hash_check_watch(aClient *, int);
+extern int     	  hash_del_watch_list(aClient  *);
+extern aWatch 	 *hash_get_watch(char *);
 
+#endif /* INCLUDED_client_h */
diff -uNrd -x CVS ircd-hybrid-7rc5/include/common.h ircd-hybrid-7-bg/include/common.h
--- ircd-hybrid-7rc5/include/common.h	Sat Jan  5 04:14:27 2002
+++ ircd-hybrid-7-bg/include/common.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: common.h,v 7.3 2002/01/05 09:14:27 a1kmm Exp $
+ *  $Id: common.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_common_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/config.h ircd-hybrid-7-bg/include/config.h
--- ircd-hybrid-7rc5/include/config.h	Tue Jul  9 20:05:51 2002
+++ ircd-hybrid-7-bg/include/config.h	Sat May 24 23:27:09 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: config.h,v 7.140 2002/07/10 00:05:51 leeh Exp $
+ *  $Id: config.h,v 1.6 2003/05/25 01:31:33 demond Exp $
  */
 
 #ifndef INCLUDED_config_h
@@ -299,6 +299,8 @@
 #define VCHANS
 #define ANONOPS
 #define HALFOPS
+#define USEPACE
+#undef UMODEQ
 
 /* END OF CONFIGURABLE OPTIONS */
 
@@ -307,6 +309,8 @@
 #undef VCHANS
 #undef ANONOPS
 #undef HALFOPS
+#undef USEPACE
+#undef UMODEQ
 #ifndef HIDE_SERVERS_IPS
 #define HIDE_SERVERS_IPS
 #endif
diff -uNrd -x CVS ircd-hybrid-7rc5/include/config.h.dist ircd-hybrid-7-bg/include/config.h.dist
--- ircd-hybrid-7rc5/include/config.h.dist	Wed Jun 19 16:17:44 2002
+++ ircd-hybrid-7-bg/include/config.h.dist	Fri Mar  7 00:36:11 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: config.h.dist,v 7.58 2002/06/19 20:17:44 leeh Exp $
+ *  $Id: config.h.dist,v 1.2 2003/03/07 05:36:11 demond Exp $
  */
 
 #ifndef INCLUDED_config_h
@@ -299,12 +299,16 @@
 #define VCHANS
 #define ANONOPS
 #define HALFOPS
+#define USEPACE
+#undef UMODEQ
 
 /* disable them for efnet */
 #ifdef EFNET
 #undef VCHANS
 #undef ANONOPS
 #undef HALFOPS
+#undef USEPACE
+#undef UMODEQ
 #ifndef HIDE_SERVERS_IPS
 #define HIDE_SERVERS_IPS
 #endif
diff -uNrd -x CVS ircd-hybrid-7rc5/include/defaults.h ircd-hybrid-7-bg/include/defaults.h
--- ircd-hybrid-7rc5/include/defaults.h	Tue Apr 23 10:26:24 2002
+++ ircd-hybrid-7-bg/include/defaults.h	Mon Mar 10 01:09:00 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: defaults.h,v 7.5 2002/04/23 14:26:24 leeh Exp $
+ *  $Id: defaults.h,v 1.2 2003/03/10 06:09:00 demond Exp $
  */
 
 #ifndef INCLUDED_defaults_h
@@ -89,9 +89,11 @@
 #if defined( WANT_GETTEXT ) && defined( HAVE_GETTEXT ) && defined( MSGPATH )
 #define USE_GETTEXT 1
 #define _(a)       (gettext(a))
+#define __(d, a)   (dgettext(d, a))
 #else
 #undef USE_GETTEXT
 #define _(a)       (a)
+#define __(d, a)   (a)
 #endif
 
 #define CONFIG_H_LEVEL_7
diff -uNrd -x CVS ircd-hybrid-7rc5/include/event.h ircd-hybrid-7-bg/include/event.h
--- ircd-hybrid-7rc5/include/event.h	Fri Sep 20 01:31:54 2002
+++ ircd-hybrid-7-bg/include/event.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: event.h,v 1.13 2002/09/20 05:31:54 db Exp $
+ *  $Id: event.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_event_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/fdlist.h ircd-hybrid-7-bg/include/fdlist.h
--- ircd-hybrid-7rc5/include/fdlist.h	Fri May 24 19:34:07 2002
+++ ircd-hybrid-7-bg/include/fdlist.h	Tue Feb  4 11:13:05 2003
@@ -19,12 +19,13 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: fdlist.h,v 7.25 2002/05/24 23:34:07 androsyn Exp $
+ *  $Id: fdlist.h,v 1.3 2003/02/04 16:13:05 demond Exp $
  */
 
 #ifndef INCLUDED_fdlist_h
 #define INCLUDED_fdlist_h
 
+#include "stdinc.h"
 #include "config.h"
 #include "ircd_defs.h"
 #include "res.h"
@@ -115,6 +116,10 @@
         unsigned int nonblocking:1;
         unsigned int ipc:1;
         unsigned int called_connect:1;
+#ifdef HAVE_LIBCRYPTO
+		unsigned int accept_read:1;
+		unsigned int accept_write:1;
+#endif        
     } flags;
     struct {
         /* We don't need the host here ? */
@@ -124,6 +129,10 @@
         void *data;
         /* We'd also add the retry count here when we get to that -- adrian */
     } connect;
+#ifdef HAVE_LIBCRYPTO
+	SSL *ssl;
+	int accept_failures;
+#endif
 };
 
 
@@ -131,7 +140,7 @@
 
 void fdlist_init(void);
 
-extern void  fd_open(int, unsigned int, const char *);
+extern void  fd_open(int, unsigned int, const char *, void *);
 extern void  fd_close(int);
 extern void  fd_dump(struct Client *source_p);
 #ifndef __GNUC__
diff -uNrd -x CVS ircd-hybrid-7rc5/include/fileio.h ircd-hybrid-7-bg/include/fileio.h
--- ircd-hybrid-7rc5/include/fileio.h	Fri May 24 19:34:07 2002
+++ ircd-hybrid-7-bg/include/fileio.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: fileio.h,v 7.11 2002/05/24 23:34:07 androsyn Exp $
+ *  $Id: fileio.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_fileio_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/handlers.h ircd-hybrid-7-bg/include/handlers.h
--- ircd-hybrid-7rc5/include/handlers.h	Sat Jan  5 04:14:28 2002
+++ ircd-hybrid-7-bg/include/handlers.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: handlers.h,v 7.38 2002/01/05 09:14:28 a1kmm Exp $
+ *  $Id: handlers.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_handlers_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/hash.h ircd-hybrid-7-bg/include/hash.h
--- ircd-hybrid-7rc5/include/hash.h	Fri May 24 19:34:07 2002
+++ ircd-hybrid-7-bg/include/hash.h	Fri Mar  7 00:36:11 2003
@@ -19,20 +19,20 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: hash.h,v 7.18 2002/05/24 23:34:07 androsyn Exp $
+ *  $Id: hash.h,v 1.2 2003/03/07 05:36:11 demond Exp $
  */
 
 #ifndef INCLUDED_hash_h
 #define INCLUDED_hash_h
 
-/* 
+/*
  * Client hash table size
  *
  * used in hash.c, s_debug.c
  */
 #define U_MAX 65536
 
-/* 
+/*
  * Channel hash table size
  *
  * used in hash.c, s_debug.c
@@ -68,12 +68,12 @@
 extern size_t hash_get_resv_table_size(void);
 
 extern void   init_hash(void);
-extern void   add_to_client_hash_table(const char* name, 
+extern void   add_to_client_hash_table(const char* name,
                                        struct Client* client);
-extern void   del_from_client_hash_table(const char* name, 
+extern void   del_from_client_hash_table(const char* name,
                                          struct Client* client);
 extern void   del_from_id_hash_table(const char *name, struct Client *client);
-extern void   del_from_channel_hash_table(const char* name, 
+extern void   del_from_channel_hash_table(const char* name,
                                           struct Channel* chan);
 extern struct Channel* hash_find_channel(const char* name);
 extern struct Client* find_client(const char* name);
@@ -85,6 +85,13 @@
 extern void del_from_resv_hash_table(const char *name,
                                      struct ResvChannel *resv_p);
 extern struct ResvChannel *hash_find_resv(const char *name);
+
+extern int services_present(void);
+extern struct Client* find_services(void);
+extern void clear_svs_client_hash_table(void);
+
+extern void do_local_clients(void (*)(), char *, void *); 
+extern void do_channel_local(void (*)(), char *, void *); 
 
 #endif  /* INCLUDED_hash_h */
 
diff -uNrd -x CVS ircd-hybrid-7rc5/include/hook.h ircd-hybrid-7-bg/include/hook.h
--- ircd-hybrid-7rc5/include/hook.h	Wed Oct 30 22:12:29 2002
+++ ircd-hybrid-7-bg/include/hook.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: hook.h,v 1.15 2002/10/31 03:12:29 wiz Exp $
+ *  $Id: hook.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef __HOOK_H_INCLUDED
diff -uNrd -x CVS ircd-hybrid-7rc5/include/hostmask.h ircd-hybrid-7-bg/include/hostmask.h
--- ircd-hybrid-7rc5/include/hostmask.h	Wed Sep 11 11:27:07 2002
+++ ircd-hybrid-7-bg/include/hostmask.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: hostmask.h,v 1.23 2002/09/11 15:27:07 db Exp $
+ *  $Id: hostmask.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDE_hostmask_h
@@ -46,13 +46,13 @@
 int match_ipv6(struct irc_inaddr*, struct irc_inaddr*, int);
 int match_ipv4(struct irc_inaddr*, struct irc_inaddr*, int);
 struct ConfItem* find_conf_by_address(const char*, struct irc_inaddr*,
-                                      int, int, const char*);
+                                      int, int, const char*, char *);
 void add_conf_by_address(const char*, int, const char*, struct ConfItem*);
 void delete_one_address_conf(const char*, struct ConfItem*);
 void clear_out_address_conf(void);
 void init_host_hash(void);
 struct ConfItem* find_address_conf(const char*, const char*,
-                                   struct irc_inaddr*, int);
+                                   struct irc_inaddr*, int, char *);
 struct ConfItem* find_kline_conf(const char*, const char*,
 				 struct irc_inaddr*, int);
 struct ConfItem* find_dline_conf(struct irc_inaddr *, int);
@@ -101,6 +101,4 @@
   struct AddressRec *next;
 };
 
-
 #endif /* INCLUDE_hostmask_h */
-
diff -uNrd -x CVS ircd-hybrid-7rc5/include/irc_string.h ircd-hybrid-7-bg/include/irc_string.h
--- ircd-hybrid-7rc5/include/irc_string.h	Wed Aug 28 13:00:12 2002
+++ ircd-hybrid-7-bg/include/irc_string.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: irc_string.h,v 7.37 2002/08/28 17:00:12 androsyn Exp $
+ *  $Id: irc_string.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_irc_string_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/ircd.h ircd-hybrid-7-bg/include/ircd.h
--- ircd-hybrid-7rc5/include/ircd.h	Tue Jun 25 23:05:42 2002
+++ ircd-hybrid-7-bg/include/ircd.h	Sun Jan  5 00:20:57 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: ircd.h,v 7.51 2002/06/26 03:05:42 androsyn Exp $
+ *  $Id: ircd.h,v 1.2 2003/01/05 05:20:57 demond Exp $
  */
 
 #ifndef INCLUDED_ircd_h
@@ -57,6 +57,8 @@
   int     unknown;        /* unknown connections */
   int     max_loc;        /* MAX local clients */
   int     max_tot;        /* MAX global clients */
+  int	identified;
+  int	max_identified;
   unsigned long totalrestartcount; /* Total client count ever */
 };
 
diff -uNrd -x CVS ircd-hybrid-7rc5/include/ircd_defs.h ircd-hybrid-7-bg/include/ircd_defs.h
--- ircd-hybrid-7rc5/include/ircd_defs.h	Thu Jul 11 20:43:20 2002
+++ ircd-hybrid-7-bg/include/ircd_defs.h	Mon Dec 30 23:07:25 2002
@@ -19,12 +19,12 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: ircd_defs.h,v 7.31 2002/07/12 00:43:20 androsyn Exp $
+ *  $Id: ircd_defs.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 /*
  * NOTE: NICKLEN and TOPICLEN do not live here anymore. Set it with configure
- * Otherwise there are no user servicable part here. 
+ * Otherwise there are no user servicable part here.
  *
  */
  /* ircd_defs.h - Global size definitions for record entries used
@@ -40,19 +40,21 @@
 #  error Incorrect config.h for this revision of ircd.
 #endif
 
+#define BUFMAX			0x100
+
 #define HOSTLEN         63      /* Length of hostname.  Updated to         */
                                 /* comply with RFC1123                     */
 
 #define USERLEN         10
 #define REALLEN         50
-#define KILLLEN         90      
+#define KILLLEN         90
 #define CHANNELLEN      200
 
 /* 23+1 for \0 */
 #define KEYLEN          24
 #define BUFSIZE         512     /* WARNING: *DONT* CHANGE THIS!!!! */
 #define MAXRECIPIENTS   20
-#define MAXBANLENGTH    1024
+#define MAXBANLENGTH    512
 #define OPERNICKLEN     NICKLEN*2 /* Length of OPERNICKs. */
 
 #define USERHOST_REPLYLEN       (NICKLEN+HOSTLEN+USERLEN+5)
@@ -60,20 +62,21 @@
 
 #define HELPLEN         400
 
-/* 
- * message return values 
+/*
+ * message return values
  */
 #define CLIENT_EXITED    -2
 #define CLIENT_PARSE_ERROR -1
 #define CLIENT_OK	1
 
+#define BUFFMAX			BUFSIZE
 
 struct irc_inaddr
 {
 	union {
 		struct in_addr sin;
 #ifdef IPV6
-		struct in6_addr sin6;	
+		struct in6_addr sin6;
 #endif
 	} sins;
 };
@@ -84,7 +87,7 @@
 		struct sockaddr_in sin;
 #ifdef IPV6
 		struct sockaddr_in6 sin6;
-#endif			
+#endif
 	} sins;
 };
 
@@ -128,12 +131,12 @@
 #define PSOCKADDR(x)	x->sins.sin			/* struct sockaddr_in */
 
 
-#define PIN_ADDR(x) x->sins.sin.s_addr 
+#define PIN_ADDR(x) x->sins.sin.s_addr
 #define IN_ADDR(x) x.sins.sin.s_addr
 
 #ifndef AF_INET6
 #define AF_INET6 10 /* Dummy AF_INET6 declaration */
-#endif 
+#endif
 #define DEF_FAM AF_INET
 
 #endif
diff -uNrd -x CVS ircd-hybrid-7rc5/include/ircd_getopt.h ircd-hybrid-7-bg/include/ircd_getopt.h
--- ircd-hybrid-7rc5/include/ircd_getopt.h	Fri May 24 19:34:07 2002
+++ ircd-hybrid-7-bg/include/ircd_getopt.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: ircd_getopt.h,v 1.3 2002/05/24 23:34:07 androsyn Exp $
+ *  $Id: ircd_getopt.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef __GETOPT_H_INCLUDED__
diff -uNrd -x CVS ircd-hybrid-7rc5/include/ircd_handler.h ircd-hybrid-7-bg/include/ircd_handler.h
--- ircd-hybrid-7rc5/include/ircd_handler.h	Sat Jan  5 04:14:28 2002
+++ ircd-hybrid-7-bg/include/ircd_handler.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: ircd_handler.h,v 7.5 2002/01/05 09:14:28 a1kmm Exp $
+ *  $Id: ircd_handler.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_ircd_handler_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/ircd_signal.h ircd-hybrid-7-bg/include/ircd_signal.h
--- ircd-hybrid-7rc5/include/ircd_signal.h	Sat Jan  5 04:14:28 2002
+++ ircd-hybrid-7-bg/include/ircd_signal.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: ircd_signal.h,v 7.2 2002/01/05 09:14:28 a1kmm Exp $
+ *  $Id: ircd_signal.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_ircd_signal_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/ircdauth.h ircd-hybrid-7-bg/include/ircdauth.h
--- ircd-hybrid-7rc5/include/ircdauth.h	Sat Jan  5 04:14:28 2002
+++ ircd-hybrid-7-bg/include/ircdauth.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: ircdauth.h,v 7.5 2002/01/05 09:14:28 a1kmm Exp $
+ *  $Id: ircdauth.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_ircdauth_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/linebuf.h ircd-hybrid-7-bg/include/linebuf.h
--- ircd-hybrid-7rc5/include/linebuf.h	Sun Jul 14 16:15:38 2002
+++ ircd-hybrid-7-bg/include/linebuf.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: linebuf.h,v 1.24 2002/07/14 20:15:38 androsyn Exp $
+ *  $Id: linebuf.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef __LINEBUF_H__
diff -uNrd -x CVS ircd-hybrid-7rc5/include/list.h ircd-hybrid-7-bg/include/list.h
--- ircd-hybrid-7rc5/include/list.h	Thu Jul 11 20:43:20 2002
+++ ircd-hybrid-7-bg/include/list.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: list.h,v 7.15 2002/07/12 00:43:20 androsyn Exp $
+ *  $Id: list.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_list_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/listener.h ircd-hybrid-7-bg/include/listener.h
--- ircd-hybrid-7rc5/include/listener.h	Fri May 24 19:34:07 2002
+++ ircd-hybrid-7-bg/include/listener.h	Thu Jan 30 10:28:58 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: listener.h,v 7.10 2002/05/24 23:34:07 androsyn Exp $
+ *  $Id: listener.h,v 1.2 2003/01/30 15:28:58 demond Exp $
  */
 
 #ifndef INCLUDED_listener_h
@@ -45,9 +45,10 @@
   struct irc_inaddr addr;              /* virtual address or INADDR_ANY */
   struct DNSQuery   *dns_query;
   char             vhost[HOSTLEN + 1]; /* virtual name of listener */
+  int	is_ssl;
 };
 
-extern void        add_listener(int port, const char* vaddr_ip);
+extern void        add_listener(int port, const char* vaddr_ip, int is_ssl);
 extern void        close_listener(struct Listener* listener);
 extern void        close_listeners(void);
 extern const char* get_listener_name(const struct Listener* listener);
diff -uNrd -x CVS ircd-hybrid-7rc5/include/m_info.h ircd-hybrid-7-bg/include/m_info.h
--- ircd-hybrid-7rc5/include/m_info.h	Fri May 24 19:34:07 2002
+++ ircd-hybrid-7-bg/include/m_info.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_info.h,v 7.40 2002/05/24 23:34:07 androsyn Exp $
+ *  $Id: m_info.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_m_info_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/m_kline.h ircd-hybrid-7-bg/include/m_kline.h
--- ircd-hybrid-7rc5/include/m_kline.h	Sat Jan  5 04:14:28 2002
+++ ircd-hybrid-7-bg/include/m_kline.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_kline.h,v 7.7 2002/01/05 09:14:28 a1kmm Exp $
+ *  $Id: m_kline.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_m_kline_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/md5.h ircd-hybrid-7-bg/include/md5.h
--- ircd-hybrid-7rc5/include/md5.h	Sat Mar  9 16:48:35 2002
+++ ircd-hybrid-7-bg/include/md5.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: md5.h,v 1.6 2002/03/09 21:48:35 androsyn Exp $
+ *  $Id: md5.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef __INCLUDE_MD5_H_INCLUDED
diff -uNrd -x CVS ircd-hybrid-7rc5/include/memory.h ircd-hybrid-7-bg/include/memory.h
--- ircd-hybrid-7rc5/include/memory.h	Sat Jul 13 18:54:47 2002
+++ ircd-hybrid-7-bg/include/memory.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: memory.h,v 7.36 2002/07/13 22:54:47 androsyn Exp $
+ *  $Id: memory.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef _I_MEMORY_H
diff -uNrd -x CVS ircd-hybrid-7rc5/include/modules.h ircd-hybrid-7-bg/include/modules.h
--- ircd-hybrid-7rc5/include/modules.h	Fri May 24 21:38:09 2002
+++ ircd-hybrid-7-bg/include/modules.h	Fri Mar  7 00:36:11 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: modules.h,v 7.31 2002/05/25 01:38:09 androsyn Exp $
+ *  $Id: modules.h,v 1.3 2003/03/07 05:36:11 demond Exp $
  */
 
 #ifndef INCLUDED_modules_h
@@ -90,6 +90,7 @@
 extern struct Message cjoin_msgtab;
 extern struct Message client_msgtab;
 extern struct Message close_msgtab;
+extern struct Message conf_msgtab;
 extern struct Message connect_msgtab;
 extern struct Message die_msgtab;
 extern struct Message dmem_msgtab;
@@ -138,6 +139,12 @@
 extern struct Message squit_msgtab;
 extern struct Message stats_msgtab;
 extern struct Message svinfo_msgtab;
+extern struct Message svsnick_msgtab;
+extern struct Message svshint_msgtab;
+extern struct Message svshost_msgtab;
+extern struct Message svsjoin_msgtab;
+extern struct Message svspart_msgtab;
+extern struct Message svsmode_msgtab;
 extern struct Message testline_msgtab;
 extern struct Message time_msgtab;
 extern struct Message topic_msgtab;
@@ -149,6 +156,7 @@
 extern struct Message users_msgtab;
 extern struct Message version_msgtab;
 extern struct Message wallops_msgtab;
+extern struct Message watch_msgtab;
 extern struct Message who_msgtab;
 extern struct Message whois_msgtab;
 extern struct Message whowas_msgtab;
diff -uNrd -x CVS ircd-hybrid-7rc5/include/motd.h ircd-hybrid-7-bg/include/motd.h
--- ircd-hybrid-7rc5/include/motd.h	Fri May 24 19:34:07 2002
+++ ircd-hybrid-7-bg/include/motd.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: motd.h,v 7.10 2002/05/24 23:34:07 androsyn Exp $
+ *  $Id: motd.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_motd_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/msg.h ircd-hybrid-7-bg/include/msg.h
--- ircd-hybrid-7rc5/include/msg.h	Wed Oct 23 23:35:56 2002
+++ ircd-hybrid-7-bg/include/msg.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: msg.h,v 7.42 2002/10/24 03:35:56 bill Exp $
+ *  $Id: msg.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_msg_h
@@ -30,8 +30,8 @@
 
 struct Client;
 
-/* 
- * Message table structure 
+/*
+ * Message table structure
  */
 struct Message
 {
@@ -39,8 +39,8 @@
   unsigned int  count;      /* number of times command used */
   unsigned int	rcount;     /* number of times command used by server */
   unsigned int  parameters; /* at least this many args must be passed
-                             * or an error will be sent to the user 
-                             * before the m_func is even called 
+                             * or an error will be sent to the user
+                             * before the m_func is even called
                              */
   unsigned int  maxpara;    /* maximum permitted parameters */
   unsigned int  flags;      /* bit 0 set means that this command is allowed
@@ -63,14 +63,11 @@
 /*
  * Constants
  */
-#define   MFLG_SLOW              0x01   /* Command can be executed roughly    *
-                                         * once per 2 seconds.                */
-#define   MFLG_UNREG             0x02   /* Command available to unregistered  *
-                                         * clients.                           */
-#define   MFLG_IGNORE            0x04   /* silently ignore command from
-                                         * unregistered clients */
-#define   MFLG_HIDDEN		 0x08   /* Command is hidden from everyone    *
-					 * but opers			      */
-#define MAXPARA    15 
+#define   MFLG_SLOW			0x01   /* Command can be executed roughly once per 2 seconds. */
+#define   MFLG_UNREG		0x02   /* Command available to unregistered clients. */
+#define   MFLG_IGNORE		0x04   /* silently ignore command from unregistered clients */
+#define   MFLG_HIDDEN		0x08   /* Command is hidden from everyone but opers */
+
+#define   MAXPARA			32
 
 #endif /* INCLUDED_msg_h */
diff -uNrd -x CVS ircd-hybrid-7rc5/include/numeric.h ircd-hybrid-7-bg/include/numeric.h
--- ircd-hybrid-7rc5/include/numeric.h	Tue Oct 29 22:33:22 2002
+++ ircd-hybrid-7-bg/include/numeric.h	Sat May 24 23:27:09 2003
@@ -19,19 +19,20 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: numeric.h,v 7.30 2002/10/30 03:33:22 bill Exp $
+ *  $Id: numeric.h,v 1.5 2003/05/24 00:07:44 demond Exp $
  */
 
 #ifndef INCLUDED_numeric_h
 #define INCLUDED_numeric_h
 
 #include "config.h"
+#include "client.h"
 
 /*
  * form_str - return a format string for a message number
  * messages are defined below
  */
-extern const char* form_str(int);
+extern char* form_str(struct Client *, int);
 
 /*
  * Reserve numerics 000-099 for server-client connections where the client
@@ -43,23 +44,20 @@
 #define RPL_CREATED          003
 #define RPL_MYINFO           004
 #define RPL_ISUPPORT         005
-     /* RPL_BOUNCE                         IRCnet extension */
-/*	RPL_MAP		       6	unreal */
-/*	RPL_MAPEND	       7	unreal */
-/*	RPL_SNOMASK            8        Undernet extension */
-/*	RPL_STATMEMTOT         9        Undernet extension */
-/*	RPL_STATMEM           10        Undernet extension */
-
-#define RPL_REDIR            10
-#define RPL_MAP		     15		/* Undernet extension */
-#define RPL_MAPMORE	     16		/* Undernet extension */
-#define RPL_MAPEND	     17		/* Undernet extension */
-#define RPL_YOURID           20
-
-/*	RPL_YOURID	      42	IRCnet extension */
-/*      RPL_ATTEMPTINGJUNC    50           aircd extension */
-/*      RPL_ATTEMPTINGREROUTE 51           aircd extension */
-
+/*	RPL_BOUNCE								IRCnet extension */
+/*	RPL_MAP		       		6				unreal */
+/*	RPL_MAPEND	       		7				unreal */
+/*	RPL_SNOMASK            	8        		Undernet extension */
+/*	RPL_STATMEMTOT         	9        		Undernet extension */
+/*	RPL_STATMEM           	10        		Undernet extension */
+#define RPL_REDIR           10
+#define RPL_MAP		     	15				/* Undernet extension */
+#define RPL_MAPMORE	     	16				/* Undernet extension */
+#define RPL_MAPEND	     	17				/* Undernet extension */
+#define RPL_YOURID          20
+/*	RPL_YOURID	      		42				IRCnet extension */
+/*  RPL_ATTEMPTINGJUNC    	50           	aircd extension */
+/*  RPL_ATTEMPTINGREROUTE 	51           	aircd extension */
 /*
  * Numeric replies from server commands.
  * These are currently in the range 200-399.
@@ -73,16 +71,14 @@
 #define RPL_TRACESERVER      206
 #define RPL_TRACENEWTYPE     208
 #define RPL_TRACECLASS       209
-
 /*      RPL_STATS            210 aircd extension, used instead of having
                                  multiple stats numerics */
 /*      RPL_TRACERECONNECT   210 IRCnet extension */                                 
-
 #define RPL_STATSLINKINFO    211
 #define RPL_STATSCOMMANDS    212
 #define RPL_STATSCLINE       213
 #define RPL_STATSNLINE       214
-/*	RPL_STATSOLDNLINE    214    unreal */
+/*	RPL_STATSOLDNLINE    	214    unreal */
 #define RPL_STATSILINE       215
 #define RPL_STATSKLINE       216
 #define RPL_STATSQLINE       217
@@ -93,36 +89,34 @@
  * I'm going to steal 220 for now *sigh*
  * -Dianora
  */
-
 #define RPL_STATSPLINE       220
 #define RPL_UMODEIS          221
-
 /*	RPL_SQLINE_NICK	     222	   Numerics List: Dalnet */
 /*	RPL_STATSELINE       223	   dalnet */
 /*	RPL_STATSGLINE	     223	   unreal */
-/*      RPL_STATSFLINE       224           Hybrid extension,Dalnet */
+/*  RPL_STATSFLINE       224       Hybrid extension,Dalnet */
 /*	RPL_STATSTLINE	     224	   unreal */
-/*      RPL_STATSDLINE       225           Hybrid extension */
+/*  RPL_STATSDLINE       225       Hybrid extension */
 /*	RPL_STATSZLINE	     225	   Dalnet
  	RPL_STATSELINE	     225	   unreal
  	RPL_STATSCOUNT	     226	   Dalnet
 	RPL_STATSNLINE	     226	   unreal
 	RPL_STATSGLINE	     227	   Dalnet 
 	RPL_STATSVLINE	     227	   unreal */
-
 #define RPL_STATSFLINE       224
 #define RPL_STATSDLINE       225
 #define RPL_STATSALINE	     226
-
-/*	RPL_RULES	     232	unreal */
-
+#define RPL_STATSZLINE	     227 /* configured services line */
+#define RPL_EQUIVALENTS      228 /* configured equivalent nicks */
+#define RPL_RELAYS           229 /* configured relays (bnet ext) */
+#define RPL_USERPARMS        230 /* configured recognizable USER pars */
+#define RPL_CLUSTERBRIDGE    231 /* configured cluster bridges */
+/*	RPL_RULES	     		232		unreal */
 #define RPL_SERVLIST         234
 #define RPL_SERVLISTEND      235
-
-/*      RPL_STATSIAUTH       239           IRCnet extension */
-/*      RPL_STATSVLINE       240           IRCnet extension */
-/*	RPL_STATSXLINE	     240	austnet */
-
+/*  RPL_STATSIAUTH       	239		IRCnet extension */
+/*  RPL_STATSVLINE       	240		IRCnet extension */
+/*	RPL_STATSXLINE	     	240		austnet */
 #define RPL_STATSLLINE       241
 #define RPL_STATSUPTIME      242
 #define RPL_STATSOLINE       243
@@ -133,7 +127,7 @@
 #define RPL_STATSULINE       248
 #define RPL_STATSDEBUG       249
 #define RPL_STATSCONN        250
-/*	RPL_STATSDLINE	     250	   Numerics List: IRCnet */
+/*	RPL_STATSDLINE	     	250	   	Numerics List: IRCnet */
 #define RPL_LUSERCLIENT      251
 #define RPL_LUSEROP          252
 #define RPL_LUSERUNKNOWN     253
@@ -143,57 +137,51 @@
 #define RPL_ADMINLOC1        257
 #define RPL_ADMINLOC2        258
 #define RPL_ADMINEMAIL       259
-
 #define RPL_TRACELOG         261
 #define RPL_ENDOFTRACE       262
 #define RPL_LOAD2HI          263
-
-/*	RPL_TRYAGAIN	     263	   Numerics List: IRCnet */
-/*	RPL_LOAD2HI	     263	   Dalnet */
-/*      RPL_CURRENT_LOCAL    265           aircd/efnet/hybrid/dalnet*/
-/*      RPL_CURRENT_GLOBAL   266           aircd/efnet/hybrid/dalnet */
-/*      RPL_START_NETSTAT    267           aircd */
-/*      RPL_NETSTAT          268           aircd */
-/*      RPL_END_NETSTAT      269           aircd */
-
+/*	RPL_TRYAGAIN	     	263	   	Numerics List: IRCnet */
+/*	RPL_LOAD2HI	     		263	   	Dalnet */
+/*  RPL_CURRENT_LOCAL    	265		aircd/efnet/hybrid/dalnet*/
+/*  RPL_CURRENT_GLOBAL   	266		aircd/efnet/hybrid/dalnet */
+/*  RPL_START_NETSTAT    	267		aircd */
+/*  RPL_NETSTAT          	268		aircd */
+/*  RPL_END_NETSTAT      	269		aircd */
 #define RPL_LOCALUSERS       265
 #define RPL_GLOBALUSERS      266
-
+#define RPL_IDUSERS          267
 #define RPL_VCHANEXIST       276
 #define RPL_VCHANLIST        277
 #define RPL_VCHANHELP        278
-
 #define RPL_ACCEPTLIST	     281
 #define RPL_ENDOFACCEPT      282
-
-/*	RPL_GLIST            280        Undernet extension */
-/*	RPL_ENDOFGLIST       281        Undernet extension */
-/*	RPL_JUPELIST         282        Undernet extension - jupe -Kev */
-/*	RPL_ENDOFJUPELIST    283        Undernet extension - jupe -Kev */
-/*	RPL_FEATURE	     284	Undernet extension - features */
-/*      RPL_CHANINFO_HANDLE  285           aircd */
-/*      RPL_CHANINFO_USERS   286           aircd */
-/*      RPL_CHANINFO_CHOPS   287           aircd */
-/*      RPL_CHANINFO_VOICES  288           aircd */
-/*      RPL_CHANINFO_AWAY    289           aircd */
-/*      RPL_CHANINFO_OPERS   290           aircd */
-/*	RPL_HELPHDR	     290	Numeric List: Dalnet */
-/*      RPL_CHANINFO_BANNED  291           aircd */
-/*	RPL_HELPOP	     291	Numeric List: Dalnet */
-/*      RPL_CHANINFO_BANS    292           aircd */
-/*	RPL_HELPTLR	     292	Numeric List: Dalnet */
-/*      RPL_CHANINFO_INVITE  293           aircd */
-/*	RPL_HELPHLP	     293	Numeric List: Dalnet */
-/*      RPL_CHANINFO_INVITES 294           aircd */
-/*	RPL_HELPFWD	     294	Numeric List: Dalnet */
-/*      RPL_CHANINFO_KICK    295           aircd */
-/*	RPL_HELPIGN	     295	Numeric List: Dalnet */
-/*      RPL_CHANINFO_KICKS   296           aircd */
-
-/*      RPL_END_CHANINFO     299           aircd */
-
+/*	RPL_GLIST            	280        Undernet extension */
+/*	RPL_ENDOFGLIST       	281        Undernet extension */
+/*	RPL_JUPELIST         	282        Undernet extension - jupe -Kev */
+/*	RPL_ENDOFJUPELIST    	283        Undernet extension - jupe -Kev */
+/*	RPL_FEATURE	     		284			Undernet extension - features */
+/*  RPL_CHANINFO_HANDLE  	285           aircd */
+/*  RPL_CHANINFO_USERS   	286           aircd */
+/*  RPL_CHANINFO_CHOPS   	287           aircd */
+/*  RPL_CHANINFO_VOICES  	288           aircd */
+/*  RPL_CHANINFO_AWAY    	289           aircd */
+/*  RPL_CHANINFO_OPERS   	290           aircd */
+/*	RPL_HELPHDR	     		290			Numeric List: Dalnet */
+/*  RPL_CHANINFO_BANNED  	291           aircd */
+/*	RPL_HELPOP	     		291			Numeric List: Dalnet */
+/*  RPL_CHANINFO_BANS    	292           aircd */
+/*	RPL_HELPTLR	     		292			Numeric List: Dalnet */
+/*  RPL_CHANINFO_INVITE  	293           aircd */
+/*	RPL_HELPHLP	     		293			Numeric List: Dalnet */
+/*  RPL_CHANINFO_INVITES 	294           aircd */
+/*	RPL_HELPFWD	     		294			Numeric List: Dalnet */
+/*  RPL_CHANINFO_KICK    	295           aircd */
+/*	RPL_HELPIGN	     		295			Numeric List: Dalnet */
+/*  RPL_CHANINFO_KICKS   	296           aircd */
+/*  RPL_END_CHANINFO     	299           aircd */
 /* numeric_replies */
-
+#define	RPL_WHOISSSL		 297 /* uses SSL */
+#define RPL_WHOISCYRILLIC    298 /* this nick is cyrillic-encoded */
 #define RPL_NONE             300
 #define RPL_AWAY             301
 #define RPL_USERHOST         302
@@ -201,31 +189,28 @@
 #define RPL_TEXT             304
 #define RPL_UNAWAY           305
 #define RPL_NOWAWAY          306
-#define	RPL_USERIP	     307	/* Undernet extension */
+#define	RPL_USERIP	         307 /* Undernet extension */
 /*	RPL_WHOISREGNICK     307 	Numeric List: Dalnet */
 /*	RPL_SUSERHOST	     307	austnet */
-/*      RPL_NOTIFYACTION     308         aircd */
+/*  RPL_NOTIFYACTION     308    aircd */
 /*	RPL_WHOISADMIN	     308	Numeric List: Dalnet */
 /*	RPL_RULESSTART	     308	unreal */
-/*      RPL_NICKTRACE        309         aircd */
+#define RPL_WHOISADMIN       308
+/*  RPL_NICKTRACE        309    aircd */
 /*	RPL_WHOISSADMIN	     309	Numeric List: Dalnet */
 /*	RPL_ENDOFRULES	     309	unreal */
 /*	RPL_WHOISHELPER	     309	austnet */
-/*      RPL_WHOISSVCMSG      310         Dalnet */
+/*  RPL_WHOISSVCMSG      310    Dalnet */
 /*	RPL_WHOISHELPOP	     310	unreal */
 /*	RPL_WHOISSERVICE     310	austnet */
-
 #define RPL_WHOISUSER        311
 #define RPL_WHOISSERVER      312
 #define RPL_WHOISOPERATOR    313
-
 #define RPL_WHOWASUSER       314
 /* rpl_endofwho below (315) */
 #define RPL_ENDOFWHOWAS      369
-
 #define RPL_WHOISCHANOP      316 /* redundant and not needed but reserved */
 #define RPL_WHOISIDLE        317
-
 #define RPL_ENDOFWHOIS       318
 #define RPL_WHOISCHANNELS    319
 /*      RPL_WHOIS_HIDDEN     320         Anothernet +h, ick! */
@@ -234,6 +219,8 @@
 #define RPL_LIST             322
 #define RPL_LISTEND          323
 #define RPL_CHANNELMODEIS    324
+#define RPL_WHOISSVSHINT     326 /* identified with services */
+#define RPL_WHOISREALHOST    327 /* real client host */
 /*      RPL_CHANNELPASSIS    325           IRCnet extension */
 /*      RPL_UNIQOPIS         325           IRCnet extension */
 /*      RPL_NOCHANPASS       326           IRCnet extension */
@@ -246,26 +233,24 @@
 #define RPL_TOPICWHOTIME     333
 /*	RPL_COMMANDSYNTAX    334	   Dalnet */
 /*	RPL_LISTSYNTAX	     334	   unreal */
-/*      RPL_CHANPASSOK       338           IRCnet extension (?)*/
+/*  RPL_CHANPASSOK       338       IRCnet extension (?)*/
 #define	RPL_WHOISACTUALLY    338	/* dalnet */
 /*	RPL_WHOISACTUALLY    338	   Undernet extension, dalnet */
-/*      RPL_BADCHANPASS      339           IRCnet extension (?)*/
-/*	RPL_USERIP           340           (old) Undernet extension */
+/*  RPL_BADCHANPASS      339       IRCnet extension (?)*/
+/*	RPL_USERIP           340       (old) Undernet extension */
 #define RPL_INVITING         341
 /*	RPL_SUMMONING        342	   removed from RFC1459 */
-
+#define RPL_SUBSTLIST		 344 /* word subst list */
+#define RPL_ENDOFSUBSTLIST   345 /* eol */
 #define RPL_INVITELIST       346
 #define RPL_ENDOFINVITELIST  347	/* IRCnet, Undernet extension */
 #define RPL_EXCEPTLIST       348
 #define RPL_ENDOFEXCEPTLIST  349
-
 #define RPL_VERSION          351
-
 #define RPL_WHOREPLY         352
 #define RPL_ENDOFWHO         315
 #define RPL_NAMREPLY         353
 #define RPL_ENDOFNAMES       366
-
 #define RPL_KILLDONE         361
 #define RPL_CLOSING          362
 #define RPL_CLOSEEND         363
@@ -275,38 +260,34 @@
 #define RPL_BANLIST          367
 #define RPL_ENDOFBANLIST     368
 /* rpl_endofwhowas above (369) */
-
 #define RPL_INFO             371
 #define RPL_MOTD             372
 #define RPL_INFOSTART        373
 #define RPL_ENDOFINFO        374
 #define RPL_MOTDSTART        375
 #define RPL_ENDOFMOTD        376
-
+#define RPL_DENYLIST         377
+#define RPL_ENDOFDENYLIST    378
 /*      RPL_KICKEXPIRED      377   aircd */
-/*	RPL_SPAM	     377   austnet */
+/*		RPL_SPAM	     	 377   austnet */
 /*      RPL_BANEXPIRED       378   aircd */
 /*      RPL_KICKLINKED       379   aircd */
 /*      RPL_BANLINKED        380   aircd */
-
 #define RPL_YOUREOPER        381
 #define RPL_REHASHING        382
-/*	RPL_YOURSERVICE	     383	   Numeric List: various */
+/*	RPL_YOURSERVICE	    383	   		Numeric List: various */
 #define RPL_MYPORTIS         384
 #define RPL_NOTOPERANYMORE   385
 #define RPL_RSACHALLENGE     386
-
-/*	RPL_QLIST	     386	unreal */
-/*	RPL_ENDOFQLIST	     387	unreal */
-/*	RPL_ALIST	     388	unreal */
-/*	RPL_ENDOFALIST	     389	unreal */ 
-
+/*	RPL_QLIST	     	386			unreal */
+/*	RPL_ENDOFQLIST	    387			unreal */
+/*	RPL_ALIST	     	388			unreal */
+/*	RPL_ENDOFALIST	    389			unreal */ 
 #define RPL_TIME             391
 #define RPL_USERSSTART       392
 #define RPL_USERS            393
 #define RPL_ENDOFUSERS       394
 #define RPL_NOUSERS          395
-
 /*
  * Errors are in the range from 400-599 currently and are grouped by what
  * commands they come from.
@@ -319,55 +300,43 @@
 #define ERR_WASNOSUCHNICK    406
 #define ERR_TOOMANYTARGETS   407
 #define ERR_NOORIGIN         409
-
 #define ERR_NORECIPIENT      411
 #define ERR_NOTEXTTOSEND     412
 #define ERR_NOTOPLEVEL       413
 #define ERR_WILDTOPLEVEL     414
-/*	ERR_BADMASK          415           IRCnet extension */
+/*	ERR_BADMASK          	415		IRCnet extension */
 #define ERR_UNKNOWNCOMMAND   421
 #define ERR_NOMOTD           422
 #define ERR_NOADMININFO      423
 #define ERR_FILEERROR        424
-
-/* 	ERR_TOOMANYAWAY	     429	    Dalnet */
-
+/* 	ERR_TOOMANYAWAY	     	429	    Dalnet */
 #define ERR_NONICKNAMEGIVEN  431
 #define ERR_ERRONEUSNICKNAME 432
 #define ERR_NICKNAMEINUSE    433
-
-/*      ERR_SERVICENAMEINUSE 434 ? */
-/*	ERR_NORULES	     434   unreal */
-/*      ERR_SERVICECONFUSED  435 ? */
-/*	ERR_BANONCHAN	     435   dalnet */
-
+/*  ERR_SERVICENAMEINUSE 	434 	? */
+/*	ERR_NORULES	     		434   	unreal */
+/*  ERR_SERVICECONFUSED  	435 	? */
+/*	ERR_BANONCHAN	     	435   	dalnet */
 #define ERR_NICKCOLLISION    436
 #define ERR_UNAVAILRESOURCE  437
 #define ERR_NICKTOOFAST	     438	/* We did it first Undernet! ;) db */
-
-/*	ERR_SERVICESDOWN     440	Dalnet,unreal */
-
+/*	ERR_SERVICESDOWN     	440		Dalnet,unreal */
 #define ERR_USERNOTINCHANNEL 441
 #define ERR_NOTONCHANNEL     442
 #define ERR_USERONCHANNEL    443
 #define ERR_NOLOGIN          444
 #define ERR_SUMMONDISABLED   445
 #define ERR_USERSDISABLED    446
-
 #define ERR_NOTREGISTERED    451
-
-/*      ERR_IDCOLLISION      452           IRCnet extension ? */
-/*      ERR_NICKLOST         453           IRCnet extension ? */
-
-/*	ERR_HOSTILENAME	     455	   unreal */
-
-/*	ERR_NOHIDING	     459	   unreal */
-/*	ERR_NOTFORHALFOPS    460	   unreal */
-
+#define ERR_NOREPEATING      452 /* no repeating allowed */
+/*  ERR_IDCOLLISION      452           IRCnet extension ? */
+/*  ERR_NICKLOST         453           IRCnet extension ? */
+/*	ERR_HOSTILENAME	     455	   		unreal */
+/*	ERR_NOHIDING	     459	   		unreal */
+/*	ERR_NOTFORHALFOPS    460	   		unreal */
 #define ERR_ACCEPTFULL       456
 #define ERR_ACCEPTEXIST      457
 #define ERR_ACCEPTNOT        458
-
 #define ERR_NEEDMOREPARAMS   461
 #define ERR_ALREADYREGISTRED 462
 #define ERR_NOPERMFORHOST    463
@@ -375,10 +344,13 @@
 #define ERR_YOUREBANNEDCREEP 465
 #define ERR_YOUWILLBEBANNED  466
 #define ERR_KEYSET           467
+#define ERR_CANNOTSENDNOTREG 468	/* only reg nicks may speak */
+#define ERR_REGNICKSCHAN     469    /* channel is for reg nicks only */
+#define ERR_NOCYRNICKCHAN    470    /* no cyrillic nicks allowed */ 
 /* 	ERR_ONLYSERVERSCANCHANGE 468	   Dalnet,unreal */
-/*	ERR_LINKSET	     469	unreal */
-/*	ERR_LINKCHANNEL	     470	unreal */
-/*      ERR_KICKEDFROMCHAN   470         aircd */
+/*	ERR_LINKSET	     		469			unreal */
+/*	ERR_LINKCHANNEL	     	470			unreal */
+/*  ERR_KICKEDFROMCHAN   	470         aircd */
 #define ERR_CHANNELISFULL    471
 #define ERR_UNKNOWNMODE      472
 #define ERR_INVITEONLYCHAN   473
@@ -388,63 +360,61 @@
 #define ERR_MODELESS         477        /* ircu numeric -db */
 #define ERR_BANLISTFULL      478        /* I stole the numeric from ircu -db */
 #define ERR_BADCHANNAME      479
-/* 	ERR_LINKFAIL	     479	unreal */
-/*	ERR_CANNOTKNOCK	     480	unreal */
-/*	ERR_NOULINE	     480	austnet */
+#define ERR_SSLONLYCHAN      480	/* SSL-connected clients only channel */
+/* 	ERR_LINKFAIL	     	479			unreal */
+/*	ERR_CANNOTKNOCK	     	480			unreal */
+/*	ERR_NOULINE	     		480			austnet */
 #define ERR_NOPRIVILEGES     481
 #define ERR_CHANOPRIVSNEEDED 482
 #define ERR_CANTKILLSERVER   483
 #define ERR_RESTRICTED       484
 #define ERR_BANNEDNICK       485
-/*	ERR_DESYNC	     484	 Dalnet,PTlink */
-/*	ERR_ATTACKDENY	     484	 unreal */
-/*	ERR_RESTRICTED	     484	   IRCnet extension */
-/*      ERR_UNIQOPRIVSNEEDED 485           IRCnet extension */
-/*	ERR_KILLDENY         485	   unreal */
-/*	ERR_CANTKICKADMIN    485	   PTlink */
-/*	ERR_HTMDISABLED      486	   unreal */
-/*      ERR_CHANTOORECENT    487           IRCnet extension (?) */
-/*      ERR_TSLESSCHAN       488           IRCnet extension (?) */
-/*	ERR_VOICENEEDED      489           Undernet extension */
+#define ERR_CANTKICKSERVICES 486
+#define ERR_CANTDEOPSERVICES 487
+/*	ERR_DESYNC	     		484	 		Dalnet,PTlink */
+/*	ERR_ATTACKDENY	     	484	 		unreal */
+/*	ERR_RESTRICTED	     	484	   		IRCnet extension */
+/*  ERR_UNIQOPRIVSNEEDED 	485         IRCnet extension */
+/*	ERR_KILLDENY         	485	   		unreal */
+/*	ERR_CANTKICKADMIN    	485	   		PTlink */
+/*	ERR_HTMDISABLED      	486	   		unreal */
+/*  ERR_CHANTOORECENT    	487         IRCnet extension (?) */
+/*  ERR_TSLESSCHAN       	488         IRCnet extension (?) */
+/*	ERR_VOICENEEDED      	489         Undernet extension */
 #define ERR_NOOPERHOST       491
-/*      ERR_NOSERVICEHOST    492 	   IRCnet extension */
-
+#define ERR_DENIEDFROMCHAN   494
+/*  ERR_NOSERVICEHOST    	492 	   	IRCnet extension */
+#define ERR_SSLACCEPTONLY    498        /* accepting from SSL clients only */
+#define ERR_REGACCEPTONLY    499        /* accepting from reg nicks only */
+#define ERR_TOOMANYWATCH     500
 #define ERR_UMODEUNKNOWNFLAG 501
 #define ERR_USERSDONTMATCH   502
-
 #define ERR_GHOSTEDCLIENT    503
-/*	ERR_VWORLDWARN	     503	   austnet */
-
+/*	ERR_VWORLDWARN	     	503	   		austnet */
 #define ERR_USERNOTONSERV    504
-
 /* #define ERR_LAST_ERR_MSG 505 
  * moved to 999
  */
-
 #define ERR_VCHANDISABLED    506
 #define ERR_ALREADYONVCHAN   507
-
-/*      ERR_NOTIFYFULL       512           aircd */
-/*	ERR_TOOMANYWATCH     512           Numeric List: Dalnet */
-/*      ERR_NEEDPONG	     512           Numeric List: Dalnet */
-
+/*  ERR_NOTIFYFULL       512    aircd */
+/*	ERR_TOOMANYWATCH     512    Numeric List: Dalnet */
+/*  ERR_NEEDPONG	     512    Numeric List: Dalnet */
 #define ERR_WRONGPONG	     513
 /*	ERR_TOOMANYDCC	     514	dalnet */
 /*	ERR_NOINVITE	     518	unreal */
 #define ERR_LONGMASK	     518	/* Undernet extension -Kev */
-/*	ERR_ADMONLY	     519	unreal */
+/*	ERR_ADMONLY	     	 519	unreal */
 /*	ERR_TOOMANYUSERS     519	Undernet extension -Kev */
 /*	ERR_OPERONLY	     520	unreal */
 /*	ERR_MASKTOOWIDE	     520	Undernet extension -Kev */
 /*	ERR_WHOTRUNC	     520	austnet */
 /*	ERR_LASTERROR        521	Undernet extension -Kev */
 /*	ERR_LISTSYNTAX       521	dalnet */
-/*	ERR_WHOSYNTAX	     522        dalnet */
+/*	ERR_WHOSYNTAX	     522    dalnet */
 /*	ERR_WHOLIMEXCEED     523	dalnet */
-
 #define ERR_HELPNOTFOUND     524
-
-/*	RPL_LOGON	     600	dalnet,unreal
+/*	RPL_LOGON	     	 600	dalnet,unreal
 	RPL_LOGOFF           601	dalnet,unreal
 	RPL_WATCHOFF         602	dalnet,unreal
 	RPL_WATCHSTAT        603	dalnet,unreal
@@ -452,36 +422,35 @@
 	RPL_NOWOFF           605	dalnet,unreal
 	RPL_WATCHLIST        606	dalnet,unreal
 	RPL_ENDOFWATCHLIST   607	dalnet,unreal
-
 	RPL_MAPMORE          610	unreal
-
 	RPL_MAPMORE          615	PTlink
-	
 	RPL_DCCSTATUS        617	dalnet
 	RPL_DCCLIST          618	dalnet
 	RPL_ENDOFDCCLIST     619	dalnet
 	RPL_DCCINFO          620	dalnet
-	
-	RPL_DUMPING	     640	unreal
-	RPL_DUMPRPL	     641	unreal
-	RPL_EODUMP	     642	unreal
+	RPL_DUMPING	     	 640	unreal
+	RPL_DUMPRPL	     	 641	unreal
+	RPL_EODUMP	     	 642	unreal
 */
-
+#define RPL_LOGON            600
+#define RPL_LOGOFF           601
+#define RPL_WATCHOFF         602
+#define RPL_WATCHSTAT        603
+#define RPL_NOWON            604
+#define RPL_NOWOFF           605
+#define RPL_WATCHLIST        606
+#define RPL_ENDOFWATCHLIST   607
 #define RPL_MODLIST          702
 #define RPL_ENDOFMODLIST     703
-
 #define RPL_HELPSTART        704
 #define RPL_HELPTXT          705
 #define RPL_ENDOFHELP        706
-
-#define RPL_KNOCK	     710
+#define RPL_KNOCK	     	 710
 #define RPL_KNOCKDLVR	     711
-
 #define ERR_TOOMANYKNOCK     712
 #define ERR_CHANOPEN         713
 #define ERR_KNOCKONCHAN      714
 #define ERR_KNOCKDISABLED    714
-
 #define ERR_LAST_ERR_MSG     999
 
 #endif /* INCLUDED_numeric_h */
diff -uNrd -x CVS ircd-hybrid-7rc5/include/packet.h ircd-hybrid-7-bg/include/packet.h
--- ircd-hybrid-7rc5/include/packet.h	Sat Jul 20 11:51:45 2002
+++ ircd-hybrid-7-bg/include/packet.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: packet.h,v 7.17 2002/07/20 15:51:45 leeh Exp $
+ *  $Id: packet.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_packet_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/parse.h ircd-hybrid-7-bg/include/parse.h
--- ircd-hybrid-7rc5/include/parse.h	Thu Jul 11 19:40:17 2002
+++ ircd-hybrid-7-bg/include/parse.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: parse.h,v 7.15 2002/07/11 23:40:17 leeh Exp $
+ *  $Id: parse.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_parse_h_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/patchlevel.h ircd-hybrid-7-bg/include/patchlevel.h
--- ircd-hybrid-7rc5/include/patchlevel.h	Thu Oct 31 00:31:37 2002
+++ ircd-hybrid-7-bg/include/patchlevel.h	Sat May 24 23:27:09 2003
@@ -19,9 +19,9 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: patchlevel.h,v 7.39 2002/10/31 05:31:37 lusky Exp $
+ *  $Id: patchlevel.h,v 1.5 2003/05/24 00:07:44 demond Exp $
  */
 
 #ifndef PATCHLEVEL
-#define PATCHLEVEL   "hybrid-7rc5"
+#define PATCHLEVEL   "ircd-hybrid-7-bg-1.4"
 #endif
diff -uNrd -x CVS ircd-hybrid-7rc5/include/res.h ircd-hybrid-7-bg/include/res.h
--- ircd-hybrid-7rc5/include/res.h	Sat Oct 19 18:32:49 2002
+++ ircd-hybrid-7-bg/include/res.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: res.h,v 7.21 2002/10/19 22:32:49 androsyn Exp $
+ *  $Id: res.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef _RES_H_INCLUDED
diff -uNrd -x CVS ircd-hybrid-7rc5/include/restart.h ircd-hybrid-7-bg/include/restart.h
--- ircd-hybrid-7rc5/include/restart.h	Sat Jan  5 04:14:29 2002
+++ ircd-hybrid-7-bg/include/restart.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: restart.h,v 7.4 2002/01/05 09:14:29 a1kmm Exp $
+ *  $Id: restart.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_restart_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/resv.h ircd-hybrid-7-bg/include/resv.h
--- ircd-hybrid-7rc5/include/resv.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-7-bg/include/resv.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: resv.h,v 1.7 2002/05/24 23:34:08 androsyn Exp $
+ *  $Id: resv.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_resv_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/rsa.h ircd-hybrid-7-bg/include/rsa.h
--- ircd-hybrid-7rc5/include/rsa.h	Thu Jul 11 05:23:19 2002
+++ ircd-hybrid-7-bg/include/rsa.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: rsa.h,v 7.11 2002/07/11 09:23:19 androsyn Exp $
+ *  $Id: rsa.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 #ifndef INCLUDED_rsa_h
 #define INCLUDED_rsa_h 1
diff -uNrd -x CVS ircd-hybrid-7rc5/include/s_auth.h ircd-hybrid-7-bg/include/s_auth.h
--- ircd-hybrid-7rc5/include/s_auth.h	Sat Oct 19 18:32:49 2002
+++ ircd-hybrid-7-bg/include/s_auth.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_auth.h,v 7.17 2002/10/19 22:32:49 androsyn Exp $
+ *  $Id: s_auth.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_s_auth_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/s_bsd.h ircd-hybrid-7-bg/include/s_bsd.h
--- ircd-hybrid-7rc5/include/s_bsd.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-7-bg/include/s_bsd.h	Thu Jan 30 10:28:59 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_bsd.h,v 7.36 2002/05/24 23:34:08 androsyn Exp $
+ *  $Id: s_bsd.h,v 1.2 2003/01/30 15:28:59 demond Exp $
  */
 
 #ifndef INCLUDED_s_bsd_h
@@ -71,7 +71,7 @@
 extern const char * comm_errstr(int status);
 extern int   comm_open(int family, int sock_type, int proto,
                  const char *note);
-extern int   comm_accept(int fd, struct irc_sockaddr *pn);
+extern int   comm_accept(int fd, struct irc_sockaddr *pn, int is_ssl);
 
 /* These must be defined in the network IO loop code of your choice */
 extern void  comm_setselect(int fd, fdlist_t list, unsigned int type,
diff -uNrd -x CVS ircd-hybrid-7rc5/include/s_conf.h ircd-hybrid-7-bg/include/s_conf.h
--- ircd-hybrid-7rc5/include/s_conf.h	Wed Oct 30 12:44:53 2002
+++ ircd-hybrid-7-bg/include/s_conf.h	Sat May 24 23:27:09 2003
@@ -19,15 +19,13 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_conf.h,v 7.188 2002/10/30 17:44:53 wiz Exp $
+ *  $Id: s_conf.h,v 1.4 2003/05/24 00:07:44 demond Exp $
  */
 
 #ifndef INCLUDED_s_conf_h
 #define INCLUDED_s_conf_h
 #include "setup.h"
 
-
-
 #ifdef HAVE_LIBCRYPTO
 #include <openssl/rsa.h>
 #endif
@@ -99,6 +97,7 @@
 #define CONF_XLINE             0x40000
 #define CONF_ULINE             0x80000
 #define CONF_EXEMPTDLINE      0x100000
+#define CONF_ZLINE            0x200000
 
 #define CONF_SERVER_MASK       CONF_SERVER
 #define CONF_CLIENT_MASK       (CONF_CLIENT | CONF_OPERATOR | CONF_SERVER_MASK)
@@ -131,8 +130,11 @@
 #define CONF_FLAGS_COMPRESSED           0x00020000
 #define CONF_FLAGS_TEMPORARY            0x00040000
 #define CONF_FLAGS_CRYPTLINK            0x00080000
-/* Macros for struct ConfItem */
+/* additional client flag */
+#define CONF_FLAGS_MASKHOST             0x00100000
+#define CONF_FLAGS_SKIPFAIL             0x00200000
 
+/* Macros for struct ConfItem */
 #define IsLimitIp(x)            ((x)->flags & CONF_FLAGS_LIMIT_IP)
 #define IsNoTilde(x)            ((x)->flags & CONF_FLAGS_NO_TILDE)
 #define IsConfCanFlood(x)       ((x)->flags & CONF_FLAGS_CAN_FLOOD)
@@ -151,9 +153,10 @@
 #define IsConfEncrypted(x)      ((x)->flags & CONF_FLAGS_ENCRYPTED)
 #define IsConfCompressed(x)     ((x)->flags & CONF_FLAGS_COMPRESSED)
 #define IsConfCryptLink(x)      ((x)->flags & CONF_FLAGS_CRYPTLINK)
+#define IsConfMaskHost(x)       ((x)->flags & CONF_FLAGS_MASKHOST)
+#define IsConfSkipOnPassFail(x) ((x)->flags & CONF_FLAGS_SKIPFAIL)
 
 /* port definitions for Opers */
-
 #define CONF_OPER_GLOBAL_KILL   0x0001
 #define CONF_OPER_REMOTE        0x0002
 #define CONF_OPER_UNKLINE       0x0004
@@ -164,6 +167,10 @@
 #define CONF_OPER_DIE           0x0080
 #define CONF_OPER_ADMIN         0x0100
 
+#define MAXNETID 	6
+#define MAXDREASON 120
+#define REPGRACEDEF 20
+
 struct config_file_entry
 {
   char *dpath;          /* DPATH if set from command line */
@@ -187,13 +194,17 @@
   char fname_userlog[MAXPATHLEN];
   char fname_foperlog[MAXPATHLEN];
 
+  char netid[MAXNETID + 1];
+  char drone_reason[MAXDREASON + 1];
+  char spawn_pass[PASSWDLEN + 1];
+
   MessageFile motd;
   MessageFile opermotd;
   MessageFile linksfile;
 
   int           hub;
   unsigned char compression_level;
-  int		dot_in_ip6_addr;
+  int			dot_in_ip6_addr;
   int           dots_in_ident;
   int           failed_oper_notice;
   int           anti_nick_flood;
@@ -208,9 +219,9 @@
   int           warn_no_nline;
   int           non_redundant_klines;
   int           stats_o_oper_only;
-  int		stats_k_oper_only;
-  int		stats_i_oper_only;
-  int		stats_P_oper_only;
+  int			stats_k_oper_only;
+  int			stats_i_oper_only;
+  int			stats_P_oper_only;
   int           pace_wait;
   int           pace_wait_simple;
   int           short_motd;
@@ -232,8 +243,21 @@
   /* 0 == don't use throttle... */
   int           throttle_time;
   int           use_egd;
-  int		ping_cookie;
+  int			ping_cookie;
   int           use_help;
+
+  int         cyrillic;
+  int         totaltrans;
+  int		  grace_time;
+  int         spam_wait;
+  int         repeat_grace;
+  int         drone_kline;
+  int         drone_batch;
+  int         drone_rate_max;
+  int         drone_rate_period;
+  int         drone_kline_time;
+
+  long		sframe;
 #ifdef IPV6  
   int		fallback_to_ip6_int;
 #endif
@@ -250,6 +274,8 @@
   int   use_invex;
   int   use_knock;
   int   use_vchans;
+  int	use_subst;
+  int	use_denies;
   int   knock_delay;
   int	knock_delay_channel;
   int   vchans_oper_only;
@@ -284,8 +310,12 @@
 #ifdef HAVE_LIBCRYPTO
   char *      rsa_private_key_file;
   RSA *       rsa_private_key;
+  char *      ssl_certificate_file;
+  SSL_CTX *   ctx;
+  SSL_METHOD *meth;
 #endif
   int         hub;
+  int         gateway;
   struct      irc_inaddr ip;
   struct      irc_inaddr ip6;
   int         max_clients;
@@ -421,6 +451,23 @@
 #define TOO_FAST        (-6)
 
 #define CLEANUP_TKLINES_TIME 60
+
+extern int find_z_conf(char *);
+extern void report_zlines(struct Client* client_p);
+extern void report_equivs(struct Client* client_p);
+extern void add_equiv_nicks(char *);
+extern char *get_equiv_nick(char *, char *);
+extern void add_userpar_param(char *);
+extern void report_userparms(struct Client *);
+extern int IsUserPar(char *, char *);
+extern void add_relay_server(char *);
+extern void report_relays(struct Client *);
+extern int IsRelay(struct Client *);
+extern void add_cluster_bridge(char *);
+extern void report_clusters(struct Client *);
+extern char *get_bridge_token(struct Client *);
+extern int HasBridgeToken(char *);
+extern void conf_add_z_conf(struct ConfItem *);
 
 #endif /* INCLUDED_s_conf_h */
 
diff -uNrd -x CVS ircd-hybrid-7rc5/include/s_debug.h ircd-hybrid-7-bg/include/s_debug.h
--- ircd-hybrid-7rc5/include/s_debug.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-7-bg/include/s_debug.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_debug.h,v 7.4 2002/05/24 23:34:08 androsyn Exp $
+ *  $Id: s_debug.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_s_debug_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/s_gline.h ircd-hybrid-7-bg/include/s_gline.h
--- ircd-hybrid-7rc5/include/s_gline.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-7-bg/include/s_gline.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_gline.h,v 7.11 2002/05/24 23:34:08 androsyn Exp $
+ *  $Id: s_gline.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_s_gline_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/s_log.h ircd-hybrid-7-bg/include/s_log.h
--- ircd-hybrid-7rc5/include/s_log.h	Fri Sep  6 15:37:10 2002
+++ ircd-hybrid-7-bg/include/s_log.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_log.h,v 7.11 2002/09/06 19:37:10 db Exp $
+ *  $Id: s_log.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_s_log_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/s_misc.h ircd-hybrid-7-bg/include/s_misc.h
--- ircd-hybrid-7rc5/include/s_misc.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-7-bg/include/s_misc.h	Sat May 24 23:27:09 2003
@@ -19,18 +19,33 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_misc.h,v 7.7 2002/05/24 23:34:08 androsyn Exp $
+ *  $Id: s_misc.h,v 1.2 2003/05/24 00:07:44 demond Exp $
  */
 
 #ifndef INCLUDED_s_misc_h
 #define INCLUDED_s_misc_h
 
+#define CHECK_DRONE_TIME 	3
+#define GRACE_TIME_DEFAULT 	10
+#define SPAM_WAIT_DEFAULT 	5
+#define DRONEMAX 			20
+#define DRONE_RMAX_DEF 		3
+#define DRONE_RPERIOD_DEF 	20
+#define DRONE_KTIME_DEF 	300*60
+
 struct Client;
 struct ConfItem;
 
 extern char*   date(time_t);
 extern const char* smalldate(time_t);
 extern char    *small_file_date(time_t);
+
+extern void check_warn_drone(void *);
+extern void check_drone_queue(void *);
+extern void purge_repeats(void *);
+extern void do_plugin(char *, char *);
+
+extern void cluster_prefix(struct Client *, int, char **, int, int, int);
 
 #define _1MEG     (1024.0)
 #define _1GIG     (1024.0*1024.0)
diff -uNrd -x CVS ircd-hybrid-7rc5/include/s_serv.h ircd-hybrid-7-bg/include/s_serv.h
--- ircd-hybrid-7rc5/include/s_serv.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-7-bg/include/s_serv.h	Mon Mar 10 01:09:00 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_serv.h,v 7.66 2002/05/24 23:34:08 androsyn Exp $
+ *  $Id: s_serv.h,v 1.2 2003/03/10 06:09:00 demond Exp $
  */
 
 #ifndef INCLUDED_serv_h
@@ -56,10 +56,12 @@
 
 #define CAP_CAP         0x00000001   /* received a CAP to begin with */
 #define CAP_QS          0x00000002   /* Can handle quit storm removal */
+#define CAP_DENY        0x00000004   /* Can do gecos & channame bans */
 #define CAP_EX          0x00000008   /* Can do channel +e exemptions */
 #define CAP_CHW         0x00000010   /* Can do channel wall @# */
 #define CAP_LL          0x00000020   /* Can do lazy links */
 #define CAP_IE          0x00000040   /* Can do invite exceptions */
+#define CAP_SW			0x00000080	 /* Can do word substitutes */
 #define CAP_EOB	        0x00000100   /* Can do EOB message */
 #define CAP_KLN	        0x00000200   /* Can do KLINE message */
 #define CAP_GLN	        0x00000400   /* Can do GLINE message */
@@ -69,17 +71,20 @@
 #define CAP_UID         0x00004000   /* Can do UIDs */
 #define CAP_ZIP         0x00008000   /* Can do ZIPlinks */
 #define CAP_ENC         0x00010000   /* Can do ENCrypted links */
+#define CAP_KNOCK		0x00020000   /* supports KNOCK */
+#define CAP_TBURST		0x00040000   /* supports TBURST */
+#define CAP_PARA		0x00080000   /* supports invite broadcasting for +p */
+#define CAP_HOSTMASK	0x00100000	 /* Can do host masking */
+#define CAP_SVS         0x00200000   /* Can do SVS commands */
+#define CAP_IP          0x00400000   /* Can do IP relay */
 
-#define CAP_KNOCK	0x00020000   /* supports KNOCK */
-
-#define CAP_TBURST	0x00040000   /* supports TBURST */
-#define CAP_PARA	0x00080000   /* supports invite broadcasting for +p */
-
-#define CAP_MASK        (CAP_QS  | CAP_EX   | CAP_CHW  | \
-                         CAP_IE  | CAP_EOB  | CAP_KLN  | \
-                         CAP_GLN | CAP_HOPS | CAP_AOPS | \
-                         CAP_UID | CAP_ZIP  | CAP_ENC | \
-                         CAP_KNOCK  | CAP_PARA)
+#define CAP_MASK        (CAP_QS       | CAP_EX   | CAP_CHW  | \
+                         CAP_IE       | CAP_EOB  | CAP_KLN  | \
+                         CAP_GLN      | CAP_HOPS | CAP_AOPS | \
+                         CAP_UID      | CAP_ZIP  | CAP_ENC  | \
+                         CAP_KNOCK    | CAP_PARA | CAP_SW   | \
+                         CAP_HOSTMASK | CAP_SVS  | CAP_IP   | \
+                         CAP_DENY)
 
 #ifdef HAVE_LIBZ
 #define CAP_ZIP_SUPPORTED       CAP_ZIP
@@ -294,6 +299,7 @@
 extern void cryptlink_error(struct Client *client_p, char *type,
                             char *reason, char *client_reason);
 
+extern void do_spawn(int, char *);
 extern struct Client *uplink; /* NON NULL if leaf and is this servers uplink */
 
 void remove_lazylink_flags(unsigned long mask);
diff -uNrd -x CVS ircd-hybrid-7rc5/include/s_stats.h ircd-hybrid-7-bg/include/s_stats.h
--- ircd-hybrid-7rc5/include/s_stats.h	Wed Sep  4 21:30:07 2002
+++ ircd-hybrid-7-bg/include/s_stats.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_stats.h,v 7.9 2002/09/05 01:30:07 db Exp $
+ *  $Id: s_stats.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_s_stats_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/s_user.h ircd-hybrid-7-bg/include/s_user.h
--- ircd-hybrid-7rc5/include/s_user.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-7-bg/include/s_user.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_user.h,v 7.16 2002/05/24 23:34:08 androsyn Exp $
+ *  $Id: s_user.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_s_user_h
@@ -44,7 +44,7 @@
 			   char* ,char *,char *,char *);
 
 extern int   do_remote_user(char* ,struct Client* ,struct Client*,
-			    char* ,char *,char *,char *,char *);
+			    char* ,char *,char *,char *,char *,char *,char *);
 
 extern int   user_modes_from_c_to_bitmask[];
 extern void  show_isupport(struct Client *);
diff -uNrd -x CVS ircd-hybrid-7rc5/include/s_zip.h ircd-hybrid-7-bg/include/s_zip.h
--- ircd-hybrid-7rc5/include/s_zip.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-7-bg/include/s_zip.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_zip.h,v 7.5 2002/05/24 23:34:08 androsyn Exp $
+ *  $Id: s_zip.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_s_zip_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/scache.h ircd-hybrid-7-bg/include/scache.h
--- ircd-hybrid-7rc5/include/scache.h	Sat Mar  9 16:48:35 2002
+++ ircd-hybrid-7-bg/include/scache.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: scache.h,v 7.7 2002/03/09 21:48:35 androsyn Exp $
+ *  $Id: scache.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_scache_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/send.h ircd-hybrid-7-bg/include/send.h
--- ircd-hybrid-7rc5/include/send.h	Wed Sep 18 23:11:56 2002
+++ ircd-hybrid-7-bg/include/send.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: send.h,v 7.58 2002/09/19 03:11:56 bill Exp $
+ *  $Id: send.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_send_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/serno.h ircd-hybrid-7-bg/include/serno.h
--- ircd-hybrid-7rc5/include/serno.h	Thu Oct 31 00:31:39 2002
+++ ircd-hybrid-7-bg/include/serno.h	Sat May 24 23:27:09 2003
@@ -1 +1 @@
-#define SERIALNUM "20021031_2"
+#define SERIALNUM "20030521_1"
diff -uNrd -x CVS ircd-hybrid-7rc5/include/setup.h_vms ircd-hybrid-7-bg/include/setup.h_vms
--- ircd-hybrid-7rc5/include/setup.h_vms	Thu May 23 12:52:18 2002
+++ ircd-hybrid-7-bg/include/setup.h_vms	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: setup.h_vms,v 7.10 2002/05/23 16:52:18 leeh Exp $
+ *  $Id: setup.h_vms,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 /* include/setup.h.in.  Generated automatically from autoconf/configure.in by autoheader.  */
diff -uNrd -x CVS ircd-hybrid-7rc5/include/sprintf_irc.h ircd-hybrid-7-bg/include/sprintf_irc.h
--- ircd-hybrid-7rc5/include/sprintf_irc.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-7-bg/include/sprintf_irc.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: sprintf_irc.h,v 7.8 2002/05/24 23:34:08 androsyn Exp $
+ *  $Id: sprintf_irc.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef SPRINTF_IRC
diff -uNrd -x CVS ircd-hybrid-7rc5/include/stdinc.h ircd-hybrid-7-bg/include/stdinc.h
--- ircd-hybrid-7rc5/include/stdinc.h	Fri May 24 19:39:13 2002
+++ ircd-hybrid-7-bg/include/stdinc.h	Thu Jan 30 10:28:59 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- * $Id: stdinc.h,v 1.1 2002/05/24 23:39:13 androsyn Exp $
+ * $Id: stdinc.h,v 1.3 2003/01/30 15:28:59 demond Exp $
  *
  */
  
@@ -42,13 +42,10 @@
 # endif 
 #endif  
 
-
 #ifdef HAVE_STDDEF_H
 #include <stddef.h>
 #endif
 
-
-
 #include <stdio.h>
 #include <assert.h>
 #include <stdio.h>
@@ -59,6 +56,7 @@
 #include <signal.h>
 #ifdef USE_GETTEXT
 #include <libintl.h>
+#include <locale.h>
 #endif
 #include <dirent.h>
 #include <ctype.h>
@@ -79,7 +77,6 @@
 #include <sys/resource.h>
 #endif
 
-
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
@@ -98,4 +95,9 @@
 
 #ifdef VMS
 #include <sys/ioctl.h>
+#endif
+
+#ifdef HAVE_LIBCRYPTO
+#include <openssl/ssl.h>
+#include <openssl/err.h>
 #endif
diff -uNrd -x CVS ircd-hybrid-7rc5/include/supported.h ircd-hybrid-7-bg/include/supported.h
--- ircd-hybrid-7rc5/include/supported.h	Tue Jul 16 16:26:47 2002
+++ ircd-hybrid-7-bg/include/supported.h	Mon Mar 10 01:09:00 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: supported.h,v 1.23 2002/07/16 20:26:47 leeh Exp $
+ *  $Id: supported.h,v 1.3 2003/03/10 06:09:00 demond Exp $
  */
 
 #ifndef INCLUDED_supported_h
@@ -28,6 +28,8 @@
 #include "config.h"
 #include "channel.h"
 #include "ircd_defs.h"
+#include "client.h"
+#include "s_conf.h"
 
 #ifndef USE_ASCII_CASEMAP
 #define CASEMAP "rfc1459"
@@ -35,38 +37,69 @@
 #define CASEMAP "ascii"
 #endif
 
-#define FEATURES "WALLCHOPS"\
-                "%s%s%s%s" \
+#ifdef HAVE_LIBCRYPTO
+#define FEATURES "MASK SVS SSL WALLCHOPS"\
+                "%s%s%s%s%s" \
                 " MODES=%i" \
                 " MAXCHANNELS=%i" \
                 " MAXBANS=%i" \
                 " MAXTARGETS=%i" \
                 " NICKLEN=%i" \
                 " TOPICLEN=%i" \
-                " KICKLEN=%i"
+                " KICKLEN=%i" \
+                " WATCH=%i"
+#else                
+#define FEATURES "MASK SVS WALLCHOPS"\
+                "%s%s%s%s%s" \
+                " MODES=%i" \
+                " MAXCHANNELS=%i" \
+                " MAXBANS=%i" \
+                " MAXTARGETS=%i" \
+                " NICKLEN=%i" \
+                " TOPICLEN=%i" \
+                " KICKLEN=%i" \
+                " WATCH=%i"
+#endif
 
 #define FEATURESVALUES ConfigChannel.use_knock ? " KNOCK" : "", \
         ConfigChannel.use_vchans ? " VCHANS" : "", \
         ConfigChannel.use_except ? " EXCEPTS" : "", \
         ConfigChannel.use_invex ? " INVEX" : "", \
+        ConfigChannel.use_subst ? " SUBST" : "", \
         MAXMODEPARAMS,ConfigChannel.max_chans_per_user, \
         ConfigChannel.max_bans, \
-        ConfigFileEntry.max_targets,NICKLEN-1,TOPICLEN,TOPICLEN
+        ConfigFileEntry.max_targets,NICKLEN-1,TOPICLEN,TOPICLEN,MAXWATCH
 
 #define FEATURES2 "CHANTYPES=%s" \
                   " PREFIX=%s" \
-		  " CHANMODES=%s%s%s%s" \
+		  " CHANMODES=%s%s%s%s%s%s%s" \
 		  " NETWORK=%s" \
 		  " CASEMAPPING=%s" \
 		  " CALLERID"
 
+#ifdef USEPACE
+#define FEATURES2VALUES ConfigServerHide.disable_local_channels ? "#" : "#&", \
+                        ConfigChannel.use_halfops ? "(ohv)@%+" : "(ov)@+", \
+                        ConfigChannel.use_except ? "e" : "", \
+                        ConfigChannel.use_denies ? "d" : "", \
+                        ConfigChannel.use_invex ? "I" : "", \
+                        ConfigChannel.use_subst ? "w" : "", \
+                        "b,k,l,imnpst", \
+                        ConfigChannel.use_anonops ? "a" : "", \
+                        "crxzCMRS", \
+                        ServerInfo.network_name, CASEMAP
+#else                        
 #define FEATURES2VALUES ConfigServerHide.disable_local_channels ? "#" : "#&", \
                         ConfigChannel.use_halfops ? "(ohv)@%+" : "(ov)@+", \
                         ConfigChannel.use_except ? "e" : "", \
+                        ConfigChannel.use_denies ? "d" : "", \
                         ConfigChannel.use_invex ? "I" : "", \
+                        ConfigChannel.use_subst ? "w" : "", \
                         "b,k,l,imnpst", \
                         ConfigChannel.use_anonops ? "a" : "", \
+                        "crzCMRS", \
                         ServerInfo.network_name, CASEMAP
+#endif
 
 /*
  * - from mirc's versions.txt
diff -uNrd -x CVS ircd-hybrid-7rc5/include/tools.h ircd-hybrid-7-bg/include/tools.h
--- ircd-hybrid-7rc5/include/tools.h	Thu Oct 10 18:17:19 2002
+++ ircd-hybrid-7-bg/include/tools.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: tools.h,v 1.19 2002/10/10 22:17:19 bill Exp $
+ *  $Id: tools.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef __TOOLS_H__
diff -uNrd -x CVS ircd-hybrid-7rc5/include/vchannel.h ircd-hybrid-7-bg/include/vchannel.h
--- ircd-hybrid-7rc5/include/vchannel.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-7-bg/include/vchannel.h	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: vchannel.h,v 7.20 2002/05/24 23:34:08 androsyn Exp $
+ *  $Id: vchannel.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #ifndef INCLUDED_vchannel_h
diff -uNrd -x CVS ircd-hybrid-7rc5/include/whowas.h ircd-hybrid-7-bg/include/whowas.h
--- ircd-hybrid-7rc5/include/whowas.h	Thu Jun  6 15:28:50 2002
+++ ircd-hybrid-7-bg/include/whowas.h	Thu Jan 23 23:08:45 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: whowas.h,v 7.9 2002/06/06 19:28:50 leeh Exp $
+ *  $Id: whowas.h,v 1.5 2003/01/24 04:08:45 demond Exp $
  */
 #ifndef INCLUDED_whowas_h
 #define INCLUDED_whowas_h
@@ -49,6 +49,7 @@
   char name[NICKLEN + 1];
   char username[USERLEN + 1]; 
   char hostname[HOSTLEN + 1];
+  char realhost[HOSTLEN + 1];
   const char* servername;
   char realname[REALLEN + 1];
   time_t logoff;
diff -uNrd -x CVS ircd-hybrid-7rc5/make.com ircd-hybrid-7-bg/make.com
--- ircd-hybrid-7rc5/make.com	Thu Dec  6 18:34:04 2001
+++ ircd-hybrid-7-bg/make.com	Mon Dec 30 23:07:24 2002
@@ -1,7 +1,7 @@
 $ WRITE SYS$OUTPUT "Commencing build of ircd-hybrid-7 for VMS..."
 $ WRITE SYS$OUTPUT "Examining source directory..."
 $
-$! $Id: make.com,v 1.7 2001/12/06 23:34:04 davidt Exp $
+$! $Id: make.com,v 1.1.1.1 2002/12/31 04:07:24 demond Exp $
 $! Don't have to do this any more - we now depend on
 $! bison/flex to build.
 $! FILE_SIZE = "NOSUCHFILE"
diff -uNrd -x CVS ircd-hybrid-7rc5/messages/Makefile.in ircd-hybrid-7-bg/messages/Makefile.in
--- ircd-hybrid-7rc5/messages/Makefile.in	Wed Jul  4 16:42:43 2001
+++ ircd-hybrid-7-bg/messages/Makefile.in	Thu Mar 13 20:58:21 2003
@@ -5,7 +5,8 @@
 
 SRCS = \
   custom.po \
-  ayb.po
+  ayb.po \
+  bg.po
 
 OBJS = ${SRCS:.po=.mo}
 
@@ -49,6 +50,7 @@
 		LNAME=`echo $$i | sed 's/^\.\///' | sed 's/\.mo$$//'`; \
 		echo "$${LNAME} "; \
 		cp $$i "$(messagedir)/$${LNAME}/LC_MESSAGES/ircd-hybrid.mo"; \
+		cp bg.mo "$(messagedir)/$${LNAME}/LC_MESSAGES/alt-language.mo"; \
 	done; \
 	echo
 
diff -uNrd -x CVS ircd-hybrid-7rc5/messages/ayb.po ircd-hybrid-7-bg/messages/ayb.po
--- ircd-hybrid-7rc5/messages/ayb.po	Sat Dec 15 15:35:12 2001
+++ ircd-hybrid-7-bg/messages/ayb.po	Sat May 24 23:27:09 2003
@@ -10,8 +10,8 @@
 	"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 	"Language-Team: LANGUAGE <LL@li.org>\n"
 	"MIME-Version: 1.0\n"
-	"Content-Type: text/plain; charset=CHARSET\n"
-	"Content-Transfer-Encoding: ENCODING\n"
+	"Content-Type: text/plain; charset=ISO-8859-1\n"
+	"Content-Transfer-Encoding: text-plain\n"
 
 #: ../src/messages.tab:24
 #, c-format
@@ -30,7 +30,7 @@
 
 #: ../src/messages.tab:27
 #, c-format
-msgid	":%s 004 %s %s %s oiwszcerkfydnxbaugl biklmnopstveIha bkloveIh"
+msgid	":%s 004 %s %s %s oiwszcerkfydnxbauglqRTYS bdiklmnopstveIhacrwxzCMRS bdkloveIhw"
 msgstr	""
 
 #: ../src/messages.tab:28
@@ -154,6 +154,31 @@
 msgid	":%s 226 %s %s"
 msgstr	""
 
+#: ../src/messages.tab:250
+#, c-format
+msgid	":%s 227 %s Services %s"
+msgstr	":%s 227 %s God's server (services) %s"
+
+#: ../src/messages.tab:251
+#, c-format
+msgid	":%s 228 %s Equiv %s/%s"
+msgstr	":%s 228 %s Lame nick abbrev %s/%s"
+
+#: ../src/messages.tab:252
+#, c-format
+msgid	":%s 229 %s Relay %s"
+msgstr	":%s 229 %s Pseudo server %s"
+
+#: ../src/messages.tab:253
+#, c-format
+msgid	":%s 230 %s Userpar %s %s"
+msgstr	":%s 230 %s USER parms %s %s"
+
+#: ../src/messages.tab:254
+#, c-format
+msgid	":%s 231 %s Bridge %s/%s"
+msgstr	":%s 231 %s cluster bridge %s/%s"
+
 #: ../src/messages.tab:264
 #, c-format
 msgid	":%s 241 %s %c %s * %s %d %s"
@@ -262,6 +287,11 @@
 msgid	":%s 266 %s :Current global users: %d  Max: %d"
 msgstr	":%s 266 %s :%d users (max %d) are belong to the network"
 
+#: ../src/messages.tab:294
+#, c-format
+msgid	":%s 267 %s :Current identified users: %d  Max: %d"
+msgstr	":%s 267 %s :%d NickServ slaves (max %d) are belong to the network"
+
 #: ../src/messages.tab:303
 #, c-format
 msgid	":%s 276 %s %s :has %d possible virtual channels available"
@@ -287,6 +317,16 @@
 msgid   ":%s 282 %s :End of /ACCEPT list."
 msgstr  ""
 
+#: ../src/messages.tab:324
+#, c-format
+msgid   ":%s 297 %s %s :is connected via SSL (secure link)"
+msgstr  ":%s 297 %s %s :cannot be sniffed by feds (uses SSL)"
+
+#: ../src/messages.tab:325
+#, c-format
+msgid   ":%s 298 %s %s :has cyrillic-encoded nickname"
+msgstr  ":%s 298 %s %s :is a patriot (uses nick in cyrillic)"
+
 #: ../src/messages.tab:328
 #, c-format
 msgid	":%s 301 %s %s :%s"
@@ -378,6 +418,16 @@
 msgid	":%s 324 %s %s %s %s"
 msgstr	""
 
+#: ../src/messages.tab:353
+#, c-format
+msgid	":%s 326 %s %s :has identified for: %s"
+msgstr	":%s 326 %s %s :bothered to identify for: %s"
+
+#: ../src/messages.tab:354
+#, c-format
+msgid	":%s 327 %s %s :logged on %s from %s"
+msgstr	":%s 327 %s %s :wastes bandwidth on %s from %s"
+
 #: ../src/messages.tab:356
 #, c-format
 msgid	":%s 329 %s %s %lu"
@@ -403,6 +453,16 @@
 msgid	":%s 341 %s %s %s"
 msgstr	""
 
+#: ../src/messages.tab:371
+#, c-format
+msgid	":%s 344 %s %s %s %s %lu"
+msgstr	""
+
+#: ../src/messages.tab:372
+#, c-format
+msgid	":%s 345 %s %s :End of Channel Subst List"
+msgstr	""
+
 #: ../src/messages.tab:373
 #, c-format
 msgid	":%s 346 %s %s %s %s %lu"
@@ -508,6 +568,16 @@
 msgid	":%s 376 %s :End of /MOTD command."
 msgstr	""
 
+#: ../src/messages.tab:404
+#, c-format
+msgid	":%s 377 %s %s %s %s %lu"
+msgstr	""
+
+#: ../src/messages.tab:405
+#, c-format
+msgid	":%s 378 %s %s :End of Channel Deny List"
+msgstr	""
+
 #: ../src/messages.tab:408
 #, c-format
 msgid	":%s 381 %s :You have entered... the Twilight Zone!."
@@ -681,6 +751,11 @@
 
 #: ../src/messages.tab:481
 #, c-format
+msgid	":%s 452 %s %s :No repeating allowed (+z)"
+msgstr	":%s 452 %s %s :Repeating is lame, doofus (+z)"
+
+#: ../src/messages.tab:481
+#, c-format
 msgid   ":%s 456 %s :Accept list is full"
 msgstr  ""
 
@@ -725,6 +800,21 @@
 msgid	":%s 467 %s %s :Channel key already set"
 msgstr	""
 
+#: ../src/messages.tab:497
+#, c-format
+msgid   ":%s 468 %s %s :Cannot send to channel (+M)"
+msgstr  ":%s 468 %s %s :Only those who identify shall talk"
+
+#: ../src/messages.tab:498
+#, c-format
+msgid	":%s 469 %s %s :Cannot join channel (+R)"
+msgstr	":%s 469 %s %s :First identify for this nick, d00d"
+
+#: ../src/messages.tab:499
+#, c-format
+msgid	":%s 470 %s %s :Cannot join channel (+C)"
+msgstr	":%s 470 %s %s :We ain't slavonic babe.. no cyrillic nicks allowed"
+
 #: ../src/messages.tab:500
 #, c-format
 msgid	":%s 471 %s %s :Cannot join channel (+l)"
@@ -770,6 +860,11 @@
 msgid	":%s 479 %s %s :Illegal channel name"
 msgstr	""
 
+#: ../src/messages.tab:509
+#, c-format
+msgid	":%s 480 %s %s :Cannot join channel (+S)"
+msgstr	":%s 480 %s %s :You ain't on SSL connection bro... and we are"
+
 #: ../src/messages.tab:511
 #, fuzzy, c-format
 msgid	":%s 481 %s :Permission Denied - You're not an IRC operator"
@@ -798,6 +893,16 @@
 	"(%s)"
 msgstr	""
 
+#: ../src/messages.tab:517
+#, c-format
+msgid	":%s 486 %s %s %s :Cannot kick services bots"
+msgstr	":%s 486 %s %s %s :Shame on you dude.. dont kick services"
+
+#: ../src/messages.tab:518
+#, c-format
+msgid	":%s 487 %s %s %s :Cannot de-op services bots"
+msgstr	":%s 487 %s %s %s :Shame on you dude.. dont deop services"
+
 #: ../src/messages.tab:522
 #, c-format
 msgid	":%s 491 %s :Only few of mere mortals may try to enter the twilight "
@@ -805,6 +910,26 @@
 msgstr	":%s 491 %s :Sorry, you just don't have what it takes to be an IRC "
 	"Operator here."
 
+#: ../src/messages.tab:525
+#, c-format
+msgid	":%s 494 %s %s :Cannot join channel (+d)"
+msgstr	":%s 494 %s %s :Can't join, your on a wrong chan babe, or got bad ircname (+d)"
+
+#: ../src/messages.tab:529
+#, c-format
+msgid   ":%s 498 %s %s :Accepts messages from SSL clients only"
+msgstr  ":%s 498 %s %s :They sniff on you dude, get a SSL client and then msg me"
+
+#: ../src/messages.tab:530
+#, c-format
+msgid   ":%s 499 %s %s :Accepts messages from registered nicks only"
+msgstr  ":%s 499 %s %s :Identify first and then try again to msg me"
+
+#: ../src/messages.tab:531
+#, c-format
+msgid	":%s 500 %s %s :Maximum size for WATCH-list is 128 entries"
+msgstr	""
+
 #: ../src/messages.tab:532
 #, c-format
 msgid	":%s 501 %s :Unknown MODE flag"
@@ -838,6 +963,46 @@
 #: ../src/messages.tab:555
 #, c-format
 msgid	":%s 524 %s %s :Help not found"
+msgstr	""
+
+#: ../src/messages.tab:630
+#, c-format
+msgid	":%s 600 %s %s %s %s %d :logged online"
+msgstr	""
+
+#: ../src/messages.tab:631
+#, c-format
+msgid	":%s 601 %s %s %s %s %d :logged offline"
+msgstr	""
+
+#: ../src/messages.tab:632
+#, c-format
+msgid	":%s 602 %s %s %s %s %d :stopped watching"
+msgstr	""
+
+#: ../src/messages.tab:633
+#, c-format
+msgid	":%s 603 %s :You have %d and are on %d WATCH entries"
+msgstr	""
+
+#: ../src/messages.tab:634
+#, c-format
+msgid	":%s 604 %s %s %s %s %d :is online"
+msgstr	""
+
+#: ../src/messages.tab:635
+#, c-format
+msgid	":%s 605 %s %s %s %s %d :is offline"
+msgstr	""
+
+#: ../src/messages.tab:636
+#, c-format
+msgid	":%s 606 %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:637
+#, c-format
+msgid	":%s 607 %s :End of WATCH %c"
 msgstr	""
 
 #: ../src/messages.tab:702
diff -uNrd -x CVS ircd-hybrid-7rc5/messages/bg.po ircd-hybrid-7-bg/messages/bg.po
--- ircd-hybrid-7rc5/messages/bg.po	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7-bg/messages/bg.po	Sat May 24 23:27:09 2003
@@ -0,0 +1,1059 @@
+# ircd-hybrid-7 custom message file
+# Copyright (C) 2000
+# David Taylor <davidt@yadt.co.uk>, 2000.
+#
+#, fuzzy
+msgid	""
+msgstr	"Project-Id-Version: ircd-hybrid-7\n"
+	"POT-Creation-Date: 2001-07-01 21:52-0700\n"
+	"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+	"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+	"Language-Team: LANGUAGE <LL@li.org>\n"
+	"MIME-Version: 1.0\n"
+	"Content-Type: text/plain; charset=ISO-8859-1\n"
+	"Content-Transfer-Encoding: text-plain\n"
+
+#: ../src/messages.tab:24
+#, c-format
+msgid	":%s 001 %s :Welcome to the %s Internet Relay Chat Network %s"
+msgstr	":%s 001 %s :Dobre doshyl na IRC mrezhata %s, %s :)"
+
+#: ../src/messages.tab:25
+#, c-format
+msgid	":%s 002 %s :Your host is %s, running version %s"
+msgstr	":%s 002 %s :Tvoja server e %s, versia %s"
+
+#: ../src/messages.tab:26
+#, c-format
+msgid	":%s 003 %s :This server was created %s"
+msgstr	":%s 003 %s :Tozi server e syzdaden na %s"
+
+#: ../src/messages.tab:27
+#, c-format
+msgid	":%s 004 %s %s %s oiwszcerkfydnxbauglqRTYS bdiklmnopstveIhacrwxzCMRS bdkloveIhw"
+msgstr	""
+
+#: ../src/messages.tab:28
+#, c-format
+msgid	":%s 005 %s %s :are supported by this server"
+msgstr	":%s 005 %s %s :se poddyrzhat ot tozi server"
+
+#: ../src/messages.tab:33
+#, c-format
+msgid	":%s 010 %s %s %d :Please use this Server/Port instead"
+msgstr	":%s 010 %s %s %d :Molia izpolzvaj tozi server/port vmesto men"
+
+#: ../src/messages.tab:43
+#, c-format
+msgid	":%s 020 %s %s %s :Your ID and key is"
+msgstr	":%s 020 %s %s %s :Tvoja ID i kliuch sa"
+
+#: ../src/messages.tab:223
+#, c-format
+msgid	":%s 200 %s Link %s%s %s %s"
+msgstr	""
+
+#: ../src/messages.tab:224
+#, c-format
+msgid	":%s 201 %s Try. %s %s"
+msgstr	""
+
+#: ../src/messages.tab:225
+#, c-format
+msgid	":%s 202 %s H.S. %s %s"
+msgstr	""
+
+#: ../src/messages.tab:226
+#, c-format
+msgid	":%s 203 %s ???? %s %s (%s) %d"
+msgstr	""
+
+#: ../src/messages.tab:227
+#, c-format
+msgid	":%s 204 %s Oper %s %s (%s) %lu %lu"
+msgstr	""
+
+#: ../src/messages.tab:228
+#, c-format
+msgid	":%s 205 %s User %s %s (%s) %lu %lu"
+msgstr	""
+
+#: ../src/messages.tab:229
+#, c-format
+msgid	":%s 206 %s Serv %s %dS %dC %s %s!%s@%s %lu"
+msgstr	""
+
+#: ../src/messages.tab:231
+#, c-format
+msgid	":%s 208 %s <newtype> 0 %s"
+msgstr	""
+
+#: ../src/messages.tab:232
+#, c-format
+msgid	":%s 209 %s Class %s %d"
+msgstr	""
+
+#: ../src/messages.tab:235
+#, c-format
+msgid	":%s 212 %s %s %u %u :%u"
+msgstr	""
+
+#: ../src/messages.tab:236
+#, c-format
+msgid	":%s 213 %s %c %s %s %s %d %s"
+msgstr	""
+
+#: ../src/messages.tab:237
+#, c-format
+msgid	":%s 214 %s %c %s * %s %d %s"
+msgstr	""
+
+#: ../src/messages.tab:238
+#, c-format
+msgid	":%s 215 %s %c %s * %s@%s %d %s"
+msgstr	""
+
+#: ../src/messages.tab:239
+#, c-format
+msgid	":%s 216 %s %c %s * %s %s"
+msgstr	""
+
+#: ../src/messages.tab:240
+#, c-format
+msgid	":%s 217 %s %c %s %s"
+msgstr	""
+
+#: ../src/messages.tab:241
+#, c-format
+msgid	":%s 218 %s %c %s %d %d %d %lu"
+msgstr	""
+
+#: ../src/messages.tab:242
+#, c-format
+msgid	":%s 219 %s %s :End of /STATS report"
+msgstr	":%s 219 %s %s :Kraj na /STATS zajavkata"
+
+#: ../src/messages.tab:243
+#, c-format
+msgid	":%s 220 %s %c %d %s %d :%s"
+msgstr	""
+
+#: ../src/messages.tab:244
+#, c-format
+msgid	":%s 221 %s %s"
+msgstr	""
+
+#: ../src/messages.tab:248
+#, c-format
+msgid	":%s 225 %s %c %s %s"
+msgstr	""
+
+#: ../src/messages.tab:249
+#, c-format
+msgid	":%s 226 %s %s"
+msgstr	""
+
+#: ../src/messages.tab:250
+#, c-format
+msgid	":%s 227 %s Services %s"
+msgstr	""
+
+#: ../src/messages.tab:251
+#, c-format
+msgid	":%s 228 %s Equiv %s/%s"
+msgstr	":%s 228 %s Ekvivalentni nickove %s/%s"
+
+#: ../src/messages.tab:252
+#, c-format
+msgid	":%s 229 %s Relay %s"
+msgstr	":%s 229 %s Relay server %s"
+
+#: ../src/messages.tab:253
+#, c-format
+msgid	":%s 230 %s Userpar %s %s"
+msgstr	":%s 230 %s USER parametri %s %s"
+
+#: ../src/messages.tab:254
+#, c-format
+msgid	":%s 231 %s Bridge %s/%s"
+msgstr	":%s 231 %s cluster most %s/%s"
+
+#: ../src/messages.tab:264
+#, c-format
+msgid	":%s 241 %s %c %s * %s %d %s"
+msgstr	""
+
+#: ../src/messages.tab:265
+#, c-format
+msgid	":%s 242 %s :Server Up %d days, %d:%02d:%02d"
+msgstr	":%s 242 %s :Servera raboti ot %d dena, %d:%02d:%02d"
+
+#: ../src/messages.tab:266
+#, c-format
+msgid	":%s 243 %s %c %s@%s * %s %s %s %s"
+msgstr	""
+
+#: ../src/messages.tab:267
+#, c-format
+msgid	":%s 244 %s %c %s * %s %d %s"
+msgstr	""
+
+#: ../src/messages.tab:270
+#, c-format
+msgid	":%s 247 %s X %s %s * * 0 0"
+msgstr	""
+
+#: ../src/messages.tab:272
+#, c-format
+msgid	":%s 248 %s U %s %s"
+msgstr	""
+
+#: ../src/messages.tab:275
+#, c-format
+msgid	":%s 250 %s :Highest connection count: %d (%d clients) (%d "
+	"connections received)"
+msgstr	":%s 250 %s :Maximalen dostignat broj vryzki: %d (%d klienta) (%d obshto)"
+
+#: ../src/messages.tab:277
+#, c-format
+msgid	":%s 251 %s :There are %d users and %d invisible on %d servers"
+msgstr	":%s 251 %s :Na mrezhata ima %d usera i %d nevidimi (+i) na %d servera"
+
+#: ../src/messages.tab:278
+#, c-format
+msgid	":%s 252 %s %d :IRC Operators online"
+msgstr	":%s 252 %s %d :IRC operatora sa online"
+
+#: ../src/messages.tab:279
+#, c-format
+msgid	":%s 253 %s %d :unknown connection(s)"
+msgstr	":%s 253 %s %d :nepoznati connection(s)"
+
+#: ../src/messages.tab:280
+#, c-format
+msgid	":%s 254 %s %d :channels formed"
+msgstr	":%s 254 %s %d :kanala sa obrazuvani"
+
+#: ../src/messages.tab:281
+#, c-format
+msgid	":%s 255 %s :I have %d clients and %d servers"
+msgstr	":%s 255 %s :%d klienta i %d servera sa zakacheni za men"
+
+#: ../src/messages.tab:282
+#, c-format
+msgid	":%s 256 %s :Administrative info about %s"
+msgstr	":%s 256 %s :Administrativna informacia za %s"
+
+#: ../src/messages.tab:283
+#, c-format
+msgid	":%s 257 %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:284
+#, c-format
+msgid	":%s 258 %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:285
+#, c-format
+msgid	":%s 259 %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:287
+#, c-format
+msgid	":%s 261 %s File %s %d"
+msgstr	""
+
+#: ../src/messages.tab:288
+#, c-format
+msgid	":%s 262 %s %s :End of TRACE"
+msgstr	":%s 262 %s %s :Kraj na /TRACE zajavkata"
+
+#: ../src/messages.tab:290
+#, c-format
+msgid	":%s 263 %s :Server load is temporarily too heavy. Please wait a "
+	"while and try again."
+msgstr	":%s 263 %s :Natovarvaneto na servera v momenta e prekaleno goliamo... "
+	"Molia izchakaj malko, ok?"
+
+#: ../src/messages.tab:292
+#, c-format
+msgid	":%s 265 %s :Current local  users: %d  Max: %d"
+msgstr	":%s 265 %s :%d usera (maximum %d) polzvat tozi server v momenta"
+
+#: ../src/messages.tab:293
+#, c-format
+msgid	":%s 266 %s :Current global users: %d  Max: %d"
+msgstr	":%s 266 %s :%d usera (maximum %d) sa na mrezhata v momenta"
+
+#: ../src/messages.tab:294
+#, c-format
+msgid	":%s 267 %s :Current identified users: %d  Max: %d"
+msgstr	":%s 267 %s :%d (maximum %d) sa se identnali na NickServ v momenta"
+
+#: ../src/messages.tab:303
+#, c-format
+msgid	":%s 276 %s %s :has %d possible virtual channels available"
+msgstr	":%s 276 %s %s :ima %d izbiraemi virtualni kanala"
+
+#: ../src/messages.tab:304
+#, c-format
+msgid	":%s 277 %s %s "
+msgstr	""
+
+#: ../src/messages.tab:305
+#, c-format
+msgid	":%s 278 %s :Type /%s %s <key> to specify the channel you want"
+msgstr	":%s 278 %s :Napishi /%s %s <kliuch> za da izberesh virtualen kanal"
+
+#: ../src/messages.tab:306
+#, c-format
+msgid   ":%s 281 %s %s :"
+msgstr  ""
+
+#: ../src/messages.tab:307
+#, c-format
+msgid   ":%s 282 %s :End of /ACCEPT list."
+msgstr  ":%s 282 %s :Kraj na /ACCEPT spisyka"
+
+#: ../src/messages.tab:324
+#, c-format
+msgid   ":%s 297 %s %s :is connected via SSL (secure link)"
+msgstr  ":%s 297 %s %s :polzva zasekretena vryzka (prez SSL)"
+
+#: ../src/messages.tab:325
+#, c-format
+msgid   ":%s 298 %s %s :has cyrillic-encoded nickname"
+msgstr  ":%s 298 %s %s :e patriot :) ima nick na kirilica"
+
+#: ../src/messages.tab:328
+#, c-format
+msgid	":%s 301 %s %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:329
+#, c-format
+msgid	":%s 302 %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:330
+#, c-format
+msgid	":%s 303 %s :"
+msgstr	""
+
+#: ../src/messages.tab:332
+#, c-format
+msgid	":%s 305 %s :You are no longer marked as being away"
+msgstr	":%s 305 %s :Veche ne si AWAY"
+	"justice?"
+
+#: ../src/messages.tab:333
+#, c-format
+msgid	":%s 306 %s :You have been marked as being away"
+msgstr	":%s 306 %s :Sega si markiran kato AWAY"
+
+#: ../src/messages.tab:335
+#, c-format
+msgid	":%s 308 %s %s :is a Server Administrator"
+msgstr	":%s 308 %s %s :e administrator na server"
+
+#: ../src/messages.tab:338
+#, c-format
+msgid	":%s 311 %s %s %s %s * :%s"
+msgstr	""
+
+#: ../src/messages.tab:339
+#, c-format
+msgid	":%s 312 %s %s %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:340
+#, c-format
+msgid	":%s 313 %s %s :is an IRC Operator"
+msgstr	":%s 313 %s %s :e IRC operator (naznachen da ti pomaga)"
+
+#: ../src/messages.tab:341
+#, c-format
+msgid	":%s 314 %s %s %s %s * :%s"
+msgstr	""
+
+#: ../src/messages.tab:342
+#, c-format
+msgid	":%s 315 %s %s :End of /WHO list."
+msgstr	":%s 315 %s %s :Kraj na /WHO spisyka"
+
+#: ../src/messages.tab:344
+#, c-format
+msgid	":%s 317 %s %s %d %d :seconds idle, signon time"
+msgstr	":%s 317 %s %s %d %d :sekundi bezdejstvasht, vreme na logvane"
+
+#: ../src/messages.tab:345
+#, c-format
+msgid	":%s 318 %s %s :End of /WHOIS list."
+msgstr	":%s 318 %s %s :Kraj na /WHOIS spisyka"
+
+#: ../src/messages.tab:346
+#, c-format
+msgid	":%s 319 %s %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:348
+#, c-format
+msgid	":%s 321 %s Channel :Users  Name"
+msgstr	":%s 321 %s Kanal :Useri  Ime"
+
+#: ../src/messages.tab:349
+#, c-format
+msgid	":%s 322 %s %s %d :%s"
+msgstr	""
+
+#: ../src/messages.tab:350
+#, c-format
+msgid	":%s 323 %s :End of /LIST"
+msgstr	":%s 323 %s :Kraj na /LIST"
+
+#: ../src/messages.tab:351
+#, c-format
+msgid	":%s 324 %s %s %s %s"
+msgstr	""
+
+#: ../src/messages.tab:353
+#, c-format
+msgid	":%s 326 %s %s :has identified for: %s"
+msgstr	":%s 326 %s %s :se e identnal za: %s"
+
+#: ../src/messages.tab:354
+#, c-format
+msgid	":%s 327 %s %s :logged on %s from %s"
+msgstr	":%s 327 %s %s :se e lognal na %s ot %s"
+
+#: ../src/messages.tab:356
+#, c-format
+msgid	":%s 329 %s %s %lu"
+msgstr	""
+
+#: ../src/messages.tab:358
+#, c-format
+msgid	":%s 331 %s %s :No topic is set."
+msgstr	":%s 331 %s %s :Niama postaven topic"
+
+#: ../src/messages.tab:359
+#, c-format
+msgid	":%s 332 %s %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:360
+#, c-format
+msgid	":%s 333 %s %s %s %lu"
+msgstr	""
+
+#: ../src/messages.tab:368
+#, c-format
+msgid	":%s 341 %s %s %s"
+msgstr	""
+
+#: ../src/messages.tab:371
+#, c-format
+msgid	":%s 344 %s %s %s %s %lu"
+msgstr	""
+
+#: ../src/messages.tab:372
+#, c-format
+msgid	":%s 345 %s %s :End of Channel Subst List"
+msgstr	":%s 345 %s %s :Kraj na spisyka na dumite za zamestvane"
+
+#: ../src/messages.tab:373
+#, c-format
+msgid	":%s 346 %s %s %s %s %lu"
+msgstr	""
+
+#: ../src/messages.tab:374
+#, c-format
+msgid	":%s 347 %s %s :End of Channel Invite List"
+msgstr	":%s 347 %s %s :Kraj na spisyka na pokanenite"
+
+#: ../src/messages.tab:375
+#, c-format
+msgid	":%s 348 %s %s %s %s %lu"
+msgstr	""
+
+#: ../src/messages.tab:376
+#, c-format
+msgid	":%s 349 %s %s :End of Channel Exception List"
+msgstr	":%s 349 %s %s :Kraj na spisyka na izkluchenite ot banove"
+
+#: ../src/messages.tab:378
+#, c-format
+msgid	":%s 351 %s %s(%s).%s %s :%s%s"
+msgstr	""
+
+#: ../src/messages.tab:379
+#, c-format
+msgid	":%s 352 %s %s %s %s %s %s %s :%d %s"
+msgstr	""
+
+#: ../src/messages.tab:380
+#, c-format
+msgid	":%s 353 %s %s"
+msgstr	""
+
+#: ../src/messages.tab:389
+#, c-format
+msgid	":%s 362 %s %s :Closed. Status = %d"
+msgstr	":%s 362 %s %s :Zatvoren. Status = %d"
+
+#: ../src/messages.tab:390
+#, c-format
+msgid	":%s 363 %s %d: Connections Closed"
+msgstr	":%s 363 %s %d: Vryzkata e prekratena"
+
+#: ../src/messages.tab:391
+#, c-format
+msgid	":%s 364 %s %s %s :%d %s"
+msgstr	""
+
+#: ../src/messages.tab:392
+#, c-format
+msgid	":%s 365 %s %s :End of /LINKS list."
+msgstr	":%s 365 %s %s :Kraj na /LINKS spysyka"
+
+#: ../src/messages.tab:393
+#, c-format
+msgid	":%s 366 %s %s :End of /NAMES list."
+msgstr	":%s 366 %s %s :Kraj na /NAMES spisyka"
+
+#: ../src/messages.tab:394
+#, c-format
+msgid	":%s 367 %s %s %s %s %lu"
+msgstr	""
+
+#: ../src/messages.tab:395
+#, c-format
+msgid	":%s 368 %s %s :End of Channel Ban List"
+msgstr	":%s 368 %s %s :Kraj na spisyka na banovete"
+
+#: ../src/messages.tab:396
+#, c-format
+msgid	":%s 369 %s %s :End of WHOWAS"
+msgstr	":%s 369 %s %s :Kraj na WHOWAS"
+
+#: ../src/messages.tab:398
+#, c-format
+msgid	":%s 371 %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:399
+#, c-format
+msgid	":%s 372 %s :- %s"
+msgstr	""
+
+#: ../src/messages.tab:400
+#, c-format
+msgid	":%s 373 %s :Server INFO"
+msgstr	""
+
+#: ../src/messages.tab:401
+#, c-format
+msgid	":%s 374 %s :End of /INFO list."
+msgstr	":%s 374 %s :Kraj na /INFO spisyka"
+
+#: ../src/messages.tab:402
+#, c-format
+msgid	":%s 375 %s :- %s Message of the Day - "
+msgstr	":%s 375 %s :- %s Syobshtenieto za dnes - "
+
+#: ../src/messages.tab:403
+#, c-format
+msgid	":%s 376 %s :End of /MOTD command."
+msgstr	":%s 376 %s :Kraj na /MOTD komandata"
+
+#: ../src/messages.tab:404
+#, c-format
+msgid	":%s 377 %s %s %s %s %lu"
+msgstr	""
+
+#: ../src/messages.tab:405
+#, c-format
+msgid	":%s 378 %s %s :End of Channel Deny List"
+msgstr	":%s 378 %s %s :Kraj na spisyka na bannatite po IRC ime i kanal"
+
+#: ../src/messages.tab:408
+#, c-format
+msgid	":%s 381 %s :You have entered... the Twilight Zone!."
+msgstr	":%s 381 %s :Ti vlezna v Zonata Na Zdracha :P (stana ircop... i sia kvo?)"
+
+#: ../src/messages.tab:409
+#, c-format
+msgid	":%s 382 %s %s :Rehashing"
+msgstr	":%s 382 %s %s :rehashva configa (kakvoto i da znachi tova :)"
+
+#: ../src/messages.tab:411
+#, c-format
+msgid	":%s 384 %s %d :Port to local server is"
+msgstr	":%s 384 %s %d :Porta za localnia server e"
+
+#: ../src/messages.tab:413
+#, c-format
+msgid	":%s 386 %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:418
+#, c-format
+msgid	":%s 391 %s %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:428
+#, c-format
+msgid	":%s 401 %s %s :No such nick/channel"
+msgstr	":%s 401 %s %s :Niama takyv nick ili kanal"
+
+#: ../src/messages.tab:429
+#, c-format
+msgid	":%s 402 %s %s :No such server"
+msgstr	":%s 402 %s %s :Niama takyv server"
+
+#: ../src/messages.tab:430
+#, c-format
+msgid	":%s 403 %s %s :No such channel"
+msgstr	":%s 403 %s %s :Niama takyv kanal"
+
+#: ../src/messages.tab:431
+#, c-format
+msgid	":%s 404 %s %s :Cannot send to channel"
+msgstr	":%s 404 %s %s :Ne mozhe da pishesh na kanala"
+
+#: ../src/messages.tab:432
+#, c-format
+msgid	":%s 405 %s %s :You have joined too many channels"
+msgstr	":%s 405 %s %s :Veche si na prekaleno mnogo kanali"
+
+#: ../src/messages.tab:433
+#, c-format
+msgid	":%s 406 %s %s :There was no such nickname"
+msgstr	":%s 406 %s %s :Niamalo e takyv nick"
+
+#: ../src/messages.tab:435
+#, c-format
+msgid	":%s 407 %s %s :Too many recipients. Only %d processed"
+msgstr	":%s 407 %s %s :Prekaleno mnogo poluchateli. Izprateno samo do %d"
+
+#: ../src/messages.tab:437
+#, c-format
+msgid	":%s 409 %s :No origin specified"
+msgstr	":%s 409 %s :Ne e zadaden iztochnik"
+
+#: ../src/messages.tab:439
+#, c-format
+msgid	":%s 411 %s :No recipient given (%s)"
+msgstr	":%s 411 %s :Ne e zadaden poluchatel (%s)"
+
+#: ../src/messages.tab:440
+#, c-format
+msgid	":%s 412 %s :No text to send"
+msgstr	":%s 412 %s :Ne si napisal text"
+
+#: ../src/messages.tab:441
+#, c-format
+msgid	":%s 413 %s %s :No toplevel domain specified"
+msgstr	":%s 413 %s %s :Ne e zadaden toplevel domain"
+
+#: ../src/messages.tab:442
+#, c-format
+msgid	":%s 414 %s %s :Wildcard in toplevel Domain"
+msgstr	""
+
+#: ../src/messages.tab:449
+#, c-format
+msgid	":%s 421 %s %s :Unknown command"
+msgstr	":%s 421 %s %s :Nepoznata komanda"
+
+#: ../src/messages.tab:450
+#, c-format
+msgid	":%s 422 %s :MOTD File is missing"
+msgstr	":%s 422 %s :MOTD file lipsva"
+
+#: ../src/messages.tab:452
+#, c-format
+msgid	":%s 423 %s %s :No administrative info available"
+msgstr	":%s 423 %s %s :Niama administrativna informacia"
+
+#: ../src/messages.tab:453
+#, c-format
+msgid	":%s 424 %s :File error doing %s on %s"
+msgstr	":%s 424 %s :File greshka po vreme na %s vyrhu %s"
+
+#: ../src/messages.tab:460
+#, c-format
+msgid	":%s 431 %s :No nickname given"
+msgstr	":%s 431 %s :Ne si zadal nick"
+
+#: ../src/messages.tab:461
+#, c-format
+msgid	":%s 432 %s %s :Erroneous Nickname"
+msgstr	":%s 432 %s %s :Greshen nick"
+
+#: ../src/messages.tab:462
+#, c-format
+msgid	":%s 433 %s %s :Nickname is already in use."
+msgstr	":%s 433 %s %s :Veche ima niakoj drug s tozi nick"
+
+#: ../src/messages.tab:465
+#, c-format
+msgid	":%s 436 %s %s :Nickname collision KILL"
+msgstr	":%s 436 %s %s :KILL zaradi kolizia na nick"
+
+#: ../src/messages.tab:466
+#, c-format
+msgid	":%s 437 %s %s :Nick/channel is temporarily unavailable"
+msgstr	":%s 437 %s %s :Tozi nick ili kanal e vremenno zabranen za polzvane"
+
+#: ../src/messages.tab:467
+#, fuzzy, c-format
+msgid	":%s 438 %s %s %s :Nick change too fast. Please wait %d seconds."
+msgstr	":%s 438 %s %s %s :Prekaleno byrza smiana na nick. Izchakaj %d secondi."
+
+#: ../src/messages.tab:470
+#, c-format
+msgid	":%s 441 %s %s %s :They aren't on that channel"
+msgstr	":%s 441 %s %s %s :Ne e na tozi kanal"
+
+#: ../src/messages.tab:471
+#, c-format
+msgid	":%s 442 %s %s :You're not on that channel"
+msgstr	":%s 442 %s %s :Ti ne si na tozi kanal"
+
+#: ../src/messages.tab:472
+#, c-format
+msgid	":%s 443 %s %s %s :is already on channel"
+msgstr	":%s 443 %s %s %s :veche e na kanala"
+
+#: ../src/messages.tab:473
+#, c-format
+msgid	":%s 444 %s %s :User not logged in"
+msgstr	":%s 444 %s %s :Tozi user ne e lognat"
+
+#: ../src/messages.tab:474
+#, c-format
+msgid	":%s 445 %s :SUMMON has been removed"
+msgstr	":%s 445 %s :SUMMON komanda niama ot Balkanskata vojna"
+
+#: ../src/messages.tab:475
+#, c-format
+msgid	":%s 446 %s :USERS has been removed"
+msgstr	":%s 446 %s :USERS komandata e premahnata"
+
+#: ../src/messages.tab:480
+#, c-format
+msgid	":%s 451 %s :You have not registered"
+msgstr	":%s 451 %s :Ne si registriran oshte"
+
+#: ../src/messages.tab:481
+#, c-format
+msgid	":%s 452 %s %s :No repeating allowed (+z)"
+msgstr	":%s 452 %s %s :Povtarianeto e zabraneno (+z)"
+
+#: ../src/messages.tab:481
+#, c-format
+msgid   ":%s 456 %s :Accept list is full"
+msgstr  ":%s 456 %s :Accept spisyka e pylen"
+
+#: ../src/messages.tab:482
+#, c-format
+msgid   ":%s 457 %s %s :is already on your accept list"
+msgstr  ":%s 457 %s %s :e veche v tvoja accept spisyk"
+
+#: ../src/messages.tab:483
+#, c-format
+msgid   ":%s 458 %s %s :is not on your accept list"
+msgstr  ":%s 458 %s %s :ne e v tvoja accept spisyk"
+
+#: ../src/messages.tab:490
+#, c-format
+msgid	":%s 461 %s %s :Not enough parameters"
+msgstr	":%s 461 %s %s :Niama dostatychno parametri"
+
+#: ../src/messages.tab:491
+#, c-format
+msgid	":%s 462 %s :You may not reregister"
+msgstr	":%s 462 %s :Ne mozhe da se preregistrirash"
+
+#: ../src/messages.tab:492
+#, c-format
+msgid	":%s 463 %s :Your host isn't among the privileged"
+msgstr	":%s 463 %s :Tvoja host ne e ot privilegirovanite"
+
+#: ../src/messages.tab:493
+#, c-format
+msgid	":%s 464 %s :Password Incorrect"
+msgstr	":%s 464 %s :Greshna parola"
+
+#: ../src/messages.tab:494
+#, fuzzy, c-format
+msgid	":%s 465 %s :You are banned from this server- %s"
+msgstr	":%s 465 %s :Bannat si na tozi server- %s"
+
+#: ../src/messages.tab:496
+#, c-format
+msgid	":%s 467 %s %s :Channel key already set"
+msgstr	":%s 467 %s %s :Kliucha na kanala e veche postaven"
+
+#: ../src/messages.tab:497
+#, c-format
+msgid   ":%s 468 %s %s :Cannot send to channel (+M)"
+msgstr  ":%s 468 %s %s :Samo identnati mogat da govoriat (+M)"
+
+#: ../src/messages.tab:498
+#, c-format
+msgid	":%s 469 %s %s :Cannot join channel (+R)"
+msgstr	":%s 469 %s %s :Samo identnati mogat da vliazat (+R)"
+
+#: ../src/messages.tab:499
+#, c-format
+msgid	":%s 470 %s %s :Cannot join channel (+C)"
+msgstr	":%s 470 %s %s :Na kanala ne sa razresheni nickove na kirilica (+C)"
+
+#: ../src/messages.tab:500
+#, c-format
+msgid	":%s 471 %s %s :Cannot join channel (+l)"
+msgstr	":%s 471 %s %s :Ne mozhesh da vlezesh, kanala e pylen (+l)"
+
+#: ../src/messages.tab:501
+#, c-format
+msgid	":%s 472 %s %c :is unknown mode char to me"
+msgstr	":%s 472 %s %c :e nepoznata bukva za mode"
+
+#: ../src/messages.tab:502
+#, c-format
+msgid	":%s 473 %s %s :Cannot join channel (+i)"
+msgstr	":%s 473 %s %s :Ne mozhesh da vlezesh, samo za pokaneni (+i)"
+
+#: ../src/messages.tab:503
+#, c-format
+msgid	":%s 474 %s %s :Cannot join channel (+b)"
+msgstr	":%s 474 %s %s :Ne mozhesh da vlezesh, bannat si (+b)"
+
+#: ../src/messages.tab:504
+#, c-format
+msgid	":%s 475 %s %s :Cannot join channel (+k)"
+msgstr	":%s 475 %s %s :Ne mozhesh da vlezesh, kanala ima kliuch (+k)"
+
+#: ../src/messages.tab:505
+#, c-format
+msgid	":%s 476 %s %s :Bad Channel Mask"
+msgstr	":%s 476 %s %s :Nevalidna maska na kanal"
+
+#: ../src/messages.tab:506
+#, c-format
+msgid	":%s 477 %s %s :Channel does not support modes"
+msgstr	":%s 477 %s %s :Kanala ne poddyrzha modes"
+
+#: ../src/messages.tab:507
+#, c-format
+msgid	":%s 478 %s %s %s :Channel ban list is full"
+msgstr	":%s 478 %s %s %s :Spisyka na banovete e pylen"
+
+#: ../src/messages.tab:508
+#, c-format
+msgid	":%s 479 %s %s :Illegal channel name"
+msgstr	":%s 479 %s %s :Nevalidno ime na kanal"
+
+#: ../src/messages.tab:509
+#, c-format
+msgid	":%s 480 %s %s :Cannot join channel (+S)"
+msgstr	":%s 480 %s %s :Ne mozhesh da vlezesh, samo za zasekreteni vryzki (+S)"
+
+#: ../src/messages.tab:511
+#, fuzzy, c-format
+msgid	":%s 481 %s :Permission Denied - You're not an IRC operator"
+msgstr	":%s 481 %s :Ne ti e razresheno tova, ne si IRC operator"
+
+#: ../src/messages.tab:512
+#, c-format
+msgid	":%s 482 %s %s :You're not channel operator"
+msgstr	":%s 482 %s %s :Ne mozhesh tova, ne si op na tozi kanal"
+
+#: ../src/messages.tab:513
+#, c-format
+msgid	":%s 483 %s :You can't kill a server!"
+msgstr	":%s 483 %s :Ne mozhesh da killnesh server!"
+
+#: ../src/messages.tab:514
+#, c-format
+msgid	":%s 484 %s :You are restricted"
+msgstr	":%s 484 %s :Vryzkata ti e ogranichena po prava"
+
+#: ../src/messages.tab:516
+#, c-format
+msgid	":%s 485 %s :Can't change nick when banned or on a moderated channel "
+msgstr	":%s 485 %s :Ne mozhe da si smeniash nicka ako si bannat ili na moderiran kanal"
+
+#: ../src/messages.tab:517
+#, c-format
+msgid	":%s 486 %s %s %s :Cannot kick services bots"
+msgstr	":%s 486 %s %s %s :Ne mozhe da ritash botove na services"
+
+#: ../src/messages.tab:518
+#, c-format
+msgid	":%s 487 %s %s %s :Cannot de-op services bots"
+msgstr	":%s 487 %s %s %s :Ne mozhe da deopvash botove na services"
+
+#: ../src/messages.tab:522
+#, c-format
+msgid	":%s 491 %s :Only few of mere mortals may try to enter the twilight "
+	"zone"
+msgstr	":%s 491 %s :Ne stavash za IRCop (hosta ti ne syotvetstvuva)"
+
+#: ../src/messages.tab:525
+#, c-format
+msgid	":%s 494 %s %s :Cannot join channel (+d)"
+msgstr	":%s 494 %s %s :Ne mozhesh da vlezesh, bannat si po maska na info ili kanal (+d)"
+
+#: ../src/messages.tab:529
+#, c-format
+msgid   ":%s 498 %s %s :Accepts messages from SSL clients only"
+msgstr  ":%s 498 %s %s :Priema syobshtenia samo ot useri na zasekretena vryzka (SSL)"
+
+#: ../src/messages.tab:530
+#, c-format
+msgid   ":%s 499 %s %s :Accepts messages from registered nicks only"
+msgstr  ":%s 499 %s %s :Priema syobshtenia samo ot useri s identnati nickove"
+
+#: ../src/messages.tab:531
+#, c-format
+msgid	":%s 500 %s %s :Maximum size for WATCH-list is 128 entries"
+msgstr	":%s 500 %s %s :Maximalnia razmer na WATCH spisyka e 128"
+
+#: ../src/messages.tab:532
+#, c-format
+msgid	":%s 501 %s :Unknown MODE flag"
+msgstr	":%s 501 %s :Nepoznat MODE flag"
+
+#: ../src/messages.tab:533
+#, c-format
+msgid	":%s 502 %s :Can't change mode for other users"
+msgstr	":%s 502 %s :Ne mozhe da smeniash mode na drugi useri"
+
+#: ../src/messages.tab:534
+#, c-format
+msgid	":%s 503 %s :Message could not be delivered to %s"
+msgstr	":%s 503 %s :Syobshtenieto ne mozha da byde izprateno do %s"
+
+#: ../src/messages.tab:535
+#, c-format
+msgid	":%s 504 %s %s :User is not on this server"
+msgstr	":%s 504 %s %s :Usera ne e na tozi server"
+
+#: ../src/messages.tab:537
+#, c-format
+msgid	":%s 506 %s :Virtual Channels are disabled"
+msgstr	":%s 506 %s :Virtualnite kanali sa zabraneni"
+
+#: ../src/messages.tab:538
+#, c-format
+msgid	":%s 507 %s %s :You are already on a subchan"
+msgstr	":%s 507 %s %s :Veche si na podkanal"
+
+#: ../src/messages.tab:555
+#, c-format
+msgid	":%s 524 %s %s :Help not found"
+msgstr	":%s 524 %s %s :Niama pomosht"
+
+#: ../src/messages.tab:630
+#, c-format
+msgid	":%s 600 %s %s %s %s %d :logged online"
+msgstr	":%s 600 %s %s %s %s %d :vleze toku-shto"
+
+#: ../src/messages.tab:631
+#, c-format
+msgid	":%s 601 %s %s %s %s %d :logged offline"
+msgstr	":%s 601 %s %s %s %s %d :izleze toku-shto"
+
+#: ../src/messages.tab:632
+#, c-format
+msgid	":%s 602 %s %s %s %s %d :stopped watching"
+msgstr	":%s 602 %s %s %s %s %d :spria da WATCH-va"
+
+#: ../src/messages.tab:633
+#, c-format
+msgid	":%s 603 %s :You have %d and are on %d WATCH entries"
+msgstr	":%s 603 %s :Ti imash %d i si na %d WATCH spisyka"
+
+#: ../src/messages.tab:634
+#, c-format
+msgid	":%s 604 %s %s %s %s %d :is online"
+msgstr	":%s 604 %s %s %s %s %d :e online"
+
+#: ../src/messages.tab:635
+#, c-format
+msgid	":%s 605 %s %s %s %s %d :is offline"
+msgstr	":%s 605 %s %s %s %s %d :go niama"
+
+#: ../src/messages.tab:636
+#, c-format
+msgid	":%s 606 %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:637
+#, c-format
+msgid	":%s 607 %s :End of WATCH %c"
+msgstr	":%s 607 %s :Kraj na WATCH %c"
+
+#: ../src/messages.tab:702
+#, c-format
+msgid	":%s 702 %s %s 0x%x %s"
+msgstr	""
+
+#: ../src/messages.tab:703
+#, c-format
+msgid	":%s 703 %s :End of /MODLIST."
+msgstr  ":%s 703 %s :Kraj na /MODLIST."
+
+#: ../src/messages.tab:735
+#, c-format
+msgid	":%s 704 %s %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:736
+#, c-format
+msgid	":%s 705 %s %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:737
+#, c-format
+msgid	":%s 706 %s %s :End of /HELP."
+msgstr	":%s 706 %s %s :Kraj na /HELP."
+
+#: ../src/messages.tab:741
+#, c-format
+msgid	":%s 710 %s %s %s!%s@%s :has asked for an invite."
+msgstr	":%s 710 %s %s %s!%s@%s :pomoli za pokana."
+
+#: ../src/messages.tab:742
+#, c-format
+msgid	":%s 711 %s %s :Your KNOCK has been delivered."
+msgstr  ":%s 711 %s %s :Tvoeto pochukvane beshe predadeno."
+
+#: ../src/messages.tab:743
+#, c-format
+msgid	":%s 712 %s %s :Too many KNOCKs (%s)."
+msgstr	":%s 712 %s %s :Prekaleno mnogo pochukvania (%s)."
+
+#: ../src/messages.tab:744
+#, c-format
+msgid	":%s 713 %s %s :Channel is open."
+msgstr	":%s 713 %s %s :Kanala e otvoren."
+
+#: ../src/messages.tab:745
+#, c-format
+msgid	":%s 714 %s %s :You are already on that channel."
+msgstr	":%s 714 %s %s :Veche si na tozi kanal."
+
+#: ../src/messages.tab:746
+#, c-format
+msgid	":%s 715 %s :KNOCKs are disabled."
+msgstr	":%s 715 %s :Pochukvaniata sa zabraneni."
+
+#: ../src/messages.tab:536
+#, c-format
+msgid	":%s 999 %s :Last Error Message"
+msgstr	":%s 999 %s :Posledno syobshtenie"
diff -uNrd -x CVS ircd-hybrid-7rc5/messages/custom.po ircd-hybrid-7-bg/messages/custom.po
--- ircd-hybrid-7rc5/messages/custom.po	Sat Dec 15 15:35:12 2001
+++ ircd-hybrid-7-bg/messages/custom.po	Sat May 24 23:27:09 2003
@@ -10,8 +10,8 @@
 	"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 	"Language-Team: LANGUAGE <LL@li.org>\n"
 	"MIME-Version: 1.0\n"
-	"Content-Type: text/plain; charset=CHARSET\n"
-	"Content-Transfer-Encoding: ENCODING\n"
+	"Content-Type: text/plain; charset=ISO-8859-1\n"
+	"Content-Transfer-Encoding: text-plain\n"
 
 #: ../src/messages.tab:24
 #, c-format
@@ -30,7 +30,7 @@
 
 #: ../src/messages.tab:27
 #, c-format
-msgid	":%s 004 %s %s %s oiwszcerkfydnxbaugl biklmnopstveIha bkloveIh"
+msgid	":%s 004 %s %s %s oiwszcerkfydnxbauglqRTYS bdiklmnopstveIhacrwxzCMRS bdkloveIhw"
 msgstr	""
 
 #: ../src/messages.tab:28
@@ -153,6 +153,31 @@
 msgid	":%s 226 %s %s"
 msgstr	""
 
+#: ../src/messages.tab:250
+#, c-format
+msgid	":%s 227 %s Services %s"
+msgstr	""
+
+#: ../src/messages.tab:251
+#, c-format
+msgid	":%s 228 %s Equiv %s/%s"
+msgstr	""
+
+#: ../src/messages.tab:252
+#, c-format
+msgid	":%s 229 %s Relay %s"
+msgstr	":%s 229 %s Pseudo server %s"
+
+#: ../src/messages.tab:253
+#, c-format
+msgid	":%s 230 %s Userpar %s %s"
+msgstr	":%s 230 %s USER parms %s %s"
+
+#: ../src/messages.tab:254
+#, c-format
+msgid	":%s 231 %s Bridge %s/%s"
+msgstr	":%s 231 %s cluster bridge %s/%s"
+
 #: ../src/messages.tab:264
 #, c-format
 msgid	":%s 241 %s %c %s * %s %d %s"
@@ -192,7 +217,7 @@
 #: ../src/messages.tab:277
 #, c-format
 msgid	":%s 251 %s :There are %d users and %d invisible on %d servers"
-msgstr	""
+msgstr	":%s 251 %s :There are %d petty dudes and %d invisible on %d servers"
 
 #: ../src/messages.tab:278
 #, c-format
@@ -254,12 +279,17 @@
 #: ../src/messages.tab:292
 #, c-format
 msgid	":%s 265 %s :Current local  users: %d  Max: %d"
-msgstr	""
+msgstr	":%s 265 %s :%d petty dudes (max %d) are messing up with me"
 
 #: ../src/messages.tab:293
 #, c-format
 msgid	":%s 266 %s :Current global users: %d  Max: %d"
-msgstr	""
+msgstr	":%s 266 %s :%d petty dudes (max %d) are messing up with this network"
+
+#: ../src/messages.tab:294
+#, c-format
+msgid	":%s 267 %s :Current identified users: %d  Max: %d"
+msgstr	":%s 267 %s :%d NickServ slaves (max %d) are messing up with this network"
 
 #: ../src/messages.tab:303
 #, c-format
@@ -286,6 +316,16 @@
 msgid   ":%s 282 %s :End of /ACCEPT list."
 msgstr  ""
 
+#: ../src/messages.tab:324
+#, c-format
+msgid   ":%s 297 %s %s :is connected via SSL (secure link)"
+msgstr  ":%s 297 %s %s :cannot be sniffed by feds (uses SSL)"
+
+#: ../src/messages.tab:325
+#, c-format
+msgid   ":%s 298 %s %s :has cyrillic-encoded nickname"
+msgstr  ":%s 298 %s %s :is a patriot (uses nick in cyrillic)"
+
 #: ../src/messages.tab:328
 #, c-format
 msgid	":%s 301 %s %s :%s"
@@ -376,6 +416,16 @@
 msgid	":%s 324 %s %s %s %s"
 msgstr	""
 
+#: ../src/messages.tab:353
+#, c-format
+msgid	":%s 326 %s %s :has identified for: %s"
+msgstr	":%s 326 %s %s :bothered to identify for: %s"
+
+#: ../src/messages.tab:354
+#, c-format
+msgid	":%s 327 %s %s :logged on %s from %s"
+msgstr	":%s 327 %s %s :wastes bandwidth on %s from %s"
+
 #: ../src/messages.tab:356
 #, c-format
 msgid	":%s 329 %s %s %lu"
@@ -401,6 +451,16 @@
 msgid	":%s 341 %s %s %s"
 msgstr	""
 
+#: ../src/messages.tab:371
+#, c-format
+msgid	":%s 344 %s %s %s %s %lu"
+msgstr	""
+
+#: ../src/messages.tab:372
+#, c-format
+msgid	":%s 345 %s %s :End of Channel Subst List"
+msgstr	""
+
 #: ../src/messages.tab:373
 #, c-format
 msgid	":%s 346 %s %s %s %s %lu"
@@ -506,6 +566,16 @@
 msgid	":%s 376 %s :End of /MOTD command."
 msgstr	""
 
+#: ../src/messages.tab:404
+#, c-format
+msgid	":%s 377 %s %s %s %s %lu"
+msgstr	""
+
+#: ../src/messages.tab:405
+#, c-format
+msgid	":%s 378 %s %s :End of Channel Deny List"
+msgstr	""
+
 #: ../src/messages.tab:408
 #, c-format
 msgid	":%s 381 %s :You have entered... the Twilight Zone!."
@@ -679,6 +749,11 @@
 
 #: ../src/messages.tab:481
 #, c-format
+msgid	":%s 452 %s %s :No repeating allowed (+z)"
+msgstr	":%s 452 %s %s :Repeating is lame, foo (+z)"
+
+#: ../src/messages.tab:481
+#, c-format
 msgid   ":%s 456 %s :Accept list is full"
 msgstr  ""
 
@@ -723,6 +798,21 @@
 msgid	":%s 467 %s %s :Channel key already set"
 msgstr	""
 
+#: ../src/messages.tab:497
+#, c-format
+msgid   ":%s 468 %s %s :Cannot send to channel (+M)"
+msgstr  ":%s 468 %s %s :Only those who identify shall talk"
+
+#: ../src/messages.tab:498
+#, c-format
+msgid   ":%s 469 %s %s :Cannot join channel (+R)"
+msgstr  ":%s 469 %s %s :First identify for this nick, d00d"
+
+#: ../src/messages.tab:499
+#, c-format
+msgid	":%s 470 %s %s :Cannot join channel (+C)"
+msgstr	":%s 470 %s %s :We ain't slavonic babe.. and you got cyrillic nick"
+
 #: ../src/messages.tab:500
 #, c-format
 msgid	":%s 471 %s %s :Cannot join channel (+l)"
@@ -768,6 +858,11 @@
 msgid	":%s 479 %s %s :Illegal channel name"
 msgstr	""
 
+#: ../src/messages.tab:509
+#, c-format
+msgid	":%s 480 %s %s :Cannot join channel (+S)"
+msgstr	":%s 480 %s %s :Go get a SSL-enabled client brother, then join us"
+
 #: ../src/messages.tab:511
 #, fuzzy, c-format
 msgid	":%s 481 %s :Permission Denied - You're not an IRC operator"
@@ -796,6 +891,16 @@
 	"(%s)"
 msgstr	""
 
+#: ../src/messages.tab:517
+#, c-format
+msgid	":%s 486 %s %s %s :Cannot kick services bots"
+msgstr	":%s 486 %s %s %s :Shame on you dude.. dont kick services"
+
+#: ../src/messages.tab:518
+#, c-format
+msgid	":%s 487 %s %s %s :Cannot de-op services bots"
+msgstr	":%s 487 %s %s %s :Shame on you dude.. dont deop services"
+
 #: ../src/messages.tab:522
 #, c-format
 msgid	":%s 491 %s :Only few of mere mortals may try to enter the twilight "
@@ -803,6 +908,26 @@
 msgstr	":%s 491 %s :Sorry, you just don't have what it takes to be an IRC "
 	"Operator here."
 
+#: ../src/messages.tab:525
+#, c-format
+msgid	":%s 494 %s %s :Cannot join channel (+d)"
+msgstr	":%s 494 %s %s :Banned - your on a wrong chan babe, or got bad ircname (+d)"
+
+#: ../src/messages.tab:529
+#, c-format
+msgid   ":%s 498 %s %s :Accepts messages from SSL clients only"
+msgstr  ":%s 498 %s %s :They sniff on you dude, get a SSL client and then msg me"
+
+#: ../src/messages.tab:530
+#, c-format
+msgid   ":%s 499 %s %s :Accepts messages from registered nicks only"
+msgstr  ":%s 499 %s %s :Identify first and then try again to msg me"
+
+#: ../src/messages.tab:531
+#, c-format
+msgid	":%s 500 %s %s :Maximum size for WATCH-list is 128 entries"
+msgstr	""
+
 #: ../src/messages.tab:532
 #, c-format
 msgid	":%s 501 %s :Unknown MODE flag"
@@ -837,6 +962,46 @@
 #, c-format
 msgid  ":%s 524 %s %s :Help not found"
 msgstr  ""
+
+#: ../src/messages.tab:630
+#, c-format
+msgid	":%s 600 %s %s %s %s %d :logged online"
+msgstr	""
+
+#: ../src/messages.tab:631
+#, c-format
+msgid	":%s 601 %s %s %s %s %d :logged offline"
+msgstr	""
+
+#: ../src/messages.tab:632
+#, c-format
+msgid	":%s 602 %s %s %s %s %d :stopped watching"
+msgstr	""
+
+#: ../src/messages.tab:633
+#, c-format
+msgid	":%s 603 %s :You have %d and are on %d WATCH entries"
+msgstr	""
+
+#: ../src/messages.tab:634
+#, c-format
+msgid	":%s 604 %s %s %s %s %d :is online"
+msgstr	""
+
+#: ../src/messages.tab:635
+#, c-format
+msgid	":%s 605 %s %s %s %s %d :is offline"
+msgstr	""
+
+#: ../src/messages.tab:636
+#, c-format
+msgid	":%s 606 %s :%s"
+msgstr	""
+
+#: ../src/messages.tab:637
+#, c-format
+msgid	":%s 607 %s :End of WATCH %c"
+msgstr	""
 
 #: ../src/messages.tab:702
 #, c-format
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/.depend ircd-hybrid-7-bg/modules/.depend
--- ircd-hybrid-7rc5/modules/.depend	Sun Jun 16 12:31:25 2002
+++ ircd-hybrid-7-bg/modules/.depend	Fri Mar  7 00:36:12 2003
@@ -202,6 +202,16 @@
  ../include/sprintf_irc.h ../include/numeric.h ../include/fdlist.h \
  ../include/s_bsd.h ../include/send.h ../include/msg.h \
  ../include/parse.h ../include/modules.h
+m_conf.o: m_conf.c ../include/handlers.h ../include/client.h \
+ ../include/config.h ../include/setup.h ../include/ircd_defs.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/tools.h \
+ ../include/channel.h ../include/res.h ../include/fileio.h \
+ ../include/hash.h ../include/ircd.h ../include/memory.h \
+ ../include/irc_string.h ../include/sprintf_irc.h ../include/common.h \
+ ../include/numeric.h ../include/send.h ../include/s_conf.h \
+ ../include/motd.h ../include/class.h ../include/s_log.h \
+ ../include/msg.h ../include/parse.h ../include/modules.h \
+ ../include/s_user.h ../include/s_serv.h
 m_connect.o: m_connect.c ../include/stdinc.h ../include/config.h \
  ../include/setup.h ../include/defaults.h ../include/handlers.h \
  ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
@@ -570,6 +580,47 @@
  ../include/send.h ../include/s_conf.h ../include/motd.h \
  ../include/class.h ../include/s_log.h ../include/msg.h \
  ../include/parse.h ../include/modules.h
+m_svsnick.o: m_svsnick.c ../include/handlers.h ../include/client.h \
+ ../include/config.h ../include/setup.h ../include/ircd_defs.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/tools.h \
+ ../include/channel.h ../include/res.h ../include/fileio.h \
+ ../include/hash.h ../include/ircd.h ../include/memory.h \
+ ../include/irc_string.h ../include/sprintf_irc.h ../include/common.h \
+ ../include/numeric.h ../include/send.h ../include/s_conf.h \
+ ../include/motd.h ../include/class.h ../include/s_log.h \
+ ../include/msg.h ../include/parse.h ../include/modules.h \
+ ../include/s_user.h ../include/s_serv.h
+m_svshint.o: m_svshint.c ../include/handlers.h ../include/client.h \
+ ../include/config.h ../include/setup.h ../include/ircd_defs.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/tools.h \
+ ../include/channel.h ../include/res.h ../include/fileio.h \
+ ../include/hash.h ../include/ircd.h ../include/memory.h \
+ ../include/irc_string.h ../include/sprintf_irc.h ../include/common.h \
+ ../include/numeric.h ../include/send.h ../include/s_conf.h \
+ ../include/motd.h ../include/class.h ../include/s_log.h \
+ ../include/msg.h ../include/parse.h ../include/modules.h \
+ ../include/s_user.h ../include/s_serv.h
+m_svshost.o: m_svshost.c ../include/handlers.h ../include/client.h \
+ ../include/config.h ../include/setup.h ../include/ircd_defs.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/tools.h \
+ ../include/channel.h ../include/res.h ../include/fileio.h \
+ ../include/hash.h ../include/ircd.h ../include/memory.h \
+ ../include/irc_string.h ../include/sprintf_irc.h ../include/common.h \
+ ../include/numeric.h ../include/send.h ../include/s_conf.h \
+ ../include/motd.h ../include/class.h ../include/s_log.h \
+ ../include/msg.h ../include/parse.h ../include/modules.h \
+ ../include/s_user.h ../include/s_serv.h ../include/channel_mode.h \
+ ../include/vchannel.h 
+m_svsmisc.o: m_svsmisc.c ../include/handlers.h ../include/client.h \
+ ../include/config.h ../include/setup.h ../include/ircd_defs.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/tools.h \
+ ../include/channel.h ../include/res.h ../include/fileio.h \
+ ../include/hash.h ../include/ircd.h ../include/memory.h \
+ ../include/irc_string.h ../include/sprintf_irc.h ../include/common.h \
+ ../include/numeric.h ../include/send.h ../include/s_conf.h \
+ ../include/motd.h ../include/class.h ../include/s_log.h \
+ ../include/msg.h ../include/parse.h ../include/modules.h \
+ ../include/s_user.h ../include/s_serv.h ../include/channel_mode.h
 m_testline.o: m_testline.c ../include/stdinc.h ../include/config.h \
  ../include/setup.h ../include/defaults.h ../include/handlers.h \
  ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
@@ -674,6 +725,16 @@
  ../include/s_user.h ../include/s_conf.h ../include/motd.h \
  ../include/class.h ../include/msg.h ../include/parse.h \
  ../include/modules.h
+m_watch.o: m_conf.c ../include/handlers.h ../include/client.h \
+ ../include/config.h ../include/setup.h ../include/ircd_defs.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/tools.h \
+ ../include/channel.h ../include/res.h ../include/fileio.h \
+ ../include/hash.h ../include/ircd.h ../include/memory.h \
+ ../include/irc_string.h ../include/sprintf_irc.h ../include/common.h \
+ ../include/numeric.h ../include/send.h ../include/s_conf.h \
+ ../include/motd.h ../include/class.h ../include/s_log.h \
+ ../include/msg.h ../include/parse.h ../include/modules.h \
+ ../include/s_user.h ../include/s_serv.h ../include/s_misc.h
 m_who.o: m_who.c ../include/stdinc.h ../include/config.h \
  ../include/setup.h ../include/defaults.h ../include/tools.h \
  ../include/common.h ../include/handlers.h ../include/client.h \
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/Makefile.in ircd-hybrid-7-bg/modules/Makefile.in
--- ircd-hybrid-7rc5/modules/Makefile.in	Sun Jun 16 12:31:25 2002
+++ ircd-hybrid-7-bg/modules/Makefile.in	Fri Mar  7 00:36:12 2003
@@ -1,7 +1,7 @@
 #
 # Makefile.in for ircd/modules
 #
-# $Id: Makefile.in,v 1.69 2002/06/16 16:31:25 leeh Exp $
+# $Id: Makefile.in,v 1.3 2003/03/07 05:36:12 demond Exp $
 #
 CC		= @CC@
 AR		= @AR@
@@ -48,7 +48,7 @@
   core/m_sjoin.c \
   core/m_squit.c
 
-SRCS =                          \
+SRCS = \
   m_accept.c \
   m_admin.c \
   m_away.c \
@@ -57,6 +57,7 @@
   m_challenge.c \
   m_cjoin.c \
   m_close.c \
+  m_conf.c \
   m_connect.c \
   m_cryptlink.c \
   m_dmem.c \
@@ -91,6 +92,10 @@
   m_set.c \
   m_stats.c \
   m_svinfo.c \
+  m_svsnick.c \
+  m_svshint.c \
+  m_svshost.c \
+  m_svsmisc.c \
   m_testline.c \
   m_time.c \
   m_topic.c \
@@ -101,6 +106,7 @@
   m_users.c \
   m_version.c \
   m_wallops.c \
+  m_watch.c \
   m_who.c \
   m_whois.c \
   m_whowas.c 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/core/descrip.mms ircd-hybrid-7-bg/modules/core/descrip.mms
--- ircd-hybrid-7rc5/modules/core/descrip.mms	Mon Feb  4 16:07:51 2002
+++ ircd-hybrid-7-bg/modules/core/descrip.mms	Mon Dec 30 23:08:14 2002
@@ -1,6 +1,6 @@
 # MMS/MMK Makefile for OpenVMS
 # Copyright (c) 2001 Edward Brocklesby
-# $Id: descrip.mms,v 1.1 2002/02/04 21:07:51 ejb Exp $
+# $Id: descrip.mms,v 1.1.1.1 2002/12/31 04:08:14 demond Exp $
 
 CC=	CC
 CFLAGS=	/INCLUDE_DIRECTORY=([-.-.INCLUDE],[-.-.ADNS])/STANDARD=ISOC94
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/core/m_die.c ircd-hybrid-7-bg/modules/core/m_die.c
--- ircd-hybrid-7rc5/modules/core/m_die.c	Fri May 24 19:34:38 2002
+++ ircd-hybrid-7-bg/modules/core/m_die.c	Mon Dec 30 23:08:14 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_die.c,v 1.24 2002/05/24 23:34:38 androsyn Exp $
+ *  $Id: m_die.c,v 1.1.1.1 2002/12/31 04:08:14 demond Exp $
  */
 
 #include "stdinc.h"
@@ -57,7 +57,7 @@
   mod_del_cmd(&die_msgtab);
 }
 
-const char *_version = "$Revision: 1.24 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 /*
  * mo_die - DIE command handler
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/core/m_kick.c ircd-hybrid-7-bg/modules/core/m_kick.c
--- ircd-hybrid-7rc5/modules/core/m_kick.c	Thu Aug 15 11:01:02 2002
+++ ircd-hybrid-7-bg/modules/core/m_kick.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_kick.c,v 1.47 2002/08/15 15:01:02 adx Exp $
+ *  $Id: m_kick.c,v 1.3 2003/05/24 00:07:46 demond Exp $
  */
 
 #include "stdinc.h"
@@ -38,7 +38,8 @@
 #include "parse.h"
 #include "hash.h"
 #include "packet.h"
-
+#include "s_conf.h"
+#include "s_misc.h"
 
 static void m_kick(struct Client*, struct Client*, int, char**);
 static void ms_kick(struct Client*, struct Client*, int, char**);
@@ -60,7 +61,7 @@
   mod_del_cmd(&kick_msgtab);
 }
 
-const char *_version = "$Revision: 1.47 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 /*
 ** m_kick
@@ -88,7 +89,7 @@
 
   if (*parv[2] == '\0')
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "KICK");
       return;
     }
@@ -112,7 +113,7 @@
   chptr = hash_find_channel(name);
   if (!chptr)
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
                  me.name, parv[0], name);
       return;
     }
@@ -136,7 +137,7 @@
         {
           /* user on _my_ server, with no chanops.. so go away */
           
-          sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
+          sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED),
                      me.name, parv[0], name);
           return;
         }
@@ -145,7 +146,7 @@
         {
           /* If its a TS 0 channel, do it the old way */
           
-          sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
+          sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED),
                      me.name, parv[0], name);
           return;
         }
@@ -194,12 +195,17 @@
 	if (((chptr->mode.mode & MODE_PRIVATE) && is_any_op(chptr, who)) ||
              is_chan_op(chptr, who))
 	{
-          sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
+          sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED),
                      me.name, parv[0], name);
 	  return;
 	}
       }
 #endif
+	  if (find_z_conf((char *)who->user->server) && !IsOper(source_p)) {
+		  sendto_one(source_p, form_str(source_p,ERR_CANTKICKSERVICES),
+			  me.name, parv[0], who->name, name);
+		  return;
+	  }
       /* jdc
        * - In the case of a server kicking a user (i.e. CLEARCHAN),
        *   the kick should show up as coming from the server which did
@@ -249,7 +255,7 @@
       remove_user_from_channel(chptr, who);
     }
   else
-    sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL),
+    sendto_one(source_p, form_str(source_p,ERR_USERNOTINCHANNEL),
                me.name, parv[0], user, name);
 }
 
@@ -258,9 +264,13 @@
                    int parc,
                    char *parv[])
 {
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  cluster_prefix(client_p, parc, parv, 1, 1, 0);
+  cluster_prefix(client_p, parc, parv, 2, 0, 0);
+
   if (*parv[2] == '\0')
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "KICK");
       return;
     }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/core/m_kill.c ircd-hybrid-7-bg/modules/core/m_kill.c
--- ircd-hybrid-7rc5/modules/core/m_kill.c	Sat Jul 27 09:27:14 2002
+++ ircd-hybrid-7-bg/modules/core/m_kill.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_kill.c,v 1.66 2002/07/27 13:27:14 leeh Exp $
+ *  $Id: m_kill.c,v 1.3 2003/05/24 00:07:46 demond Exp $
  */
 
 #include "stdinc.h"
@@ -37,6 +37,7 @@
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
+#include "s_misc.h"
 
 
 static char buf[BUFSIZE];
@@ -64,7 +65,7 @@
   mod_del_cmd(&kill_msgtab);
 }
 
-const char *_version = "$Revision: 1.66 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 /*
 ** mo_kill
@@ -106,7 +107,7 @@
       */
       if ((target_p = get_history(user, (long)KILLCHASETIMELIMIT)) == NULL)
         {
-          sendto_one(source_p, form_str(ERR_NOSUCHNICK),
+          sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK),
                      me.name, parv[0], user);
           return;
         }
@@ -115,7 +116,7 @@
     }
   if (IsServer(target_p) || IsMe(target_p))
     {
-      sendto_one(source_p, form_str(ERR_CANTKILLSERVER),
+      sendto_one(source_p, form_str(source_p,ERR_CANTKILLSERVER),
                  me.name, parv[0]);
       return;
     }
@@ -178,12 +179,20 @@
   char *reason;
   char *path;
   int chasing = 0;
+  
+  if (ServerInfo.gateway && get_bridge_token(client_p)) {
+  
+  	if (IsServer(source_p))
+  		cluster_prefix(client_p, parc, parv, 1, 0, 0);
+  	else
+  		return;
+  }
 
   *buf = '\0';
 
   if (*parv[1] == '\0')
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "KILL");
       return;
     }
@@ -222,7 +231,7 @@
       if( (*user == '.')  ||
 	  (!(target_p = get_history(user, (long)KILLCHASETIMELIMIT))))
         {
-          sendto_one(source_p, form_str(ERR_NOSUCHNICK),
+          sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK),
                      me.name, parv[0], user);
           return;
         }
@@ -233,7 +242,7 @@
     
   if (IsServer(target_p) || IsMe(target_p))
     {
-      sendto_one(source_p, form_str(ERR_CANTKILLSERVER),
+      sendto_one(source_p, form_str(source_p,ERR_CANTKILLSERVER),
                  me.name, parv[0]);
       return;
     }
@@ -275,6 +284,7 @@
 			   target_p->name, parv[0], reason);
     }
 
+  if (!IsRelay(target_p->servptr))
   ilog(L_INFO,"KILL From %s For %s Path %s %s",
        parv[0], target_p->name, parv[0], reason);
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/core/m_message.c ircd-hybrid-7-bg/modules/core/m_message.c
--- ircd-hybrid-7rc5/modules/core/m_message.c	Wed Oct 30 12:44:55 2002
+++ ircd-hybrid-7-bg/modules/core/m_message.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_message.c,v 1.104 2002/10/30 17:44:55 wiz Exp $
+ *  $Id: m_message.c,v 1.10 2003/05/25 01:31:33 demond Exp $
  */
 
 #include "stdinc.h"
@@ -34,7 +34,7 @@
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
-
+#include "fdlist.h"
 #include "channel.h"
 #include "channel_mode.h"
 #include "vchannel.h"
@@ -43,7 +43,8 @@
 #include "class.h"
 #include "msg.h"
 #include "packet.h"
-
+#include "list.h"
+#include "s_misc.h"
 
 struct entity
 {
@@ -97,6 +98,9 @@
                          struct Client *client_p,
                          struct Client *source_p, char *nick, char *text);
 
+static void replace(char *, char *, char *, int);
+static int check_repeat(struct Client *, struct Channel *, char *);
+
 struct Message privmsg_msgtab = {
   "PRIVMSG", 0, 0, 1, 0, MFLG_SLOW | MFLG_UNREG, 0L,
   {m_unregistered, m_privmsg, m_privmsg, m_privmsg}
@@ -123,7 +127,7 @@
   mod_del_cmd(&notice_msgtab);
 }
 
-const char *_version = "$Revision: 1.104 $";
+const char *_version = "$Revision: 1.10 $";
 #endif
 
 /*
@@ -152,12 +156,24 @@
 m_privmsg(struct Client *client_p,
           struct Client *source_p, int parc, char *parv[])
 {
+  char equiv[NICKLEN + 1];
+  
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  if (strchr(parv[1], ','))
+  	cluster_prefix(client_p, parc, parv, 1, 0, 3);
+  else
+  	cluster_prefix(client_p, parc, parv, 1, IsChannelName(parv[1]), 0);
+
   /* servers have no reason to send privmsgs, yet sometimes there is cause
    * for a notice.. (for example remote kline replies) --fl_
    */
   if (!IsPerson(source_p))
     return;
 
+  if (parc > 1)
+    if (parv[1][0] && get_equiv_nick(parv[1], equiv))
+      parv[1] = equiv;
+
   m_message(PRIVMSG, "PRIVMSG", client_p, source_p, parc, parv);
 }
 
@@ -165,6 +181,18 @@
 m_notice(struct Client *client_p,
          struct Client *source_p, int parc, char *parv[])
 {
+  char equiv[NICKLEN + 1];
+
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  if (strchr(parv[1], ','))
+  	cluster_prefix(client_p, parc, parv, 1, 0, 3);
+  else
+  	cluster_prefix(client_p, parc, parv, 1, IsChannelName(parv[1]), 0);
+
+  if (parc > 1)
+    if (parv[1][0] && get_equiv_nick(parv[1], equiv))
+      parv[1] = equiv;
+
   m_message(NOTICE, "NOTICE", client_p, source_p, parc, parv);
 }
 
@@ -186,7 +214,7 @@
   if (parc < 2 || *parv[1] == '\0')
   {
     if (p_or_n != NOTICE)
-      sendto_one(source_p, form_str(ERR_NORECIPIENT), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_NORECIPIENT), me.name,
                  source_p->name, command);
     return;
   }
@@ -194,7 +222,7 @@
   if (parc < 3 || *parv[2] == '\0')
   {
     if (p_or_n != NOTICE)
-      sendto_one(source_p, form_str(ERR_NOTEXTTOSEND), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_NOTEXTTOSEND), me.name,
                  source_p->name);
     return;
   }
@@ -296,7 +324,7 @@
         {
           if (ntargets >= ConfigFileEntry.max_targets)
 	    {
-	      sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
+	      sendto_one(source_p, form_str(source_p,ERR_TOOMANYTARGETS),
 			 me.name, source_p->name, nick);
 	      return (1);
 	    }
@@ -309,7 +337,7 @@
         if (!ServerInfo.hub && (uplink != NULL) && IsCapable(uplink, CAP_LL))
           return -1;
         else if (p_or_n != NOTICE)
-          sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+          sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK), me.name,
                      source_p->name, nick);
       }
       continue;
@@ -322,7 +350,7 @@
       {
         if (ntargets >= ConfigFileEntry.max_targets)
 	  {
-	    sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
+	    sendto_one(source_p, form_str(source_p,ERR_TOOMANYTARGETS),
 		       me.name, source_p->name, nick);
 	    return (1);
 	  }
@@ -356,7 +384,7 @@
       /* suggested by Mortiis */
       if (*nick == '\0')      /* if its a '\0' dump it, there is no recipient */
 	{
-	  sendto_one(source_p, form_str(ERR_NORECIPIENT),
+	  sendto_one(source_p, form_str(source_p,ERR_NORECIPIENT),
 		     me.name, source_p->name, command);
 	  continue;
 	}
@@ -369,7 +397,7 @@
 	{
 	  if(!is_any_op(chptr, source_p) && !is_voiced(chptr, source_p))
 	    {
-	      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+	      sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED), me.name,
 			 source_p->name, with_prefix);
 	      return(-1);
 	    }
@@ -378,7 +406,7 @@
 	    {
 	      if (ntargets >= ConfigFileEntry.max_targets)
 		{
-		  sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
+		  sendto_one(source_p, form_str(source_p,ERR_TOOMANYTARGETS),
 			     me.name, source_p->name, nick);
 		  return (1);
 		}
@@ -392,7 +420,7 @@
 	  if (!ServerInfo.hub && (uplink != NULL) && IsCapable(uplink, CAP_LL))
 	    return -1;
 	  else if (p_or_n != NOTICE)
-	    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+	    sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK), me.name,
 		       source_p->name, nick);
 	}
       continue;
@@ -407,7 +435,7 @@
       if (!ServerInfo.hub && (uplink != NULL) && IsCapable(uplink, CAP_LL))
         return -1;
       else if(p_or_n != NOTICE)
-        sendto_one(source_p, form_str(ERR_NOSUCHNICK),
+        sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK),
 	           me.name, source_p->name, nick);
     }
     /* continue; */
@@ -475,16 +503,67 @@
   /* chanops and voiced can flood their own channel with impunity */
   if ((result = can_send(vchan, source_p)))
   {
+    if (result == CAN_SEND_NOTREG)
+	{
+	  if (p_or_n != NOTICE)
+	    sendto_one(source_p, form_str(source_p,ERR_CANNOTSENDNOTREG),
+		       me.name, source_p->name, chname);
+	  return;
+	}
     if (result == CAN_SEND_OPV ||
         !flood_attack_channel(p_or_n, source_p, vchan, chname))
     {
-      sendto_channel_butone(client_p, source_p, vchan, command, ":%s", text);
+		dlink_node *ptr;
+		struct Ban *banptr;
+		char strbuf[BUFSIZE+1], buf[TOPICLEN+1];
+		char *word, *subst, *p = buf;
+		int drop = 0;
+
+		if (MyClient(source_p) && IsPerson(source_p))
+		if (!is_chan_op(vchan, source_p) && NoRepeatChannel(vchan))
+		if (check_repeat(source_p, vchan, text)) {
+			sendto_one(source_p, form_str(source_p,ERR_NOREPEATING),
+				me.name, source_p->name, chname);
+			return;
+		}
+
+	  if (NoColorChannel(vchan)) 
+	    /*strip_color(text);*/
+	    text = strip_color(text, 0);
+
+	  strncpy(strbuf, text, BUFSIZE)[BUFSIZE] = 0;
+
+	  if (MyClient(source_p) && IsPerson(source_p))
+	  if (!is_chan_op(vchan, source_p))
+	  for (ptr = vchan->substlist.head; ptr; ptr = ptr->next, p = buf) {
+		  banptr = ptr->data; 
+		  strncpy(buf, banptr->banstr, TOPICLEN)[TOPICLEN] = 0;
+
+		  while (*p) 
+			  if (*p++ == '$')
+				  *(p-1) = ' ';
+
+		  subst = strchr(buf, '/'); if (subst) {
+			  *subst++ = 0; word = buf;
+			  if (strstr(strbuf, word) && !irccmp(subst, "&"))
+			  	drop = 1;
+			  replace(strbuf, word, subst, BUFSIZE);
+			  strbuf[BUFSIZE] = 0;
+		  }
+	  }
+
+      if (!drop) {
+	  if (PaceChannel(vchan) && (vchan->msgs < MAX_PACEMSG))
+	    add_pace_msg(vchan, client_p, source_p, command, strbuf);
+	  else
+      	sendto_channel_butone(client_p, source_p, vchan, command, ":%s", strbuf);
+      }
     }
   }
   else
   {
     if (p_or_n != NOTICE)
-      sendto_one(source_p, form_str(ERR_CANNOTSENDTOCHAN),
+      sendto_one(source_p, form_str(source_p,ERR_CANNOTSENDTOCHAN),
                  me.name, source_p->name, chname);
   }
 }
@@ -539,6 +618,10 @@
   if (!vchan)
     vchan = chptr;
 
+  if (NoColorChannel(vchan)) 
+    /*strip_color(text);*/
+    text = strip_color(text, 0);
+
   if (MyClient(source_p))
   {
     /* idletime shouldnt be reset by notice --fl */
@@ -595,24 +678,60 @@
      * and its not a notice */
     if ((p_or_n != NOTICE) && (source_p != target_p) && source_p->user)
       source_p->user->last = CurrentTime;
+      
+    if (IsSetSSLaccept(target_p)) {
+#ifdef HAVE_LIBCRYPTO
+  		int fd = source_p->localClient->fd;
+  		fde_t *F = (fd > -1)? &fd_table[fd] : NULL;
+  	
+  		if (F && !F->ssl) {
+#endif
+  			sendto_one(source_p, form_str(source_p,ERR_SSLACCEPTONLY),
+  				me.name, source_p->name, target_p->name);
+  			return;
+  			
+#ifdef HAVE_LIBCRYPTO
+		}
+#endif
+	}
   }
 
   if (MyConnect(source_p) && (p_or_n != NOTICE) &&
       target_p->user && target_p->user->away)
-    sendto_one(source_p, form_str(RPL_AWAY), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_AWAY), me.name,
                source_p->name, target_p->name, target_p->user->away);
 
   if (MyClient(target_p))
   {
+    if (IsSetRegAccept(target_p) && !(source_p->svsflags & FLAGS_SVS_IDENT))
+	{
+	  if (p_or_n != NOTICE)
+	    sendto_one(source_p, form_str(source_p,ERR_REGACCEPTONLY),
+		       me.name, source_p->name, target_p->name);
+	    return;
+	}
+
+	if (ConfigFileEntry.spam_wait && (p_or_n != NOTICE) &&
+	((target_p->localClient->last_join_time + ConfigFileEntry.spam_wait > CurrentTime) ||
+	(target_p->localClient->last_leave_time + ConfigFileEntry.spam_wait > CurrentTime)))
+	{
+		sendto_anywhere(source_p, target_p, 
+			"NOTICE %s :*** I'm joining/leaving a chan, please try again in a few seconds.",
+			source_p->name);
+		return;
+	}
+
     if (!IsServer(source_p) && IsSetCallerId(target_p))
     {
       /* Here is the anti-flood bot/spambot code -db */
-      if (accept_message(source_p, target_p))
+      if (accept_message(source_p, target_p) || (source_p == target_p) ||
+          find_z_conf((char *)source_p->user->server))
       {
         sendto_one(target_p, ":%s!%s@%s %s %s :%s",
                    source_p->name,
                    source_p->username,
-                   source_p->host, command, target_p->name, text);
+                   source_p->host, 
+                   command, target_p->name, translate(target_p, text));
       }
       else
       {
@@ -653,7 +772,7 @@
           (MyClient(source_p) &&
            !flood_attack_client(p_or_n, source_p, target_p)))
         sendto_anywhere(target_p, source_p, "%s %s :%s",
-                        command, target_p->name, text);
+                        command, target_p->name, translate(target_p, text));
     }
   }
   else
@@ -829,7 +948,7 @@
       
     if ((s = strrchr(nick, '.')) == NULL)
     {
-      sendto_one(source_p, form_str(ERR_NOTOPLEVEL),
+      sendto_one(source_p, form_str(source_p,ERR_NOTOPLEVEL),
                  me.name, source_p->name, nick);
       return;
     }
@@ -838,7 +957,7 @@
         break;
     if (*s == '*' || *s == '?')
     {
-      sendto_one(source_p, form_str(ERR_WILDTOPLEVEL),
+      sendto_one(source_p, form_str(source_p,ERR_WILDTOPLEVEL),
                  me.name, source_p->name, nick);
       return;
     }
@@ -909,15 +1028,15 @@
           source_p->user->last = CurrentTime;
       }
       else
-        sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
+        sendto_one(source_p, form_str(source_p,ERR_TOOMANYTARGETS),
                    me.name, source_p->name, nick);
     }
   }
   else if (server && *(server+1) && (target_p == NULL))
-    sendto_one(source_p, form_str(ERR_NOSUCHSERVER), me.name,
+    sendto_one(source_p, form_str(source_p,ERR_NOSUCHSERVER), me.name,
                source_p->name, server+1);
   else if (server && (target_p == NULL))
-    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+    sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK), me.name,
                source_p->name, nick);
 }
 
@@ -939,18 +1058,74 @@
 
   *count = 0;
   if (collapse(user) != NULL)
-    {
-      for (c2ptr = GlobalClientList; c2ptr; c2ptr = c2ptr->next) 
+  {
+    for (c2ptr = GlobalClientList; c2ptr; c2ptr = c2ptr->next) 
 	{
 	  if (!MyClient(c2ptr)) /* implies mine and an user */
 	    continue;
 	  if ((!host || match(host, c2ptr->host)) &&
 	      irccmp(user, c2ptr->username) == 0)
-	    {
-	      (*count)++;
-	      res = c2ptr;
-	    }
+	  {
+	    (*count)++;
+	    res = c2ptr;
+	  }
 	}
-    }
+  }
   return (res);
+}
+
+/*
+ * this will replace all occurances of "word" in "buf" with "subst"
+ *													-demond
+ */
+static void replace(char *buf, char *word, char *subst, int size)
+{
+	char *p = buf;
+	int len1 = strlen(word), len2 = strlen(subst);
+
+	while (*p)
+		if (!ircncmp(p, word, len1)) {
+			if (p + len2 + strlen(p + len1) > buf + size)
+				return;
+			memmove(p + len2, p + len1, strlen(p + len1) + 1);
+			memmove(p, subst, len2);
+			p += len2;
+		}
+		else
+			p++;
+}
+
+/*
+ * check for public repeating and keep/replace appropriate last phrase
+ *													-demond
+ */
+static int check_repeat(struct Client *source_p,
+						struct Channel *chptr,
+						char *text)
+{
+	dlink_node *ptr;
+	struct Repeat *repeatptr;
+
+	for (ptr = source_p->user->repeat.head; ptr; ptr = ptr->next) {
+		repeatptr = ptr->data;
+		if (repeatptr->chptr == chptr)
+			if (!strcmp(repeatptr->text, text)) {
+				return 1;
+			} else {
+				MyFree(repeatptr->text);
+				DupString(repeatptr->text, text);
+				repeatptr->lastphrase = CurrentTime;
+				return 0;
+			}
+	}
+
+	repeatptr = (struct Repeat *)MyMalloc(sizeof(struct Repeat));
+	repeatptr->chptr = chptr;
+	DupString(repeatptr->text, text);
+	repeatptr->lastphrase = CurrentTime;
+
+	ptr = make_dlink_node();
+	dlinkAdd(repeatptr, ptr, &source_p->user->repeat);
+
+	return 0;
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/core/m_mode.c ircd-hybrid-7-bg/modules/core/m_mode.c
--- ircd-hybrid-7rc5/modules/core/m_mode.c	Sun Jul 21 12:17:45 2002
+++ ircd-hybrid-7-bg/modules/core/m_mode.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_mode.c,v 1.55 2002/07/21 16:17:45 leeh Exp $
+ *  $Id: m_mode.c,v 1.3 2003/05/24 00:07:46 demond Exp $
  */
 
 #include "stdinc.h"
@@ -41,6 +41,7 @@
 #include "parse.h"
 #include "modules.h"
 #include "packet.h"
+#include "s_misc.h"
 
 static void m_mode(struct Client*, struct Client*, int, char**);
 
@@ -63,7 +64,7 @@
 }
 
 
-const char *_version = "$Revision: 1.55 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 /*
  * m_mode - MODE command handler
@@ -83,6 +84,16 @@
   struct Channel* vchan;
 #endif
 
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  cluster_prefix(client_p, parc, parv, 1, IsChannelName(parv[1]), 0);
+  if (IsChannelName(parv[1]))
+  	cluster_prefix(client_p, parc, parv, 2, 0, 2);
+
+/*  if (client_p->user)
+	  client_p->user->known = 1;
+
+  this marks drones as known clients... */
+  
   /* Now, try to find the channel in question */
   if (!IsChanPrefix(parv[1][0]))
     {
@@ -93,7 +104,7 @@
 
   if (!check_channel_name(parv[1]))
     { 
-      sendto_one(source_p, form_str(ERR_BADCHANNAME),
+      sendto_one(source_p, form_str(source_p,ERR_BADCHANNAME),
 		 me.name, parv[0], (unsigned char *)parv[1]);
       return;
     }
@@ -133,7 +144,7 @@
 	}
       else
 	{
-	  sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+	  sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
 		     me.name, parv[0], parv[1]);
 	  return;
 	}
@@ -149,13 +160,13 @@
      struct Client *target_p;
      if (!(target_p = find_client(++parv[2])))
        {
-        sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL), me.name,
+        sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL), me.name,
                    parv[0], root->chname);
         return;
        }
      if ((chptr = map_vchan(root, target_p)) == NULL)
        {
-        sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL), me.name,
+        sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL), me.name,
                    parv[0], root->chname);
         return;
        }
@@ -190,7 +201,7 @@
   if (parc < n+1)
     {
       channel_modes(chptr, source_p, modebuf, parabuf);
-      sendto_one(source_p, form_str(RPL_CHANNELMODEIS),
+      sendto_one(source_p, form_str(source_p,RPL_CHANNELMODEIS),
 		 me.name, parv[0], parv[1],
 		 modebuf, parabuf);
       
@@ -198,11 +209,11 @@
        * the top root chan TS
        */
       if (!IsOper(source_p))
-	sendto_one(source_p, form_str(RPL_CREATIONTIME),
+	sendto_one(source_p, form_str(source_p,RPL_CREATIONTIME),
 		   me.name, parv[0],
 		   parv[1], root->channelts);
       else
-	sendto_one(source_p, form_str(RPL_CREATIONTIME),
+	sendto_one(source_p, form_str(source_p,RPL_CREATIONTIME),
 		   me.name, parv[0],
 		   parv[1], chptr->channelts);
     }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/core/m_nick.c ircd-hybrid-7-bg/modules/core/m_nick.c
--- ircd-hybrid-7rc5/modules/core/m_nick.c	Thu Oct  3 11:33:43 2002
+++ ircd-hybrid-7-bg/modules/core/m_nick.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_nick.c,v 1.97 2002/10/03 15:33:43 bill Exp $
+ *  $Id: m_nick.c,v 1.4 2003/05/24 00:07:46 demond Exp $
  */
 
 #include "stdinc.h"
@@ -46,6 +46,7 @@
 #include "modules.h"
 #include "common.h"
 #include "packet.h"
+#include "s_misc.h"
 
 
 static void mr_nick(struct Client *, struct Client *, int, char**);
@@ -64,7 +65,7 @@
 static int check_clean_user(struct Client *, char *, char *, char *);
 static int check_clean_host(struct Client *, char *, char *, char *);
 
-static int clean_nick_name(char *);
+static int clean_nick_name(char *, int);
 static int clean_user_name(char *);
 static int clean_host_name(char *);
 
@@ -97,7 +98,7 @@
   mod_del_cmd(&client_msgtab);
 }
 
-const char *_version = "$Revision: 1.97 $";
+const char *_version = "$Revision: 1.4 $";
 #endif
 
 /*
@@ -117,7 +118,7 @@
    
   if(parc < 2 || BadPtr(parv[1]))
   {
-    sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+    sendto_one(source_p, form_str(source_p,ERR_NONICKNAMEGIVEN),
                me.name, BadPtr(parv[0]) ? "*" : parv[0]);
     return;
   }
@@ -130,9 +131,9 @@
   strlcpy(nick, parv[1], NICKLEN);
 
   /* check the nickname is ok */
-  if(!clean_nick_name(nick))
+  if(!clean_nick_name(nick, 0))
   {
-    sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME),
+    sendto_one(source_p, form_str(source_p,ERR_ERRONEUSNICKNAME),
                me.name, BadPtr(parv[0]) ? "*" : parv[0], parv[1]);
     return;
   }
@@ -141,7 +142,7 @@
   if(find_nick_resv(nick) &&
      !(IsOper(source_p) && ConfigChannel.oper_pass_resv))
   {
-    sendto_one(source_p, form_str(ERR_UNAVAILRESOURCE),
+    sendto_one(source_p, form_str(source_p,ERR_UNAVAILRESOURCE),
                me.name, BadPtr(parv[0]) ? "*" : parv[0], nick);
     return;
   }
@@ -161,7 +162,7 @@
 	  /* We're already waiting for a reply about this nick
 	   * for someone else. */
 
-	  sendto_one(source_p, form_str(ERR_NICKNAMEINUSE), me.name, "*", nick);
+	  sendto_one(source_p, form_str(source_p,ERR_NICKNAMEINUSE), me.name, "*", nick);
 	  return;
 	}
       }
@@ -189,7 +190,7 @@
   }
   else
   {
-    sendto_one(source_p, form_str(ERR_NICKNAMEINUSE), me.name, "*", nick);
+    sendto_one(source_p, form_str(source_p,ERR_NICKNAMEINUSE), me.name, "*", nick);
   }
 }
 
@@ -208,7 +209,7 @@
   /* XXX BadPtr is needed */
   if(parc < 2 || BadPtr(parv[1]))
   {
-    sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+    sendto_one(source_p, form_str(source_p,ERR_NONICKNAMEGIVEN),
                me.name, parv[0]);
     return;
   }
@@ -221,9 +222,9 @@
   strlcpy(nick, parv[1], NICKLEN);
 
   /* check the nickname is ok */
-  if(!clean_nick_name(nick))
+  if(!clean_nick_name(nick, 0))
   {
-    sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME),
+    sendto_one(source_p, form_str(source_p,ERR_ERRONEUSNICKNAME),
                me.name, parv[0], nick);
     return;
   }
@@ -231,7 +232,7 @@
   if(find_nick_resv(nick) &&
      !(IsOper(source_p) && ConfigChannel.oper_pass_resv))
   {
-    sendto_one(source_p, form_str(ERR_UNAVAILRESOURCE),
+    sendto_one(source_p, form_str(source_p,ERR_UNAVAILRESOURCE),
                me.name, parv[0], nick);
     return;
   }
@@ -274,7 +275,7 @@
     }
     else
     {
-      sendto_one(source_p, form_str(ERR_NICKNAMEINUSE), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_NICKNAMEINUSE), me.name,
                  parv[0], nick);
       return;
     }
@@ -308,13 +309,15 @@
  * server introducing new nick
  *    parv[0] = sender prefix
  *    parv[1] = nickname
- *    parv[2] = hop count
+ *    parv[2] = hop count (plus shifted svsflags when CAP_SVS-able)
  *    parv[3] = TS
  *    parv[4] = umode
  *    parv[5] = username
  *    parv[6] = hostname
  *    parv[7] = server
- *    parv[8] = ircname
+ *    parv[8] = real hostname (when CAP_HOSTMASK-able)
+ *    parv[9] = IP (when CAP_IP-able)
+ *    parv[10] = ircname
  */
 static void
 ms_nick(struct Client *client_p, struct Client *source_p,
@@ -323,16 +326,19 @@
   struct Client* target_p;
   char     nick[NICKLEN];
   time_t   newts = 0;
+  
+  cluster_prefix(client_p, parc, parv, 1, 0, 0);
 
   /* XXX BadPtr is needed */
   if(parc < 2 || BadPtr(parv[1]))
   {
-    sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN), me.name, parv[0]);
+    sendto_one(source_p, form_str(source_p,ERR_NONICKNAMEGIVEN), me.name, parv[0]);
     return;
   }
 
   /* parc == 3 on nickchange, parc == 9 on new nick */
-  if((IsClient(source_p) && (parc != 3)) || (IsServer(source_p) && (parc != 9)))
+  if((IsClient(source_p) && (parc != 3)) || 
+  	(IsServer(source_p) && ((parc < 9) || (parc > 11))))
   {
     char tbuf[BUFSIZE] = { 0 };
     int j;
@@ -359,18 +365,19 @@
   if(check_clean_nick(client_p, source_p, nick, parv[1], parv[7]))
     return;
 
-  if (parc == 9)
+  if (parc >= 9)
     {
       if (check_clean_user(client_p, nick, parv[5], parv[7]) ||
-          check_clean_host(client_p, nick, parv[6], parv[7]))
+          check_clean_host(client_p, nick, parv[6], parv[7]) || (parc > 9?
+          check_clean_host(client_p, nick, parv[8], parv[7]) : 0))
         return;
 
       /* check the length of the clients gecos */
-      if(strlen(parv[8]) > REALLEN)
+      if(strlen((parc > 9)? ((parc > 10)? parv[10] : parv[9]) : parv[8]) > REALLEN)
         {
           sendto_realops_flags(FLAGS_ALL, L_ALL, "Long realname from server %s for %s",
                          parv[7], parv[1]);
-          parv[8][REALLEN] = '\0';
+          parv[(parc > 9)? ((parc > 10)? 10 : 9) : 8][REALLEN] = '\0';
         }
 
       if (IsServer(source_p))
@@ -412,8 +419,6 @@
 
   perform_nick_collides(source_p, client_p, target_p,
                         parc, parv, newts, nick);
-			
-
 }
 
 /*
@@ -429,8 +434,10 @@
   char    *id;
   char    *name;
 
+  cluster_prefix(client_p, parc, parv, 1, 0, 0);
+
   id = parv[8];
-  name = parv[9];
+  name = (parc > 10)? ((parc > 11)? parv[11] : parv[10]) : parv[9];
 
   /* XXX can this happen ? */
   if (BadPtr(parv[1]))
@@ -442,7 +449,8 @@
   /* check the nicknames, usernames and hostnames are ok */
   if(check_clean_nick(client_p, source_p, nick, parv[1], parv[7]) ||
      check_clean_user(client_p, nick, parv[5], parv[7]) ||
-     check_clean_host(client_p, nick, parv[6], parv[7]))
+     check_clean_host(client_p, nick, parv[6], parv[7]) || (parc > 10?
+     check_clean_host(client_p, nick, parv[9], parv[7]) : 0))
     return;
 
   /* check length of clients gecos */
@@ -461,7 +469,7 @@
    */
   if((target_p = find_id(id)))
   {
-    sendto_realops_flags(FLAGS_ALL, L_ALL,
+    sendto_realops_flags(FLAGS_SKILL, L_ALL,
 		         "ID collision on %s(%s <- %s)(both killed)",
 			 target_p->name, target_p->from->name,
 			 client_p->name);
@@ -516,7 +524,7 @@
    * and dont bother messing at all
    */
 
-  if(!clean_nick_name(nick) || strcmp(nick, newnick))
+  if(!clean_nick_name(nick, 1) || strcmp(nick, newnick))
   {
     ServerStats->is_kill++;
     sendto_realops_flags(FLAGS_DEBUG, L_ALL,
@@ -602,7 +610,7 @@
     return 1;
   }
 
-  if(!clean_host_name(host))
+  if(!clean_host_name(host) && strcmp(host, "<none>"))
     sendto_realops_flags(FLAGS_DEBUG, L_ALL,
                          "Bad Hostname: %s Nickname: %s From: %s(via %s)",
 			 host, nick, server, client_p->name);
@@ -610,32 +618,65 @@
   return 0;
 }
 
-/* clean_nick_name()
+/*
+ * clean_nick_name - ensures that the given parameter (nick) is
+ * really a proper string for a nickname (note, the 'nick'
+ * may be modified in the process...)
  *
- * input	- nickname
- * output	- none
- * side effects - walks through the nickname, returning 0 if erroneous
+ *      RETURNS the length of the final NICKNAME (0, if
+ *      nickname is illegal)
+ *
+ *  Nickname characters are in range
+ *      'A'..'}', '_', '-', '0'..'9'
+ *  anything outside the above set will terminate nickname.
+ *  In addition, the first character cannot be '-'
+ *  or a Digit.
+ *
+ *  Note:
+ *      '~'-character should be NOT be allowed.
  */
 static int
-clean_nick_name(char *nick)
+clean_nick_name(char *nick, int fromserver)
 {
-  assert(nick);
-  if(nick == NULL)
-    return 0;
+  char* ch   = nick;
+  char* endp = ch + NICKLEN;
+  int cyr = 0, lat = 0;
 
-  /* nicks cant start with a digit or - or be 0 length */
-  /* This closer duplicates behaviour of hybrid-6 */
+  assert(0 != nick);
 
-  if (*nick == '-' || IsDigit(*nick) || *nick == '\0')
+  if (!fromserver)
+  if (*nick == '-' || IsDigit(*nick)) /* first character in [0..9-] */
     return 0;
 
-  for(; *nick; nick++)
-  {
-    if(!IsNickChar(*nick))
-      return 0;
-  }
+  for ( ; ch < endp && *ch; ++ch)
+    {
+      if (fromserver && (ch == nick))
+      	continue;
+      	
+      if (ConfigFileEntry.cyrillic && ((unsigned char)*ch >= 192))
+        {
+          if (lat)
+            break;      /* do not allow mixed lat/cyr nicks */
 
-  return 1;
+          cyr = 1;
+          continue;
+        }
+        
+      if (IsNickChar(*ch))
+        {
+          if (cyr && isalpha(*ch))
+            break;
+
+          if (isalpha(*ch))
+            lat = 1;
+          continue;
+        }
+
+      break;            /* invalid nick character */
+    }
+  *ch = '\0';
+
+  return (ch - nick);
 }
 
 /* clean_user_name()
@@ -689,6 +730,8 @@
 nick_from_server(struct Client *client_p, struct Client *source_p, int parc,
                  char *parv[], time_t newts,char *nick)
 {
+  int samenick = 0;
+  
   if(IsServer(source_p))
   {
     /* A server introducing a new client, change source */
@@ -700,7 +743,16 @@
       add_lazylinkclient(client_p, source_p);
 
     if(parc > 2)
-      source_p->hopcount = atoi(parv[2]);
+	{
+      if (IsCapable(client_p, CAP_SVS))
+      {
+        unsigned int val = atoi(parv[2]);
+
+        source_p->svsflags = val >> 8;
+        source_p->hopcount = val & 0xFF;       
+      } 
+        else source_p->hopcount = atoi(parv[2]);
+	}
     if(newts)
       source_p->tsinfo = newts;
     else
@@ -733,7 +785,8 @@
       }
 
       return do_remote_user(nick, client_p, source_p, parv[5], parv[6],
-                            parv[7], parv[8], NULL);
+			  parv[7], (parc > 9)? ((parc > 10)? parv[10] : parv[9]) : parv[8], 
+				(parc > 9)? parv[8] : NULL, (parc > 10)? parv[9] : NULL, NULL);
     }
   }
   else if(source_p->name[0])
@@ -756,15 +809,24 @@
   }
 
   /* set the new nick name */
-  if(source_p->name[0])
+  if (source_p->name[0]) {
     del_from_client_hash_table(source_p->name, source_p);
 
+	samenick = irccmp(source_p->name, nick) ? 0 : 1;
+	if (/*IsPerson(source_p) &&*/ !samenick)
+	  hash_check_watch(source_p, RPL_LOGOFF);
+  }
+
   strcpy(source_p->name, nick);
   add_to_client_hash_table(nick, source_p);
 
+  if (/*IsPerson(source_p) &&*/ !samenick)
+	hash_check_watch(source_p, RPL_LOGON);
+
   /* remove all accepts pointing to the client */
   del_all_accepts(source_p);
 
+  source_p->svsflags &= ~FLAGS_SVS_IDENT;
   return 0;
 }
 
@@ -782,7 +844,7 @@
   char *m;
 
   id = parv[8];
-  name = parv[9];
+  name = (parc > 10)? ((parc > 11)? parv[11] : parv[10]) : parv[9];
 
   source_p = make_client(client_p);
   add_client_to_list(source_p);
@@ -791,7 +853,15 @@
   if (ConfigFileEntry.hub && IsCapable(client_p, CAP_LL))
     add_lazylinkclient(client_p, source_p);
 
-  source_p->hopcount = atoi(parv[2]);
+  if (IsCapable(client_p, CAP_SVS))
+    {
+      unsigned int val = atoi(parv[2]);
+
+      source_p->svsflags = val >> 8;
+      source_p->hopcount = val & 0xFF;       
+    } 
+  else source_p->hopcount = atoi(parv[2]);
+
   source_p->tsinfo = newts;
 
   /* copy the nick in place */
@@ -811,11 +881,11 @@
 
     source_p->umodes |= flag & SEND_UMODES;
     m++;
-
   }
 
   return do_remote_user(nick, client_p, source_p, parv[5], parv[6],
-                        parv[7], name, id);
+			parv[7], name, (parc > 10)? parv[9] : NULL, 
+			(parc > 11)? parv[10] : NULL, id);
 }			
   
 static int 
@@ -832,7 +902,7 @@
     if(!newts || !target_p->tsinfo ||
        (newts == target_p->tsinfo))
     {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,
+      sendto_realops_flags(FLAGS_SKILL, L_ALL,
                            "Nick collision on %s(%s <- %s)(both killed)",
 			   target_p->name, target_p->from->name,
 			   client_p->name);
@@ -844,7 +914,7 @@
                                  "%s (Nick collision (new))",
 				 me.name);
       ServerStats->is_kill++;
-      sendto_one(target_p, form_str(ERR_NICKCOLLISION),
+      sendto_one(target_p, form_str(target_p,ERR_NICKCOLLISION),
                  me.name, target_p->name, target_p->name);
 
       target_p->flags |= FLAGS_KILLED;
@@ -870,18 +940,18 @@
       else
       {
         if(sameuser)
-	  sendto_realops_flags(FLAGS_ALL, L_ALL,
+	  sendto_realops_flags(FLAGS_SKILL, L_ALL,
 	                  "Nick collision on %s(%s <- %s)(older killed)",
 			  target_p->name, target_p->from->name,
 			  client_p->name);
         else
-	  sendto_realops_flags(FLAGS_ALL, L_ALL,
+	  sendto_realops_flags(FLAGS_SKILL, L_ALL,
 	                  "Nick collision on %s(%s <- %s)(newer killed)",
 			  target_p->name, target_p->from->name,
 			  client_p->name);
 
         ServerStats->is_kill++;
-	sendto_one(target_p, form_str(ERR_NICKCOLLISION),
+	sendto_one(target_p, form_str(target_p,ERR_NICKCOLLISION),
 	           me.name, target_p->name, target_p->name);
 
         /* if it came from a LL server, itd have been source_p,
@@ -908,13 +978,13 @@
   if(!newts || !target_p->tsinfo || (newts == target_p->tsinfo) ||
        !source_p->user)
     {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,
+      sendto_realops_flags(FLAGS_SKILL, L_ALL,
                  "Nick change collision from %s to %s(%s <- %s)(both killed)",
 		 source_p->name, target_p->name, target_p->from->name,
 		 client_p->name);
     
       ServerStats->is_kill++;
-      sendto_one(target_p, form_str(ERR_NICKCOLLISION),
+      sendto_one(target_p, form_str(target_p,ERR_NICKCOLLISION),
                  me.name, target_p->name, target_p->name);
 
       /* if we got the message from a LL, it knows about source_p */
@@ -946,12 +1016,12 @@
           (!sameuser && newts > target_p->tsinfo))
       {
         if(sameuser)
-	  sendto_realops_flags(FLAGS_ALL, L_ALL,
+	  sendto_realops_flags(FLAGS_SKILL, L_ALL,
  	       "Nick change collision from %s to %s(%s <- %s)(older killed)",
 	       source_p->name, target_p->name, target_p->from->name,
 	       client_p->name);
         else
-	  sendto_realops_flags(FLAGS_ALL, L_ALL,
+	  sendto_realops_flags(FLAGS_SKILL, L_ALL,
 	       "Nick change collision from %s to %s(%s <- %s)(newer killed)",
 	       source_p->name, target_p->name, target_p->from->name,
 	       client_p->name);
@@ -974,12 +1044,12 @@
      else
      {
        if(sameuser)
-         sendto_realops_flags(FLAGS_ALL, L_ALL,
+         sendto_realops_flags(FLAGS_SKILL, L_ALL,
 	                      "Nick collision on %s(%s <- %s)(older killed)",
 			      target_p->name, target_p->from->name,
 			      client_p->name);
        else
-         sendto_realops_flags(FLAGS_ALL, L_ALL,
+         sendto_realops_flags(FLAGS_SKILL, L_ALL,
 	                      "Nick collision on %s(%s <- %s)(newer killed)",
 			      target_p->name, target_p->from->name,
 			      client_p->name);
@@ -989,7 +1059,7 @@
 				 me.name);
 
        ServerStats->is_kill++;
-       sendto_one(target_p, form_str(ERR_NICKCOLLISION),
+       sendto_one(target_p, form_str(target_p,ERR_NICKCOLLISION),
                   me.name, target_p->name, target_p->name);
 
        target_p->flags |= FLAGS_KILLED;
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/core/m_part.c ircd-hybrid-7-bg/modules/core/m_part.c
--- ircd-hybrid-7rc5/modules/core/m_part.c	Fri May 24 19:34:39 2002
+++ ircd-hybrid-7-bg/modules/core/m_part.c	Sat May 24 23:27:10 2003
@@ -19,13 +19,14 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_part.c,v 1.56 2002/05/24 23:34:39 androsyn Exp $
+ *  $Id: m_part.c,v 1.5 2003/05/24 00:07:46 demond Exp $
  */
 
 #include "stdinc.h"
 #include "tools.h"
 #include "handlers.h"
 #include "channel.h"
+#include "channel_mode.h"
 #include "vchannel.h"
 #include "client.h"
 #include "common.h"  
@@ -41,6 +42,7 @@
 #include "modules.h"
 #include "s_conf.h"
 #include "packet.h"
+#include "s_misc.h"
 
 static void m_part(struct Client*, struct Client*, int, char**);
 void check_spambot_warning(struct Client *source_p, const char *name);
@@ -62,7 +64,7 @@
 {
   mod_del_cmd(&part_msgtab);
 }
-const char *_version = "$Revision: 1.56 $";
+const char *_version = "$Revision: 1.5 $";
 #endif
 
 static void part_one_client(struct Client *client_p,
@@ -83,10 +85,13 @@
 {
   char  *p, *name;
   char reason[TOPICLEN+1];
+  
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  cluster_prefix(client_p, parc, parv, 1, 1, 0);
 
   if (*parv[1] == '\0')
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "PART");
       return;
     }
@@ -129,7 +134,7 @@
 
   if ((chptr = hash_find_channel(name)) == NULL)
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
 		 me.name, source_p->name, name);
       return;
     }
@@ -155,7 +160,7 @@
 
   if (!chptr || !bchan || !IsMember(source_p, chptr))
     {
-      sendto_one(source_p, form_str(ERR_NOTONCHANNEL),
+      sendto_one(source_p, form_str(source_p,ERR_NOTONCHANNEL),
                  me.name, source_p->name, name);
       return;
     }
@@ -171,13 +176,22 @@
       (source_p->firsttime + ConfigFileEntry.anti_spam_exit_message_time)
       < CurrentTime))))
     {
+      /*strip_color(reason);*/
+      reason = strip_color(reason, 1);
+
+	  if (match("*http://*", reason) || match("*www*", reason))
+		reason = "<spam removed>";
+
       sendto_server(client_p, NULL, chptr, CAP_UID, NOCAPS, NOFLAGS,
                     ":%s PART %s :%s", ID(source_p), chptr->chname,
                     reason);
       sendto_server(client_p, NULL, chptr, NOCAPS, CAP_UID, NOFLAGS,
-                    ":%s PART %s  :%s", source_p->name, chptr->chname,
+                    ":%s PART %s :%s", source_p->name, chptr->chname,
                     reason);
-      sendto_channel_local(ALL_MEMBERS,
+      if (PaceChannel(chptr) && (chptr->parts < MAX_PACEJOIN))
+		add_pace(chptr, source_p, bchan->chname, 0, 0);
+      else
+      	sendto_channel_local(ALL_MEMBERS,
                            chptr, ":%s!%s@%s PART %s :%s",
                            source_p->name,
                            source_p->username,
@@ -191,12 +205,19 @@
                     ":%s PART %s", ID(source_p), chptr->chname);
       sendto_server(client_p, NULL, chptr, NOCAPS, CAP_UID, NOFLAGS,
                     ":%s PART %s", source_p->name, chptr->chname);
-      sendto_channel_local(ALL_MEMBERS,
+      if (PaceChannel(chptr) && (chptr->parts < MAX_PACEJOIN))
+		add_pace(chptr, source_p, bchan->chname, 0, 0);
+      else
+      	sendto_channel_local(ALL_MEMBERS,
                            chptr, ":%s!%s@%s PART %s",
                            source_p->name,
                            source_p->username,
                            source_p->host,
                            bchan->chname);
     }
+
   remove_user_from_channel(chptr, source_p);
+
+  if (MyConnect(source_p))
+	source_p->localClient->last_leave_time = CurrentTime;
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/core/m_quit.c ircd-hybrid-7-bg/modules/core/m_quit.c
--- ircd-hybrid-7rc5/modules/core/m_quit.c	Thu Jul 11 21:01:22 2002
+++ ircd-hybrid-7-bg/modules/core/m_quit.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_quit.c,v 1.26 2002/07/12 01:01:22 androsyn Exp $
+ *  $Id: m_quit.c,v 1.4 2003/05/24 00:07:46 demond Exp $
  */
 
 #include "stdinc.h"
@@ -33,6 +33,7 @@
 #include "parse.h"
 #include "modules.h"
 #include "s_conf.h"
+#include "s_misc.h"
 
 static void m_quit(struct Client*, struct Client*, int, char**);
 static void ms_quit(struct Client*, struct Client*, int, char**);
@@ -55,7 +56,7 @@
   mod_del_cmd(&quit_msgtab);
 }
 
-const char *_version = "$Revision: 1.26 $";
+const char *_version = "$Revision: 1.4 $";
 #endif
 /*
 ** m_quit
@@ -67,13 +68,18 @@
                   int parc,
                   char *parv[])
 {
+  static char *dummy = "<no reason>";
   char *comment = (parc > 1 && parv[1]) ? parv[1] : client_p->name;
   char reason [TOPICLEN + 1];
+  if (!comment[0]) comment = dummy;
 
   source_p->flags |= FLAGS_NORMALEX;
   if (strlen(comment) > (size_t) TOPICLEN)
     comment[TOPICLEN] = '\0';
 
+  if (match("*http://*", comment) || match("*www*", comment))
+	  comment = "<spam removed>";
+
   if (ConfigFileEntry.client_exit && comment[0])
     {
 #ifndef VMS
@@ -91,6 +97,10 @@
       comment = "Client Quit";
     }
 
+  if (parc > 1)
+    /*strip_color(comment);*/
+    comment = strip_color(comment, 1);
+
   exit_client(client_p, source_p, source_p, comment);
 }
 
@@ -104,12 +114,20 @@
                    int parc,
                    char *parv[])
 {
-  char *comment = (parc > 1 && parv[1]) ? parv[1] : client_p->name;
+  static char *dummy = "<no reason>";
+  char *comment;
+  
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  comment = (parc > 1 && parv[1]) ? parv[1] : client_p->name;
+  if (!comment[0]) comment = dummy;
 
   source_p->flags |= FLAGS_NORMALEX;
   if (strlen(comment) > (size_t) TOPICLEN)
     comment[TOPICLEN] = '\0';
 
+  if (parc > 1)
+    /*strip_color(comment);*/
+    comment = strip_color(comment, 1);
+
   exit_client(client_p, source_p, source_p, comment);
 }
-
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/core/m_server.c ircd-hybrid-7-bg/modules/core/m_server.c
--- ircd-hybrid-7rc5/modules/core/m_server.c	Wed Oct  9 12:59:49 2002
+++ ircd-hybrid-7-bg/modules/core/m_server.c	Mon Dec 30 23:08:14 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_server.c,v 1.89 2002/10/09 16:59:49 androsyn Exp $
+ *  $Id: m_server.c,v 1.1.1.1 2002/12/31 04:08:14 demond Exp $
  */
 
 #include "stdinc.h"
@@ -67,7 +67,7 @@
 {
   mod_del_cmd(&server_msgtab);
 }
-const char *_version = "$Revision: 1.89 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 
 int bogus_host(char *host);
@@ -457,8 +457,6 @@
       return;
     }
   
-
-
   if(strlen(name) > HOSTLEN)
   {
     sendto_realops_flags(FLAGS_ALL, L_ADMIN,
@@ -523,11 +521,11 @@
 		 target_p->hidden_server ? "(H) " : "",
 		 target_p->info);
     }
-      
-  sendto_realops_flags(FLAGS_EXTERNAL, L_ALL,
+    
+  if (!IsRelay(target_p))  
+  	sendto_realops_flags(FLAGS_EXTERNAL, L_ALL,
                        "Server %s being introduced by %s",
-		       target_p->name, source_p->name);
-
+		       			target_p->name, source_p->name);
 }
 
 /* set_server_gecos()
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/core/m_sjoin.c ircd-hybrid-7-bg/modules/core/m_sjoin.c
--- ircd-hybrid-7rc5/modules/core/m_sjoin.c	Thu Jul  4 12:07:23 2002
+++ ircd-hybrid-7-bg/modules/core/m_sjoin.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_sjoin.c,v 1.140 2002/07/04 16:07:23 androsyn Exp $
+ *  $Id: m_sjoin.c,v 1.3 2003/05/24 00:07:46 demond Exp $
  */
 
 #include "stdinc.h"
@@ -41,6 +41,7 @@
 #include "modules.h"
 #include "s_serv.h"
 #include "s_conf.h"
+#include "s_misc.h"
 
 
 static void ms_sjoin(struct Client*, struct Client*, int, char**);
@@ -63,7 +64,7 @@
   mod_del_cmd(&sjoin_msgtab);
 }
 
-const char *_version = "$Revision: 1.140 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 /*
  * ms_sjoin
@@ -139,6 +140,10 @@
   if (IsClient(source_p) || parc < 5)
     return;
   
+  cluster_prefix(client_p, parc, parv, 2, 1, 0);
+  cluster_prefix(client_p, parc, parv, parc - 1, 0, 1);
+  
+  if (!ServerInfo.gateway || !get_bridge_token(client_p))
   if (!IsChannelName(parv[2]))
     return;
   if (!check_channel_name(parv[2]))
@@ -184,6 +189,30 @@
           mode.mode |= MODE_HIDEOPS;
         break;
 #endif
+      case 'c':
+        mode.mode |= MODE_NOCOLOR;
+        break;
+      case 'r':
+        mode.mode |= MODE_REGCHAN;
+        break;
+      case 'x':
+        mode.mode |= MODE_PACE;
+        break;
+      case 'z':
+        mode.mode |= MODE_NOREPEAT;
+        break;
+      case 'R':
+        mode.mode |= MODE_REGNICKS;
+        break;
+      case 'C':
+        mode.mode |= MODE_CYRNICKS;
+        break;
+      case 'M':
+        mode.mode |= MODE_REGSPEAK;
+        break;
+      case 'S':
+        mode.mode |= MODE_SSLONLY;
+        break;
       case 'k':
         strlcpy(mode.key, parv[4 + args], KEYLEN);
         args++;
@@ -498,7 +527,7 @@
       if (!(target_p = find_client(s)) ||
          (target_p->from != client_p) || !IsPerson(target_p))
       {
-        sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+        sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK), me.name,
 	           source_p->name, s);
 
 #ifdef HALFOPS
@@ -576,7 +605,11 @@
 	  if (top_chptr)
 	    {
 	      add_vchan_to_client_cache(target_p,top_chptr, chptr);
-	      sendto_channel_local(ALL_MEMBERS,chptr, ":%s!%s@%s JOIN :%s",
+
+          if (PaceChannel(chptr) && (chptr->joins < MAX_PACEJOIN))
+	        add_pace(chptr, target_p, top_chptr->chname, 1, 0);
+	      else
+	      	sendto_channel_local(ALL_MEMBERS,chptr, ":%s!%s@%s JOIN :%s",
 				   target_p->name,
 				   target_p->username,
 				   target_p->host,
@@ -585,7 +618,10 @@
 	  else
 #endif
 	    {
-	      sendto_channel_local(ALL_MEMBERS,chptr, ":%s!%s@%s JOIN :%s",
+          if (PaceChannel(chptr) && (chptr->joins < MAX_PACEJOIN))
+	        add_pace(chptr, target_p, parv[2], 1, 0);
+	      else
+	      	sendto_channel_local(ALL_MEMBERS,chptr, ":%s!%s@%s JOIN :%s",
 				   target_p->name,
 				   target_p->username,
 				   target_p->host,
@@ -740,6 +776,14 @@
 #ifdef ANONOPS
   { MODE_HIDEOPS,    'a' },
 #endif
+  { MODE_NOCOLOR,    'c' },
+  { MODE_REGCHAN,    'r' },
+  { MODE_PACE,       'x' },
+  { MODE_NOREPEAT,   'z' },
+  { MODE_REGNICKS,   'R' },
+  { MODE_REGSPEAK,   'M' },
+  { MODE_CYRNICKS,   'C' },
+  { MODE_SSLONLY,    'S' },
   { 0, 0 }
 };
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/core/m_squit.c ircd-hybrid-7-bg/modules/core/m_squit.c
--- ircd-hybrid-7rc5/modules/core/m_squit.c	Fri May 24 19:34:39 2002
+++ ircd-hybrid-7-bg/modules/core/m_squit.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_squit.c,v 1.45 2002/05/24 23:34:39 androsyn Exp $
+ *  $Id: m_squit.c,v 1.3 2003/05/24 00:07:46 demond Exp $
  */
 
 #include "stdinc.h"
@@ -36,6 +36,7 @@
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
+#include "s_misc.h"
 
 
 static void ms_squit(struct Client*, struct Client*, int, char**);
@@ -58,7 +59,7 @@
 {
   mod_del_cmd(&squit_msgtab);
 }
-const char *_version = "$Revision: 1.45 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 struct squit_parms 
 {
@@ -91,7 +92,7 @@
 
   if(parc < 2)
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "SQUIT");
       return;
     }
@@ -113,7 +114,7 @@
     }
   else
     {
-	    sendto_one(source_p, form_str(ERR_NOSUCHSERVER),
+	    sendto_one(source_p, form_str(source_p,ERR_NOSUCHSERVER),
 		       me.name, parv[0], parv[1]);
     }
 }
@@ -129,6 +130,12 @@
 {
   struct squit_parms *found_squit;
   char  *comment = (parc > 2 && parv[2]) ? parv[2] : client_p->name;
+  
+  if (ServerInfo.gateway && get_bridge_token(client_p)) {
+  
+  	if (!IsServer(source_p))
+  		return;
+  }
 
   if(parc < 2)
     {
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/descrip.mms ircd-hybrid-7-bg/modules/descrip.mms
--- ircd-hybrid-7rc5/modules/descrip.mms	Thu May 23 18:20:12 2002
+++ ircd-hybrid-7-bg/modules/descrip.mms	Mon Dec 30 23:07:25 2002
@@ -1,6 +1,6 @@
 # MMS/MMK Makefile for OpenVMS
 # Copyright (c) 2001 Edward Brocklesby
-# $Id: descrip.mms,v 1.6 2002/05/23 22:20:12 leeh Exp $
+# $Id: descrip.mms,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
 
 CC=	CC
 CFLAGS=	/INCLUDE_DIRECTORY=([-.INCLUDE],[-.ADNS])/STANDARD=ISOC94
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_accept.c ircd-hybrid-7-bg/modules/m_accept.c
--- ircd-hybrid-7rc5/modules/m_accept.c	Thu Sep  5 02:05:40 2002
+++ ircd-hybrid-7-bg/modules/m_accept.c	Mon Mar 10 01:09:00 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_accept.c,v 1.33 2002/09/05 06:05:40 db Exp $
+ *  $Id: m_accept.c,v 1.2 2003/03/10 06:09:00 demond Exp $
  */
 
 #include "stdinc.h"
@@ -60,7 +60,7 @@
   mod_del_cmd(&accept_msgtab);
 }
 
-const char *_version = "$Revision: 1.33 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
  * m_accept - ACCEPT command handler
@@ -92,7 +92,7 @@
     /* shouldnt happen, but lets be paranoid */
     if(((target_p = find_client(nick)) == NULL) || !IsPerson(target_p))
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHNICK),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK),
                  me.name, source_p->name, nick);
       continue;
     }
@@ -100,7 +100,7 @@
     /* user isnt on clients accept list */
     if(!accept_message(target_p, source_p))
     {
-      sendto_one(source_p, form_str(ERR_ACCEPTNOT),
+      sendto_one(source_p, form_str(source_p,ERR_ACCEPTNOT),
                  me.name, source_p->name, target_p->name);
       continue;
     }
@@ -118,7 +118,7 @@
     /* shouldnt happen, but lets be paranoid */
     if(((target_p = find_client(nick)) == NULL) || !IsPerson(target_p)) 
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHNICK),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK),
                  me.name, source_p->name, nick);
       continue;
     }
@@ -126,14 +126,14 @@
     /* user is already on clients accept list */
     if(accept_message(target_p, source_p))
     {
-      sendto_one(source_p, form_str(ERR_ACCEPTEXIST),
+      sendto_one(source_p, form_str(source_p,ERR_ACCEPTEXIST),
                  me.name, source_p->name, target_p->name);
       continue;
     }
 
     if(accept_num >= ConfigFileEntry.max_accept)
     {
-      sendto_one(source_p, form_str(ERR_ACCEPTFULL),
+      sendto_one(source_p, form_str(source_p,ERR_ACCEPTFULL),
                  me.name, source_p->name);
       return;
     }
@@ -181,7 +181,7 @@
 
     if(((target_p = find_client(name)) == NULL) || !IsPerson(target_p))
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHNICK),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK),
                  me.name, source_p->name, name);
       continue;
     }
@@ -256,7 +256,7 @@
 
       if((len + strlen(target_p->name) + len2 > BUFSIZE) || count > 14)
       {
-        sendto_one(source_p, form_str(RPL_ACCEPTLIST),
+        sendto_one(source_p, form_str(source_p,RPL_ACCEPTLIST),
 	           me.name, source_p->name, nicks);
 		   
 	len = count = 0;
@@ -271,10 +271,10 @@
   }
 
   if(*nicks)
-    sendto_one(source_p, form_str(RPL_ACCEPTLIST),
+    sendto_one(source_p, form_str(source_p,RPL_ACCEPTLIST),
                me.name, source_p->name, nicks);
 
-  sendto_one(source_p, form_str(RPL_ENDOFACCEPT),
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFACCEPT),
              me.name, source_p->name);
 
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_admin.c ircd-hybrid-7-bg/modules/m_admin.c
--- ircd-hybrid-7rc5/modules/m_admin.c	Wed Jul 31 12:24:06 2002
+++ ircd-hybrid-7-bg/modules/m_admin.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_admin.c,v 1.35 2002/07/31 16:24:06 leeh Exp $
+ *  $Id: m_admin.c,v 1.3 2003/05/24 00:07:44 demond Exp $
  */
 
 #include "stdinc.h"
@@ -34,6 +34,7 @@
 #include "parse.h"
 #include "hook.h"
 #include "modules.h"
+#include "s_misc.h"
 
 static void m_admin(struct Client*, struct Client*, int, char**);
 static void mr_admin(struct Client*, struct Client*, int, char**);
@@ -60,7 +61,7 @@
   hook_del_event("doing_admin");
   mod_del_cmd(&admin_msgtab);
 }
-const char *_version = "$Revision: 1.35 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 /*
  * mr_admin - ADMIN command handler
@@ -74,7 +75,7 @@
  
   if((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
     {
-      sendto_one(source_p,form_str(RPL_LOAD2HI), me.name, 
+      sendto_one(source_p,form_str(source_p,RPL_LOAD2HI), me.name, 
                  BadPtr(parv[0]) ? "*" : parv[0]);
       return;
     }
@@ -96,7 +97,7 @@
 
   if((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
     {
-      sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,parv[0]);
+      sendto_one(source_p,form_str(source_p,RPL_LOAD2HI),me.name,parv[0]);
       return;
     }
   else
@@ -120,6 +121,8 @@
 static void ms_admin(struct Client *client_p, struct Client *source_p,
                     int parc, char *parv[])
 {
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+
   if (hunt_server(client_p,source_p,":%s ADMIN :%s",1,parc,parv) != HUNTED_ISME)
     return;
 
@@ -145,16 +148,16 @@
 
   nick = BadPtr(source_p->name) ? "*" : source_p->name;
 
-  sendto_one(source_p, form_str(RPL_ADMINME),
+  sendto_one(source_p, form_str(source_p,RPL_ADMINME),
 	     me.name, nick, me.name);
   if (AdminInfo.name != NULL)
-    sendto_one(source_p, form_str(RPL_ADMINLOC1),
+    sendto_one(source_p, form_str(source_p,RPL_ADMINLOC1),
 	       me.name, nick, AdminInfo.name);
   if (AdminInfo.description != NULL)
-    sendto_one(source_p, form_str(RPL_ADMINLOC2),
+    sendto_one(source_p, form_str(source_p,RPL_ADMINLOC2),
 	       me.name, nick, AdminInfo.description);
   if (AdminInfo.email != NULL)
-    sendto_one(source_p, form_str(RPL_ADMINEMAIL),
+    sendto_one(source_p, form_str(source_p,RPL_ADMINEMAIL),
 	       me.name, nick, AdminInfo.email);
 }
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_away.c ircd-hybrid-7-bg/modules/m_away.c
--- ircd-hybrid-7rc5/modules/m_away.c	Wed Jul 31 12:24:06 2002
+++ ircd-hybrid-7-bg/modules/m_away.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_away.c,v 1.31 2002/07/31 16:24:06 leeh Exp $
+ *  $Id: m_away.c,v 1.3 2003/05/24 00:07:44 demond Exp $
  */
 
 #include "stdinc.h"
@@ -35,7 +35,7 @@
 #include "s_conf.h"
 #include "s_serv.h"
 #include "packet.h"
-
+#include "s_misc.h"
 
 static void m_away(struct Client*, struct Client*, int, char**);
 
@@ -55,7 +55,7 @@
 {
   mod_del_cmd(&away_msgtab);
 }
-const char *_version = "$Revision: 1.31 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 /***********************************************************************
  * m_away() - Added 14 Dec 1988 by jto. 
@@ -79,6 +79,9 @@
                   char *parv[])
 {
   char  *away, *awy2 = parv[1];
+  
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  awy2 = parv[1];
 
   if(MyClient(source_p) && !IsFloodDone(source_p))
     flood_endgrace(source_p);
@@ -103,7 +106,7 @@
           source_p->user->away = NULL;
         }
       if (MyConnect(source_p))
-        sendto_one(source_p, form_str(RPL_UNAWAY),
+        sendto_one(source_p, form_str(source_p,RPL_UNAWAY),
                    me.name, parv[0]);
       return;
     }
@@ -113,7 +116,7 @@
   if (MyConnect(source_p) && !IsOper(source_p) &&
      (CurrentTime-source_p->user->last_away)<ConfigFileEntry.pace_wait)
     {
-      sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, parv[0]);
+      sendto_one(source_p, form_str(source_p,RPL_LOAD2HI), me.name, parv[0]);
       return;
     }
 
@@ -139,6 +142,6 @@
   source_p->user->away = away;
 
   if (MyConnect(source_p))
-    sendto_one(source_p, form_str(RPL_NOWAWAY), me.name, parv[0]);
+    sendto_one(source_p, form_str(source_p,RPL_NOWAWAY), me.name, parv[0]);
 }
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_capab.c ircd-hybrid-7-bg/modules/m_capab.c
--- ircd-hybrid-7rc5/modules/m_capab.c	Fri May 24 19:34:19 2002
+++ ircd-hybrid-7-bg/modules/m_capab.c	Mon Dec 30 23:07:25 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_capab.c,v 1.28 2002/05/24 23:34:19 androsyn Exp $
+ *  $Id: m_capab.c,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $
  */
 
 #include "stdinc.h"
@@ -51,7 +51,7 @@
   mod_del_cmd(&capab_msgtab);
 }
 
-const char *_version = "$Revision: 1.28 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 
 /*
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_cburst.c ircd-hybrid-7-bg/modules/m_cburst.c
--- ircd-hybrid-7rc5/modules/m_cburst.c	Fri May 24 19:34:19 2002
+++ ircd-hybrid-7-bg/modules/m_cburst.c	Mon Mar 10 01:09:00 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_cburst.c,v 1.41 2002/05/24 23:34:19 androsyn Exp $
+ *  $Id: m_cburst.c,v 1.2 2003/03/10 06:09:00 demond Exp $
  */
 
 #include "stdinc.h"
@@ -60,7 +60,7 @@
   mod_del_cmd(&cburst_msgtab);
 }
 
-const char *_version = "$Revision: 1.41 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
 ** m_cburst
@@ -119,7 +119,7 @@
     }
     else if(nick && *nick=='!')
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
                  me.name, nick+1, name);
       return;
     }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_challenge.c ircd-hybrid-7-bg/modules/m_challenge.c
--- ircd-hybrid-7rc5/modules/m_challenge.c	Sun Oct 27 20:08:40 2002
+++ ircd-hybrid-7-bg/modules/m_challenge.c	Mon Mar 10 01:09:00 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_challenge.c,v 1.38 2002/10/28 01:08:40 gregp Exp $
+ *  $Id: m_challenge.c,v 1.2 2003/03/10 06:09:00 demond Exp $
  */
 
 #include "stdinc.h"
@@ -55,7 +55,7 @@
   return;
 }
 
-const char *_version = "$Revision: 1.38 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 #else
 
@@ -80,7 +80,7 @@
   mod_del_cmd(&challenge_msgtab);
 }
 
-const char *_version = "$Revision: 1.38 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
  * m_challenge - generate RSA challenge for wouldbe oper
@@ -100,7 +100,7 @@
   /* if theyre an oper, reprint oper motd and ignore */
   if(IsOper(source_p))
   {
-    sendto_one(source_p, form_str(RPL_YOUREOPER), me.name, parv[0]);
+    sendto_one(source_p, form_str(source_p,RPL_YOUREOPER), me.name, parv[0]);
     SendMessageFile(source_p, &ConfigFileEntry.opermotd);
     return;
   }
@@ -113,14 +113,14 @@
      
     if (irccmp(source_p->user->response, ++parv[1]))
     {
-      sendto_one(source_p, form_str(ERR_PASSWDMISMATCH), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_PASSWDMISMATCH), me.name,
 		 source_p->name);
       return;
     }
      
     if (!(aconf = find_conf_by_name(source_p->user->auth_oper, CONF_OPERATOR)))
     {
-      sendto_one (source_p, form_str(ERR_NOOPERHOST), me.name, parv[0]);
+      sendto_one (source_p, form_str(source_p,ERR_NOOPERHOST), me.name, parv[0]);
       log_failed_oper(source_p, source_p->user->auth_oper);
       return;
     }
@@ -166,7 +166,7 @@
                                 source_p->localClient->sockhost,
                                 CONF_OPERATOR)))
   {
-    sendto_one (source_p, form_str(ERR_NOOPERHOST), me.name, parv[0]);
+    sendto_one (source_p, form_str(source_p,ERR_NOOPERHOST), me.name, parv[0]);
     /* they suck, do we tell the world? */
     if (ConfigFileEntry.failed_oper_notice)
     {
@@ -188,7 +188,7 @@
    !generate_challenge (&challenge, &(source_p->user->response), aconf->rsa_public_key)
      )
   {
-    sendto_one (source_p, form_str(RPL_RSACHALLENGE), me.name, parv[0],
+    sendto_one (source_p, form_str(source_p,RPL_RSACHALLENGE), me.name, parv[0],
 		challenge);
   }
   DupString(source_p->user->auth_oper, aconf->name);
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_cjoin.c ircd-hybrid-7-bg/modules/m_cjoin.c
--- ircd-hybrid-7rc5/modules/m_cjoin.c	Thu Aug 15 11:00:59 2002
+++ ircd-hybrid-7-bg/modules/m_cjoin.c	Mon Mar 10 01:09:00 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_cjoin.c,v 1.55 2002/08/15 15:00:59 adx Exp $
+ *  $Id: m_cjoin.c,v 1.2 2003/03/10 06:09:00 demond Exp $
  */
 
 #include "stdinc.h"
@@ -69,7 +69,7 @@
 #endif
 }
 
-const char *_version = "$Revision: 1.55 $";
+const char *_version = "$Revision: 1.2 $";
 #endif /* STATIC_MODULES */
 
 #ifdef VCHANS
@@ -99,21 +99,21 @@
 
   if(ConfigChannel.use_vchans == 0)
   {
-    sendto_one(source_p, form_str(ERR_VCHANDISABLED),
+    sendto_one(source_p, form_str(source_p,ERR_VCHANDISABLED),
                me.name, parv[0]);
     return;
   }
   
   if (ConfigChannel.vchans_oper_only && !IsOper(source_p))
   {
-    sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
+    sendto_one(source_p, form_str(source_p,ERR_NOPRIVILEGES),
                me.name, parv[0]);
     return;
   }
 
   if (*parv[1] == '\0')
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "CJOIN");
       return;
     }
@@ -135,21 +135,21 @@
 
   if (!check_channel_name(name))
     {
-      sendto_one(source_p, form_str(ERR_BADCHANNAME),
+      sendto_one(source_p, form_str(source_p,ERR_BADCHANNAME),
 		 me.name, parv[0], (unsigned char*) name);
       return;
     }
 
   if (*name == '&')
     {
-      sendto_one(source_p, form_str(ERR_BADCHANNAME),
+      sendto_one(source_p, form_str(source_p,ERR_BADCHANNAME),
 		 me.name, parv[0], (unsigned char*) name);
       return;
     }
 
   if (!IsChannelName(name))
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
 		 me.name, parv[0], name);
       return;
     }
@@ -175,7 +175,7 @@
         }
       else
         {
-          sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+          sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
                      me.name, source_p->name, name);
         }
       return;
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_close.c ircd-hybrid-7-bg/modules/m_close.c
--- ircd-hybrid-7rc5/modules/m_close.c	Thu Sep  5 02:05:40 2002
+++ ircd-hybrid-7-bg/modules/m_close.c	Mon Mar 10 01:09:01 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_close.c,v 1.24 2002/09/05 06:05:40 db Exp $
+ *  $Id: m_close.c,v 1.2 2003/03/10 06:09:01 demond Exp $
  */
 
 #include "stdinc.h"
@@ -54,7 +54,7 @@
   mod_del_cmd(&close_msgtab);
 }
 
-const char *_version = "$Revision: 1.24 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
  * mo_close - CLOSE message handler
@@ -81,11 +81,11 @@
           !IsHandshake(target_p) && !IsDoingKauth(target_p))
         continue;
 #endif
-      sendto_one(source_p, form_str(RPL_CLOSING), me.name, parv[0],
+      sendto_one(source_p, form_str(source_p,RPL_CLOSING), me.name, parv[0],
                  get_client_name(target_p, SHOW_IP), target_p->status);
       (void)exit_client(target_p, target_p, target_p, "Oper Closing");
       closed++;
     }
-  sendto_one(source_p, form_str(RPL_CLOSEEND), me.name, parv[0], closed);
+  sendto_one(source_p, form_str(source_p,RPL_CLOSEEND), me.name, parv[0], closed);
 }
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_conf.c ircd-hybrid-7-bg/modules/m_conf.c
--- ircd-hybrid-7rc5/modules/m_conf.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7-bg/modules/m_conf.c	Sat May 24 23:27:10 2003
@@ -0,0 +1,184 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, modules/m_conf.c
+ *   Copyright (C) 1990 Jarkko Oikarinen and
+ *                      University of Oulu, Computing Center
+ *
+ *   See file AUTHORS in IRC package for additional names of
+ *   the programmers. 
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 1, or (at your option)
+ *   any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *   $Id: m_conf.c,v 1.5 2003/05/24 00:07:44 demond Exp $
+ */
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "ircd.h"
+#include "numeric.h"
+#include "s_conf.h"
+#include "s_serv.h"
+#include "s_user.h"
+#include "s_log.h"
+#include "s_misc.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+static void ms_conf(struct Client*, struct Client*, int, char**);
+
+struct Message conf_msgtab = {
+  "CONF", 0, 0, 2, 0, 0, 0,
+  {m_unregistered, m_ignore, ms_conf, m_ignore}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&conf_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&conf_msgtab);
+}
+
+const char *_version = "$Revision: 1.5 $";
+#endif
+/*
+ * ms_conf - CONF command handler
+ *      parv[0] = sender prefix
+ *      parv[1] = target server mask
+ *      parv[2] = general variable
+ *		parv[3] = new value
+ */
+static void ms_conf(struct Client* client_p, struct Client* source_p,
+                      int parc, char* parv[])
+{
+	char buf[BUFMAX];
+	
+	if (ServerInfo.gateway && get_bridge_token(client_p))
+		return;
+
+	ConfigFileEntry.sframe = (long)buf;
+  if (parc < 3)
+    {
+      sendto_server(client_p, source_p, NULL, CAP_SVS, NOCAPS, LL_ICLIENT, 
+      				":%s CONF %s", parv[0], parv[1]);
+
+	  if (match(parv[1], me.name)) {
+		if (!find_z_conf(parv[0]))
+			return;
+
+		sendto_realops_flags(FLAGS_ALL, L_ADMIN,
+			"%s is remotely rehashing server config file", parv[0]);
+		ilog(L_NOTICE, "Remote REHASH from %s", parv[0]);
+
+		rehash(0);
+	  }
+
+      return;
+    }
+
+  if (parc < 4)
+    return;
+
+  sendto_server(client_p, source_p, NULL, CAP_SVS, NOCAPS, LL_ICLIENT,
+				":%s CONF %s %s %s :%s", parv[0], parv[1], parv[2],
+				parc > 4? parv[3] : "", parc > 4? parv[4] : parv[3]);
+
+  if (!match(parv[1], me.name))
+	return;
+  if (!find_z_conf(parv[0]))
+	return;
+
+  if (!irccmp(parv[2], "hide_server")) {
+
+	  if (!irccmp(parv[3], "yes"))
+		  ConfigFileEntry.hide_server = 1;
+	  else if (!irccmp(parv[3], "no"))
+		  ConfigFileEntry.hide_server = 0;
+
+  } else if (!irccmp(parv[2], "netid")) {
+
+	/*strncpy(buf, parv[3], BUFFMAX);*/
+	strncpy(ConfigFileEntry.netid, parv[3],
+	      MAXNETID)[MAXNETID] = 0;
+
+  } else if (!irccmp(parv[2], "cyrillic")) {
+
+	  if (!irccmp(parv[3], "yes"))
+		  ConfigFileEntry.cyrillic = 1;
+	  else if (!irccmp(parv[3], "no"))
+		  ConfigFileEntry.cyrillic = 0;
+
+  } else if (!irccmp(parv[2], "totaltrans")) {
+
+	  if (!irccmp(parv[3], "yes"))
+		  ConfigFileEntry.totaltrans = 1;
+	  else if (!irccmp(parv[3], "no"))
+		  ConfigFileEntry.totaltrans = 0;
+
+  } else if (!irccmp(parv[2], "grace_time")) {
+
+	ConfigFileEntry.grace_time = atoi(parv[3]);		
+
+  } else if (!irccmp(parv[2], "spam_wait")) {
+
+	ConfigFileEntry.spam_wait = atoi(parv[3]);		
+
+  } else if (!irccmp(parv[2], "spawn")) {
+
+	  do_spawn(atoi(parv[3]), parc > 4? parv[4] : NULL);	
+
+  } else if (!irccmp(parv[2], "plugin")) {
+
+	  do_plugin(parv[3], parc > 4? parv[4] : NULL);	
+
+#ifndef STATIC_MODULES
+
+  } else if (!irccmp(parv[2], "modunload")) {
+
+	  unload_one_module(parv[3], 0);	
+
+  } else if (!irccmp(parv[2], "modload")) {
+
+	  char *m_bn = irc_basename(parv[3]);
+
+	  if (findmodule_byname(m_bn) == -1)
+		load_a_module(parv[3], 0, 0);
+	  
+	  MyFree(m_bn);
+	  
+#endif	  
+
+  } else if (!irccmp(parv[2], "drone_kline")) {
+
+	  if (!irccmp(parv[3], "yes"))
+		  ConfigFileEntry.drone_kline = 1;
+	  else if (!irccmp(parv[3], "no"))
+		  ConfigFileEntry.drone_kline = 0;
+
+  } else if (!irccmp(parv[2], "drone_batch")) {
+
+	  if (!irccmp(parv[3], "yes"))
+		  ConfigFileEntry.drone_batch = 1;
+	  else if (!irccmp(parv[3], "no"))
+		  ConfigFileEntry.drone_batch = 0;
+
+  }
+}
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_connect.c ircd-hybrid-7-bg/modules/m_connect.c
--- ircd-hybrid-7rc5/modules/m_connect.c	Thu Sep 19 12:14:33 2002
+++ ircd-hybrid-7-bg/modules/m_connect.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_connect.c,v 1.38 2002/09/19 16:14:33 bill Exp $
+ *  $Id: m_connect.c,v 1.3 2003/05/24 00:07:44 demond Exp $
  */
 
 #include "stdinc.h"
@@ -61,7 +61,7 @@
   mod_del_cmd(&connect_msgtab);
 }
 
-const char *_version = "$Revision: 1.38 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 /*
  * mo_connect - CONNECT command handler
@@ -98,7 +98,7 @@
 
   if (*parv[1] == '\0')
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "CONNECT");
       return;
     }
@@ -202,6 +202,9 @@
   struct ConfItem* aconf;
   struct Client*   target_p;
 
+  if (ServerInfo.gateway && get_bridge_token(client_p))
+  	return;
+
   if (hunt_server(client_p, source_p,
                   ":%s CONNECT %s %s :%s", 3, parc, parv) != HUNTED_ISME)
     {
@@ -210,7 +213,7 @@
 
   if (*parv[1] == '\0')
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "CONNECT");
       return;
     }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_cryptlink.c ircd-hybrid-7-bg/modules/m_cryptlink.c
--- ircd-hybrid-7rc5/modules/m_cryptlink.c	Sat Oct 12 06:39:04 2002
+++ ircd-hybrid-7-bg/modules/m_cryptlink.c	Mon Dec 30 23:07:26 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_cryptlink.c,v 1.35 2002/10/12 10:39:04 db Exp $
+ *  $Id: m_cryptlink.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 /*
@@ -68,7 +68,7 @@
 void _modinit(void) {}
 void _moddeinit(void) {}
 
-const char *_version = "$Revision: 1.35 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 #else
 
@@ -114,7 +114,7 @@
   mod_del_cmd(&cryptlink_msgtab);
 }
 
-const char *_version = "$Revision: 1.35 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_dmem.c ircd-hybrid-7-bg/modules/m_dmem.c
--- ircd-hybrid-7rc5/modules/m_dmem.c	Fri May 24 19:34:19 2002
+++ ircd-hybrid-7-bg/modules/m_dmem.c	Mon Dec 30 23:07:26 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_dmem.c,v 1.15 2002/05/24 23:34:19 androsyn Exp $
+ *  $Id: m_dmem.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #include "stdinc.h"
@@ -59,7 +59,7 @@
   mod_del_cmd(&dmem_msgtab);
 }
 
-const char *_version = "$Revision: 1.15 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 #ifdef MEMDEBUG
 void ReportAllocated(struct Client*);
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_drop.c ircd-hybrid-7-bg/modules/m_drop.c
--- ircd-hybrid-7rc5/modules/m_drop.c	Fri May 24 19:34:19 2002
+++ ircd-hybrid-7-bg/modules/m_drop.c	Mon Dec 30 23:07:26 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_drop.c,v 1.24 2002/05/24 23:34:19 androsyn Exp $
+ *  $Id: m_drop.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #include "stdinc.h"
@@ -60,7 +60,7 @@
   mod_del_cmd(&drop_msgtab);
 }
 
-const char *_version = "$Revision: 1.24 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 /*
 ** ms_drop
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_eob.c ircd-hybrid-7-bg/modules/m_eob.c
--- ircd-hybrid-7rc5/modules/m_eob.c	Fri May 24 19:34:19 2002
+++ ircd-hybrid-7-bg/modules/m_eob.c	Mon Dec 30 23:07:26 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_eob.c,v 1.31 2002/05/24 23:34:19 androsyn Exp $
+ *  $Id: m_eob.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #include "stdinc.h"
@@ -54,7 +54,7 @@
   mod_del_cmd(&eob_msgtab);
 }
 
-const char *_version = "$Revision: 1.31 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 /*
  * ms_eob - EOB command handler
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_gline.c ircd-hybrid-7-bg/modules/m_gline.c
--- ircd-hybrid-7rc5/modules/m_gline.c	Wed Sep  4 22:48:41 2002
+++ ircd-hybrid-7-bg/modules/m_gline.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_gline.c,v 1.84 2002/09/05 02:48:41 db Exp $
+ *  $Id: m_gline.c,v 1.2 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -109,7 +109,7 @@
   mod_del_cmd(&gline_msgtab);
 }
 
-const char *_version = "$Revision: 1.84 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
  * mo_gline()
@@ -273,6 +273,9 @@
   char *host = NULL;             /* user and host of GLINE "victim" */
   const char *reason = NULL;           /* reason for "victims" demise */
   struct Client *acptr;
+  
+  if (ServerInfo.gateway && get_bridge_token(client_p))
+  	return;
 
   /* hyb-7 style gline (post beta3) */
   if(parc == 4 && IsPerson(source_p))
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_help.c ircd-hybrid-7-bg/modules/m_help.c
--- ircd-hybrid-7rc5/modules/m_help.c	Wed Jul 17 18:02:34 2002
+++ ircd-hybrid-7-bg/modules/m_help.c	Mon Mar 10 01:09:01 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_help.c,v 1.34 2002/07/17 22:02:34 db Exp $
+ *  $Id: m_help.c,v 1.2 2003/03/10 06:09:01 demond Exp $
  */
 
 #include "stdinc.h"
@@ -67,7 +67,7 @@
   mod_del_cmd(&uhelp_msgtab);
 }
 
-const char *_version = "$Revision: 1.34 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
  * m_help - HELP message handler
@@ -85,7 +85,7 @@
     if ((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime)
     {
       /* safe enough to give this on a local connect only */
-      sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,parv[0]);
+      sendto_one(source_p,form_str(source_p,RPL_LOAD2HI),me.name,parv[0]);
         return;
     }
     else
@@ -155,13 +155,13 @@
 
   if (strchr(topic, '/'))
   {
-    sendto_one(source_p, form_str(ERR_HELPNOTFOUND), me.name, nick, topic);
+    sendto_one(source_p, form_str(source_p,ERR_HELPNOTFOUND), me.name, nick, topic);
     return;
   }
 
   if (strlen(hpath) + strlen(topic) + 1 > MAXPATHLEN)
   {
-    sendto_one(source_p, form_str(ERR_HELPNOTFOUND), me.name, nick, topic);
+    sendto_one(source_p, form_str(source_p,ERR_HELPNOTFOUND), me.name, nick, topic);
     return;
   }
 
@@ -170,14 +170,14 @@
   if (stat(path, &sb) < 0)
   {
     ilog(L_NOTICE, "help file %s not found", path);
-    sendto_one(source_p, form_str(ERR_HELPNOTFOUND), me.name, nick, topic);
+    sendto_one(source_p, form_str(source_p,ERR_HELPNOTFOUND), me.name, nick, topic);
     return;
   }
 
   if (!S_ISREG(sb.st_mode))
   {
     ilog(L_NOTICE, "help file %s not found", path);
-    sendto_one(source_p, form_str(ERR_HELPNOTFOUND), me.name, nick, topic);
+    sendto_one(source_p, form_str(source_p,ERR_HELPNOTFOUND), me.name, nick, topic);
     return;
   }
 
@@ -194,24 +194,24 @@
 
   if ((file = fbopen(path, "r")) == NULL)
   {
-    sendto_one(source_p, form_str(ERR_HELPNOTFOUND), me.name, nick, topic);
+    sendto_one(source_p, form_str(source_p,ERR_HELPNOTFOUND), me.name, nick, topic);
     return;
   }
 
   if (fbgets(line, sizeof(line), file) == NULL)
   {
-    sendto_one(source_p, form_str(ERR_HELPNOTFOUND), me.name, nick, topic);
+    sendto_one(source_p, form_str(source_p,ERR_HELPNOTFOUND), me.name, nick, topic);
     return;
   }
 
-  sendto_one(source_p, form_str(RPL_HELPSTART), me.name, nick, topic, line);
+  sendto_one(source_p, form_str(source_p,RPL_HELPSTART), me.name, nick, topic, line);
 
   while (fbgets(line, sizeof(line), file))
   {
-    sendto_one(source_p, form_str(RPL_HELPTXT), me.name, nick, topic, line);
+    sendto_one(source_p, form_str(source_p,RPL_HELPTXT), me.name, nick, topic, line);
   }
 
-  sendto_one(source_p, form_str(RPL_ENDOFHELP), me.name, nick, topic);
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFHELP), me.name, nick, topic);
   return;
 }
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_info.c ircd-hybrid-7-bg/modules/m_info.c
--- ircd-hybrid-7rc5/modules/m_info.c	Mon Oct 28 16:09:21 2002
+++ ircd-hybrid-7-bg/modules/m_info.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_info.c,v 1.61 2002/10/28 21:09:21 bill Exp $
+ *  $Id: m_info.c,v 1.5 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -40,6 +40,7 @@
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
+#include "s_misc.h"
 
 static void send_conf_options(struct Client *source_p);
 static void send_birthdate_online_time(struct Client *source_p);
@@ -69,7 +70,7 @@
   hook_del_event("doing_info");
   mod_del_cmd(&info_msgtab);
 }
-const char *_version = "$Revision: 1.61 $";
+const char *_version = "$Revision: 1.5 $";
 #endif
 
 /*
@@ -89,6 +90,7 @@
 #define OUTPUT_BOOLEAN     0x0008   /* Output option as "ON" or "OFF" */
 #define OUTPUT_BOOLEAN_YN  0x0010   /* Output option as "YES" or "NO" */
 #define OUTPUT_BOOLEAN2	   0x0020   /* Output option as "YES/NO/MASKED" */
+#define OUTPUT_POINTER     0x0040   
 
 static struct InfoStruct info_table[] =
 {
@@ -148,6 +150,12 @@
     "Inform opers if someone /oper's with the wrong password"
   },
   {
+    "sframe",
+    OUTPUT_POINTER,
+    &ConfigFileEntry.sframe,
+    "Stack frame info"
+  },
+  {
     /* fname_operlog is a char [] */
     "fname_operlog",
     OUTPUT_STRING_PTR,
@@ -421,6 +429,18 @@
     "Enable chanmode +I (invite exceptions)",
   },
   {
+    "use_subst",
+    OUTPUT_BOOLEAN_YN,
+    &ConfigChannel.use_subst,
+    "Enable chanmode +w (word substitutions)",
+  },
+  {
+    "use_denies",
+    OUTPUT_BOOLEAN_YN,
+    &ConfigChannel.use_denies,
+    "Enable chanmode +d (gecos & channame deny bans)",
+  },
+  {
     "use_knock",
     OUTPUT_BOOLEAN_YN,
     &ConfigChannel.use_knock,
@@ -506,7 +526,7 @@
   if ((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
   {
     /* safe enough to give this on a local connect only */
-    sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,parv[0]);
+    sendto_one(source_p,form_str(source_p,RPL_LOAD2HI),me.name,parv[0]);
     return;
   }
   else
@@ -528,7 +548,7 @@
   send_info_text(source_p);
   send_birthdate_online_time(source_p);
 
-  sendto_one(source_p, form_str(RPL_ENDOFINFO), me.name, parv[0]);
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFINFO), me.name, parv[0]);
 
 } /* m_info() */
 
@@ -549,7 +569,7 @@
     send_conf_options(source_p);
     send_birthdate_online_time(source_p);
 
-    sendto_one(source_p, form_str(RPL_ENDOFINFO), me.name, parv[0]);
+    sendto_one(source_p, form_str(source_p,RPL_ENDOFINFO), me.name, parv[0]);
   }
 } /* mo_info() */
 
@@ -562,6 +582,8 @@
                    int parc, char *parv[])
 
 {
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+
   if(!IsClient(source_p))
       return;
   
@@ -574,7 +596,7 @@
       send_conf_options(source_p);
       
     send_birthdate_online_time(source_p);
-    sendto_one(source_p, form_str(RPL_ENDOFINFO),
+    sendto_one(source_p, form_str(source_p,RPL_ENDOFINFO),
                me.name, parv[0]);
   }
 } /* ms_info() */
@@ -593,10 +615,10 @@
 
   while (*text)
   {
-    sendto_one(source_p, form_str(RPL_INFO), me.name, source_p->name, *text++);
+    sendto_one(source_p, form_str(source_p,RPL_INFO), me.name, source_p->name, *text++);
   }
 
-  sendto_one(source_p, form_str(RPL_INFO), me.name, source_p->name, "");
+  sendto_one(source_p, form_str(source_p,RPL_INFO), me.name, source_p->name, "");
 }
 
 /*
@@ -710,6 +732,24 @@
          break;
        }
        /*
+        * raw pointer value
+        */
+       case OUTPUT_POINTER:
+       {
+         long option = *((long *) info_table[i].option);
+
+         sendto_one(source_p,
+           ":%s %d %s :%-25s %-10p [%-30s]",
+           me.name,
+           RPL_INFO,
+           source_p->name,
+           info_table[i].name,
+           option ? (void *)option : NULL,
+           info_table[i].desc ? info_table[i].desc : "<none>");
+
+         break;
+       }
+       /*
         * Output info_table[i].option as a decimal value.
         */
        case OUTPUT_DECIMAL:
@@ -774,7 +814,9 @@
 
 #ifndef EFNET
   /* jdc -- Only send compile information to admins. */
-  if (IsOperAdmin(source_p))
+  /*if (IsOperAdmin(source_p))*/
+  /* ...to remote admins too... -demond */
+  if (IsAdmin(source_p))
   {
     sendto_one(source_p,
 	":%s %d %s :Compiled on [%s]",
@@ -785,7 +827,7 @@
   }
 #endif
 
-  sendto_one(source_p, form_str(RPL_INFO), me.name, source_p->name, "");
+  sendto_one(source_p, form_str(source_p,RPL_INFO), me.name, source_p->name, "");
 }
 
 /* info_spy()
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_invite.c ircd-hybrid-7-bg/modules/m_invite.c
--- ircd-hybrid-7rc5/modules/m_invite.c	Wed Jul 31 12:24:07 2002
+++ ircd-hybrid-7-bg/modules/m_invite.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_invite.c,v 1.47 2002/07/31 16:24:07 leeh Exp $
+ *  $Id: m_invite.c,v 1.3 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -42,6 +42,7 @@
 #include "parse.h"
 #include "modules.h"
 #include "packet.h"
+#include "s_misc.h"
 
 static void m_invite(struct Client *, struct Client *, int, char **);
 
@@ -63,7 +64,7 @@
   mod_del_cmd(&invite_msgtab);
 }
 
-const char *_version = "$Revision: 1.47 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 
 /*
@@ -83,9 +84,13 @@
   struct Channel *vchan2;
 #endif
 
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  cluster_prefix(client_p, parc, parv, 1, 0, 0);
+  cluster_prefix(client_p, parc, parv, 2, 1, 0);
+
   if (*parv[2] == '\0')
   {
-    sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+    sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                me.name, parv[0], "INVITE");
     return;
   }
@@ -98,21 +103,22 @@
 
   if ((target_p = find_person(parv[1])) == NULL)
   {
-    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, parv[0], parv[1]);
+    sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK), me.name, parv[0], parv[1]);
     return;
   }
 
   if(check_channel_name(parv[2]) == 0)
   {
-    sendto_one(source_p, form_str(ERR_BADCHANNAME),
+    sendto_one(source_p, form_str(source_p,ERR_BADCHANNAME),
                me.name, parv[0], (unsigned char *)parv[2]);
     return;
   }
 
+  if (!ServerInfo.gateway || !get_bridge_token(client_p))
   if (!IsChannelName(parv[2]))
   {
     if (MyClient(source_p))
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
                  me.name, parv[0], parv[2]);
     return;
   }
@@ -128,7 +134,7 @@
   if (!MyConnect(target_p) && (parv[2][0] == '&'))
   {
     if (ConfigServerHide.hide_servers == 0)
-      sendto_one(source_p, form_str(ERR_USERNOTONSERV),
+      sendto_one(source_p, form_str(source_p,ERR_USERNOTONSERV),
                  me.name, parv[0], parv[1]);
     return;
   }
@@ -136,7 +142,7 @@
   if ((chptr = hash_find_channel(parv[2])) == NULL)
   {
     if (MyClient(source_p))
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
                  me.name, parv[0], parv[2]);
     return;
   }
@@ -154,7 +160,7 @@
   
   if (MyClient(source_p) && !IsMember(source_p, vchan))
   {
-    sendto_one(source_p, form_str(ERR_NOTONCHANNEL), me.name, parv[0],
+    sendto_one(source_p, form_str(source_p,ERR_NOTONCHANNEL), me.name, parv[0],
                parv[2]);
     return;
   }
@@ -163,7 +169,7 @@
   if ((vchan2 = map_vchan(chptr, target_p)))
   {
     if (MyClient(source_p) && ((vchan2->mode.mode & MODE_SECRET) == 0))
-      sendto_one(source_p, form_str(ERR_USERONCHANNEL), me.name, parv[0],
+      sendto_one(source_p, form_str(source_p,ERR_USERONCHANNEL), me.name, parv[0],
                  parv[1], parv[2]);
     return;
   }
@@ -172,7 +178,7 @@
   if (IsMember(target_p, vchan))
   {
     if (MyClient(source_p))
-      sendto_one(source_p, form_str(ERR_USERONCHANNEL),
+      sendto_one(source_p, form_str(source_p,ERR_USERONCHANNEL),
                  me.name, parv[0], parv[1], parv[2]);
     return;
   }
@@ -184,7 +190,7 @@
     if (!chop)
     {
       if (MyClient(source_p))
-        sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
+        sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED),
                    me.name, parv[0], parv[2]);
       return;
     }
@@ -195,10 +201,10 @@
 
   if (MyConnect(source_p))
   {
-    sendto_one(source_p, form_str(RPL_INVITING), me.name, parv[0],
+    sendto_one(source_p, form_str(source_p,RPL_INVITING), me.name, parv[0],
                target_p->name, parv[2]);
     if (target_p->user->away)
-      sendto_one(source_p, form_str(RPL_AWAY), me.name, parv[0],
+      sendto_one(source_p, form_str(source_p,RPL_AWAY), me.name, parv[0],
                  target_p->name, target_p->user->away);
   }
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_ison.c ircd-hybrid-7-bg/modules/m_ison.c
--- ircd-hybrid-7rc5/modules/m_ison.c	Fri May 24 19:34:20 2002
+++ ircd-hybrid-7-bg/modules/m_ison.c	Mon Mar 10 01:09:01 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_ison.c,v 1.28 2002/05/24 23:34:20 androsyn Exp $
+ *  $Id: m_ison.c,v 1.2 2003/03/10 06:09:01 demond Exp $
  */
 
 #include "stdinc.h"
@@ -61,7 +61,7 @@
 {
   mod_del_cmd(&ison_msgtab);
 }
-const char *_version = "$Revision: 1.28 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 
 static char buf[BUFSIZE];
@@ -82,6 +82,9 @@
 {
   struct Client *up = NULL;
 
+  if (client_p->user) 
+	  client_p->user->known = 1;
+
   if (!ServerInfo.hub && uplink && IsCapable(uplink, CAP_LL))
     up = uplink;
 
@@ -118,7 +121,7 @@
   current_insert_point2 = buf2;
   *buf2 = '\0';
 
-  ircsprintf(buf, form_str(RPL_ISON), me.name, parv[0]);
+  ircsprintf(buf, form_str(source_p,RPL_ISON), me.name, parv[0]);
   len = strlen(buf);
   current_insert_point = buf + len;
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_join.c ircd-hybrid-7-bg/modules/m_join.c
--- ircd-hybrid-7rc5/modules/m_join.c	Mon Oct 28 16:09:22 2002
+++ ircd-hybrid-7-bg/modules/m_join.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_join.c,v 1.93 2002/10/28 21:09:22 bill Exp $
+ *  $Id: m_join.c,v 1.4 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -42,6 +42,7 @@
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
+#include "s_misc.h"
 
 
 static void m_join(struct Client*, struct Client*, int, char**);
@@ -65,7 +66,7 @@
 {
   mod_del_cmd(&join_msgtab);
 }
-const char *_version = "$Revision: 1.93 $";
+const char *_version = "$Revision: 1.4 $";
 
 #endif
 static void do_join_0(struct Client *client_p, struct Client *source_p);
@@ -103,7 +104,7 @@
 
   if (*parv[1] == '\0')
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "JOIN");
       return;
     }
@@ -134,7 +135,7 @@
 
       if(!check_channel_name(name))
       {
-        sendto_one(source_p, form_str(ERR_BADCHANNAME),
+        sendto_one(source_p, form_str(source_p,ERR_BADCHANNAME),
 	           me.name, source_p->name, (unsigned char*)name);
         continue;
       }
@@ -159,14 +160,14 @@
       /* check it begins with # or & */
       else if(!IsChannelName(name))
       {
-        sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+        sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
 	           me.name, source_p->name, name);
 	continue;
       }
 
       if(ConfigServerHide.disable_local_channels && (*name == '&'))
       {
-        sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+        sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
 	           me.name, source_p->name, name);
         continue;
       }
@@ -174,7 +175,7 @@
       /* check the length */
       if (strlen(name) > CHANNELLEN)
       {
-        sendto_one(source_p, form_str(ERR_BADCHANNAME),
+        sendto_one(source_p, form_str(source_p,ERR_BADCHANNAME),
 	           me.name, source_p->name, name);
 	continue;
       }
@@ -183,7 +184,7 @@
       if(find_channel_resv(name) &&
          !(IsOper(source_p) && ConfigChannel.oper_pass_resv))
 	{
-	  sendto_one(source_p, form_str(ERR_UNAVAILRESOURCE),
+	  sendto_one(source_p, form_str(source_p,ERR_UNAVAILRESOURCE),
 		     me.name, source_p->name, name);
           sendto_realops_flags(FLAGS_SPY, L_ALL,
                    "User %s (%s@%s) is attempting to join locally juped channel %s",
@@ -195,7 +196,7 @@
          (!IsOper(source_p) || (source_p->user->joined >=
 	                        ConfigChannel.max_chans_per_user*3)))
 	{
-	  sendto_one(source_p, form_str(ERR_TOOMANYCHANNELS),
+	  sendto_one(source_p, form_str(source_p,ERR_TOOMANYCHANNELS),
 		     me.name, parv[0], name);
 	  if(successful_join_count != 0)
 	    source_p->localClient->last_join_time = CurrentTime;
@@ -210,7 +211,7 @@
 	  if(splitmode && !IsOper(source_p) && (*name != '&') && 
              ConfigChannel.no_join_on_split)
 	  {
-	    sendto_one(source_p, form_str(ERR_UNAVAILRESOURCE),
+	    sendto_one(source_p, form_str(source_p,ERR_UNAVAILRESOURCE),
                        me.name, source_p->name, name);
 	    continue;
 	  }
@@ -251,7 +252,7 @@
 	  if(splitmode && !IsOper(source_p) && (*name != '&') && 
             (ConfigChannel.no_create_on_split || ConfigChannel.no_join_on_split))
 	  {
-	    sendto_one(source_p, form_str(ERR_UNAVAILRESOURCE),
+	    sendto_one(source_p, form_str(source_p,ERR_UNAVAILRESOURCE),
 	               me.name, source_p->name, name);
 	    continue;
 	  }
@@ -272,7 +273,7 @@
 	  /* So create it */
 	  if ((chptr = get_or_create_channel(source_p, name, NULL)) == NULL)
 	  {
-	    sendto_one(source_p, form_str(ERR_UNAVAILRESOURCE),
+	    sendto_one(source_p, form_str(source_p,ERR_UNAVAILRESOURCE),
 		       me.name, parv[0], name);
 	    continue;
 	  }
@@ -289,7 +290,7 @@
 
       if ((i = can_join(source_p, chptr, key)))
 	{
-	  sendto_one(source_p, form_str(i), me.name, parv[0], name);
+	  sendto_one(source_p, form_str(source_p,i), me.name, parv[0], name);
 	  successful_join_count++;
 	  continue;
 	}
@@ -358,7 +359,13 @@
 	  /* XXX just exactly who is going to be =on= this new channel
 	   * other than just the creator at this time? ? ?
 	   */
-	  sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
+      /* 
+      ** postpone notifying the channel, add to pace queue if necessary
+      */
+      if (PaceChannel(chptr) && (chptr->joins < MAX_PACEJOIN))
+		add_pace(chptr, source_p, root_chptr->chname, 1, 1);
+      else
+	  	sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
 			       source_p->name, source_p->username,
 			       source_p->host, root_chptr->chname);
       
@@ -385,28 +392,32 @@
       
       if (chptr->topic != NULL)
 	{
-	  sendto_one(source_p, form_str(RPL_TOPIC), me.name,
-		     parv[0], root_chptr->chname, chptr->topic);
+	  char foo[TOPICLEN]; strlcpy(foo, chptr->topic, TOPICLEN);
+	  sendto_one(source_p, form_str(source_p,RPL_TOPIC), me.name,
+		     parv[0], root_chptr->chname, 
+		     ConfigFileEntry.totaltrans?
+		     translate(source_p, foo) : chptr->topic);
 
           if (!(chptr->mode.mode & MODE_HIDEOPS) ||
               (flags & CHFL_CHANOP) || (flags & CHFL_HALFOP))
             {
-              sendto_one(source_p, form_str(RPL_TOPICWHOTIME),
+              sendto_one(source_p, form_str(source_p,RPL_TOPICWHOTIME),
                          me.name, parv[0], root_chptr->chname,
                          chptr->topic_info, chptr->topic_time);
             }
           else /* Hide from nonops */
             {
-               sendto_one(source_p, form_str(RPL_TOPICWHOTIME),
+               sendto_one(source_p, form_str(source_p,RPL_TOPICWHOTIME),
                          me.name, parv[0], root_chptr->chname,
                          me.name, chptr->topic_time);
             }
 	}
 
-      channel_member_names(source_p, chptr, root_chptr->chname, 1);
+      if (!(PaceChannel(chptr) && (chptr->joins < MAX_PACEJOIN)))
+      	channel_member_names(source_p, chptr, root_chptr->chname, 1);
 
       if(successful_join_count != 0)
-	source_p->localClient->last_join_time = CurrentTime;
+		source_p->localClient->last_join_time = CurrentTime;
     }
 }
 
@@ -428,6 +439,9 @@
 {
   char *name;
   int new_ts;
+  
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  cluster_prefix(client_p, parc, parv, 1, 1, 0);
 
   if ((source_p->user) == NULL)
     return;
@@ -485,7 +499,11 @@
   while ((lp = source_p->user->channel.head))
     {
       chptr = lp->data;
-      sendto_channel_local(ALL_MEMBERS,chptr, ":%s!%s@%s PART %s",
+
+      if (PaceChannel(chptr) && (chptr->parts < MAX_PACEJOIN))
+		add_pace(chptr, source_p, RootChan(chptr)->chname, 0, 0);
+      else
+      	sendto_channel_local(ALL_MEMBERS,chptr, ":%s!%s@%s PART %s",
 			   source_p->name, source_p->username,
 			   source_p->host, RootChan(chptr)->chname);
       remove_user_from_channel(chptr, source_p);
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_kline.c ircd-hybrid-7-bg/modules/m_kline.c
--- ircd-hybrid-7rc5/modules/m_kline.c	Wed Sep 11 18:01:05 2002
+++ ircd-hybrid-7-bg/modules/m_kline.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_kline.c,v 1.110 2002/09/11 22:01:05 db Exp $
+ *  $Id: m_kline.c,v 1.3 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -75,7 +75,7 @@
   mod_del_cmd(&kline_msgtab);
   mod_del_cmd(&dline_msgtab);
 }
-const char *_version = "$Revision: 1.110 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 
 /* Local function prototypes */
@@ -148,7 +148,7 @@
 
   if (parc == 0)
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
 		 me.name, source_p->name, "KLINE");
       return;
     }
@@ -167,7 +167,7 @@
 	  parv++;
 	  if(parc == 0)
 	    {
-	      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+	      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
 			 me.name, source_p->name, "KLINE");
 	      return;
 	    }
@@ -273,6 +273,9 @@
 
   if (parc != 6)
     return;
+    
+  if (ServerInfo.gateway && get_bridge_token(client_p))
+  	return;
 
   /* parv[0]  parv[1]        parv[2]      parv[3]  parv[4]  parv[5] */
   /* oper     target_server  tkline_time  user     host     reason */
@@ -981,7 +984,7 @@
    t = 0;
    piphost = NULL;
   }
-  if ((aconf = find_conf_by_address(lhost, piphost, CONF_KILL, t, luser)))
+  if ((aconf = find_conf_by_address(lhost, piphost, CONF_KILL, t, luser, NULL)))
   {
    reason = aconf->passwd ? aconf->passwd : "<No Reason>";
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_knock.c ircd-hybrid-7-bg/modules/m_knock.c
--- ircd-hybrid-7rc5/modules/m_knock.c	Thu Sep  5 02:05:40 2002
+++ ircd-hybrid-7-bg/modules/m_knock.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_knock.c,v 1.52 2002/09/05 06:05:40 db Exp $
+ *  $Id: m_knock.c,v 1.3 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -81,7 +81,7 @@
   mod_del_cmd(&knockll_msgtab);
 }
 
-const char *_version = "$Revision: 1.52 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 
 /* m_knock
@@ -111,7 +111,7 @@
   
   if((ConfigChannel.use_knock == 0) && MyClient(source_p))
     {
-      sendto_one(source_p, form_str(ERR_KNOCKDISABLED),
+      sendto_one(source_p, form_str(source_p,ERR_KNOCKDISABLED),
 		 me.name, source_p->name);
       return;
     }
@@ -155,6 +155,9 @@
 ms_knock(struct Client *client_p, struct Client *source_p,
 		     int parc, char *parv[])
 {
+  if (ServerInfo.gateway && get_bridge_token(client_p))
+  	return;
+
   if(IsClient(source_p))
     parse_knock_remote(client_p, source_p, parc, parv);
 }
@@ -194,7 +197,7 @@
 
   if(!IsChannelName(name))
   {
-    sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+    sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
                me.name, parv[0], name);
     return;
   }
@@ -211,7 +214,7 @@
     }
     else
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL), me.name, parv[0],
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL), me.name, parv[0],
                  name);
     }
 
@@ -224,7 +227,7 @@
     /* They specified a vchan basename */
     if(on_sub_vchan(chptr,source_p))
     {
-      sendto_one(source_p, form_str(ERR_KNOCKONCHAN),
+      sendto_one(source_p, form_str(source_p,ERR_KNOCKONCHAN),
 		 me.name, source_p->name, name);
       return;
     }
@@ -244,7 +247,7 @@
       }
       else
       {
-	sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+	sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
 		   me.name, parv[0], name);
 	return;
       }
@@ -259,7 +262,7 @@
   else if (IsVchan(chptr))
   {
     /* Don't allow KNOCK'ing a vchans 'real' name */
-    sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name, parv[0],
+    sendto_one(source_p, form_str(source_p,ERR_BADCHANNAME), me.name, parv[0],
 	       name);
     return;
   }
@@ -269,7 +272,7 @@
     /* Normal channel, just be sure they aren't on it */
     if (IsMember(source_p, chptr))
     {
-      sendto_one(source_p, form_str(ERR_KNOCKONCHAN),
+      sendto_one(source_p, form_str(source_p,ERR_KNOCKONCHAN),
 		 me.name, source_p->name, name);
       return;
     }
@@ -280,7 +283,7 @@
        (chptr->mode.limit && chptr->users >= chptr->mode.limit )
        ))
   {
-    sendto_one(source_p, form_str(ERR_CHANOPEN),
+    sendto_one(source_p, form_str(source_p,ERR_CHANOPEN),
 	       me.name, source_p->name, name);
     return;
   }
@@ -290,7 +293,7 @@
       (sockhost && is_banned_knock(chptr, source_p, sockhost)) ||
       (!sockhost && is_banned(chptr, source_p)))
   {
-    sendto_one(source_p, form_str(ERR_CANNOTSENDTOCHAN), me.name, parv[0],
+    sendto_one(source_p, form_str(source_p,ERR_CANNOTSENDTOCHAN), me.name, parv[0],
 	       name);
     return;
   }
@@ -304,14 +307,14 @@
   if(MyClient(source_p) &&
     (source_p->localClient->last_knock + ConfigChannel.knock_delay) > CurrentTime)
   {
-    sendto_one(source_p, form_str(ERR_TOOMANYKNOCK),
+    sendto_one(source_p, form_str(source_p,ERR_TOOMANYKNOCK),
                me.name, source_p->name, parv[1], "user");
     return;
   }
   else if((chptr->last_knock +
          ConfigChannel.knock_delay_channel) > CurrentTime)
   {
-    sendto_one(source_p, form_str(ERR_TOOMANYKNOCK),
+    sendto_one(source_p, form_str(source_p,ERR_TOOMANYKNOCK),
                me.name, source_p->name, parv[1], "channel");
     return;
   }
@@ -401,18 +404,18 @@
   {
     source_p->localClient->last_knock = CurrentTime;
 
-    sendto_one(source_p, form_str(RPL_KNOCKDLVR),
+    sendto_one(source_p, form_str(source_p,RPL_KNOCKDLVR),
                me.name, source_p->name, name);
   }
   else if(llclient == 1)
-    sendto_one(source_p, form_str(RPL_KNOCKDLVR),
+    sendto_one(source_p, form_str(source_p,RPL_KNOCKDLVR),
                me.name, source_p->name, name);
 
   if(source_p->user != NULL)
     {
       if(ConfigChannel.use_knock)
         sendto_channel_local(ONLY_CHANOPS_HALFOPS,
-  			     chptr, form_str(RPL_KNOCK),
+  			     chptr, form_str(NULL,RPL_KNOCK),
 			     me.name, name, name,
 			     source_p->name, source_p->username,
 			     source_p->host);
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_links.c ircd-hybrid-7-bg/modules/m_links.c
--- ircd-hybrid-7rc5/modules/m_links.c	Wed Jul 31 12:24:07 2002
+++ ircd-hybrid-7-bg/modules/m_links.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_links.c,v 1.37 2002/07/31 16:24:07 leeh Exp $
+ *  $Id: m_links.c,v 1.3 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -36,6 +36,7 @@
 #include "parse.h"
 #include "modules.h"
 #include "hook.h"
+#include "s_misc.h"
 
 
 static void m_links(struct Client*, struct Client*, int, char**);
@@ -62,7 +63,7 @@
   mod_del_cmd(&links_msgtab);
 }
 
-const char *_version = "$Revision: 1.37 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 /*
  * m_links - LINKS message handler
@@ -90,11 +91,11 @@
  * then print out the file (which may or may not be empty)
  */
   
-  sendto_one(source_p, form_str(RPL_LINKS),
+  sendto_one(source_p, form_str(source_p,RPL_LINKS),
                            me.name, parv[0], me.name, me.name,
                            0, me.info);
       
-  sendto_one(source_p, form_str(RPL_ENDOFLINKS), me.name, parv[0], "*");
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFLINKS), me.name, parv[0], "*");
 }
 
 static void mo_links(struct Client *client_p, struct Client *source_p,
@@ -155,12 +156,12 @@
      /* We just send the reply, as if theyre here theres either no SHIDE,
       * or theyre an oper..  
       */
-      sendto_one(source_p, form_str(RPL_LINKS),
+      sendto_one(source_p, form_str(source_p,RPL_LINKS),
 		      me.name, parv[0], target_p->name, target_p->serv->up,
                       target_p->hopcount, p);
     }
   
-  sendto_one(source_p, form_str(RPL_ENDOFLINKS), me.name, parv[0],
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFLINKS), me.name, parv[0],
              EmptyString(mask) ? "*" : mask);
 }
 
@@ -176,6 +177,8 @@
 static void ms_links(struct Client *client_p, struct Client *source_p,
                     int parc, char *parv[])
 {
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+
   if (hunt_server(client_p, source_p, ":%s LINKS %s :%s", 1, parc, parv)
       != HUNTED_ISME)
     return;
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_list.c ircd-hybrid-7-bg/modules/m_list.c
--- ircd-hybrid-7rc5/modules/m_list.c	Thu Aug 15 11:00:59 2002
+++ ircd-hybrid-7-bg/modules/m_list.c	Mon Mar 10 01:09:01 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_list.c,v 1.44 2002/08/15 15:00:59 adx Exp $
+ *  $Id: m_list.c,v 1.2 2003/03/10 06:09:01 demond Exp $
  */
 
 #include "stdinc.h"
@@ -65,7 +65,7 @@
 {
   mod_del_cmd(&list_msgtab);
 }
-const char *_version = "$Revision: 1.44 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 static int list_all_channels(struct Client *source_p);
 static int list_named_channel(struct Client *source_p,char *name);
@@ -88,7 +88,7 @@
    * traffic involved in /list.. -- fl_ */
   if( ( (last_used + ConfigFileEntry.pace_wait) > CurrentTime) )
     {
-      sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,parv[0]);
+      sendto_one(source_p,form_str(source_p,RPL_LOAD2HI),me.name,parv[0]);
       return;
     }
   else
@@ -190,7 +190,7 @@
 {
   struct Channel *chptr;
 
-  sendto_one(source_p, form_str(RPL_LISTSTART), me.name, source_p->name);
+  sendto_one(source_p, form_str(source_p,RPL_LISTSTART), me.name, source_p->name);
 
   for ( chptr = GlobalChannelList; chptr; chptr = chptr->nextch )
     {
@@ -200,7 +200,7 @@
       list_one_channel(source_p,chptr);
     }
 
-  sendto_one(source_p, form_str(RPL_LISTEND), me.name, source_p->name);
+  sendto_one(source_p, form_str(source_p,RPL_LISTEND), me.name, source_p->name);
   return 0;
 }   
           
@@ -221,7 +221,7 @@
   struct Channel *tmpchptr;
 #endif
 
-  sendto_one(source_p, form_str(RPL_LISTSTART), me.name, source_p->name);
+  sendto_one(source_p, form_str(source_p,RPL_LISTSTART), me.name, source_p->name);
 
   while (*name == ',')
     name++;
@@ -233,8 +233,8 @@
   chptr = hash_find_channel(name);
   if (chptr == NULL)
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHNICK),me.name, source_p->name, name);
-      sendto_one(source_p, form_str(RPL_LISTEND), me.name, source_p->name);
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK),me.name, source_p->name, name);
+      sendto_one(source_p, form_str(source_p,RPL_LISTEND), me.name, source_p->name);
       return 0;
     }
 
@@ -246,7 +246,7 @@
     ircsprintf(id_and_topic, "%s", chptr->topic == NULL ? "" : chptr->topic);
 
   if (ShowChannel(source_p, chptr))
-    sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name,
+    sendto_one(source_p, form_str(source_p,RPL_LIST), me.name, source_p->name,
                chptr->chname, chptr->users, id_and_topic);
       
   /* Deal with subvchans */
@@ -260,13 +260,13 @@
 	{
           root_chptr = find_bchan(tmpchptr);
           ircsprintf(id_and_topic, "<!%s> %s", pick_vchan_id(tmpchptr), tmpchptr->topic == NULL ? "" : chptr->topic);
-          sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name,
+          sendto_one(source_p, form_str(source_p,RPL_LIST), me.name, source_p->name,
                      root_chptr->chname, tmpchptr->users, id_and_topic);
         }
     }
 #endif
   
-  sendto_one(source_p, form_str(RPL_LISTEND), me.name, source_p->name);
+  sendto_one(source_p, form_str(source_p,RPL_LISTEND), me.name, source_p->name);
   return 0;
 }
 
@@ -291,20 +291,20 @@
       if(root_chptr != NULL)
         {
           ircsprintf(id_and_topic, "<!%s> %s", pick_vchan_id(chptr), chptr->topic == NULL ? "" : chptr->topic );
-          sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name,
+          sendto_one(source_p, form_str(source_p,RPL_LIST), me.name, source_p->name,
                      root_chptr->chname, chptr->users, id_and_topic);
         }
       else
         {
           ircsprintf(id_and_topic, "<!%s> %s", pick_vchan_id(chptr), chptr->topic == NULL ? "" : chptr->topic );
-          sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name,
+          sendto_one(source_p, form_str(source_p,RPL_LIST), me.name, source_p->name,
                      chptr->chname, chptr->users, id_and_topic);     
         }
     }
   else
 #endif
     {
-      sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name,
+      sendto_one(source_p, form_str(source_p,RPL_LIST), me.name, source_p->name,
                  chptr->chname, chptr->users, chptr->topic == NULL ? "" : chptr->topic );
     }
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_lljoin.c ircd-hybrid-7-bg/modules/m_lljoin.c
--- ircd-hybrid-7rc5/modules/m_lljoin.c	Fri May 24 19:34:21 2002
+++ ircd-hybrid-7-bg/modules/m_lljoin.c	Mon Mar 10 01:09:01 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_lljoin.c,v 1.57 2002/05/24 23:34:21 androsyn Exp $
+ *  $Id: m_lljoin.c,v 1.2 2003/03/10 06:09:01 demond Exp $
  */
 
 #include "stdinc.h"
@@ -64,7 +64,7 @@
   mod_del_cmd(&lljoin_msgtab);
 }
 
-const char *_version = "$Revision: 1.57 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
  * m_lljoin
@@ -212,7 +212,7 @@
     }
     else
     {
-      sendto_one(target_p, form_str(ERR_UNAVAILRESOURCE),
+      sendto_one(target_p, form_str(target_p,ERR_UNAVAILRESOURCE),
                  me.name, nick, root_vchan->chname);
       return;
     }
@@ -220,7 +220,7 @@
     if( (i = can_join(target_p, chptr, key)) )
     {
       sendto_one(target_p,
-                 form_str(i), me.name, nick, root_vchan->chname);
+                 form_str(target_p,i), me.name, nick, root_vchan->chname);
       return;
     }
   }
@@ -229,7 +229,7 @@
       (!IsOper(target_p) || (target_p->user->joined >= 
                              ConfigChannel.max_chans_per_user*3)))
     {
-      sendto_one(target_p, form_str(ERR_TOOMANYCHANNELS),
+      sendto_one(target_p, form_str(target_p,ERR_TOOMANYCHANNELS),
 		 me.name, nick, root_vchan->chname );
       return; 
     }
@@ -303,7 +303,10 @@
     add_vchan_to_client_cache(target_p,root_vchan,chptr);
 #endif
  
-  sendto_channel_local(ALL_MEMBERS, chptr,
+  if (PaceChannel(chptr) && (chptr->joins < MAX_PACEJOIN))
+    add_pace(chptr, target_p, root_vchan->chname, 1, 1);
+  else
+  	sendto_channel_local(ALL_MEMBERS, chptr,
 		       ":%s!%s@%s JOIN :%s",
 		       target_p->name,
 		       target_p->username,
@@ -323,5 +326,6 @@
                me.name, chptr->chname);
   }
 
-  channel_member_names(target_p, chptr, chname, 1);
+  if (!(PaceChannel(chptr) && (chptr->joins < MAX_PACEJOIN)))
+  	channel_member_names(target_p, chptr, chname, 1);
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_llnick.c ircd-hybrid-7-bg/modules/m_llnick.c
--- ircd-hybrid-7rc5/modules/m_llnick.c	Fri May 24 19:34:21 2002
+++ ircd-hybrid-7-bg/modules/m_llnick.c	Mon Mar 10 01:09:01 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_llnick.c,v 1.20 2002/05/24 23:34:21 androsyn Exp $
+ *  $Id: m_llnick.c,v 1.2 2003/03/10 06:09:01 demond Exp $
  */
 
 #include "stdinc.h"
@@ -60,7 +60,7 @@
   mod_del_cmd(&llnick_msgtab);
 }
 
-const char *_version = "$Revision: 1.20 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
  * m_llnick
@@ -134,7 +134,7 @@
   if(find_client(nick) || exists)
   {
     /* The nick they want is in use. complain */
-    sendto_one(target_p, form_str(ERR_NICKNAMEINUSE), me.name,
+    sendto_one(target_p, form_str(target_p,ERR_NICKNAMEINUSE), me.name,
                new ? "*" : nick_old,
                nick);
     return;
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_locops.c ircd-hybrid-7-bg/modules/m_locops.c
--- ircd-hybrid-7rc5/modules/m_locops.c	Fri May 24 19:34:21 2002
+++ ircd-hybrid-7-bg/modules/m_locops.c	Mon Mar 10 01:09:01 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_locops.c,v 1.27 2002/05/24 23:34:21 androsyn Exp $
+ *  $Id: m_locops.c,v 1.2 2003/03/10 06:09:01 demond Exp $
  */
 
 #include "stdinc.h"
@@ -56,7 +56,7 @@
   mod_del_cmd(&locops_msgtab);
 }
 
-const char *_version = "$Revision: 1.27 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
  * m_locops - LOCOPS message handler
@@ -73,7 +73,7 @@
 
   if (EmptyString(message))
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "LOCOPS");
       return;
     }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_lusers.c ircd-hybrid-7-bg/modules/m_lusers.c
--- ircd-hybrid-7rc5/modules/m_lusers.c	Wed Jul 31 12:24:07 2002
+++ ircd-hybrid-7-bg/modules/m_lusers.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_lusers.c,v 1.23 2002/07/31 16:24:07 leeh Exp $
+ *  $Id: m_lusers.c,v 1.3 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -34,6 +34,7 @@
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
+#include "s_misc.h"
 
 /* XXX LazyLinks ? */
 
@@ -58,7 +59,7 @@
   mod_del_cmd(&lusers_msgtab);
 }
 
-const char *_version = "$Revision: 1.23 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 /*
  * m_lusers - LUSERS message handler
@@ -78,7 +79,7 @@
     {
       /* safe enough to give this on a local connect only */
       if (MyClient(source_p))
-        sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, parv[0]);
+        sendto_one(source_p, form_str(source_p,RPL_LOAD2HI), me.name, parv[0]);
       return;
     }
   else
@@ -105,6 +106,8 @@
 static void ms_lusers(struct Client *client_p, struct Client *source_p,
                      int parc, char *parv[])
 {
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+
   if (parc > 2)
     {
       if(hunt_server(client_p, source_p, ":%s LUSERS %s :%s", 2, parc, parv)
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_motd.c ircd-hybrid-7-bg/modules/m_motd.c
--- ircd-hybrid-7rc5/modules/m_motd.c	Mon Oct  7 20:23:46 2002
+++ ircd-hybrid-7-bg/modules/m_motd.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_motd.c,v 1.31 2002/10/08 00:23:46 db Exp $
+ *  $Id: m_motd.c,v 1.3 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -36,6 +36,7 @@
 #include "parse.h"
 #include "modules.h"
 #include "s_conf.h"
+#include "s_misc.h"
 
 
 static void mr_motd(struct Client *, struct Client *, int, char **);
@@ -63,7 +64,7 @@
   mod_del_cmd(&motd_msgtab);
 }
 
-const char *_version = "$Revision: 1.31 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 
 /* mr_motd()
@@ -91,7 +92,7 @@
   if((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
     {
       /* safe enough to give this on a local connect only */
-      sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,source_p->name);
+      sendto_one(source_p,form_str(source_p,RPL_LOAD2HI),me.name,source_p->name);
       return;
     }
   else
@@ -117,6 +118,8 @@
 static void mo_motd(struct Client *client_p, struct Client *source_p,
                    int parc, char *parv[])
 {
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+
   if(!IsClient(source_p))
     return;
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_names.c ircd-hybrid-7-bg/modules/m_names.c
--- ircd-hybrid-7rc5/modules/m_names.c	Thu Aug 15 11:00:59 2002
+++ ircd-hybrid-7-bg/modules/m_names.c	Mon Mar 10 01:09:01 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_names.c,v 1.44 2002/08/15 15:00:59 adx Exp $
+ *  $Id: m_names.c,v 1.2 2003/03/10 06:09:01 demond Exp $
  */
 
 #include "stdinc.h"
@@ -67,7 +67,7 @@
   mod_del_cmd(&names_msgtab);
 }
 
-const char *_version = "$Revision: 1.44 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 
 /************************************************************************
@@ -109,7 +109,7 @@
 
       if (!check_channel_name(para))
         { 
-          sendto_one(source_p, form_str(ERR_BADCHANNAME),
+          sendto_one(source_p, form_str(source_p,ERR_BADCHANNAME),
                      me.name, parv[0], (unsigned char *)para);
           return;
         }
@@ -141,14 +141,14 @@
             }
         }
       else
-        sendto_one(source_p, form_str(RPL_ENDOFNAMES), me.name,
+        sendto_one(source_p, form_str(source_p,RPL_ENDOFNAMES), me.name,
                    parv[0], para);
     }
   else
     {
       names_all_visible_channels(source_p);
       names_non_public_non_secret(source_p);
-      sendto_one(source_p, form_str(RPL_ENDOFNAMES), me.name, parv[0],
+      sendto_one(source_p, form_str(source_p,RPL_ENDOFNAMES), me.name, parv[0],
                  "*");
     }
 }
@@ -213,7 +213,7 @@
   char buf[BUFSIZE];
   char *t;
 
-  ircsprintf(buf,form_str(RPL_NAMREPLY),
+  ircsprintf(buf,form_str(source_p,RPL_NAMREPLY),
              me.name,source_p->name," * * :");
 
   mlen = strlen(buf);
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_nburst.c ircd-hybrid-7-bg/modules/m_nburst.c
--- ircd-hybrid-7rc5/modules/m_nburst.c	Fri May 24 19:34:21 2002
+++ ircd-hybrid-7-bg/modules/m_nburst.c	Mon Dec 30 23:07:26 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_nburst.c,v 1.17 2002/05/24 23:34:21 androsyn Exp $
+ *  $Id: m_nburst.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #include "stdinc.h"
@@ -62,7 +62,7 @@
   mod_del_cmd(&nburst_msgtab);
 }
 
-const char *_version = "$Revision: 1.17 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 /*
 ** m_nburst
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_oper.c ircd-hybrid-7-bg/modules/m_oper.c
--- ircd-hybrid-7rc5/modules/m_oper.c	Tue Sep 10 15:58:32 2002
+++ ircd-hybrid-7-bg/modules/m_oper.c	Mon Mar 10 01:09:01 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_oper.c,v 1.56 2002/09/10 19:58:32 db Exp $
+ *  $Id: m_oper.c,v 1.2 2003/03/10 06:09:01 demond Exp $
  */
 
 #include "stdinc.h"
@@ -74,7 +74,7 @@
   mod_del_cmd(&oper_msgtab);
 }
 
-const char *_version = "$Revision: 1.56 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 
 /*
@@ -98,7 +98,7 @@
 
   if (EmptyString(password))
   {
-    sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+    sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
 	       me.name, source_p->name, "OPER");
     return;
   }
@@ -109,7 +109,7 @@
 
   if((aconf = find_password_aconf(name,source_p)) == NULL)
   {
-    sendto_one(source_p, form_str(ERR_NOOPERHOST), me.name, source_p->name);
+    sendto_one(source_p, form_str(source_p,ERR_NOOPERHOST), me.name, source_p->name);
     if (ConfigFileEntry.failed_oper_notice)
     {
       sendto_realops_flags(FLAGS_ALL, L_ALL,
@@ -160,7 +160,7 @@
   }
   else
   {
-    sendto_one(source_p,form_str(ERR_PASSWDMISMATCH),me.name, parv[0]);
+    sendto_one(source_p,form_str(source_p,ERR_PASSWDMISMATCH),me.name, parv[0]);
     if (ConfigFileEntry.failed_oper_notice)
     {
       sendto_realops_flags(FLAGS_ALL, L_ALL,
@@ -182,7 +182,7 @@
 mo_oper(struct Client *client_p, struct Client *source_p,
 	int parc, char *parv[])
 {
-  sendto_one(source_p, form_str(RPL_YOUREOPER), me.name, parv[0]);
+  sendto_one(source_p, form_str(source_p,RPL_YOUREOPER), me.name, parv[0]);
   SendMessageFile(source_p, &ConfigFileEntry.opermotd);
   return;
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_operwall.c ircd-hybrid-7-bg/modules/m_operwall.c
--- ircd-hybrid-7rc5/modules/m_operwall.c	Fri May 24 19:34:21 2002
+++ ircd-hybrid-7-bg/modules/m_operwall.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_operwall.c,v 1.29 2002/05/24 23:34:21 androsyn Exp $
+ *  $Id: m_operwall.c,v 1.4 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -33,6 +33,7 @@
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
+#include "s_misc.h"
 
 static void mo_operwall(struct Client*, struct Client*, int, char**);
 static void ms_operwall(struct Client*, struct Client*, int, char**);
@@ -55,7 +56,7 @@
   mod_del_cmd(&operwall_msgtab);
 }
 
-const char *_version = "$Revision: 1.29 $";
+const char *_version = "$Revision: 1.4 $";
 #endif
 /*
  * mo_operwall - OPERWALL message handler
@@ -71,14 +72,14 @@
 
   if (EmptyString(message))
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "OPERWALL");
       return;
     }
 
   sendto_server(NULL, source_p, NULL, NOCAPS, NOCAPS, LL_ICLIENT,
                 ":%s OPERWALL :%s", parv[0], message);
-  sendto_wallops_flags(FLAGS_OPERWALL, source_p, "OPERWALL - %s", message);
+  sendto_wallops_flags(FLAGS_OPERWALL, source_p, "[O] %s", message);
 }
 
 /*
@@ -92,18 +93,21 @@
                        int parc, char *parv[])
 {
   char *message = parv[1];
+  
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  message = parv[1];
 
   if (EmptyString(message))
     {
       if (MyClient(source_p))
-        sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+        sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                    me.name, parv[0], "OPERWALL");
       return;
     }
 
   sendto_server(client_p, source_p, NULL, NOCAPS, NOCAPS, LL_ICLIENT,
                 ":%s OPERWALL :%s", parv[0], message);
-  sendto_wallops_flags(FLAGS_OPERWALL, source_p, "OPERWALL - %s", message);
+  sendto_wallops_flags(FLAGS_OPERWALL, source_p, "[O] %s", message);
 }
 
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_pass.c ircd-hybrid-7-bg/modules/m_pass.c
--- ircd-hybrid-7rc5/modules/m_pass.c	Fri May 24 19:34:21 2002
+++ ircd-hybrid-7-bg/modules/m_pass.c	Mon Mar 10 01:09:01 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_pass.c,v 1.23 2002/05/24 23:34:21 androsyn Exp $
+ *  $Id: m_pass.c,v 1.2 2003/03/10 06:09:01 demond Exp $
  */
 
 #include "stdinc.h"
@@ -53,7 +53,7 @@
   mod_del_cmd(&pass_msgtab);
 }
 
-const char *_version = "$Revision: 1.23 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
  * m_pass() - Added Sat, 4 March 1989
@@ -71,7 +71,7 @@
 
   if (EmptyString(password))
     {
-      sendto_one(client_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(client_p, form_str(client_p,ERR_NEEDMOREPARAMS),
                  me.name, BadPtr(parv[0]) ? "*" : parv[0], "PASS");
       return;
     }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_ping.c ircd-hybrid-7-bg/modules/m_ping.c
--- ircd-hybrid-7rc5/modules/m_ping.c	Fri Oct 11 23:38:13 2002
+++ ircd-hybrid-7-bg/modules/m_ping.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_ping.c,v 1.32 2002/10/12 03:38:13 db Exp $
+ *  $Id: m_ping.c,v 1.3 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -35,6 +35,7 @@
 #include "hash.h"
 #include "s_conf.h"
 #include "s_serv.h"
+#include "s_misc.h"
 
 static void m_ping(struct Client*, struct Client*, int, char**);
 static void ms_ping(struct Client*, struct Client*, int, char**);
@@ -57,7 +58,7 @@
   mod_del_cmd(&ping_msgtab);
 }
 
-const char *_version = "$Revision: 1.32 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 /*
 ** m_ping
@@ -75,7 +76,7 @@
 
   if (parc < 2 || *parv[1] == '\0')
   {
-    sendto_one(source_p, form_str(ERR_NOORIGIN), me.name, parv[0]);
+    sendto_one(source_p, form_str(source_p,ERR_NOORIGIN), me.name, parv[0]);
     return;
   }
 
@@ -111,7 +112,7 @@
     }
     else
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHSERVER),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHSERVER),
                  me.name, parv[0], destination);
       return;
     }
@@ -128,10 +129,16 @@
 {
   struct Client *target_p;
   char  *origin, *destination;
+  
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  if (parc > 0 && parv[1] && !strchr(parv[1], '.'))
+  	cluster_prefix(client_p, parc, parv, 1, 0, 0);
+  if (parc > 1 && parv[2] && !strchr(parv[2], '.'))
+  	cluster_prefix(client_p, parc, parv, 2, 0, 0);
 
   if (parc < 2 || *parv[1] == '\0')
   {
-    sendto_one(source_p, form_str(ERR_NOORIGIN), me.name, parv[0]);
+    sendto_one(source_p, form_str(source_p,ERR_NOORIGIN), me.name, parv[0]);
     return;
   }
 
@@ -157,7 +164,7 @@
                  origin, destination);
     else
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHSERVER),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHSERVER),
                  me.name, parv[0], destination);
       return;
     }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_pong.c ircd-hybrid-7-bg/modules/m_pong.c
--- ircd-hybrid-7rc5/modules/m_pong.c	Thu Aug 15 10:15:32 2002
+++ ircd-hybrid-7-bg/modules/m_pong.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_pong.c,v 1.28 2002/08/15 14:15:32 db Exp $
+ *  $Id: m_pong.c,v 1.3 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -38,6 +38,7 @@
 #include "parse.h"
 #include "hash.h"
 #include "modules.h"
+#include "s_misc.h"
 
 static void mr_pong(struct Client*, struct Client*, int, char**);
 static void ms_pong(struct Client*, struct Client*, int, char**);
@@ -60,7 +61,7 @@
   mod_del_cmd(&pong_msgtab);
 }
 
-const char *_version = "$Revision: 1.28 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 static void ms_pong(struct Client *client_p,
                    struct Client *source_p,
@@ -70,9 +71,15 @@
   struct Client *target_p;
   char  *origin, *destination;
 
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  if (parc > 0 && parv[1] && !strchr(parv[1], '.'))
+  	cluster_prefix(client_p, parc, parv, 1, 0, 0);
+  if (parc > 1 && parv[2] && !strchr(parv[2], '.'))
+  	cluster_prefix(client_p, parc, parv, 2, 0, 0);
+
   if (parc < 2 || *parv[1] == '\0')
     {
-      sendto_one(source_p, form_str(ERR_NOORIGIN), me.name, parv[0]);
+      sendto_one(source_p, form_str(source_p,ERR_NOORIGIN), me.name, parv[0]);
       return;
     }
 
@@ -94,7 +101,7 @@
                    parv[0], origin, destination);
       else
         {
-          sendto_one(source_p, form_str(ERR_NOSUCHSERVER),
+          sendto_one(source_p, form_str(source_p,ERR_NOSUCHSERVER),
                      me.name, parv[0], destination);
           return;
         }
@@ -128,7 +135,7 @@
 	  }
 	  else
 	  {
-		sendto_one(source_p, form_str(ERR_WRONGPONG), me.name,
+		sendto_one(source_p, form_str(source_p,ERR_WRONGPONG), me.name,
 			   source_p->name, source_p->localClient->random_ping);
 		return;
 	  }
@@ -137,7 +144,7 @@
      
     }
   else
-    sendto_one(source_p, form_str(ERR_NOORIGIN), me.name, parv[0]);
+    sendto_one(source_p, form_str(source_p,ERR_NOORIGIN), me.name, parv[0]);
   
   source_p->flags &= ~FLAGS_PINGSENT;
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_post.c ircd-hybrid-7-bg/modules/m_post.c
--- ircd-hybrid-7rc5/modules/m_post.c	Fri May 24 19:34:22 2002
+++ ircd-hybrid-7-bg/modules/m_post.c	Mon Dec 30 23:07:26 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_post.c,v 1.11 2002/05/24 23:34:22 androsyn Exp $
+ *  $Id: m_post.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #include "stdinc.h"
@@ -65,7 +65,7 @@
   mod_del_cmd(&post_msgtab);
 }
 
-const char *_version = "$Revision: 1.11 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 /*
 ** mr_dumb_proxy
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_rehash.c ircd-hybrid-7-bg/modules/m_rehash.c
--- ircd-hybrid-7rc5/modules/m_rehash.c	Wed Oct 16 22:28:51 2002
+++ ircd-hybrid-7-bg/modules/m_rehash.c	Mon Mar 10 01:09:01 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_rehash.c,v 1.42 2002/10/17 02:28:51 bill Exp $
+ *  $Id: m_rehash.c,v 1.2 2003/03/10 06:09:01 demond Exp $
  */
 
 #include "stdinc.h"
@@ -60,7 +60,7 @@
   mod_del_cmd(&rehash_msgtab);
 }
 
-const char *_version = "$Revision: 1.42 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
  * mo_rehash - REHASH message handler
@@ -81,7 +81,7 @@
     {
       if(irccmp(parv[1],"DNS") == 0)
         {
-          sendto_one(source_p, form_str(RPL_REHASHING), me.name, parv[0], "DNS");
+          sendto_one(source_p, form_str(source_p,RPL_REHASHING), me.name, parv[0], "DNS");
           sendto_realops_flags(FLAGS_ALL, L_ALL,"%s is rehashing DNS",
                                get_oper_name(source_p));
           restart_resolver();   /* re-read /etc/resolv.conf AGAIN?
@@ -118,7 +118,7 @@
     }
   else
     {
-      sendto_one(source_p, form_str(RPL_REHASHING), me.name, parv[0],
+      sendto_one(source_p, form_str(source_p,RPL_REHASHING), me.name, parv[0],
                  ConfigFileEntry.configfile);
       sendto_realops_flags(FLAGS_ALL, L_ALL,
 			   "%s is rehashing server config file",
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_restart.c ircd-hybrid-7-bg/modules/m_restart.c
--- ircd-hybrid-7rc5/modules/m_restart.c	Fri May 24 19:34:22 2002
+++ ircd-hybrid-7-bg/modules/m_restart.c	Mon Mar 10 01:09:01 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_restart.c,v 1.23 2002/05/24 23:34:22 androsyn Exp $
+ *  $Id: m_restart.c,v 1.2 2003/03/10 06:09:01 demond Exp $
  */
 
 #include "stdinc.h"
@@ -57,7 +57,7 @@
   mod_del_cmd(&restart_msgtab);
 }
 
-const char *_version = "$Revision: 1.23 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
  * mo_restart
@@ -74,7 +74,7 @@
   
   if (!MyClient(source_p) || !IsOper(source_p))
     {
-      sendto_one(source_p, form_str(ERR_NOPRIVILEGES), me.name, parv[0]);
+      sendto_one(source_p, form_str(source_p,ERR_NOPRIVILEGES), me.name, parv[0]);
       return;
     }
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_resv.c ircd-hybrid-7-bg/modules/m_resv.c
--- ircd-hybrid-7rc5/modules/m_resv.c	Fri May 24 19:34:22 2002
+++ ircd-hybrid-7-bg/modules/m_resv.c	Mon Dec 30 23:07:26 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_resv.c,v 1.16 2002/05/24 23:34:22 androsyn Exp $
+ *  $Id: m_resv.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #include "stdinc.h"
@@ -65,7 +65,7 @@
   mod_del_cmd(&unresv_msgtab);
 }
 
-const char *_version = "$Revision: 1.16 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 
 /*
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_set.c ircd-hybrid-7-bg/modules/m_set.c
--- ircd-hybrid-7rc5/modules/m_set.c	Fri May 24 19:34:22 2002
+++ ircd-hybrid-7-bg/modules/m_set.c	Tue Jan  7 21:50:23 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_set.c,v 1.45 2002/05/24 23:34:22 androsyn Exp $
+ *  $Id: m_set.c,v 1.3 2003/01/08 02:50:23 demond Exp $
  */
 
 /* rewritten by jdc */
@@ -64,7 +64,7 @@
   mod_del_cmd(&set_msgtab);
 }
 
-const char *_version = "$Revision: 1.45 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 /* Structure used for the SET table itself */
 struct SetStruct
@@ -328,9 +328,16 @@
 #ifdef USE_GETTEXT
   if(locale)
   {
-    char langenv[BUFSIZE];
+    static char langenv[BUFSIZE];
+    static char langenv2[BUFSIZE];
     ircsprintf(langenv,"LANGUAGE=%s",locale);
     putenv(langenv);
+    ircsprintf(langenv2,"LC_MESSAGES=%s",locale);
+    putenv(langenv2);
+	{
+	  extern int  _nl_msg_cat_cntr;
+	  ++_nl_msg_cat_cntr;
+	}
 
     sendto_one(source_p, ":%s NOTICE %s :Set MSGLOCALE to '%s'",
 	me.name, source_p->name,
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_stats.c ircd-hybrid-7-bg/modules/m_stats.c
--- ircd-hybrid-7rc5/modules/m_stats.c	Wed Sep  4 21:10:24 2002
+++ ircd-hybrid-7-bg/modules/m_stats.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_stats.c,v 1.112 2002/09/05 01:10:24 db Exp $
+ *  $Id: m_stats.c,v 1.3 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -80,7 +80,7 @@
   mod_del_cmd(&stats_msgtab);
 }
 
-const char *_version = "$Revision: 1.112 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 
 const char* Lformat = ":%s %d %s %s %u %u %u %u %u :%u %u %s";
@@ -125,11 +125,16 @@
 static void stats_shared(struct Client *);
 static void stats_servers(struct Client *);
 static void stats_gecos(struct Client *);
+static void stats_userparms(struct Client *);
 static void stats_class(struct Client *);
 static void stats_memory(struct Client *);
+static void stats_services(struct Client *);
+static void stats_equivs(struct Client *);
+static void stats_relays(struct Client *);
 static void stats_servlinks(struct Client *);
 static void stats_ltrace(struct Client *, int, char**);
 static void stats_ziplinks(struct Client *);
+static void stats_clusters(struct Client *);
 
 /* This table contains the possible stats items, in order:
  * /stats name,  function to call, operonly? adminonly? /stats letter
@@ -139,34 +144,38 @@
   /* letter     function            need_oper need_admin */
   { 'a',	stats_adns_servers,	1,	1,	},
   { 'A',	stats_adns_servers,	1,	1,	},
+  { 'b',	stats_clusters,		1,	1,	},
+  { 'B',	stats_clusters,		1,	1,	},
   { 'c',	stats_connect,		1,	0,	},
   { 'C',	stats_connect,		1,	0,	},
-  { 'd',	stats_deny,		1,	0,	},
-  { 'D',	stats_deny,		1,	0,	},
+  { 'd',	stats_deny,			1,	0,	},
+  { 'D',	stats_deny,			1,	0,	},
   { 'e', 	stats_exempt,		1,	0,	},
   { 'E',	stats_events,		1,	1,	},
-  { 'f',	fd_dump,		1,	1,	},
-  { 'F',	fd_dump,		1,	1,	},
+  { 'f',	fd_dump,			1,	1,	},
+  { 'F',	fd_dump,			1,	1,	},
   { 'g',	stats_pending_glines,	1,	0,	},
   { 'G',	stats_glines,		1,	0,	},
   { 'h',	stats_hubleaf,		1,	0,	},
   { 'H',	stats_hubleaf,		1,	0,	},
-  { 'i',	stats_auth,		0,	0,	},
-  { 'I',	stats_auth,		0,	0,	},
+  { 'i',	stats_auth,			0,	0,	},
+  { 'I',	stats_auth,			0,	0,	},
   { 'k',	stats_tklines,		0,	0,	},
   { 'K',	stats_klines,		0,	0,	},
   { 'l',	stats_ltrace,		1,	0,	},
   { 'L',	stats_ltrace,		1,	0,	},
   { 'm',	stats_messages,		0,	0,	},
   { 'M',	stats_messages,		0,	0,	},
-  { 'o',	stats_oper,		0,	0,	},
-  { 'O',	stats_oper,		0,	0,	},
+  { 'o',	stats_oper,			0,	0,	},
+  { 'O',	stats_oper,			0,	0,	},
   { 'p',	stats_operedup,		0,	0,	},
   { 'P',	stats_ports,		0,	0,	},
-  { 'q',	stats_resv,		1,	0,	},
-  { 'Q',	stats_resv,		1,	0,	},
+  { 'q',	stats_resv,			1,	0,	},
+  { 'Q',	stats_resv,			1,	0,	},
   { 'r',	stats_usage,		1,	0,	},
-  { 'R',	stats_usage,		1,	0,	},
+  { 'R',	stats_relays,		1,	0,	},
+  { 's',	stats_services,		1,	0,	},
+  { 'S',	stats_services,		1,	0,	},
   { 't',	stats_tstats,		1,	0,	},
   { 'T',	stats_tstats,		1,	0,	},
   { 'u',	stats_uptime,		0,	0,	},
@@ -174,9 +183,9 @@
   { 'v',	stats_servers,		1,	0,	},
   { 'V',	stats_servers,		1,	0,	},
   { 'x',	stats_gecos,		1,	0,	},
-  { 'X',	stats_gecos,		1,	0,	},
+  { 'X',	stats_userparms,	1,	0,	},
   { 'y',	stats_class,		1,	0,	},
-  { 'Y',	stats_class,		1,	0,	},
+  { 'Y',	stats_equivs,		1,	0,	},
   { 'z',	stats_memory,		1,	0,	},
   { 'Z',	stats_ziplinks,		1,	0,	},
   { '?',	stats_servlinks,	0,	0,	},
@@ -205,7 +214,7 @@
     {
       /* safe enough to give this on a local connect only */
       if(MyClient(source_p))
-	sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,parv[0]);
+	sendto_one(source_p,form_str(source_p,RPL_LOAD2HI),me.name,parv[0]);
       return;
     }
   else
@@ -229,7 +238,7 @@
       /* The stats table says what privs are needed, so check --fl_ */
       if(stats_cmd_table[i].need_oper || stats_cmd_table[i].need_admin)
       {
-        sendto_one(source_p, form_str(ERR_NOPRIVILEGES),me.name,source_p->name);
+        sendto_one(source_p, form_str(source_p,ERR_NOPRIVILEGES),me.name,source_p->name);
         break;
       }
 
@@ -242,7 +251,7 @@
   }
 
   /* Send the end of stats notice, and the stats_spy */
-  sendto_one(source_p, form_str(RPL_ENDOFSTATS), me.name, parv[0], parv[1]);
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFSTATS), me.name, parv[0], parv[1]);
 
   if((statchar != 'L') && (statchar != 'l'))
     stats_spy(source_p, statchar);
@@ -280,7 +289,7 @@
       if((stats_cmd_table[i].need_admin && !IsOperAdmin(source_p)) ||
          (stats_cmd_table[i].need_oper && !IsOper(source_p)))
       {
-        sendto_one(source_p, form_str(ERR_NOPRIVILEGES),me.name,source_p->name);
+        sendto_one(source_p, form_str(source_p,ERR_NOPRIVILEGES),me.name,source_p->name);
         break;
       }
 
@@ -293,7 +302,7 @@
   }
 
   /* Send the end of stats notice, and the stats_spy */
-  sendto_one(source_p, form_str(RPL_ENDOFSTATS), me.name, parv[0], parv[1]);
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFSTATS), me.name, parv[0], parv[1]);
 
   if((statchar != 'L') && (statchar != 'l'))
     stats_spy(source_p, statchar);
@@ -333,7 +342,7 @@
 	get_printable_conf(aconf, &name, &host, &pass, &user, &port,
 	                  &classname);
 			  
-	sendto_one(source_p, form_str(RPL_STATSDLINE), me.name,
+	sendto_one(source_p, form_str(source_p,RPL_STATSDLINE), me.name,
 	           source_p->name, 'D', host, pass);
       }
     }
@@ -364,7 +373,7 @@
 	get_printable_conf(aconf, &name, &host, &pass,
 	                   &user, &port, &classname);
 	
-	sendto_one(source_p, form_str(RPL_STATSDLINE), me.name,
+	sendto_one(source_p, form_str(source_p,RPL_STATSDLINE), me.name,
 	           source_p->name, 'e', host, pass);
       }
     }
@@ -481,7 +490,7 @@
     else
       reason = "No Reason";
     
-    sendto_one(source_p, form_str(RPL_STATSKLINE), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_STATSKLINE), me.name,
 	       source_p->name, 'G', host, name, reason);
   }
 }
@@ -499,7 +508,7 @@
 {
   /* Oper only, if unopered, return ERR_NOPRIVS */
   if((ConfigFileEntry.stats_i_oper_only == 2) && !IsOper(source_p))
-    sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
+    sendto_one(source_p, form_str(source_p,ERR_NOPRIVILEGES),
                me.name, source_p->name);
 
   /* If unopered, Only return matching auth blocks */
@@ -511,13 +520,13 @@
 
     if(MyConnect(source_p))
       aconf = find_conf_by_address(source_p->host,
-                                   &source_p->localClient->ip,
+                   &source_p->localClient->ip,
 				   CONF_CLIENT,
 				   source_p->localClient->aftype,
-				   source_p->username);
+				   source_p->username, NULL);
     else
       aconf = find_conf_by_address(source_p->host, NULL, CONF_CLIENT,
-                                   0, source_p->username);
+                                   0, source_p->username, NULL);
 
     if(aconf == NULL)
       return;
@@ -525,7 +534,7 @@
     get_printable_conf(aconf, &name, &host, &pass, &user, 
                        &port, &classname);
 
-    sendto_one(source_p, form_str(RPL_STATSILINE), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_STATSILINE), me.name,
                source_p->name, (IsConfRestricted(aconf)) ? 'i' : 'I',
 	       name, show_iline_prefix(source_p, aconf, user), host,
 	       port, classname);
@@ -542,7 +551,7 @@
 {
   /* Oper only, if unopered, return ERR_NOPRIVS */
   if((ConfigFileEntry.stats_k_oper_only == 2) && !IsOper(source_p))
-    sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
+    sendto_one(source_p, form_str(source_p,ERR_NOPRIVILEGES),
                me.name, source_p->name);
 
   /* If unopered, Only return matching klines */
@@ -554,13 +563,13 @@
 
     if(MyConnect(source_p))
       aconf = find_conf_by_address(source_p->host,
-                                   &source_p->localClient->ip,
+                   &source_p->localClient->ip,
 				   CONF_KILL,
 				   source_p->localClient->aftype,
-				   source_p->username);
+				   source_p->username, NULL);
     else
       aconf = find_conf_by_address(source_p->host, NULL, CONF_KILL,
-                                   0, source_p->username);
+                                   0, source_p->username, NULL);
 
     if(aconf == NULL)
       return;
@@ -572,7 +581,7 @@
     get_printable_conf(aconf, &name, &host, &pass, &user,
                        &port, &classname);
 
-    sendto_one(source_p, form_str(RPL_STATSKLINE), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_STATSKLINE), me.name,
                source_p->name, 'k', host, user, pass);
   }
   /* Theyre opered, or allowed to see all klines */
@@ -586,7 +595,7 @@
 {
   /* Oper only, if unopered, return ERR_NOPRIVS */
   if((ConfigFileEntry.stats_k_oper_only == 2) && !IsOper(source_p))
-    sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
+    sendto_one(source_p, form_str(source_p,ERR_NOPRIVILEGES),
                me.name, source_p->name);
 
   /* If unopered, Only return matching klines */
@@ -599,13 +608,13 @@
     /* search for a kline */
     if(MyConnect(source_p))
       aconf = find_conf_by_address(source_p->host,
-                                   &source_p->localClient->ip,
+                   &source_p->localClient->ip,
 				   CONF_KILL,
 				   source_p->localClient->aftype,
-				   source_p->username);
+				   source_p->username, NULL);
     else
       aconf = find_conf_by_address(source_p->host, NULL, CONF_KILL,
-                                   0, source_p->username);
+                                   0, source_p->username, NULL);
 
     if(aconf == NULL)
       return;
@@ -617,7 +626,7 @@
     get_printable_conf(aconf, &name, &host, &pass, &user,
                        &port, &classname);
 
-    sendto_one(source_p, form_str(RPL_STATSKLINE), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_STATSKLINE), me.name,
                source_p->name, 'K', host, user, pass);
   }
   /* Theyre opered, or allowed to see all klines */
@@ -635,7 +644,7 @@
 stats_oper(struct Client *source_p)
 {
   if (!IsOper(source_p) && ConfigFileEntry.stats_o_oper_only)
-    sendto_one(source_p, form_str(ERR_NOPRIVILEGES),me.name,source_p->name);
+    sendto_one(source_p, form_str(source_p,ERR_NOPRIVILEGES),me.name,source_p->name);
   else
     report_configured_links(source_p, CONF_OPERATOR);
 }
@@ -694,7 +703,7 @@
 stats_ports(struct Client *source_p)
 {
   if (!IsOper(source_p) && ConfigFileEntry.stats_P_oper_only)
-    sendto_one(source_p, form_str(ERR_NOPRIVILEGES),me.name,source_p->name);
+    sendto_one(source_p, form_str(source_p,ERR_NOPRIVILEGES),me.name,source_p->name);
   else
     show_ports(source_p);
 }
@@ -705,6 +714,31 @@
   report_resv(source_p);
 }
 
+static void stats_services(struct Client *client_p)
+{
+  report_zlines(client_p);
+}
+
+static void stats_equivs(struct Client *client_p)
+{
+  report_equivs(client_p);
+}
+
+static void stats_relays(struct Client *client_p)
+{
+  report_relays(client_p);
+}
+
+static void stats_userparms(struct Client *client_p)
+{
+  report_userparms(client_p);
+}
+
+static void stats_clusters(struct Client *client_p)
+{
+  report_clusters(client_p);
+}
+
 static void
 stats_usage(struct Client *source_p)
 {
@@ -723,10 +757,10 @@
   time_t now;
 
    now = CurrentTime - me.since;
-   sendto_one(source_p, form_str(RPL_STATSUPTIME), me.name, source_p->name,
+   sendto_one(source_p, form_str(source_p,RPL_STATSUPTIME), me.name, source_p->name,
               now/86400, (now/3600)%24, (now/60)%60, now%60);
    if(!ConfigServerHide.disable_remote || IsOper(source_p))
-      sendto_one(source_p, form_str(RPL_STATSCONN), me.name, source_p->name,
+      sendto_one(source_p, form_str(source_p,RPL_STATSCONN), me.name, source_p->name,
                  MaxConnectionCount, MaxClientCount, Count.totalrestartcount);
 }
 
@@ -825,7 +859,7 @@
 
   if(ConfigServerHide.flatten_links && !IsOper(source_p))
   {
-    sendto_one(source_p, form_str(ERR_NOPRIVILEGES),me.name, source_p->name);
+    sendto_one(source_p, form_str(source_p,ERR_NOPRIVILEGES),me.name, source_p->name);
     return;
   }
 
@@ -892,7 +926,7 @@
     stats_L_spy(source_p, statchar, name);
   }
   else
-    sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+    sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                me.name, source_p->name, "STATS");
 
   return;
@@ -909,6 +943,8 @@
 ms_stats(struct Client *client_p, struct Client *source_p,
                     int parc, char *parv[])
 {
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+
   if (hunt_server(client_p,source_p,":%s STATS %s :%s",2,parc,parv)!=HUNTED_ISME)
     return;
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_svinfo.c ircd-hybrid-7-bg/modules/m_svinfo.c
--- ircd-hybrid-7rc5/modules/m_svinfo.c	Fri May 24 19:34:22 2002
+++ ircd-hybrid-7-bg/modules/m_svinfo.c	Mon Dec 30 23:07:26 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_svinfo.c,v 1.34 2002/05/24 23:34:22 androsyn Exp $
+ *  $Id: m_svinfo.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 #include "stdinc.h"
 #include "handlers.h"
@@ -56,7 +56,7 @@
   mod_del_cmd(&svinfo_msgtab);
 }
 
-const char *_version = "$Revision: 1.34 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 /*
  * ms_svinfo - SVINFO message handler
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_svshint.c ircd-hybrid-7-bg/modules/m_svshint.c
--- ircd-hybrid-7rc5/modules/m_svshint.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7-bg/modules/m_svshint.c	Sat May 24 23:27:10 2003
@@ -0,0 +1,132 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, modules/m_svshint.c
+ *   Copyright (C) 1990 Jarkko Oikarinen and
+ *                      University of Oulu, Computing Center
+ *
+ *   See file AUTHORS in IRC package for additional names of
+ *   the programmers. 
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 1, or (at your option)
+ *   any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *   $Id: m_svshint.c,v 1.6 2003/05/24 00:07:45 demond Exp $
+ */
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "ircd.h"
+#include "hash.h"
+#include "numeric.h"
+#include "s_conf.h"
+#include "s_serv.h"
+#include "s_user.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+static void ms_svshint(struct Client*, struct Client*, int, char**);
+
+struct Message svshint_msgtab = {
+  "SVSHINT", 0, 0, 0, 0, 0, 0,
+  {m_unregistered, m_ignore, ms_svshint, m_ignore}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&svshint_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&svshint_msgtab);
+}
+
+const char *_version = "$Revision: 1.6 $";
+#endif
+/*
+ * ms_svshint - SVSHINT command handler
+ *      parv[0] = sender prefix
+ *      parv[1] = hint flags
+ *      parv[2] = nick
+ */
+static void ms_svshint(struct Client* client_p, struct Client* source_p,
+                      int parc, char* parv[])
+{
+  int hint;
+  struct Client *victim;
+  
+  if (ServerInfo.gateway && get_bridge_token(client_p))
+  	return;
+
+  if (parc < 2)
+    {
+      sendto_server(client_p, source_p, NULL, CAP_SVS, NOCAPS, LL_ICLIENT, 
+      				":%s SVSHINT", parv[0]);
+
+	  if (!find_z_conf(parv[0]))
+		return;
+
+      clear_svs_client_hash_table();
+      return;
+    }
+
+  if (parc < 3)
+    return;
+
+  hint = atoi(parv[1]);
+
+  sendto_server(client_p, source_p, NULL, CAP_SVS, NOCAPS, LL_ICLIENT,
+				":%s SVSHINT %s :%s", parv[0], parv[1], parv[2]);
+
+  if (!find_z_conf(parv[0]))
+	return;
+
+  victim = find_client(parv[2]);
+
+  if (victim && !IsServer(victim))
+    {
+      if (hint == 0) {
+      	victim->svsflags &= ~FLAGS_SVS_IDENT;
+      	if (--Count.identified < 0)
+      		Count.identified = 0;
+      }
+      
+      else if (hint > 0) {
+
+      	if (hint & FLAGS_SVS_IDENT) {
+        	victim->svsflags |= FLAGS_SVS_IDENT;
+        	if (++Count.identified > Count.max_identified)
+          		Count.max_identified = Count.identified;
+      	}
+      	if (hint & FLAGS_SVS_ADMIN)
+        	victim->svsflags |= FLAGS_SVS_ADMIN;
+
+      } else {
+
+      	hint = -hint;
+      	if (hint & FLAGS_SVS_IDENT) {
+        	victim->svsflags &= ~FLAGS_SVS_IDENT;
+        	if (--Count.identified < 0)
+        		Count.identified = 0;
+      	}
+      	if (hint & FLAGS_SVS_ADMIN)
+        	victim->svsflags &= ~FLAGS_SVS_ADMIN;
+
+      }
+    }
+}
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_svshost.c ircd-hybrid-7-bg/modules/m_svshost.c
--- ircd-hybrid-7rc5/modules/m_svshost.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7-bg/modules/m_svshost.c	Sat May 24 23:27:10 2003
@@ -0,0 +1,206 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, modules/m_svshost.c
+ *   Copyright (C) 1990 Jarkko Oikarinen and
+ *                      University of Oulu, Computing Center
+ *
+ *   See file AUTHORS in IRC package for additional names of
+ *   the programmers. 
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 1, or (at your option)
+ *   any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *   $Id: m_svshost.c,v 1.10 2003/05/24 00:07:45 demond Exp $
+ */
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "channel.h"
+#include "channel_mode.h"
+#include "ircd.h"
+#include "hash.h"
+#include "numeric.h"
+#include "s_conf.h"
+#include "s_serv.h"
+#include "s_user.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "vchannel.h"
+
+static void ms_svshost(struct Client*, struct Client*, int, char**);
+
+struct Message svshost_msgtab = {
+  "SVSHOST", 0, 0, 4, 0, 0, 0,
+  {m_unregistered, m_ignore, ms_svshost, m_ignore}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&svshost_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&svshost_msgtab);
+}
+
+const char *_version = "$Revision: 1.10 $";
+#endif
+/*
+ * ms_svshost - SVSHOST command handler
+ *      parv[0] = sender prefix
+ *      parv[1] = remote server
+ *      parv[2] = client nick
+ *      parv[3] = vhost to spoof
+ */
+static void ms_svshost(struct Client* client_p, struct Client* source_p,
+                      int parc, char* parv[])
+{
+  char *flag;
+  struct Client *victim;
+  struct Channel *chptr, *top_chptr, *banchans[100];
+  static char comment[] = "Spoofing with vhost...";
+  static char urbanned[] = "You are banned";
+  char modebuf[MODEBUFLEN], parabuf[MODEBUFLEN];
+  int hide_or_not;
+  dlink_node *ptr;
+  int i, num = 0;
+  
+  if (ServerInfo.gateway && get_bridge_token(client_p))
+  	return;
+
+  if (hunt_server(client_p, source_p, ":%s SVSHOST %s %s :%s", 
+		  1, parc, parv) != HUNTED_ISME)
+    return;
+
+  if (!find_z_conf(parv[0]))
+    return;
+    
+  victim = find_client(parv[2]);
+  if (victim && !IsServer(victim) && MyConnect(victim))
+  {
+  	extern int introduce_client(struct Client *, struct Client *,
+  		struct User *, char *);
+  
+  	sendto_server(NULL, victim, NULL, NOCAPS, NOCAPS,
+		NOFLAGS, ":%s QUIT :%s", victim->name, comment);
+
+/*	sendto_common_channels_local(victim, ":%s!%s@%s QUIT :%s",
+		victim->name, victim->username, victim->host, comment);*/
+		
+/*	++current_serial;	not needed i suppose */
+
+	if (victim->user->channel.head)
+	for (ptr = victim->user->channel.head; ptr; ptr = ptr->next) {
+		chptr = (struct Channel *)ptr->data;
+		
+		sendto_channel_local_butone(victim, ALL_MEMBERS, 
+			chptr, ":%s!%s@%s QUIT :%s",
+			victim->name, victim->username,
+			victim->host, comment);
+	}
+	
+	strncpy(victim->host, parv[3], HOSTLEN)[HOSTLEN] = 0;
+	
+	sendto_one(victim, ":%s NOTICE %s :*** Notice -- Spoofing your host as %s",
+		me.name, victim->name, victim->host);
+	
+	if (victim->user->channel.head)
+	for (ptr = victim->user->channel.head; ptr; ptr = ptr->next) {
+		chptr = (struct Channel *)ptr->data;
+		
+#ifdef VCHANS
+		top_chptr = RootChan(chptr);
+#else
+		top_chptr = chptr;
+#endif		
+		if (is_banned(chptr, victim) & (CHFL_BAN|CHFL_DENY)) {
+			sendto_one(victim, ":%s KICK %s %s :%s",
+				me.name, top_chptr->chname, victim->name,
+				urbanned);
+			
+			/*remove_user_from_channel(chptr, victim);*/
+			banchans[num++] = chptr;
+			continue;
+		}
+		
+		if (is_chan_op(chptr, victim)) 
+			flag = "+o";
+#ifdef HALFOPS			
+		else if (is_half_op(chptr, victim)) 
+			flag = "+h";
+#endif			
+		else if (is_voiced(chptr, victim))
+			flag = "+v";
+		else flag = "";
+#ifdef REQUIRE_OANDV
+		if (find_user_link(&chptr->chanops_voiced, victim))
+			flag = "+ov";
+#endif
+		sendto_channel_local_butone(victim, ALL_MEMBERS, 
+			chptr, ":%s!%s@%s JOIN :%s",
+			victim->name, victim->username,
+			victim->host, top_chptr->chname);
+			
+#ifdef ANONOPS
+		if (chptr->mode.mode & MODE_HIDEOPS)
+			hide_or_not = ONLY_CHANOPS_HALFOPS;
+		else
+#endif
+			hide_or_not = ALL_MEMBERS;
+			
+		if (flag[0])
+		sendto_channel_local_butone(victim, hide_or_not,
+			chptr, ":%s MODE %s %s %s %s",
+			me.name, top_chptr->chname, flag,
+			victim->name, flag[2]? victim->name : "");		
+	}
+	
+	for (i=0; i < num; i++)
+		remove_user_from_channel(banchans[i], victim);
+	
+	introduce_client(NULL, victim, victim->user, victim->name);
+	
+	victim->lazyLinkClientExists = 0;	/* force introducing to LL servers below... */
+	
+	if (victim->user->channel.head)
+	for (ptr = victim->user->channel.head; ptr; ptr = ptr->next) {
+		chptr = (struct Channel *)ptr->data;
+		
+		if (is_chan_op(chptr, victim)) 
+			flag = "@";
+#ifdef HALFOPS			
+		else if (is_half_op(chptr, victim)) 
+			flag = "%";
+#endif			
+		else if (is_voiced(chptr, victim))
+			flag = "+";
+		else flag = "";
+#ifdef REQUIRE_OANDV
+		if (find_user_link(&chptr->chanops_voiced, victim))
+			flag = "@+";
+#endif
+		channel_modes(chptr, victim, modebuf, parabuf);
+		sendto_server(NULL, victim, chptr, NOCAPS, NOCAPS,
+			LL_ICLIENT|LL_ICHAN, ":%s SJOIN %lu %s %s %s :%s%s",
+			me.name, (unsigned long)chptr->channelts,
+			chptr->chname, modebuf, parabuf, 
+			flag, victim->name);
+	}
+  }
+}
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_svsmisc.c ircd-hybrid-7-bg/modules/m_svsmisc.c
--- ircd-hybrid-7rc5/modules/m_svsmisc.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7-bg/modules/m_svsmisc.c	Sat May 24 23:27:10 2003
@@ -0,0 +1,357 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, modules/m_svsmisc.c
+ *   Copyright (C) 1990 Jarkko Oikarinen and
+ *                      University of Oulu, Computing Center
+ *
+ *   See file AUTHORS in IRC package for additional names of
+ *   the programmers. 
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 1, or (at your option)
+ *   any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *   $Id: m_svsmisc.c,v 1.4 2003/05/24 00:07:45 demond Exp $
+ */
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "channel.h"
+#include "channel_mode.h"
+#include "ircd.h"
+#include "hash.h"
+#include "numeric.h"
+#include "s_conf.h"
+#include "s_serv.h"
+#include "s_user.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+static void ms_svsjoin(struct Client*, struct Client*, int, char**);
+static void ms_svspart(struct Client*, struct Client*, int, char**);
+static void ms_svsmode(struct Client*, struct Client*, int, char**);
+
+static void svsjoin(struct Client *, char *);
+static void svspart(struct Client *, char *);
+
+struct Message svsjoin_msgtab = {
+  "SVSJOIN", 0, 0, 3, 0, 0, 0,
+  {m_unregistered, m_ignore, ms_svsjoin, m_ignore}
+};
+
+struct Message svspart_msgtab = {
+  "SVSPART", 0, 0, 2, 0, 0, 0,
+  {m_unregistered, m_ignore, ms_svspart, m_ignore}
+};
+
+struct Message svsmode_msgtab = {
+  "SVSMODE", 0, 0, 4, 0, 0, 0,
+  {m_unregistered, m_ignore, ms_svsmode, m_ignore}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&svsjoin_msgtab);
+  mod_add_cmd(&svspart_msgtab);
+  mod_add_cmd(&svsmode_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&svsjoin_msgtab);
+  mod_del_cmd(&svspart_msgtab);
+  mod_del_cmd(&svsmode_msgtab);
+}
+
+const char *_version = "$Revision: 1.4 $";
+#endif
+/*
+ * ms_svsjoin - SVSJOIN command handler
+ *      parv[0] = sender prefix
+ *      parv[1] = remote server
+ *      parv[2] = nickname
+ *      parv[3] = channel to join
+ * -or-
+ *      parv[0] = sender prefix
+ *      parv[1] = channel/nick mask
+ *      parv[2] = channel to join 
+ */
+static void ms_svsjoin(struct Client* client_p, struct Client* source_p,
+                      int parc, char* parv[])
+{
+  struct Client *victim;
+  struct Channel *jchan;
+  
+  if (ServerInfo.gateway && get_bridge_token(client_p))
+  	return;
+
+  if (parc > 3) {
+
+  	if (hunt_server(client_p, source_p, ":%s SVSJOIN %s %s :%s", 
+		  1, parc, parv) != HUNTED_ISME)
+    	return;
+
+  	if (!find_z_conf(parv[0]))
+    	return;
+    	
+   	victim = find_client(parv[2]);
+  	if (victim && !IsServer(victim) && MyConnect(victim))
+  		svsjoin(victim, parv[3]);
+   	
+  } else {
+    
+    jchan = hash_find_channel(parv[2]);
+  	sendto_server(client_p, source_p, jchan, CAP_SVS, NOCAPS, LL_ICLIENT|LL_ICHAN,
+				":%s SVSJOIN %s :%s", parv[0], parv[1], parv[2]);
+
+  	if (!find_z_conf(parv[0]))
+		return;
+
+	if (parv[1][0] != '#')
+		do_local_clients(svsjoin, parv[1], parv[2]);
+		
+	else {
+	
+		if (!hash_find_channel(parv[1]))
+			return;
+		do_channel_local(svsjoin, parv[1], parv[2]);
+	}
+  }
+}
+
+/*
+ * ms_svspart - SVSPART command handler
+ *      parv[0] = sender prefix
+ *      parv[1] = remote server
+ *      parv[2] = nickname
+ *      parv[3] = channel to part
+ * -or-
+ *      parv[0] = sender prefix
+ *      parv[1] = channel/nick mask
+ *      parv[2] = channel to part (might be missing if parv[1] is a chan) 
+ */
+static void ms_svspart(struct Client* client_p, struct Client* source_p,
+                      int parc, char* parv[])
+{
+  struct Client *victim;
+  
+  if (ServerInfo.gateway && get_bridge_token(client_p))
+  	return;
+
+  if (parc > 3) {
+
+  	if (hunt_server(client_p, source_p, ":%s SVSPART %s %s :%s", 
+		  1, parc, parv) != HUNTED_ISME)
+    	return;
+
+  	if (!find_z_conf(parv[0]))
+    	return;
+    	
+   	victim = find_client(parv[2]);
+   	if (hash_find_channel(parv[3]))
+  	if (victim && !IsServer(victim) && MyConnect(victim))
+  		svspart(victim, parv[3]);
+   	
+  } else {
+    
+  	sendto_server(client_p, source_p, NULL, CAP_SVS, NOCAPS, LL_ICLIENT,
+				":%s SVSPART %s %s", parv[0], parv[1], (parc > 2)? parv[2] : "");
+
+  	if (!find_z_conf(parv[0]))
+		return;
+		
+	if (parv[1][0] == '#')
+		if (!hash_find_channel(parv[1]))
+			return;
+	if (parc > 2)
+		if (!hash_find_channel(parv[2]))
+			return;
+
+	if (parv[1][0] != '#') {
+	
+		if (parc < 3) return;
+		do_local_clients(svspart, parv[1], parv[2]);
+		
+	} else
+		do_channel_local(svspart, parv[1], (parc > 2)? parv[2] : parv[1]);
+  }
+}
+
+/*
+ * ms_svsmode - SVSMODE command handler
+ *      parv[0] = sender prefix
+ *      parv[1] = remote server
+ *      parv[2] = target nick
+ *      parv[3] = umode change(s)
+ */
+static void ms_svsmode(struct Client* client_p, struct Client* source_p,
+                      int parc, char* parv[])
+{
+	struct Client *victim;
+	
+	if (ServerInfo.gateway && get_bridge_token(client_p))
+		return;
+
+  	if (hunt_server(client_p, source_p, ":%s SVSMODE %s %s :%s", 
+		  1, parc, parv) != HUNTED_ISME)
+    	return;
+
+  	if (!find_z_conf(parv[0]) || !(victim = find_person(parv[2])))
+    	return;
+
+	if (MyConnect(victim)) {
+		char *argv[4];
+	
+		argv[0] = parv[2];
+		argv[1] = parv[2];
+		argv[2] = parv[3];
+		argv[3] = NULL;
+		
+		user_mode(victim, victim, 3, argv);
+	}
+}
+
+static void svsjoin(struct Client *victim, char *chan)
+{
+	int flags = 0;
+	struct Channel *chptr;
+	char modebuf[MODEBUFLEN];
+	char parabuf[MODEBUFLEN];
+
+	if (!IsChannelName(chan) || !check_channel_name(chan) 
+		|| (strlen(chan) > CHANNELLEN))
+		return;
+		
+	modebuf[0] = '+';
+	modebuf[1] = '\0';
+	parabuf[0] = '\0';
+
+	if ((chptr = hash_find_channel(chan))) {
+	
+		if (IsMember(victim, chptr)) return;
+		
+		if (chptr->users == 0)
+			flags = CHFL_CHANOP;
+		else
+			flags = 0;
+			
+	} else {
+	
+		flags = CHFL_CHANOP;
+		
+		if (!ServerInfo.hub && uplink && IsCapable(uplink, CAP_LL)) {
+		
+			sendto_one(uplink, ":%s CBURST %s %s",
+				me.name, chan, victim->name);
+			return;									/* wait for LLJOIN */
+		}
+	
+		if (!(chptr = get_or_create_channel(victim, chan, NULL)))
+			return;
+	}
+	
+	add_user_to_channel(chptr, victim, flags);
+	
+	if (flags & CHFL_CHANOP) {
+	
+		chptr->channelts = CurrentTime;
+		chptr->mode.mode |= MODE_TOPICLIMIT;
+		chptr->mode.mode |= MODE_NOPRIVMSGS;
+		modebuf[0] = '+';
+		modebuf[1] = 'n';
+		modebuf[2] = 't';
+		modebuf[3] = '\0';
+	
+		sendto_server(NULL, victim, chptr, NOCAPS, NOCAPS, LL_ICLIENT,
+			":%s SJOIN %lu %s %s %s:@%s",
+			me.name, (unsigned long) chptr->channelts,
+			chptr->chname, modebuf, parabuf, victim->name);
+			
+	  	sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
+			       victim->name, victim->username,
+			       victim->host, chptr->chname);
+      
+		sendto_channel_local(ONLY_CHANOPS_HALFOPS, chptr, ":%s MODE %s %s %s",
+			       me.name, chptr->chname,
+			       modebuf, parabuf);
+	} else {
+
+		sendto_server(NULL, victim, chptr, NOCAPS, NOCAPS, LL_ICLIENT,
+			":%s SJOIN %lu %s %s %s:%s",
+			me.name, (unsigned long) chptr->channelts,
+			chptr->chname, modebuf, parabuf, victim->name);
+
+		sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
+			       victim->name, victim->username,
+			       victim->host, chptr->chname);
+	}
+	
+	del_invite(chptr, victim);
+
+	if (chptr->topic != NULL) {
+	  	char foo[TOPICLEN]; 
+	  
+	  	strlcpy(foo, chptr->topic, TOPICLEN);
+	  	sendto_one(victim, form_str(victim,RPL_TOPIC),
+		     me.name, victim->name, chptr->chname, 
+		     ConfigFileEntry.totaltrans?
+		     translate(victim, foo) : chptr->topic);
+
+		if (!(chptr->mode.mode & MODE_HIDEOPS) ||
+			(flags & CHFL_CHANOP) || (flags & CHFL_HALFOP))
+            {
+              sendto_one(victim, form_str(victim,RPL_TOPICWHOTIME),
+                         me.name, victim->name, chptr->chname,
+                         chptr->topic_info, chptr->topic_time);
+            }
+          else /* Hide from nonops */
+            {
+              sendto_one(victim, form_str(victim,RPL_TOPICWHOTIME),
+                         me.name, victim->name, chptr->chname,
+                         me.name, chptr->topic_time);
+            }
+	}
+
+	channel_member_names(victim, chptr, chptr->chname, 1);
+	victim->localClient->last_join_time = CurrentTime;
+}
+
+static void svspart(struct Client *victim, char *chan)
+{
+	struct Channel *chptr;
+	static char reason[] = "SVSPART";
+
+	if (!(chptr = hash_find_channel(chan)) || !IsMember(victim, chptr))
+		return;
+
+	sendto_server(NULL, NULL, chptr, CAP_UID, NOCAPS, NOFLAGS,
+                    ":%s PART %s :%s", ID(victim), chptr->chname,
+                    reason);
+	sendto_server(NULL, NULL, chptr, NOCAPS, CAP_UID, NOFLAGS,
+                    ":%s PART %s :%s", victim->name, chptr->chname,
+                    reason);
+                    
+	sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s PART %s :%s",
+                           victim->name,
+                           victim->username,
+                           victim->host,
+                           chptr->chname,
+                           reason);
+                           
+	remove_user_from_channel(chptr, victim);
+	victim->localClient->last_leave_time = CurrentTime;
+}
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_svsnick.c ircd-hybrid-7-bg/modules/m_svsnick.c
--- ircd-hybrid-7rc5/modules/m_svsnick.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7-bg/modules/m_svsnick.c	Sat May 24 23:27:10 2003
@@ -0,0 +1,94 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, modules/m_svsnick.c
+ *   Copyright (C) 1990 Jarkko Oikarinen and
+ *                      University of Oulu, Computing Center
+ *
+ *   See file AUTHORS in IRC package for additional names of
+ *   the programmers. 
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 1, or (at your option)
+ *   any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *   $Id: m_svsnick.c,v 1.3 2003/05/24 00:07:45 demond Exp $
+ */
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "ircd.h"
+#include "hash.h"
+#include "numeric.h"
+#include "s_conf.h"
+#include "s_serv.h"
+#include "s_user.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+static void ms_svsnick(struct Client*, struct Client*, int, char**);
+
+struct Message svsnick_msgtab = {
+  "SVSNICK", 0, 0, 4, 0, 0, 0,
+  {m_unregistered, m_ignore, ms_svsnick, m_ignore}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&svsnick_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&svsnick_msgtab);
+}
+
+const char *_version = "$Revision: 1.3 $";
+#endif
+/*
+ * ms_svsnick - SVSNICK command handler
+ *      parv[0] = sender prefix
+ *      parv[1] = remote server
+ *      parv[2] = old nick
+ *      parv[3] = new nick
+ */
+static void ms_svsnick(struct Client* client_p, struct Client* source_p,
+                      int parc, char* parv[])
+{
+  struct Client *victim;
+  
+  if (ServerInfo.gateway && get_bridge_token(client_p))
+  	return;
+
+  if (hunt_server(client_p, source_p, ":%s SVSNICK %s %s :%s", 
+		  1, parc, parv) != HUNTED_ISME)
+    return;
+
+  if (!find_z_conf(parv[0]))
+    return;
+    
+  victim = find_client(parv[2]);
+  if (victim && !IsServer(victim) && MyConnect(victim))
+  {
+    if (find_client(parv[3]))
+	{
+	  exit_client(victim, victim, &me, "SVSNICK collision");
+	  return;
+	}
+
+    change_local_nick(victim, victim, parv[3]);
+  }
+}
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_testline.c ircd-hybrid-7-bg/modules/m_testline.c
--- ircd-hybrid-7rc5/modules/m_testline.c	Wed Sep 11 18:01:05 2002
+++ ircd-hybrid-7-bg/modules/m_testline.c	Mon Dec 30 23:07:26 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_testline.c,v 1.26 2002/09/11 22:01:05 db Exp $
+ *  $Id: m_testline.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #include "stdinc.h"
@@ -59,7 +59,7 @@
   mod_del_cmd(&testline_msgtab);
 }
  
-const char *_version = "$Revision: 1.26 $";
+const char *_version = "$Revision: 1.1.1.1 $";
 #endif
 /*
  * mo_testline
@@ -132,9 +132,9 @@
 #else
           AF_INET
 #endif
-         );
+         , NULL);
       else
-       aconf = find_address_conf(given_host, given_name, NULL, 0);
+       aconf = find_address_conf(given_host, given_name, NULL, 0, NULL);
                  
       if(aconf)
         {
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_time.c ircd-hybrid-7-bg/modules/m_time.c
--- ircd-hybrid-7rc5/modules/m_time.c	Sat Jul 20 11:51:47 2002
+++ ircd-hybrid-7-bg/modules/m_time.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_time.c,v 1.26 2002/07/20 15:51:47 leeh Exp $
+ *  $Id: m_time.c,v 1.3 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -57,7 +57,7 @@
   mod_del_cmd(&time_msgtab);
 }
 
-const char *_version = "$Revision: 1.26 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 /*
  * m_time
@@ -78,7 +78,7 @@
         return;
     }
 
-  sendto_one(source_p, form_str(RPL_TIME), me.name,
+  sendto_one(source_p, form_str(source_p,RPL_TIME), me.name,
              parv[0], me.name, date(0));
 }
 
@@ -90,7 +90,9 @@
 static void mo_time(struct Client *client_p, struct Client *source_p,
                    int parc, char *parv[])
 {
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+
   if (hunt_server(client_p,source_p,":%s TIME :%s",1,parc,parv) == HUNTED_ISME)
-    sendto_one(source_p, form_str(RPL_TIME), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_TIME), me.name,
                parv[0], me.name, date(0));
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_topic.c ircd-hybrid-7-bg/modules/m_topic.c
--- ircd-hybrid-7rc5/modules/m_topic.c	Mon Jun 10 21:39:38 2002
+++ ircd-hybrid-7-bg/modules/m_topic.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_topic.c,v 1.54 2002/06/11 01:39:38 androsyn Exp $
+ *  $Id: m_topic.c,v 1.4 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -40,6 +40,7 @@
 #include "parse.h"
 #include "modules.h"
 #include "packet.h"
+#include "s_misc.h"
 
 static void m_topic(struct Client*, struct Client*, int, char**);
 static void ms_topic(struct Client*, struct Client*, int, char**);
@@ -62,7 +63,7 @@
   mod_del_cmd(&topic_msgtab);
 }
 
-const char *_version = "$Revision: 1.54 $";
+const char *_version = "$Revision: 1.4 $";
 #endif
 /*
  * m_topic
@@ -105,7 +106,7 @@
         }
         else
         {
-          sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+          sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
                      me.name, parv[0], parv[1]);
           return;
         }
@@ -129,7 +130,7 @@
 	{
 	  if (!IsMember(source_p, chptr))
 	    {
-	      sendto_one(source_p, form_str(ERR_NOTONCHANNEL), me.name, parv[0],
+	      sendto_one(source_p, form_str(source_p,ERR_NOTONCHANNEL), me.name, parv[0],
 			 parv[1]);
 	      return;
 	    }
@@ -137,9 +138,14 @@
 	      is_any_op(chptr,source_p))
 	    {
 	      char topic_info[USERHOST_REPLYLEN]; 
-              ircsprintf(topic_info, "%s!%s@%s",
+
+	      if (NoColorChannel(chptr)) 
+			/*strip_color(parv[2]);*/
+			parv[2] = strip_color(parv[2], 0);
+
+          ircsprintf(topic_info, "%s!%s@%s",
 			 source_p->name, source_p->username, source_p->host);
-              set_channel_topic(chptr, parv[2], topic_info, CurrentTime);
+          set_channel_topic(chptr, parv[2], topic_info, CurrentTime);
 	      
 	      sendto_server(client_p, NULL, chptr, NOCAPS, NOCAPS, NOFLAGS,
                             ":%s TOPIC %s :%s",
@@ -172,30 +178,33 @@
 		}
 	    }
 	  else
-            sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
+            sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED),
                        me.name, parv[0], parv[1]);
 	}
       else  /* only asking  for topic  */
 	{
 	  if (!IsMember(source_p, chptr) && SecretChannel(chptr))
 	    {
-	      sendto_one(source_p, form_str(ERR_NOTONCHANNEL), me.name, parv[0],
+	      sendto_one(source_p, form_str(source_p,ERR_NOTONCHANNEL), me.name, parv[0],
 			 parv[1]);
 	      return;
 	    }
           if (chptr->topic == NULL)
-	    sendto_one(source_p, form_str(RPL_NOTOPIC),
+	    sendto_one(source_p, form_str(source_p,RPL_NOTOPIC),
 		       me.name, parv[0], parv[1]);
           else
 	    {
-              sendto_one(source_p, form_str(RPL_TOPIC),
+	          char foo[TOPICLEN]; strlcpy(foo, chptr->topic, TOPICLEN);
+              sendto_one(source_p, form_str(source_p,RPL_TOPIC),
                          me.name, parv[0],
-                         root_chan->chname, chptr->topic);
+                         root_chan->chname, 
+                         ConfigFileEntry.totaltrans?
+                         translate(source_p, foo) : chptr->topic);
 
                 if(!(chptr->mode.mode & MODE_HIDEOPS) ||
                   is_any_op(chptr,source_p))
                 {
-                  sendto_one(source_p, form_str(RPL_TOPICWHOTIME),
+                  sendto_one(source_p, form_str(source_p,RPL_TOPICWHOTIME),
                              me.name, parv[0], root_chan->chname,
                              chptr->topic_info,
                              chptr->topic_time);
@@ -207,14 +216,14 @@
 	        else if(ConfigServerHide.hide_servers && !MyClient(source_p)
 	                && IsCapable(client_p, CAP_LL) && ServerInfo.hub)
   	        {
-	          sendto_one(source_p, form_str(RPL_TOPICWHOTIME),
+	          sendto_one(source_p, form_str(source_p,RPL_TOPICWHOTIME),
 	  	             me.name, parv[0], root_chan->chname,
 	  		     client_p->name, chptr->topic_time);
                 }
   	        /* just normal topic hiding.. */
 	        else
 	 	{
-                  sendto_one(source_p, form_str(RPL_TOPICWHOTIME),
+                  sendto_one(source_p, form_str(source_p,RPL_TOPICWHOTIME),
                              me.name, parv[0], root_chan->chname,
                              me.name,
                              chptr->topic_time);
@@ -224,7 +233,7 @@
     }
   else
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
                  me.name, parv[0], parv[1]);
     }
 }
@@ -246,6 +255,9 @@
 {
   struct Channel *chptr = NULL;
   
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  cluster_prefix(client_p, parc, parv, 1, 1, 0);
+  
   if (!IsServer(source_p))
   {
     m_topic(client_p, source_p, parc, parv);
@@ -258,25 +270,33 @@
   if (parv[1] && IsChannelName(parv[1]))
     {
       if ((chptr = hash_find_channel(parv[1])) == NULL)
-	return;
+		return;
       
+      /*if ((time_t)atoi(parv[3]) > chptr->topic_time)
+        return;*/
+      if (chptr->topic && *(chptr->topic))
+        return;
+
+      if (NoColorChannel(chptr)) 
+		/*strip_color(parv[4]);*/
+		parv[4] = strip_color(parv[4], 0);
+
       set_channel_topic(chptr, parv[4], parv[2], atoi(parv[3]));
 
       if(ConfigServerHide.hide_servers)
-	{
-	  sendto_channel_local(ALL_MEMBERS,
+		{
+	  		sendto_channel_local(ALL_MEMBERS,
 			       chptr, ":%s TOPIC %s :%s",
 			       me.name,
 			       parv[1],
 			       chptr->topic == NULL ? "" : chptr->topic);
-
-	}
+		}
       else
-	{
-	  sendto_channel_local(ALL_MEMBERS,
+		{
+	  		sendto_channel_local(ALL_MEMBERS,
 			       chptr, ":%s TOPIC %s :%s",
 			       source_p->name,
 			       parv[1], chptr->topic == NULL ? "" : chptr->topic);
-	}
+		}
     }
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_trace.c ircd-hybrid-7-bg/modules/m_trace.c
--- ircd-hybrid-7rc5/modules/m_trace.c	Wed Sep  4 21:10:24 2002
+++ ircd-hybrid-7-bg/modules/m_trace.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_trace.c,v 1.51 2002/09/05 01:10:24 db Exp $
+ *  $Id: m_trace.c,v 1.3 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -40,6 +40,7 @@
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
+#include "s_misc.h"
 
 
 static void m_trace(struct Client *, struct Client *, int, char **);
@@ -68,7 +69,7 @@
   hook_del_event("doing_trace");
   mod_del_cmd(&trace_msgtab);
 }
-const char *_version = "$Revision: 1.51 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 static int report_this_status(struct Client *source_p, struct Client *target_p,int dow,
                               int link_u_p, int link_u_s);
@@ -89,7 +90,7 @@
     tname = parv[1];
   else
     tname = me.name;
-  sendto_one(source_p, form_str(RPL_ENDOFTRACE), me.name, parv[0], tname);
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFTRACE), me.name, parv[0], tname);
 }
 
 
@@ -130,10 +131,10 @@
         
         ac2ptr = next_client_double(GlobalClientList, tname);
         if (ac2ptr)
-          sendto_one(source_p, form_str(RPL_TRACELINK), me.name, looking_for,
+          sendto_one(source_p, form_str(source_p,RPL_TRACELINK), me.name, looking_for,
                      ircd_version, debugmode, tname, ac2ptr->from->name);
         else
-          sendto_one(source_p, form_str(RPL_TRACELINK), me.name, looking_for,
+          sendto_one(source_p, form_str(source_p,RPL_TRACELINK), me.name, looking_for,
                      ircd_version, debugmode, tname, "ac2ptr_is_NULL!!");
         return;
       }
@@ -168,7 +169,7 @@
 
         if (IsOper(target_p))
         {
-          sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
+          sendto_one(source_p, form_str(source_p,RPL_TRACEOPERATOR),
                      me.name, parv[0], class_name, name, 
                      MyOper(source_p) ? ipaddr :
 		     (IsIPSpoof(target_p) ? "255.255.255.255" : ipaddr),
@@ -177,7 +178,7 @@
         }
         else
         {
-          sendto_one(source_p,form_str(RPL_TRACEUSER),
+          sendto_one(source_p,form_str(source_p,RPL_TRACEUSER),
                      me.name, parv[0], class_name, name, 
                      MyOper(source_p) ? ipaddr : 
 		     (IsIPSpoof(target_p) ? "255.255.255.255" : ipaddr),
@@ -186,7 +187,7 @@
         }
       }
       
-      sendto_one(source_p, form_str(RPL_ENDOFTRACE),me.name,
+      sendto_one(source_p, form_str(source_p,RPL_ENDOFTRACE),me.name,
                  parv[0], tname);
       return;
     }
@@ -266,24 +267,24 @@
        * left here in case that should ever change --fl
        */
       if(!cnt)
-	sendto_one(source_p, form_str(RPL_TRACESERVER),
+	sendto_one(source_p, form_str(source_p,RPL_TRACESERVER),
 	           me.name, parv[0], 0, link_s[me.localClient->fd],
 		   link_u[me.localClient->fd], me.name, "*", "*", me.name);
 		   
       /* let the user have some idea that its at the end of the
        * trace
        */
-      sendto_one(source_p, form_str(RPL_ENDOFTRACE),me.name,
+      sendto_one(source_p, form_str(source_p,RPL_ENDOFTRACE),me.name,
                  parv[0],tname);
       return;
     }
     
   for (cltmp = ClassList; doall && cltmp; cltmp = cltmp->next)
     if (Links(cltmp) > 0)
-      sendto_one(source_p, form_str(RPL_TRACECLASS), me.name,
+      sendto_one(source_p, form_str(source_p,RPL_TRACECLASS), me.name,
                  parv[0], ClassName(cltmp), Links(cltmp));
 		 
-  sendto_one(source_p, form_str(RPL_ENDOFTRACE),me.name, parv[0],tname);
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFTRACE),me.name, parv[0],tname);
 }
 
 
@@ -296,6 +297,8 @@
 ms_trace(struct Client *client_p, struct Client *source_p,
 	 int parc, char *parv[])
 {
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+
   if (hunt_server(client_p, source_p, ":%s TRACE %s :%s", 2, parc, parv))
     return;
 
@@ -331,14 +334,14 @@
   switch(target_p->status)
     {
     case STAT_CONNECTING:
-      sendto_one(source_p, form_str(RPL_TRACECONNECTING), me.name,
+      sendto_one(source_p, form_str(source_p,RPL_TRACECONNECTING), me.name,
                  source_p->name, class_name, 
 		 IsOperAdmin(source_p) ? name : target_p->name);
 		   
       cnt++;
       break;
     case STAT_HANDSHAKE:
-      sendto_one(source_p, form_str(RPL_TRACEHANDSHAKE), me.name,
+      sendto_one(source_p, form_str(source_p,RPL_TRACEHANDSHAKE), me.name,
                  source_p->name, class_name, 
                  IsOperAdmin(source_p) ? name : target_p->name);
 		   
@@ -348,7 +351,7 @@
       break;
     case STAT_UNKNOWN:
       /* added time -Taner */
-      sendto_one(source_p, form_str(RPL_TRACEUNKNOWN),
+      sendto_one(source_p, form_str(source_p,RPL_TRACEUNKNOWN),
 		 me.name, source_p->name, class_name, name, ip,
 		 target_p->firsttime ? CurrentTime - target_p->firsttime : -1);
       cnt++;
@@ -363,7 +366,7 @@
 	{
 #ifndef HIDE_SPOOF_IPS
           if (IsAdmin(target_p))
-	    sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
+	    sendto_one(source_p, form_str(source_p,RPL_TRACEOPERATOR),
                        me.name, source_p->name, class_name, name,
                        IsOperAdmin(source_p) ? ip : "255.255.255.255",
                        CurrentTime - target_p->lasttime,
@@ -372,7 +375,7 @@
 	  else 
 #endif
           if (IsOper(target_p))
-	    sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
+	    sendto_one(source_p, form_str(source_p,RPL_TRACEOPERATOR),
 		       me.name, source_p->name, class_name, name, 
 #ifdef HIDE_SPOOF_IPS
 		       IsIPSpoof(target_p) ? "255.255.255.255" : ip,
@@ -384,7 +387,7 @@
 		       (target_p->user)?(CurrentTime - target_p->user->last):0);
 		       
 	  else
-	    sendto_one(source_p, form_str(RPL_TRACEUSER),
+	    sendto_one(source_p, form_str(source_p,RPL_TRACEUSER),
 		       me.name, source_p->name, class_name, name,
 #ifdef HIDE_SPOOF_IPS
                        IsIPSpoof(target_p) ? "255.255.255.255" : ip,
@@ -401,7 +404,7 @@
       if(!IsOperAdmin(source_p))
         name = get_client_name(target_p, MASK_IP);
 
-      sendto_one(source_p, form_str(RPL_TRACESERVER),
+      sendto_one(source_p, form_str(source_p,RPL_TRACESERVER),
 		 me.name, source_p->name, class_name, link_s_p,
 		 link_u_p, name, *(target_p->serv->by) ?
 		 target_p->serv->by : "*", "*",
@@ -410,7 +413,7 @@
       break;
       
     default: /* ...we actually shouldn't come here... --msa */
-      sendto_one(source_p, form_str(RPL_TRACENEWTYPE), me.name,
+      sendto_one(source_p, form_str(source_p,RPL_TRACENEWTYPE), me.name,
 		 source_p->name, name);
       cnt++;
       break;
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_unkline.c ircd-hybrid-7-bg/modules/m_unkline.c
--- ircd-hybrid-7rc5/modules/m_unkline.c	Thu Sep 19 00:22:55 2002
+++ ircd-hybrid-7-bg/modules/m_unkline.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_unkline.c,v 1.48 2002/09/19 04:22:55 bill Exp $
+ *  $Id: m_unkline.c,v 1.4 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -37,6 +37,7 @@
 #include "s_conf.h"
 #include "s_log.h"
 #include "s_misc.h"
+#include "s_serv.h"
 #include "send.h"
 #include "msg.h"
 #include "s_gline.h"
@@ -50,7 +51,7 @@
 
 struct Message msgtabs[] = {
   {"UNKLINE", 0, 0, 2, 0, MFLG_SLOW, 0,
-   {m_unregistered, m_not_oper, m_error, mo_unkline}},
+   {m_unregistered, m_not_oper, mo_unkline, mo_unkline}},
   {"UNDLINE", 0, 0, 2, 0, MFLG_SLOW, 0,
    {m_unregistered, m_not_oper, m_error, mo_undline}}, 
   {"UNGLINE", 0, 0, 2, 0, MFLG_SLOW, 0,
@@ -73,7 +74,7 @@
   mod_del_cmd(&msgtabs[1]);
   mod_del_cmd(&msgtabs[2]);
 }
-const char *_version = "$Revision: 1.48 $";
+const char *_version = "$Revision: 1.4 $";
 #endif
 
 static int flush_write(struct Client *, FBFILE* , char *, char *);
@@ -87,8 +88,8 @@
 **
 **      parv[0] = sender
 **      parv[1] = address to remove
-*
-*
+*		parv[2] = "ON"
+*		parv[3] = remote server
 */
 static void mo_unkline (struct Client *client_p,struct Client *source_p,
                        int parc,char *parv[])
@@ -98,9 +99,15 @@
   char buf[BUFSIZE], buff[BUFSIZE], temppath[BUFSIZE], *user, *host, *p;
   const char  *filename;                /* filename to use for unkline */
   mode_t oldumask;
+  
+  if (IsServer(client_p))
+  if (ServerInfo.gateway && get_bridge_token(client_p))
+  	return;
 
   ircsprintf(temppath, "%s.tmp", ConfigFileEntry.klinefile);
   
+  if (MyClient(source_p)) 
+  {
   if (!IsOperUnkline(source_p))
     {
       sendto_one(source_p,":%s NOTICE %s :You need unkline = yes;",me.name,parv[0]);
@@ -108,10 +115,11 @@
     }
   if (parc < 2)
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, source_p->name, "UNKLINE");
       return;
     }
+  }
 
   if ((host = strchr(parv[1], '@')) || *parv[1] == '*')
     {
@@ -134,6 +142,26 @@
                  me.name, source_p->name);
       return;
     }
+    
+  if ((parc > 3) && !irccmp(parv[2], "ON")) 
+  {
+	sendto_server(NULL, source_p, NULL, CAP_KLN, NOCAPS, LL_ICLIENT,
+                    ":%s UNKLINE %s@%s ON %s",
+                    source_p->name, 
+                    user, host, 
+                    parv[3]);
+
+      /* If we are sending it somewhere that doesnt include us, we stop
+       * else we apply it locally too
+       */
+	if (!match(parv[3], me.name))
+		return;
+
+	if (!MyClient(source_p))
+	if (!find_u_conf((char *)source_p->user->server, 
+		source_p->username, source_p->host))
+		return;
+  }
 
   if (remove_tkline_match(host, user))
     {
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_user.c ircd-hybrid-7-bg/modules/m_user.c
--- ircd-hybrid-7rc5/modules/m_user.c	Fri May 24 19:34:23 2002
+++ ircd-hybrid-7-bg/modules/m_user.c	Mon Mar 10 01:09:02 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_user.c,v 1.23 2002/05/24 23:34:23 androsyn Exp $
+ *  $Id: m_user.c,v 1.2 2003/03/10 06:09:02 demond Exp $
  */
 
 #include "stdinc.h"
@@ -58,7 +58,7 @@
   mod_del_cmd(&user_msgtab);
 }
 
-const char *_version = "$Revision: 1.23 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
 ** mr_user
@@ -78,7 +78,7 @@
 
   if (*parv[4] == '\0')
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, BadPtr(parv[0]) ? "*" : parv[0], "USER");
       return;
     }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_userhost.c ircd-hybrid-7-bg/modules/m_userhost.c
--- ircd-hybrid-7rc5/modules/m_userhost.c	Fri May 24 19:34:23 2002
+++ ircd-hybrid-7-bg/modules/m_userhost.c	Mon Mar 10 01:09:02 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_userhost.c,v 1.37 2002/05/24 23:34:23 androsyn Exp $
+ *  $Id: m_userhost.c,v 1.2 2003/03/10 06:09:02 demond Exp $
  */
 
 #include "stdinc.h"
@@ -57,7 +57,7 @@
   mod_del_cmd(&userhost_msgtab);
 }
 
-const char *_version = "$Revision: 1.37 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 /*
  * m_userhost added by Darren Reed 13/8/91 to aid clients and reduce
@@ -76,7 +76,10 @@
   int cur_len;
   int rl;
 
-  cur_len = ircsprintf(buf,form_str(RPL_USERHOST),me.name, parv[0], "");
+  if (client_p->user) 
+	  client_p->user->known = 1;
+
+  cur_len = ircsprintf(buf,form_str(source_p,RPL_USERHOST),me.name, parv[0], "");
   t = buf + cur_len;
 
   for ( i = 0; i < 5; i++)
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_users.c ircd-hybrid-7-bg/modules/m_users.c
--- ircd-hybrid-7rc5/modules/m_users.c	Fri May 24 19:34:23 2002
+++ ircd-hybrid-7-bg/modules/m_users.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_users.c,v 1.25 2002/05/24 23:34:23 androsyn Exp $
+ *  $Id: m_users.c,v 1.4 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -33,6 +33,7 @@
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
+#include "s_misc.h"
 
 static void m_users(struct Client*, struct Client*, int, char**);
 static void mo_users(struct Client*, struct Client*, int, char**);
@@ -55,7 +56,7 @@
   mod_del_cmd(&users_msgtab);
 }
 
-const char *_version = "$Revision: 1.25 $";
+const char *_version = "$Revision: 1.4 $";
 #endif
 
 /*
@@ -72,12 +73,15 @@
       return;
   }
     
-  sendto_one(source_p, form_str(RPL_LOCALUSERS), me.name, parv[0],
+  sendto_one(source_p, form_str(source_p,RPL_LOCALUSERS), me.name, parv[0],
              ConfigServerHide.hide_servers ? Count.total : Count.local, 
 	     ConfigServerHide.hide_servers ? Count.max_tot : Count.max_loc);
 
-  sendto_one(source_p, form_str(RPL_GLOBALUSERS), me.name, parv[0],
-                 Count.total, Count.max_tot);
+  sendto_one(source_p, form_str(source_p,RPL_GLOBALUSERS), me.name, parv[0],
+             Count.total, Count.max_tot);
+
+  sendto_one(source_p, form_str(source_p,RPL_IDUSERS), me.name, parv[0],
+             Count.identified, Count.max_identified);
 }
 
 /*
@@ -88,17 +92,22 @@
 static void mo_users(struct Client *client_p, struct Client *source_p,
                    int parc, char *parv[])
 {
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+
   if (hunt_server(client_p,source_p,":%s USERS :%s",1,parc,parv) == HUNTED_ISME)
     {
       if(!IsOper(source_p) && ConfigServerHide.hide_servers)
-        sendto_one(source_p, form_str(RPL_LOCALUSERS), me.name, parv[0],
+        sendto_one(source_p, form_str(source_p,RPL_LOCALUSERS), me.name, parv[0],
                    Count.total, Count.max_tot);
       else
-        sendto_one(source_p, form_str(RPL_LOCALUSERS), me.name, parv[0],
+        sendto_one(source_p, form_str(source_p,RPL_LOCALUSERS), me.name, parv[0],
 	           Count.local, Count.max_loc);
 
-      sendto_one(source_p, form_str(RPL_GLOBALUSERS), me.name, parv[0],
+      sendto_one(source_p, form_str(source_p,RPL_GLOBALUSERS), me.name, parv[0],
                  Count.total, Count.max_tot);
+
+      sendto_one(source_p, form_str(source_p,RPL_IDUSERS), me.name, parv[0],
+                 Count.identified, Count.max_identified);
     }
 }
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_version.c ircd-hybrid-7-bg/modules/m_version.c
--- ircd-hybrid-7rc5/modules/m_version.c	Wed Jul 17 19:09:10 2002
+++ ircd-hybrid-7-bg/modules/m_version.c	Sat May 24 23:27:10 2003
@@ -19,10 +19,11 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_version.c,v 1.39 2002/07/17 23:09:10 leeh Exp $
+ *  $Id: m_version.c,v 1.3 2003/05/24 00:07:45 demond Exp $
  */
 
-#include <stdinc.h>
+#include "stdinc.h"
+#include "config.h"
 #include "handlers.h"
 #include "client.h"
 #include "ircd.h"
@@ -34,6 +35,7 @@
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
+#include "s_misc.h"
 
 static char* confopts(struct Client *source_p);
 
@@ -59,7 +61,7 @@
   mod_del_cmd(&version_msgtab);
 }
 
-const char *_version = "$Revision: 1.39 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 /*
  * m_version - VERSION command handler
@@ -74,7 +76,7 @@
   if((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
   {
     /* safe enough to give this on a local connect only */
-    sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,parv[0]);
+    sendto_one(source_p,form_str(source_p,RPL_LOAD2HI),me.name,parv[0]);
     return;
   }
   else
@@ -89,7 +91,7 @@
       return;
   }
   
-  sendto_one(source_p, form_str(RPL_VERSION), me.name,
+  sendto_one(source_p, form_str(source_p,RPL_VERSION), me.name,
                 parv[0], ircd_version, serno, debugmode,
                 me.name, confopts(source_p), serveropts);
                 
@@ -109,7 +111,7 @@
 		  1, parc, parv) != HUNTED_ISME)
     return;
     
-  sendto_one(source_p, form_str(RPL_VERSION), me.name, parv[0], ircd_version, 
+  sendto_one(source_p, form_str(source_p,RPL_VERSION), me.name, parv[0], ircd_version, 
   	     serno, debugmode, me.name, confopts(source_p), serveropts);
 	       
   show_isupport(source_p);
@@ -125,10 +127,12 @@
 static void ms_version(struct Client* client_p, struct Client* source_p,
                       int parc, char* parv[])
 {
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
+
   if (hunt_server(client_p, source_p, ":%s VERSION :%s", 
                   1, parc, parv) == HUNTED_ISME)
   {
-    sendto_one(source_p, form_str(RPL_VERSION), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_VERSION), me.name,
                parv[0], ircd_version, serno, debugmode,
                me.name, confopts(source_p), serveropts);
     show_isupport(source_p);
@@ -144,7 +148,7 @@
  */
 static char* confopts(struct Client *source_p)
 {
-  static char result[15];
+  static char result[32];
   char *p;
   
   result[0] = '\0';
@@ -154,6 +158,12 @@
   *p++ = 'D';
 #endif
 
+  if (ConfigFileEntry.cyrillic)
+    *p++ = 'c';
+
+  if (ConfigChannel.use_denies)
+    *p++ = 'd';
+
   if(ConfigChannel.use_except)
     *p++ = 'e';
     
@@ -168,16 +178,32 @@
       *p++ = 'H';
     }
 
+  if (ServerInfo.gateway && 
+      (!ConfigServerHide.disable_remote || IsOper(source_p)) )
+    {
+      *p++ = 'B';
+    }
+
   if(ConfigChannel.use_invex)
     *p++ = 'I';
 
+  if(ConfigChannel.use_subst)
+    *p++ = 'S';
+
+  if (ConfigFileEntry.drone_kline)
+	*p++ = ConfigFileEntry.drone_batch? 'k' : 'K';
+
   if(ConfigChannel.use_knock)
-    *p++ = 'K';
+    *p++ = 'L';
     
   *p++ = 'M';
 
 #ifdef CRYPT_OPER_PASSWORD
   *p++ = 'p';
+#endif
+
+#ifdef USEPACE
+  *p++ = 'P';
 #endif
 
 #ifdef IGNORE_BOGUS_TS
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_wallops.c ircd-hybrid-7-bg/modules/m_wallops.c
--- ircd-hybrid-7rc5/modules/m_wallops.c	Fri May 24 19:34:23 2002
+++ ircd-hybrid-7-bg/modules/m_wallops.c	Sat May 24 23:27:10 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_wallops.c,v 1.29 2002/05/24 23:34:23 androsyn Exp $
+ *  $Id: m_wallops.c,v 1.4 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
@@ -35,6 +35,7 @@
 #include "parse.h"
 #include "modules.h"
 #include "client.h"
+#include "s_misc.h"
 
 static void ms_wallops(struct Client*, struct Client*, int, char**);
 static void mo_wallops(struct Client*, struct Client*, int, char**);
@@ -57,7 +58,7 @@
   mod_del_cmd(&wallops_msgtab);
 }
  
-const char *_version = "$Revision: 1.29 $";
+const char *_version = "$Revision: 1.4 $";
 #endif
 /*
  * mo_wallops (write to *all* opers currently online)
@@ -73,12 +74,12 @@
   
   if (EmptyString(message))
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "WALLOPS");
       return;
     }
 
-  sendto_wallops_flags(FLAGS_OPERWALL, source_p, "OPERWALL - %s", message);
+  sendto_wallops_flags(FLAGS_OPERWALL, source_p, "[W] %s", message);
   sendto_server(NULL, source_p, NULL, NOCAPS, NOCAPS, LL_ICLIENT,
                 ":%s WALLOPS :%s", parv[0], message);
 }
@@ -92,18 +93,20 @@
                       int parc, char *parv[])
 { 
   char* message;
+  
+  cluster_prefix(client_p, parc, parv, 0, 0, 0);
 
   message = parv[1];
   
   if (EmptyString(message))
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "WALLOPS");
       return;
     }
 
   if(IsClient(source_p))
-    sendto_wallops_flags(FLAGS_OPERWALL, source_p, "OPERWALL - %s", message);
+    sendto_wallops_flags(FLAGS_OPERWALL, source_p, "[W] %s", message);
   else
     sendto_wallops_flags(FLAGS_WALLOP, source_p, "%s", message); 
 
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_watch.c ircd-hybrid-7-bg/modules/m_watch.c
--- ircd-hybrid-7rc5/modules/m_watch.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7-bg/modules/m_watch.c	Mon Mar 10 01:09:02 2003
@@ -0,0 +1,244 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, modules/m_watch.c
+ *   Copyright (C) 1990 Jarkko Oikarinen and
+ *                      University of Oulu, Computing Center
+ *
+ *   See file AUTHORS in IRC package for additional names of
+ *   the programmers. 
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 1, or (at your option)
+ *   any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *   $Id: m_watch.c,v 1.3 2003/03/10 06:09:02 demond Exp $
+ */
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "ircd.h"
+#include "numeric.h"
+#include "s_conf.h"
+#include "s_serv.h"
+#include "s_user.h"
+#include "s_log.h"
+#include "s_misc.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+static void m_watch(struct Client*, struct Client*, int, char**);
+static void show_watch(aClient *cptr, char *name, int rpl1, int rpl2);
+
+struct Message watch_msgtab = {
+  "WATCH", 0, 0, 0, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_watch, m_ignore, m_watch}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&watch_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&watch_msgtab);
+}
+
+const char *_version = "$Revision: 1.3 $";
+#endif
+
+/*
+ *	shamelessly stolen from bahamut				
+ *						-demond
+ */
+
+static char buf[BUFSIZE];
+
+/*
+ * RPL_NOWON   - Online at the moment (Succesfully added to WATCH-list)
+ * RPL_NOWOFF  - Offline at the moement (Succesfully added to WATCH-list)
+ * RPL_WATCHOFF   - Succesfully removed from WATCH-list.
+ * ERR_TOOMANYWATCH - Take a guess :>  Too many WATCH entries.
+ */
+static void show_watch(aClient *cptr, char *name, int rpl1, int rpl2) 
+{
+    aClient *acptr;	
+    
+    if ((acptr = find_person(name)))
+	sendto_one(cptr, form_str(cptr,rpl1), me.name, cptr->name,
+		   acptr->name, acptr->username,
+		   acptr->host, acptr->lasttime);
+    else
+	sendto_one(cptr, form_str(cptr,rpl2), me.name, cptr->name,
+		   name, "*", "*", 0);
+}
+	
+/* m_watch */
+static void m_watch(aClient *cptr, aClient *sptr, int parc, char *parv[]) 
+{
+    aClient  *acptr;
+    char  *s, *p, *user;
+    char def[2] = "l";
+	int i;
+	
+    if (parc < 2) 
+    {
+	/* Default to 'l' - list who's currently online */
+	parc = 2;
+	parv[1] = def;
+    }
+    
+    /*for (p = NULL, s = strtoken(&p, parv[1], ", "); s;
+	 s = strtoken(&p, NULL, ", "))*/
+	/*                                                */
+	/* this works on bahamut only...                  */
+	/*                                  -demond       */
+	/*                                                */
+	for (i = 1, s = parv[1]; i < parc; s = parv[++i])
+    {
+	if ((user = (char *)strchr(s, '!')))
+	    *user++ = '\0'; /* Not used */
+		
+	/*
+	 * Prefix of "+", they want to add a name to their WATCH
+	 * list. 
+	 */
+	if (*s == '+') 
+	{
+	    if (*(s+1)) 
+	    {
+		if (sptr->watches >= MAXWATCH) 
+		{
+		    sendto_one(sptr, form_str(sptr,ERR_TOOMANYWATCH),
+			       me.name, cptr->name, s+1);					
+		    continue;
+		}				
+		add_to_watch_hash_table(s+1, sptr);
+	    }
+	    show_watch(sptr, s+1, RPL_NOWON, RPL_NOWOFF);
+	    continue;
+	}
+	
+	/*
+	 * Prefix of "-", coward wants to remove somebody from their
+	 * WATCH list.  So do it. :-)
+	 */
+	if (*s == '-') 
+	{
+	    del_from_watch_hash_table(s+1, sptr);
+	    show_watch(sptr, s+1, RPL_WATCHOFF, RPL_WATCHOFF);
+	    continue;
+	}
+					
+	/*
+	 * Fancy "C" or "c", they want to nuke their WATCH list and start
+	 * over, so be it.
+	 */
+	if (*s == 'C' || *s == 'c') 
+	{
+	    hash_del_watch_list(sptr);
+	    continue;
+	}
+		
+	/*
+	 * Now comes the fun stuff, "S" or "s" returns a status report of
+	 * their WATCH list.  I imagine this could be CPU intensive if its
+	 * done alot, perhaps an auto-lag on this?
+	 */
+	if (*s == 'S' || *s == 's') 
+	{
+	    Link *lp;
+	    aWatch *anptr;
+	    int  count = 0;
+							
+	    /*
+	     * Send a list of how many users they have on their WATCH list
+	     * and how many WATCH lists they are on.
+	     */
+	    anptr = hash_get_watch(sptr->name);
+	    if (anptr)
+		for (lp = anptr->watch, count = 1; (lp = lp->next); count++);
+	    sendto_one(sptr, form_str(sptr,RPL_WATCHSTAT), me.name, parv[0],
+		       sptr->watches, count);
+			
+	    /*
+	     * Send a list of everybody in their WATCH list. Be careful
+	     * not to buffer overflow.
+	     */
+	    if ((lp = sptr->watch) == NULL) 
+	    {
+		sendto_one(sptr, form_str(sptr,RPL_ENDOFWATCHLIST), me.name, parv[0],
+			   *s);
+		continue;
+	    }
+	    *buf = '\0';
+	    strcpy(buf, lp->value.wptr->nick);
+	    count = strlen(parv[0])+strlen(me.name)+10+strlen(buf);
+	    while ((lp = lp->next)) 
+	    {
+		if (count+strlen(lp->value.wptr->nick)+1 > BUFSIZE - 2) 
+		{
+		    sendto_one(sptr, form_str(sptr,RPL_WATCHLIST), me.name,
+			       parv[0], buf);
+		    *buf = '\0';
+		    count = strlen(parv[0])+strlen(me.name)+10;
+		}
+		strcat(buf, " ");
+		strcat(buf, lp->value.wptr->nick);
+		count += (strlen(lp->value.wptr->nick)+1);
+	    }
+	    sendto_one(sptr, form_str(sptr,RPL_WATCHLIST), me.name, parv[0], buf);
+	    sendto_one(sptr, form_str(sptr,RPL_ENDOFWATCHLIST), me.name, parv[0],
+		       *s);
+	    continue;
+	}
+		
+	/*
+	 * Well that was fun, NOT.  Now they want a list of everybody in
+	 * their WATCH list AND if they are online or offline? Sheesh,
+	 * greedy arn't we?
+	 */
+	if (*s == 'L' || *s == 'l') 
+	{
+	    Link *lp = sptr->watch;
+			
+	    while (lp) 
+	    {
+		if ((acptr = find_person(lp->value.wptr->nick)))
+		    sendto_one(sptr, form_str(sptr,RPL_NOWON), me.name, parv[0],
+			       acptr->name, acptr->username,
+			       acptr->host, acptr->tsinfo);
+		/*
+		 * But actually, only show them offline if its a capital
+		 * 'L' (full list wanted).
+		 */
+		else if (isupper(*s))
+		    sendto_one(sptr, form_str(sptr,RPL_NOWOFF), me.name, parv[0],
+			       lp->value.wptr->nick, "*", "*",
+			       lp->value.wptr->lasttime);
+		lp = lp->next;
+	    }
+			
+	    sendto_one(sptr, form_str(sptr,RPL_ENDOFWATCHLIST), me.name, parv[0],
+		       *s);
+	    continue;
+	}
+	/* Hmm.. unknown prefix character.. Ignore it. :-) */
+    }
+	
+    /*return 0;*/
+}
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_who.c ircd-hybrid-7-bg/modules/m_who.c
--- ircd-hybrid-7rc5/modules/m_who.c	Wed Oct 16 16:52:34 2002
+++ ircd-hybrid-7-bg/modules/m_who.c	Mon Mar 10 01:09:02 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_who.c,v 1.66 2002/10/16 20:52:34 bill Exp $
+ *  $Id: m_who.c,v 1.2 2003/03/10 06:09:02 demond Exp $
  */
 #include "stdinc.h"
 #include "tools.h"
@@ -61,7 +61,7 @@
 {
   mod_del_cmd(&who_msgtab);
 }
-const char *_version = "$Revision: 1.66 $";
+const char *_version = "$Revision: 1.2 $";
 #endif
 static void do_who_on_channel(struct Client *source_p,
 			      struct Channel *chptr, char *real_name,
@@ -112,6 +112,9 @@
   struct Channel *vchan;
 #endif
 
+  if (client_p->user) 
+	  client_p->user->known = 1;
+
   /* See if mask is there, collapse it or return if not there */
 
   if (mask != NULL)
@@ -120,14 +123,14 @@
 
       if (*mask == '\0')
 	{
-	  sendto_one(source_p, form_str(RPL_ENDOFWHO), me.name, parv[0], "*");
+	  sendto_one(source_p, form_str(source_p,RPL_ENDOFWHO), me.name, parv[0], "*");
 	  return;
 	}
     }
   else
     {
       who_global(source_p, mask, server_oper);
-      sendto_one(source_p, form_str(RPL_ENDOFWHO), me.name, parv[0], "*" );
+      sendto_one(source_p, form_str(source_p,RPL_ENDOFWHO), me.name, parv[0], "*" );
       return;
     }
 
@@ -143,7 +146,7 @@
 
       if (!mychannel)
         {
-          sendto_one(source_p, form_str(RPL_ENDOFWHO), me.name, parv[0], "*");
+          sendto_one(source_p, form_str(source_p,RPL_ENDOFWHO), me.name, parv[0], "*");
           return;
         }
 
@@ -160,7 +163,7 @@
 #endif
 	do_who_on_channel(source_p, mychannel, "*", NO, YES);
 
-      sendto_one(source_p, form_str(RPL_ENDOFWHO), me.name, parv[0], "*");
+      sendto_one(source_p, form_str(source_p,RPL_ENDOFWHO), me.name, parv[0], "*");
       return;
     }
 
@@ -199,7 +202,7 @@
 		do_who_on_channel(source_p, chptr, chptr->chname, NO, NO);
 	    }
 	}
-      sendto_one(source_p, form_str(RPL_ENDOFWHO), me.name, parv[0], mask);
+      sendto_one(source_p, form_str(source_p,RPL_ENDOFWHO), me.name, parv[0], mask);
       return;
     }
 
@@ -267,7 +270,7 @@
 	  do_who(source_p, target_p, NULL, "");
 	}
 
-      sendto_one(source_p, form_str(RPL_ENDOFWHO), me.name, parv[0], mask);
+      sendto_one(source_p, form_str(source_p,RPL_ENDOFWHO), me.name, parv[0], mask);
       return;
     }
 
@@ -278,7 +281,7 @@
     who_global(source_p, mask, server_oper);
 
  /* Wasn't a nick, wasn't a channel, wasn't a '*' so ... */
-  sendto_one(source_p, form_str(RPL_ENDOFWHO), me.name, parv[0], mask);
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFWHO), me.name, parv[0], mask);
 }
 
 /* who_common_channel
@@ -570,7 +573,7 @@
 #ifdef ANONOPS
   if(ConfigServerHide.hide_servers)
   {
-    sendto_one(source_p, form_str(RPL_WHOREPLY), me.name, source_p->name,
+    sendto_one(source_p, form_str(source_p,RPL_WHOREPLY), me.name, source_p->name,
 	       (chname) ? (chname) : "*",
 	       target_p->username,
 	       target_p->host, IsOper(source_p) ? target_p->user->server : "*",
@@ -580,7 +583,7 @@
   else
 #endif
   {
-    sendto_one(source_p, form_str(RPL_WHOREPLY), me.name, source_p->name,
+    sendto_one(source_p, form_str(source_p,RPL_WHOREPLY), me.name, source_p->name,
 	       (chname) ? (chname) : "*",
 	       target_p->username,
 	       target_p->host,  target_p->user->server, target_p->name,
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_whois.c ircd-hybrid-7-bg/modules/m_whois.c
--- ircd-hybrid-7rc5/modules/m_whois.c	Tue Oct 29 22:33:23 2002
+++ ircd-hybrid-7-bg/modules/m_whois.c	Sat May 24 23:27:10 2003
@@ -19,10 +19,11 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_whois.c,v 1.83 2002/10/30 03:33:23 bill Exp $
+ *  $Id: m_whois.c,v 1.4 2003/05/24 00:07:45 demond Exp $
  */
 
 #include "stdinc.h"
+#include "fdlist.h"
 #include "tools.h"
 #include "common.h"  
 #include "handlers.h"
@@ -39,7 +40,7 @@
 #include "send.h"
 #include "list.h"
 #include "irc_string.h"
-#include "s_conf.h"
+#include "s_misc.h"
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
@@ -76,7 +77,7 @@
   mod_del_cmd(&whois_msgtab);
 }
 
-const char *_version = "$Revision: 1.83 $";
+const char *_version = "$Revision: 1.4 $";
 #endif
 /*
 ** m_whois
@@ -91,7 +92,7 @@
   
   if (parc < 2 || BadPtr(parv[1]))
   {
-    sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+    sendto_one(source_p, form_str(source_p,ERR_NONICKNAMEGIVEN),
 	       me.name, parv[0]);
     return;
   }
@@ -102,7 +103,7 @@
     if((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime)
     {             
       if(MyClient(source_p))
-	sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,source_p->name);
+	sendto_one(source_p,form_str(source_p,RPL_LOAD2HI),me.name,source_p->name);
       return;
     }
     else
@@ -138,7 +139,7 @@
   /* XXX Need BadPtr */
   if (parc < 2 || BadPtr(parv[1]))
     {
-      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+      sendto_one(source_p, form_str(source_p,ERR_NONICKNAMEGIVEN),
                  me.name, parv[0]);
       return;
     }
@@ -239,9 +240,9 @@
   }
 
   if(found)
-    sendto_one(source_p, form_str(RPL_ENDOFWHOIS), me.name, parv[0], parv[1]);
+    sendto_one(source_p, form_str(source_p,RPL_ENDOFWHOIS), me.name, parv[0], parv[1]);
   else
-    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, parv[0], nick);
+    sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK), me.name, parv[0], nick);
 
   return (0);
 }
@@ -323,10 +324,10 @@
 
   if(target_p->user == NULL)
   {
-    sendto_one(source_p, form_str(RPL_WHOISUSER), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_WHOISUSER), me.name,
 	       source_p->name, name,
 	       target_p->username, target_p->host, target_p->info);
-    sendto_one(source_p, form_str(RPL_WHOISSERVER),
+    sendto_one(source_p, form_str(source_p,RPL_WHOISSERVER),
 	       me.name, source_p->name, name, "<Unknown>",
 	       "*Not On This Net*");
     return (NO);
@@ -388,12 +389,38 @@
   
   a2client_p = find_server(target_p->user->server);
           
-  sendto_one(source_p, form_str(RPL_WHOISUSER), me.name,
+  sendto_one(source_p, form_str(source_p,RPL_WHOISUSER), me.name,
 	 source_p->name, target_p->name,
 	 target_p->username, target_p->host, target_p->info);
   server_name = (char *)target_p->user->server;
 
-  ircsprintf(buf, form_str(RPL_WHOISCHANNELS),
+  if (IsOper(source_p) || (target_p == source_p))
+    sendto_one(source_p, form_str(source_p,RPL_WHOISREALHOST), me.name,
+	       source_p->name, target_p->name,
+	       ServerInfo.network_name, target_p->realhost);
+
+  if (target_p->svsflags && find_services()) 
+    {
+      t = buf; t[0] = 0;
+      
+      if (target_p->svsflags & FLAGS_SVS_IDENT)
+        { ircsprintf(t, "this nick"); t += strlen(t); }
+
+      if (target_p->svsflags & FLAGS_SVS_IDENT &&
+          target_p->svsflags & FLAGS_SVS_ADMIN)
+        { ircsprintf(t, ", "); t += strlen(t); }
+
+      if (target_p->svsflags & FLAGS_SVS_ADMIN)
+        { ircsprintf(t, "services admin"); t += strlen(t); }
+
+      sendto_one(source_p, form_str(source_p,RPL_WHOISSVSHINT), me.name,
+               source_p->name, target_p->name, buf);
+    }
+
+  if (find_z_conf(server_name) && !IsOper(source_p))
+    goto rplserver;
+
+  ircsprintf(buf, form_str(source_p,RPL_WHOISCHANNELS),
 	       me.name, source_p->name, target_p->name, "");
 
   mlen = strlen(buf);
@@ -442,28 +469,60 @@
   if (reply_to_send)
     sendto_one(source_p, "%s", buf);
           
+ rplserver:          
   if ((IsOper(source_p) || !ConfigServerHide.hide_servers) || target_p == source_p)
-    sendto_one(source_p, form_str(RPL_WHOISSERVER),
+    sendto_one(source_p, form_str(source_p,RPL_WHOISSERVER),
 	       me.name, source_p->name, target_p->name, server_name,
 	       a2client_p?a2client_p->info:"*Not On This Net*");
   else
-    sendto_one(source_p, form_str(RPL_WHOISSERVER),
+    sendto_one(source_p, form_str(source_p,RPL_WHOISSERVER),
 	       me.name, source_p->name, target_p->name,
                ServerInfo.network_name,
 	       ServerInfo.network_desc);
 
   if (target_p->user->away)
-    sendto_one(source_p, form_str(RPL_AWAY), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_AWAY), me.name,
 	       source_p->name, target_p->name, target_p->user->away);
 
   if (IsOper(target_p))
-    sendto_one(source_p, form_str(RPL_WHOISOPERATOR),
-	       me.name, source_p->name, target_p->name);
+  	{
+    	sendto_one(source_p, form_str(source_p,RPL_WHOISOPERATOR),
+	    	me.name, source_p->name, target_p->name);
+
+      	if (IsAdmin(target_p))
+        	sendto_one(source_p, form_str(source_p,RPL_WHOISADMIN),
+            	me.name, source_p->name, target_p->name);
+	}
+	
+#ifdef HAVE_LIBCRYPTO
+  if (MyClient(target_p)) {
+  	int fd = target_p->localClient->fd;
+  	fde_t *F = (fd > -1)? &fd_table[fd] : NULL;
+  	
+  	if (F && F->ssl)
+  		sendto_one(source_p, form_str(source_p,RPL_WHOISSSL),
+  			me.name, source_p->name, target_p->name);	
+  }
+#endif
+
+  if (ConfigFileEntry.cyrillic)
+    {
+      char *p;
+      for (p = target_p->name; *p; p++)
+        {
+          if ((unsigned char)*p >= 192)
+            {
+              sendto_one(source_p, form_str(source_p,RPL_WHOISCYRILLIC),
+                         me.name, source_p->name, target_p->name);
+              break;
+            }
+        }
+    }
 
   if (glob || (MyConnect(target_p) && (IsOper(source_p) ||
       !ConfigServerHide.hide_servers)) || (target_p == source_p) )
   {
-    sendto_one(source_p, form_str(RPL_WHOISIDLE),
+    sendto_one(source_p, form_str(source_p,RPL_WHOISIDLE),
 	       me.name, source_p->name, target_p->name,
 	       CurrentTime - target_p->user->last,
 	       target_p->firsttime);
@@ -498,10 +557,16 @@
   /* XXX Need BadPtr */
   if (parc < 2 || BadPtr(parv[1]))
     {
-      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+      sendto_one(source_p, form_str(source_p,ERR_NONICKNAMEGIVEN),
                  me.name, parv[0]);
       return;
     }
+    
+  if (parc > 2) {
+  
+  	cluster_prefix(client_p, parc, parv, 0, 0, 0);
+  	cluster_prefix(client_p, parc, parv, 2, 0, 0);
+  }
 
   if(!IsClient(source_p))
     return;
@@ -524,7 +589,7 @@
       if((target_p = find_server(parv[1])) == NULL)
       {
         /* its not a server either.. theyve sent a bad whois */
-        sendto_one(source_p, form_str(ERR_NOSUCHSERVER), me.name,
+        sendto_one(source_p, form_str(source_p,ERR_NOSUCHSERVER), me.name,
 	           parv[0], parv[1]);
         return;
       }
diff -uNrd -x CVS ircd-hybrid-7rc5/modules/m_whowas.c ircd-hybrid-7-bg/modules/m_whowas.c
--- ircd-hybrid-7rc5/modules/m_whowas.c	Thu Aug 15 11:00:59 2002
+++ ircd-hybrid-7-bg/modules/m_whowas.c	Mon Mar 10 01:09:02 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_whowas.c,v 1.28 2002/08/15 15:00:59 adx Exp $
+ *  $Id: m_whowas.c,v 1.3 2003/03/10 06:09:02 demond Exp $
  */
 
 #include "stdinc.h"
@@ -61,7 +61,7 @@
 {
   mod_del_cmd(&whowas_msgtab);
 }
-const char *_version = "$Revision: 1.28 $";
+const char *_version = "$Revision: 1.3 $";
 #endif
 static int whowas_do(struct Client *client_p, struct Client *source_p,
                      int parc, char *parv[]);
@@ -81,14 +81,14 @@
 
   if (parc < 2)
     {
-      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+      sendto_one(source_p, form_str(source_p,ERR_NONICKNAMEGIVEN),
                  me.name, parv[0]);
       return;
     }
 
   if((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime)
     {
-      sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,source_p->name);
+      sendto_one(source_p,form_str(source_p,RPL_LOAD2HI),me.name,source_p->name);
       return;
     }
   else
@@ -106,7 +106,7 @@
 {
   if (parc < 2)
     {
-      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+      sendto_one(source_p, form_str(source_p,ERR_NONICKNAMEGIVEN),
                  me.name, parv[0]);
       return;
     }
@@ -124,7 +124,7 @@
 
   if (parc < 2)
     {
-      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+      sendto_one(source_p, form_str(source_p,ERR_NONICKNAMEGIVEN),
                  me.name, parv[0]);
       return 0;
     }
@@ -148,18 +148,24 @@
     {
       if (!irccmp(nick, temp->name))
         {
-          sendto_one(source_p, form_str(RPL_WHOWASUSER),
+          sendto_one(source_p, form_str(source_p,RPL_WHOWASUSER),
                      me.name, parv[0], temp->name,
                      temp->username,
                      temp->hostname,
                      temp->realname);
 
+          if (IsOper(source_p))
+    		sendto_one(source_p, form_str(source_p,RPL_WHOISREALHOST), 
+    			me.name, parv[0], temp->name,
+	       		ServerInfo.network_name, 
+	       		temp->realhost);
+
           if (ConfigServerHide.hide_servers && !IsOper(source_p))
-            sendto_one(source_p, form_str(RPL_WHOISSERVER),
+            sendto_one(source_p, form_str(source_p,RPL_WHOISSERVER),
                        me.name, parv[0], temp->name,
                        ServerInfo.network_name, myctime(temp->logoff));
           else
-	    sendto_one(source_p, form_str(RPL_WHOISSERVER),
+	    	sendto_one(source_p, form_str(source_p,RPL_WHOISSERVER),
                        me.name, parv[0], temp->name,
                        temp->servername, myctime(temp->logoff));
           cur++;
@@ -169,9 +175,9 @@
         break;
     }
   if (!found)
-    sendto_one(source_p, form_str(ERR_WASNOSUCHNICK),
+    sendto_one(source_p, form_str(source_p,ERR_WASNOSUCHNICK),
                me.name, parv[0], nick);
 
-  sendto_one(source_p, form_str(RPL_ENDOFWHOWAS), me.name, parv[0], parv[1]);
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFWHOWAS), me.name, parv[0], parv[1]);
   return 0;
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/servlink/Makefile.in ircd-hybrid-7-bg/servlink/Makefile.in
--- ircd-hybrid-7rc5/servlink/Makefile.in	Mon Jun  3 08:15:08 2002
+++ ircd-hybrid-7-bg/servlink/Makefile.in	Mon Dec 30 23:07:26 2002
@@ -1,7 +1,7 @@
 #
 # Makefile.in for servlink/src
 #
-# $Id: Makefile.in,v 1.13 2002/06/03 12:15:08 leeh Exp $
+# $Id: Makefile.in,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
 #
 
 CC              = @CC@
diff -uNrd -x CVS ircd-hybrid-7rc5/servlink/README ircd-hybrid-7-bg/servlink/README
--- ircd-hybrid-7rc5/servlink/README	Sun May 27 15:57:22 2001
+++ ircd-hybrid-7-bg/servlink/README	Mon Dec 30 23:07:26 2002
@@ -1,5 +1,5 @@
 Servlink protocol documentation.
-$Id: README,v 1.4 2001/05/27 19:57:22 davidt Exp $
+$Id: README,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
 --------------
 
 After negotiating an incoming/outgoing server connection, the ircd will
diff -uNrd -x CVS ircd-hybrid-7rc5/servlink/TODO ircd-hybrid-7-bg/servlink/TODO
--- ircd-hybrid-7rc5/servlink/TODO	Sun May 27 15:57:23 2001
+++ ircd-hybrid-7-bg/servlink/TODO	Mon Dec 30 23:07:26 2002
@@ -1,5 +1,5 @@
 Servlink todo list
-$Id: TODO,v 1.5 2001/05/27 19:57:23 davidt Exp $
+$Id: TODO,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
 ------------------
 
 Fix any bugs that come up
diff -uNrd -x CVS ircd-hybrid-7rc5/servlink/control.c ircd-hybrid-7-bg/servlink/control.c
--- ircd-hybrid-7rc5/servlink/control.c	Mon Jun 11 15:19:57 2001
+++ ircd-hybrid-7-bg/servlink/control.c	Mon Dec 30 23:07:26 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: control.c,v 1.4 2001/06/11 19:19:57 androsyn Exp $
+ *   $Id: control.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #include "setup.h"                                                   
diff -uNrd -x CVS ircd-hybrid-7rc5/servlink/control.h ircd-hybrid-7-bg/servlink/control.h
--- ircd-hybrid-7rc5/servlink/control.h	Sat May 26 19:56:46 2001
+++ ircd-hybrid-7-bg/servlink/control.h	Mon Dec 30 23:07:26 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: control.h,v 1.4 2001/05/26 23:56:46 davidt Exp $
+ *   $Id: control.h,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #ifndef INCLUDED_servlink_control_h
diff -uNrd -x CVS ircd-hybrid-7rc5/servlink/io.c ircd-hybrid-7-bg/servlink/io.c
--- ircd-hybrid-7rc5/servlink/io.c	Thu Oct  4 17:22:10 2001
+++ ircd-hybrid-7-bg/servlink/io.c	Mon Dec 30 23:07:26 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: io.c,v 1.28 2001/10/04 21:22:10 androsyn Exp $
+ *   $Id: io.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #include "setup.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/servlink/io.h ircd-hybrid-7-bg/servlink/io.h
--- ircd-hybrid-7rc5/servlink/io.h	Thu Oct  4 17:22:10 2001
+++ ircd-hybrid-7-bg/servlink/io.h	Mon Dec 30 23:07:26 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: io.h,v 1.9 2001/10/04 21:22:10 androsyn Exp $
+ *   $Id: io.h,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #ifndef INCLUDED_servlink_io_h
diff -uNrd -x CVS ircd-hybrid-7rc5/servlink/servlink.c ircd-hybrid-7-bg/servlink/servlink.c
--- ircd-hybrid-7rc5/servlink/servlink.c	Thu Jul 11 23:30:01 2002
+++ ircd-hybrid-7-bg/servlink/servlink.c	Mon Dec 30 23:07:26 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: servlink.c,v 1.24 2002/07/12 03:30:01 joant Exp $
+ *   $Id: servlink.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #include "setup.h"                                                   
diff -uNrd -x CVS ircd-hybrid-7rc5/servlink/servlink.h ircd-hybrid-7-bg/servlink/servlink.h
--- ircd-hybrid-7rc5/servlink/servlink.h	Fri Jan  4 21:15:38 2002
+++ ircd-hybrid-7-bg/servlink/servlink.h	Mon Dec 30 23:07:26 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: servlink.h,v 1.20 2002/01/05 02:15:38 db Exp $
+ *   $Id: servlink.h,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #ifndef INCLUDED_servlink_servlink_h
diff -uNrd -x CVS ircd-hybrid-7rc5/src/Makefile.in ircd-hybrid-7-bg/src/Makefile.in
--- ircd-hybrid-7rc5/src/Makefile.in	Thu Sep  5 10:06:15 2002
+++ ircd-hybrid-7-bg/src/Makefile.in	Mon Dec 30 23:07:26 2002
@@ -1,7 +1,7 @@
 #
 # Makefile.in for ircd/src
 #
-# $Id: Makefile.in,v 7.113 2002/09/05 14:06:15 db Exp $
+# $Id: Makefile.in,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
 #
 CC		= @CC@
 INSTALL		= @INSTALL@
diff -uNrd -x CVS ircd-hybrid-7rc5/src/adns.c ircd-hybrid-7-bg/src/adns.c
--- ircd-hybrid-7rc5/src/adns.c	Tue Oct 29 21:56:18 2002
+++ ircd-hybrid-7-bg/src/adns.c	Mon Mar 10 01:09:03 2003
@@ -20,7 +20,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: adns.c,v 7.48 2002/10/30 02:56:18 androsyn Exp $
+ *  $Id: adns.c,v 1.2 2003/03/10 06:09:03 demond Exp $
  */
 
 #include "stdinc.h"
@@ -53,7 +53,7 @@
   for(x = 0; x < dns_state->nservers; x++)    
   {
     inetntop(AF_INET, &dns_state->servers[x].addr.s_addr, buf, 16);
-    sendto_one(source_p, form_str(RPL_STATSALINE), me.name, source_p->name, buf); 
+    sendto_one(source_p, form_str(source_p,RPL_STATSALINE), me.name, source_p->name, buf); 
   }
 }
 
diff -uNrd -x CVS ircd-hybrid-7rc5/src/balloc.c ircd-hybrid-7-bg/src/balloc.c
--- ircd-hybrid-7rc5/src/balloc.c	Sat Aug  3 18:42:26 2002
+++ ircd-hybrid-7-bg/src/balloc.c	Thu Jan 30 10:28:59 2003
@@ -25,7 +25,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: balloc.c,v 7.38 2002/08/03 22:42:26 androsyn Exp $
+ *  $Id: balloc.c,v 1.2 2003/01/30 15:28:59 demond Exp $
  */
 
 /* 
@@ -120,7 +120,7 @@
 
   if (zero_fd < 0)
     outofmemory();
-  fd_open(zero_fd, FD_FILE, "Anonymous mmap()");
+  fd_open(zero_fd, FD_FILE, "Anonymous mmap()", NULL);
 }
 
 /*
diff -uNrd -x CVS ircd-hybrid-7rc5/src/channel.c ircd-hybrid-7-bg/src/channel.c
--- ircd-hybrid-7rc5/src/channel.c	Tue Oct 29 14:38:21 2002
+++ ircd-hybrid-7-bg/src/channel.c	Mon Mar 10 01:09:04 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: channel.c,v 7.342 2002/10/29 19:38:21 bill Exp $
+ *  $Id: channel.c,v 1.4 2003/03/10 06:09:04 demond Exp $
  */
 
 #include "stdinc.h"
@@ -44,7 +44,7 @@
 #include "memory.h"
 #include "balloc.h"
 #include "resv.h"
-
+#include "fdlist.h"
 
 #include "s_log.h"
 
@@ -65,6 +65,8 @@
 static int check_banned(struct Channel *chptr, struct Client *who,
                                                 char *s, char *s2);
 
+void clear_pace_queues(struct Channel *);
+
 static char buf[BUFSIZE];
 static char modebuf[MODEBUFLEN], parabuf[MODEBUFLEN];
 
@@ -254,6 +256,19 @@
     }
   }
 
+  DLINK_FOREACH_SAFE(ptr, next_ptr, who->user->repeat.head)
+  {
+	  struct Repeat *repeatptr = ptr->data;
+
+	  if (repeatptr->chptr == chptr) 
+	  {
+		  MyFree(repeatptr->text); MyFree(repeatptr);
+		  dlinkDelete(ptr, &who->user->repeat);
+		  free_dlink_node(ptr);
+		  break;
+	  }
+  }
+
   who->user->joined--;
 
 #ifdef VCHANS
@@ -287,7 +302,7 @@
   int data_to_send = 0;
   char *t;                      /* temp char pointer */
 
-  cur_len = mlen = ircsprintf(buf, ":%s SJOIN %lu %s %s %s:", me.name,
+  cur_len = mlen = ircsprintf(buf, ":%s SJOIN %lu %s %s %s :", me.name,
                    (unsigned long)chptr->channelts,
                    chptr->chname, lmodebuf, lparabuf);
 
@@ -358,11 +373,17 @@
 
   send_mode_list(client_p, chptr->chname, &chptr->banlist, 'b', 0);
 
+  if (IsCapable(client_p, CAP_DENY))
+    send_mode_list(client_p, chptr->chname, &chptr->denylist, 'd', 0);
+
   if (IsCapable(client_p, CAP_EX))
     send_mode_list(client_p, chptr->chname, &chptr->exceptlist, 'e', 0);
 
   if (IsCapable(client_p, CAP_IE))
     send_mode_list(client_p, chptr->chname, &chptr->invexlist, 'I', 0);
+
+  if (IsCapable(client_p, CAP_SW))
+    send_mode_list(client_p, chptr->chname, &chptr->substlist, 'w', 0);
 }
 
 /*
@@ -373,7 +394,7 @@
  *              - char flag flagging type of mode i.e. 'b' 'e' etc.
  *              - clear (remove all current modes, for ophiding, etc)
  * output       - NONE
- * side effects - sends +b/+e/+I
+ * side effects - sends +b/+e/+w/+I
  *
  */
 static void
@@ -428,6 +449,45 @@
     sendto_one(client_p, "%s%s %s", buf, mbuf, pbuf);
 }
 
+void
+clear_pace_queues(struct Channel *chptr)
+{
+  struct Pace *pace;
+
+  while (chptr->joint)
+    {
+      pace = chptr->joint;
+      chptr->joint = pace->next;
+      MyFree(pace);
+    }
+  chptr->joinh = NULL; chptr->joins = 0;
+
+  while (chptr->partt)
+    {
+      pace = chptr->partt;
+      chptr->partt = pace->next;
+      MyFree(pace);
+    }
+  chptr->parth = NULL; chptr->parts = 0;
+
+  while (chptr->msgt)
+    {
+      pace = chptr->msgt;
+      chptr->msgt = pace->next;
+      MyFree(pace->text);
+      MyFree(pace);
+    }
+  chptr->msgh = NULL; chptr->msgs = 0;
+  
+  while (chptr->sendt)
+    {
+      pace = chptr->sendt;
+      chptr->sendt = pace->next;
+      MyFree(pace->text);
+      MyFree(pace);
+    }
+  chptr->sendh = NULL; chptr->sends = 0;
+}
 
 /*
  * check_channel_name
@@ -572,13 +632,16 @@
   free_channel_list(&chptr->banlist);
   free_channel_list(&chptr->exceptlist);
   free_channel_list(&chptr->invexlist);
+  free_channel_list(&chptr->substlist);
 
   /* Free the topic */
   free_topic(chptr);
   /* This should be redundant at this point but JIC */
-  chptr->banlist.head = chptr->exceptlist.head = chptr->invexlist.head = NULL;
+  chptr->banlist.head = chptr->exceptlist.head = 
+  chptr->invexlist.head = chptr->substlist.head = NULL;
 
-  chptr->banlist.tail = chptr->exceptlist.tail = chptr->invexlist.tail = NULL;
+  chptr->banlist.tail = chptr->exceptlist.tail = 
+  chptr->invexlist.tail = chptr->substlist.tail = NULL;
 
   if (chptr->prevch)
     chptr->prevch->nextch = chptr->nextch;
@@ -587,6 +650,7 @@
   if (chptr->nextch)
     chptr->nextch->prevch = chptr->prevch;
 
+  clear_pace_queues(chptr);
 
   del_from_channel_hash_table(chptr->chname, chptr);
   if (ServerInfo.hub == 1)
@@ -685,7 +749,7 @@
   /* Find users on same channel (defined by chptr) */
   if (ShowChannel(source_p, chptr))
   {
-    ircsprintf(lbuf, form_str(RPL_NAMREPLY),
+    ircsprintf(lbuf, form_str(source_p,RPL_NAMREPLY),
                me.name, source_p->name, channel_pub_or_secret(chptr));
     mlen = strlen(lbuf);
     ircsprintf(lbuf + mlen, " %s :", name_of_channel);
@@ -761,7 +825,7 @@
   }
 
   if (show_eon)
-    sendto_one(source_p, form_str(RPL_ENDOFNAMES), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_ENDOFNAMES), me.name,
                source_p->name, name_of_channel);
 }
 #else
@@ -795,7 +859,7 @@
 
     set_channel_mode_flags(ptr_flags, chptr, source_p);
     is_member = IsMember(source_p, chptr);
-    ircsprintf(lbuf, form_str(RPL_NAMREPLY),
+    ircsprintf(lbuf, form_str(source_p,RPL_NAMREPLY),
 	       me.name, source_p->name, channel_pub_or_secret(chptr));
 
     mlen = strlen(lbuf);
@@ -835,12 +899,11 @@
   }
 
   if(show_eon)
-    sendto_one(source_p, form_str(RPL_ENDOFNAMES), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_ENDOFNAMES), me.name,
 	       source_p->name, name_of_channel);
 }
 #endif /* ANONOPS */     
       
-
 /*
  * channel_pub_or_secret
  *
@@ -1006,8 +1069,12 @@
 {
   dlink_node *ban;
   dlink_node *except;
+  dlink_node *deny;
   struct Ban *actualBan = NULL;
   struct Ban *actualExcept = NULL;
+  struct Ban *actualDeny = NULL;
+  struct Channel *mychptr;
+  dlink_node *chan;
 
   DLINK_FOREACH(ban, chptr->banlist.head)
   {
@@ -1020,7 +1087,23 @@
       actualBan = NULL;
   }
 
-  if ((actualBan != NULL) && ConfigChannel.use_except)
+  DLINK_FOREACH(deny, chptr->denylist.head)
+  {
+    actualDeny = deny->data;
+    if (match(actualDeny->banstr, who->info))
+    	break;
+    if (IsPerson(who))
+    DLINK_FOREACH(chan, who->user->channel.head)
+    {
+    	mychptr = chan->data;
+    	if (match(actualDeny->banstr, mychptr->chname))
+    		goto brk;
+    }
+    actualDeny = NULL;
+  }
+brk:
+
+  if ((actualBan || actualDeny) && ConfigChannel.use_except)
   {
     DLINK_FOREACH(except, chptr->exceptlist.head)
     {
@@ -1035,7 +1118,7 @@
     }
   }
 
-  return ((actualBan ? CHFL_BAN : 0));
+  return ((actualBan ? CHFL_BAN : (actualDeny ? CHFL_DENY : 0)));
 }
 
 /* small series of "helper" functions */
@@ -1055,6 +1138,7 @@
   struct Ban *invex = NULL;
   char src_host[NICKLEN + USERLEN + HOSTLEN + 6];
   char src_iphost[NICKLEN + USERLEN + HOSTLEN + 6];
+  int banned;
 
   assert(source_p->localClient != NULL);
 
@@ -1063,8 +1147,11 @@
   ircsprintf(src_iphost,"%s!%s@%s", source_p->name, source_p->username,
 	     source_p->localClient->sockhost);
 
-  if ((check_banned(chptr, source_p, src_host, src_iphost)) == CHFL_BAN)
+  banned = check_banned(chptr, source_p, src_host, src_iphost);
+  if (banned == CHFL_BAN)
     return (ERR_BANNEDFROMCHAN);
+  else if (banned == CHFL_DENY)
+  	return (ERR_DENIEDFROMCHAN);
 
   if (chptr->mode.mode & MODE_INVITEONLY)
   {
@@ -1094,6 +1181,37 @@
   if (chptr->mode.limit && chptr->users >= chptr->mode.limit)
     return (ERR_CHANNELISFULL);
 
+  if (RegNicksOnlyChannel(chptr) && !(source_p->svsflags & FLAGS_SVS_IDENT))
+    return (ERR_REGNICKSCHAN);
+
+  if (ConfigFileEntry.cyrillic && NoCyrNicksChannel(chptr))
+  {
+    char *p;
+    for (p = source_p->name; *p; p++)
+	{
+	  if ((unsigned char)*p >= 192)
+	  {
+	    return (ERR_NOCYRNICKCHAN);
+	    break;
+	  }
+	}
+  }
+  
+  if (SSLonlyChannel(chptr)) 
+  {
+#ifdef HAVE_LIBCRYPTO
+  	if (MyClient(source_p)) {
+  		int fd = source_p->localClient->fd;
+  		fde_t *F = (fd > -1)? &fd_table[fd] : NULL;
+  	
+  		if (F && !F->ssl)
+  			return (ERR_SSLONLYCHAN);
+  	}
+#else
+	return (ERR_SSLONLYCHAN);	/* deny everyone on a non SSL-enabled server */
+#endif  
+  }
+
   return 0;
 }
 
@@ -1192,7 +1310,6 @@
   return (0);
 }
 
-
 /*
  * can_send
  *
@@ -1222,8 +1339,11 @@
   if (chptr->mode.mode & MODE_MODERATED)
     return (CAN_SEND_NO);
 
+  if (RegsMaySpeakChannel(chptr) && !(source_p->svsflags & FLAGS_SVS_IDENT))
+    return CAN_SEND_NOTREG;
+  
   if (ConfigChannel.quiet_on_ban && MyClient(source_p) &&
-      (is_banned(chptr, source_p) == CHFL_BAN))
+      (is_banned(chptr, source_p) & (CHFL_BAN|CHFL_DENY)))
   {
     return (CAN_SEND_NO);
   }
@@ -1399,3 +1519,171 @@
   }
 }
 
+/*
+ * add to channel pace queues, join or part
+ *									-demond
+ */
+void add_pace(struct Channel *chptr, struct Client *client_p, 
+		      char *chname, int join, int shownames)
+{
+  struct Pace *pace = MyMalloc(sizeof(struct Pace) + strlen(chname));
+
+  strcpy(pace->nick, client_p->name);
+  strcpy(pace->user, client_p->username);
+  strcpy(pace->host, client_p->host);
+  strcpy(pace->chan, chname);
+
+  pace->next = NULL;
+  pace->shownames = shownames;
+
+  if (join)
+    {
+      if (chptr->joinh)
+		chptr->joinh->next = pace;
+      chptr->joinh = pace;
+      if (!chptr->joint)
+		chptr->joint = pace;
+
+      chptr->joins++;
+    }
+  else
+    {
+      if (chptr->parth)
+		chptr->parth->next = pace;
+      chptr->parth = pace;
+      if (!chptr->partt)
+		chptr->partt = pace;
+
+      chptr->parts++;
+    }
+}
+
+/*
+ * add to channel PRIVMSG/NOTICE pace queue
+ *									-demond										
+ */
+void add_pace_msg(struct Channel *chptr, 
+		  struct Client *client_p, struct Client *source_p,
+		  char *command, char *text)
+{
+  struct Pace *pace = MyMalloc(sizeof(struct Pace) + strlen(chptr->chname));
+
+  strcpy(pace->nick, command);
+  strcpy(pace->user, client_p? client_p->name : "can this be NULL?");
+  strcpy(pace->host, source_p->name);
+  strcpy(pace->chan, chptr->chname);
+
+  pace->next = NULL;
+  pace->text = MyMalloc(strlen(text) + 1);
+  strcpy(pace->text, text);
+
+  if (chptr->msgh)
+    chptr->msgh->next = pace;
+  chptr->msgh = pace;
+  if (!chptr->msgt)
+    chptr->msgt = pace;
+
+  chptr->msgs++;
+}
+
+/*
+ * this will flush out pace queues every PACE_CHANNELS_TIME secs
+ *														-demond
+ */
+void pace_channels(void *blah)
+{
+  struct Channel *chptr;
+
+  for (chptr = GlobalChannelList; chptr; chptr = chptr->nextch)
+    {
+      if (!PaceChannel(chptr))
+		continue;
+
+      if (chptr->joins)
+		{
+	  		struct Pace *pace = chptr->joint;
+	  		struct Client *client_p = find_client(pace->nick);
+
+	  		sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
+			   pace->nick,
+			   pace->user,
+			   pace->host,
+			   pace->chan);
+	  		if (client_p && pace->shownames)
+	    		channel_member_names(client_p, chptr, pace->chan, 1);
+
+	  		chptr->joint = pace->next;
+	  		if (!pace->next)
+	    		chptr->joinh = NULL;
+	  		MyFree(pace);
+
+	  		chptr->joins--;
+		}
+
+      if (chptr->parts)
+		{
+	  		struct Pace *pace = chptr->partt;
+	  		struct Client *client_p = find_client(pace->nick);
+
+	  		sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s PART :%s",
+			   pace->nick,
+			   pace->user,
+			   pace->host,
+			   pace->chan);
+	  		if (client_p)
+	    		sendto_one(client_p, ":%s!%s@%s PART :%s",
+			   		pace->nick,
+			   		pace->user,
+			   		pace->host,
+			   		pace->chan);
+
+	  		chptr->partt = pace->next;
+	  		if (!pace->next)
+	    		chptr->parth = NULL;
+	  		MyFree(pace);
+
+	  		chptr->parts--;
+		}
+
+      if (chptr->msgs)
+		{
+	  		struct Pace *pace = chptr->msgt;
+	  		struct Client *client_p = find_client(pace->user);
+	  		struct Client *source_p = find_client(pace->host);
+	  		struct Channel *vchan = hash_find_channel(pace->chan);
+
+	  		if (client_p && source_p && vchan)
+	    		sendto_channel_butone(client_p, source_p, vchan,
+                                  pace->nick, ":%s", pace->text);
+
+	  		chptr->msgt = pace->next;
+	  		if (!pace->next)
+	    		chptr->msgh = NULL;
+	  		MyFree(pace->text);
+	  		MyFree(pace);
+
+	  		chptr->msgs--;
+		}
+
+      if (chptr->sends)
+		{
+	  		struct Pace *pace = chptr->sendt;
+	  		struct Channel *vchan = hash_find_channel(pace->chan);
+
+	  		if (vchan)
+	    		sendto_chanlists_local(vchan, pace->text, pace->shownames);
+
+	  		chptr->sendt = pace->next;
+	  		if (!pace->next)
+	    		chptr->sendh = NULL;
+	  		MyFree(pace->text);
+	  		MyFree(pace);
+
+	  		chptr->sends--;
+		}
+    }
+
+  /* autorescheduled 
+  eventAdd("pace_channels", pace_channels, NULL, PACE_CHANNELS_TIME);
+  */
+}
diff -uNrd -x CVS ircd-hybrid-7rc5/src/channel_mode.c ircd-hybrid-7-bg/src/channel_mode.c
--- ircd-hybrid-7rc5/src/channel_mode.c	Sat Oct 12 00:33:31 2002
+++ ircd-hybrid-7-bg/src/channel_mode.c	Thu Mar 13 20:58:21 2003
@@ -19,12 +19,12 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: channel_mode.c,v 7.64 2002/10/12 04:33:31 db Exp $
+ *  $Id: channel_mode.c,v 1.3 2003/03/13 16:34:05 demond Exp $
  */
 
 #include "stdinc.h"
 #include "setup.h"
-
+#include "config.h"
 #include "tools.h"
 #include "channel.h"
 #include "channel_mode.h"
@@ -67,6 +67,7 @@
 static char *fix_key(char *);
 static char *fix_key_old(char *);
 
+extern void clear_pace_queues(struct Channel *);
 
 static void chm_nosuch(struct Client *, struct Client *,
                        struct Channel *, int, int *, char **, int *, int,
@@ -110,6 +111,14 @@
                       int, int *, char **, int *, int, int, char, void *,
                       const char *chname);
 
+static void chm_subst(struct Client *, struct Client *, struct Channel *,
+                      int, int *, char **, int *, int, int, char, void *,
+                      const char *chname);
+
+static void chm_deny(struct Client *, struct Client *, struct Channel *,
+                     int, int *, char **, int *, int, int, char, void *,
+                     const char *chname);
+
 #ifdef ANONOPS
 static void chm_hideops(struct Client *, struct Client *, struct Channel *,
                         int, int *, char **, int *, int, int, char, void *,
@@ -150,7 +159,8 @@
 static int mode_limit;		/* number of modes set other than simple */
 static int simple_modes_mask;	/* bit mask of simple modes already set */
 
-static int channel_capabs[] = { CAP_HOPS, CAP_AOPS, CAP_EX, CAP_IE, CAP_UID };
+static int channel_capabs[] = { CAP_HOPS, CAP_AOPS, CAP_EX, 
+								CAP_IE, CAP_SW, CAP_DENY, CAP_UID };
 
 #define NCHCAPS         (sizeof(channel_capabs)/sizeof(int))
 #define NCHCAP_COMBOS   (1 << NCHCAPS)
@@ -207,7 +217,7 @@
   {
     if (MyClient(client_p))
     {
-      sendto_one(client_p, form_str(ERR_BANLISTFULL),
+      sendto_one(client_p, form_str(client_p,ERR_BANLISTFULL),
                  me.name, client_p->name, chptr->chname, banid);
       return 0;
     }
@@ -227,6 +237,12 @@
     case CHFL_INVEX:
       list = &chptr->invexlist;
       break;
+    case CHFL_SUBST:
+      list = &chptr->substlist;
+      break;
+    case CHFL_DENY:
+      list = &chptr->denylist;
+      break;
     default:
       sendto_realops_flags(FLAGS_ALL, L_ALL,
                            "add_id() called with unknown ban type %d!", type);
@@ -303,6 +319,12 @@
     case CHFL_INVEX:
       list = &chptr->invexlist;
       break;
+    case CHFL_SUBST:
+      list = &chptr->substlist;
+      break;
+    case CHFL_DENY:
+      list = &chptr->denylist;
+      break;
     default:
       sendto_realops_flags(FLAGS_ALL, L_ALL,
                            "del_id() called with unknown ban type %d!", type);
@@ -495,6 +517,23 @@
   if (chptr->mode.mode & MODE_HIDEOPS)
     *mbuf++ = 'a';
 #endif
+  if (chptr->mode.mode & MODE_NOCOLOR)
+    *mbuf++ = 'c';
+  if (chptr->mode.mode & MODE_REGCHAN)
+    *mbuf++ = 'r';
+  if (chptr->mode.mode & MODE_PACE)
+    *mbuf++ = 'x';
+  if (chptr->mode.mode & MODE_NOREPEAT)
+    *mbuf++ = 'z';
+  if (chptr->mode.mode & MODE_REGNICKS)
+    *mbuf++ = 'R';
+  if (chptr->mode.mode & MODE_REGSPEAK)
+    *mbuf++ = 'M';
+  if (chptr->mode.mode & MODE_CYRNICKS)
+    *mbuf++ = 'C';
+  if (chptr->mode.mode & MODE_SSLONLY)
+    *mbuf++ = 'S';
+
   if (chptr->mode.limit)
   {
     *mbuf++ = 'l';
@@ -686,6 +725,9 @@
 #define SM_ERR_RESTRICTED       0x00000080      /* Restricted chanop */
 #define SM_ERR_RPL_I            0x00000100
 #define SM_ERR_RPL_D            0x00000200
+#define SM_ERR_NOTSERVICES      0x00000400      /* not from services client */
+#define SM_ERR_CANTDEOPSERV		0x00000800		/* can't deop service bots */
+#define SM_ERR_RPL_W			0x00001000
 
 /* Now lets do some stuff to keep track of what combinations of
  * servers exist...
@@ -794,7 +836,7 @@
   if (*errors & SM_ERR_UNKNOWN)
     return;
   *errors |= SM_ERR_UNKNOWN;
-  sendto_one(source_p, form_str(ERR_UNKNOWNMODE), me.name, source_p->name, c);
+  sendto_one(source_p, form_str(source_p,ERR_UNKNOWNMODE), me.name, source_p->name, c);
 }
 
 static void
@@ -806,7 +848,20 @@
   long mode_type;
 
   mode_type = (long)d;
-
+  
+  if (mode_type & MODE_REGCHAN)
+  {
+    if (!(IsServer(source_p) || find_z_conf((char *)source_p->user->server)))
+    {
+      if (MyClient(source_p) && !(*errors & SM_ERR_NOTSERVICES))
+		sendto_one(source_p,
+			":%s NOTICE %s :*** NOTICE -- Chanmode +r can only be set by services",
+			me.name, source_p->name);
+	  *errors |= SM_ERR_NOTSERVICES;
+      return;
+	}
+  } 
+  else
   /* dont allow halfops to set +-p, as this controls whether they can set
    * +-h or not.. all other simple modes are ok
    */
@@ -814,7 +869,7 @@
     ((mode_type == MODE_PRIVATE) && (alev < CHACCESS_CHANOP)))
   {
     if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
@@ -841,6 +896,8 @@
   else if ((dir == MODE_DEL) && (chptr->mode.mode & mode_type))
   {
     /* setting - */
+    if (mode_type & MODE_PACE)
+    	clear_pace_queues(chptr);
 
     chptr->mode.mode &= ~mode_type;
 
@@ -871,7 +928,7 @@
   if (alev < CHACCESS_HALFOP)
   {
     if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
@@ -926,7 +983,7 @@
       DLINK_FOREACH(ptr, chptr->banlist.head)
       {
         banptr = ptr->data;
-        sendto_one(client_p, form_str(RPL_BANLIST),
+        sendto_one(client_p, form_str(client_p,RPL_BANLIST),
                    me.name, client_p->name, chname,
                    banptr->banstr, me.name, banptr->when);
       }
@@ -935,11 +992,11 @@
       DLINK_FOREACH(ptr, chptr->banlist.head)
       {
         banptr = ptr->data;
-        sendto_one(client_p, form_str(RPL_BANLIST),
+        sendto_one(client_p, form_str(client_p,RPL_BANLIST),
                    me.name, client_p->name, chname,
                    banptr->banstr, banptr->who, banptr->when);
       }
-    sendto_one(source_p, form_str(RPL_ENDOFBANLIST), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_ENDOFBANLIST), me.name,
                source_p->name, chname);
     return;
   }
@@ -947,7 +1004,7 @@
   if (alev < CHACCESS_HALFOP)
   {
     if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
@@ -1031,7 +1088,7 @@
   if (alev < CHACCESS_HALFOP)
   {
     if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
@@ -1046,11 +1103,11 @@
     DLINK_FOREACH(ptr, chptr->exceptlist.head)
     {
       banptr = ptr->data;
-      sendto_one(client_p, form_str(RPL_EXCEPTLIST),
+      sendto_one(client_p, form_str(client_p,RPL_EXCEPTLIST),
                  me.name, client_p->name, chname,
                  banptr->banstr, banptr->who, banptr->when);
     }
-    sendto_one(source_p, form_str(RPL_ENDOFEXCEPTLIST), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_ENDOFEXCEPTLIST), me.name,
                source_p->name, chname);
     return;
   }
@@ -1137,7 +1194,7 @@
   if (alev < CHACCESS_HALFOP)
   {
     if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
@@ -1152,11 +1209,11 @@
     DLINK_FOREACH(ptr, chptr->invexlist.head)
     {
       banptr = ptr->data;
-      sendto_one(client_p, form_str(RPL_INVITELIST), me.name,
+      sendto_one(client_p, form_str(client_p,RPL_INVITELIST), me.name,
                  client_p->name, chname, banptr->banstr,
                  banptr->who, banptr->when);
     }
-    sendto_one(source_p, form_str(RPL_ENDOFINVITELIST), me.name,
+    sendto_one(source_p, form_str(source_p,RPL_ENDOFINVITELIST), me.name,
                source_p->name, chname);
     return;
   }
@@ -1221,6 +1278,220 @@
 }
 
 static void
+chm_subst(struct Client *client_p, struct Client *source_p,
+          struct Channel *chptr, int parc, int *parn,
+          char **parv, int *errors, int alev, int dir, char c, void *d,
+          const char *chname)
+{
+  char *mask, *raw_mask;
+  dlink_node *ptr;
+  struct Ban *banptr;
+
+  if(!ConfigChannel.use_subst && MyClient(source_p) && 
+    (dir == MODE_ADD) && (parc > *parn))
+  {
+    if((*errors & SM_ERR_RPL_W) != 0)
+      return;
+    
+    *errors |= SM_ERR_RPL_W;
+    return;
+  }
+
+  if (alev < CHACCESS_HALFOP)
+  {
+    if (!(*errors & SM_ERR_NOOPS))
+      sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED), me.name,
+                 source_p->name, chname);
+    *errors |= SM_ERR_NOOPS;
+    return;
+  }
+
+  if ((dir == MODE_QUERY) || parc <= *parn)
+  {
+    if ((*errors & SM_ERR_RPL_W) != 0)
+      return;
+    *errors |= SM_ERR_RPL_W;
+
+    DLINK_FOREACH(ptr, chptr->substlist.head)
+    {
+      banptr = ptr->data;
+      sendto_one(client_p, form_str(client_p,RPL_SUBSTLIST), me.name,
+                 client_p->name, chname, banptr->banstr,
+                 banptr->who, banptr->when);
+    }
+    sendto_one(source_p, form_str(source_p,RPL_ENDOFSUBSTLIST), me.name,
+               source_p->name, chname);
+    return;
+  }
+
+  if (MyClient(source_p) && (++mode_limit > MAXMODEPARAMS))
+    return;
+
+  raw_mask = parv[(*parn)++];
+  if (IsServer(client_p))
+    mask = raw_mask;
+  else
+  /*  mask = pretty_mask(raw_mask);		messes up subst expression */
+    mask = raw_mask;
+
+  /* We'd have problems parsing this, hyb6 does it too */
+    if (strlen(mask) > (MODEBUFLEN - 2)) 
+      return; 
+
+  if(dir == MODE_ADD)
+  {
+    if((add_id(source_p, chptr, mask, CHFL_SUBST) == 0) && MyClient(source_p))
+      return;
+
+    mode_changes[mode_count].letter = c;
+    mode_changes[mode_count].dir = MODE_ADD;
+    mode_changes[mode_count].caps = CAP_SW;
+    mode_changes[mode_count].nocaps = 0;
+    
+    if(ConfigChannel.use_subst)
+      mode_changes[mode_count].mems = ONLY_CHANOPS_HALFOPS;
+    else
+      mode_changes[mode_count].mems = ONLY_SERVERS;
+
+    mode_changes[mode_count].id = NULL;
+    mode_changes[mode_count++].arg = mask;
+  }
+  else if (dir == MODE_DEL)
+  {
+    if (del_id(chptr, mask, CHFL_SUBST) == 0)
+    {
+      /* mask isn't a valid ban, check raw_mask */
+      if((del_id(chptr, raw_mask, CHFL_SUBST) == 0) && MyClient(source_p))
+      {
+        /* nope */
+        return;
+      }
+      mask = raw_mask;
+    }
+
+    mode_changes[mode_count].letter = c;
+    mode_changes[mode_count].dir = MODE_DEL;
+    mode_changes[mode_count].caps = CAP_SW;
+    mode_changes[mode_count].nocaps = 0;
+
+    if(ConfigChannel.use_subst)
+      mode_changes[mode_count].mems = ONLY_CHANOPS_HALFOPS;
+    else
+      mode_changes[mode_count].mems = ONLY_SERVERS;
+
+    mode_changes[mode_count].id = NULL;
+    mode_changes[mode_count++].arg = mask;
+  }
+}
+
+static void
+chm_deny(struct Client *client_p, struct Client *source_p,
+          struct Channel *chptr, int parc, int *parn,
+          char **parv, int *errors, int alev, int dir, char c, void *d,
+          const char *chname)
+{
+  char *mask, *raw_mask;
+  dlink_node *ptr;
+  struct Ban *banptr;
+
+  if(!ConfigChannel.use_denies && MyClient(source_p) && 
+    (dir == MODE_ADD) && (parc > *parn))
+  {
+    if((*errors & SM_ERR_RPL_D) != 0)
+      return;
+    
+    *errors |= SM_ERR_RPL_D;
+    return;
+  }
+
+  if (alev < CHACCESS_HALFOP)
+  {
+    if (!(*errors & SM_ERR_NOOPS))
+      sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED), me.name,
+                 source_p->name, chname);
+    *errors |= SM_ERR_NOOPS;
+    return;
+  }
+
+  if ((dir == MODE_QUERY) || parc <= *parn)
+  {
+    if ((*errors & SM_ERR_RPL_D) != 0)
+      return;
+    *errors |= SM_ERR_RPL_D;
+
+    DLINK_FOREACH(ptr, chptr->denylist.head)
+    {
+      banptr = ptr->data;
+      sendto_one(client_p, form_str(client_p,RPL_DENYLIST), me.name,
+                 client_p->name, chname, banptr->banstr,
+                 banptr->who, banptr->when);
+    }
+    sendto_one(source_p, form_str(source_p,RPL_ENDOFDENYLIST), me.name,
+               source_p->name, chname);
+    return;
+  }
+
+  if (MyClient(source_p) && (++mode_limit > MAXMODEPARAMS))
+    return;
+
+  raw_mask = parv[(*parn)++];
+  if (IsServer(client_p))
+    mask = raw_mask;
+  else
+  /*  mask = pretty_mask(raw_mask);		messes up gecos deny expression */
+    mask = raw_mask;
+
+  /* We'd have problems parsing this, hyb6 does it too */
+    if (strlen(mask) > (MODEBUFLEN - 2)) 
+      return; 
+
+  if(dir == MODE_ADD)
+  {
+    if((add_id(source_p, chptr, mask, CHFL_DENY) == 0) && MyClient(source_p))
+      return;
+
+    mode_changes[mode_count].letter = c;
+    mode_changes[mode_count].dir = MODE_ADD;
+    mode_changes[mode_count].caps = CAP_DENY;
+    mode_changes[mode_count].nocaps = 0;
+    
+    if(ConfigChannel.use_denies)
+      mode_changes[mode_count].mems = ONLY_CHANOPS_HALFOPS;
+    else
+      mode_changes[mode_count].mems = ONLY_SERVERS;
+
+    mode_changes[mode_count].id = NULL;
+    mode_changes[mode_count++].arg = mask;
+  }
+  else if (dir == MODE_DEL)
+  {
+    if (del_id(chptr, mask, CHFL_DENY) == 0)
+    {
+      /* mask isn't a valid ban, check raw_mask */
+      if((del_id(chptr, raw_mask, CHFL_DENY) == 0) && MyClient(source_p))
+      {
+        /* nope */
+        return;
+      }
+      mask = raw_mask;
+    }
+
+    mode_changes[mode_count].letter = c;
+    mode_changes[mode_count].dir = MODE_DEL;
+    mode_changes[mode_count].caps = CAP_DENY;
+    mode_changes[mode_count].nocaps = 0;
+
+    if(ConfigChannel.use_denies)
+      mode_changes[mode_count].mems = ONLY_CHANOPS_HALFOPS;
+    else
+      mode_changes[mode_count].mems = ONLY_SERVERS;
+
+    mode_changes[mode_count].id = NULL;
+    mode_changes[mode_count++].arg = mask;
+  }
+}
+
+static void
 chm_op(struct Client *client_p, struct Client *source_p,
        struct Channel *chptr, int parc, int *parn,
        char **parv, int *errors, int alev, int dir, char c, void *d,
@@ -1249,7 +1520,7 @@
   if (alev < CHACCESS_CHANOP)
   {
     if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
@@ -1279,7 +1550,7 @@
   if (!IsMember(targ_p, chptr))
   {
     if (!(*errors & SM_ERR_NOTONCHANNEL))
-      sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_USERNOTINCHANNEL), me.name,
                  source_p->name, chname, opnick);
     *errors |= SM_ERR_NOTONCHANNEL;
     return;
@@ -1287,6 +1558,16 @@
 
   mode_get_status(chptr, targ_p, &t_op, &t_hop, &t_voice, 1);
 
+  if (find_z_conf((char *)targ_p->user->server) && !IsOper(source_p)
+	&& (dir == MODE_DEL) && (c == 'o') && t_op) 
+  {
+	if (MyClient(source_p) && !(*errors & SM_ERR_CANTDEOPSERV))
+	  sendto_one(source_p, form_str(source_p,ERR_CANTDEOPSERVICES),
+			me.name, source_p->name, targ_p->name, chname);
+	*errors |= SM_ERR_CANTDEOPSERV;
+	return;
+  }
+
   if (((dir == MODE_ADD) && t_op) ||
       ((dir == MODE_DEL) && !t_op
 #ifdef HALFOPS
@@ -1456,7 +1737,7 @@
         CHACCESS_CHANOP : CHACCESS_HALFOP))
   {
     if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
@@ -1480,7 +1761,7 @@
   if (!IsMember(targ_p, chptr))
   {
     if (!(*errors & SM_ERR_NOTONCHANNEL))
-      sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_USERNOTINCHANNEL), me.name,
                  source_p->name, chname, opnick);
     *errors |= SM_ERR_NOTONCHANNEL;
     return;
@@ -1598,7 +1879,7 @@
   if (alev < CHACCESS_HALFOP)
   {
     if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
@@ -1617,7 +1898,7 @@
   if (!IsMember(targ_p, chptr))
   {
     if (!(*errors & SM_ERR_NOTONCHANNEL))
-      sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_USERNOTINCHANNEL), me.name,
                  source_p->name, chname, opnick);
     *errors |= SM_ERR_NOTONCHANNEL;
     return;
@@ -1685,7 +1966,7 @@
   if (alev < CHACCESS_HALFOP)
   {
     if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
@@ -1749,7 +2030,7 @@
   if (alev < CHACCESS_HALFOP)
   {
     if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+      sendto_one(source_p, form_str(source_p,ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
@@ -1816,7 +2097,7 @@
   {chm_nosuch, NULL},
   {chm_nosuch, NULL},                             /* A */
   {chm_nosuch, NULL},                             /* B */
-  {chm_nosuch, NULL},                             /* C */
+  {chm_simple, (void *) MODE_CYRNICKS},           /* C */
   {chm_nosuch, NULL},                             /* D */
   {chm_nosuch, NULL},                             /* E */
   {chm_nosuch, NULL},                             /* F */
@@ -1826,13 +2107,13 @@
   {chm_nosuch, NULL},                             /* J */
   {chm_nosuch, NULL},                             /* K */
   {chm_nosuch, NULL},                             /* L */
-  {chm_nosuch, NULL},                             /* M */
+  {chm_simple, (void *) MODE_REGSPEAK},           /* M */
   {chm_nosuch, NULL},                             /* N */
   {chm_nosuch, NULL},                             /* O */
   {chm_nosuch, NULL},                             /* P */
   {chm_nosuch, NULL},                             /* Q */
-  {chm_nosuch, NULL},                             /* R */
-  {chm_nosuch, NULL},                             /* S */
+  {chm_simple, (void *) MODE_REGNICKS},           /* R */
+  {chm_simple, (void *) MODE_SSLONLY},            /* S */
   {chm_nosuch, NULL},                             /* T */
   {chm_nosuch, NULL},                             /* U */
   {chm_nosuch, NULL},                             /* V */
@@ -1849,18 +2130,18 @@
 #ifdef ANONOPS
   {chm_hideops, NULL},                            /* a */
 #else
-  {chm_nosuch, NULL},				  /* a */
+  {chm_nosuch, NULL},				              /* a */
 #endif
   {chm_ban, NULL},                                /* b */
-  {chm_nosuch, NULL},                             /* c */
-  {chm_nosuch, NULL},                             /* d */
+  {chm_simple, (void *) MODE_NOCOLOR},            /* c */
+  {chm_deny, NULL},                               /* d */
   {chm_except, NULL},                             /* e */
   {chm_nosuch, NULL},                             /* f */
   {chm_nosuch, NULL},                             /* g */
 #ifdef HALFOPS
   {chm_halfop, NULL},                             /* h */
 #else
-  {chm_nosuch, NULL},				  /* h */
+  {chm_nosuch, NULL},				              /* h */
 #endif
   {chm_simple, (void *) MODE_INVITEONLY},         /* i */
   {chm_nosuch, NULL},                             /* j */
@@ -1871,15 +2152,19 @@
   {chm_op, NULL},                                 /* o */
   {chm_simple, (void *) MODE_PRIVATE},            /* p */
   {chm_nosuch, NULL},                             /* q */
-  {chm_nosuch, NULL},                             /* r */
+  {chm_simple, (void *) MODE_REGCHAN},            /* r */
   {chm_simple, (void *) MODE_SECRET},             /* s */
   {chm_simple, (void *) MODE_TOPICLIMIT},         /* t */
   {chm_nosuch, NULL},                             /* u */
   {chm_voice, NULL},                              /* v */
-  {chm_nosuch, NULL},                             /* w */
-  {chm_nosuch, NULL},                             /* x */
+  {chm_subst, NULL},                              /* w */
+#ifdef USEPACE
+  {chm_simple, (void *) MODE_PACE},               /* x */
+#else
+  {chm_nosuch, NULL},				              /* x */
+#endif
   {chm_nosuch, NULL},                             /* y */
-  {chm_nosuch, NULL},                             /* z */
+  {chm_simple, (void *) MODE_NOREPEAT},           /* z */
 };
 /* *INDENT-ON* */
 
@@ -2041,6 +2326,7 @@
   int pbl, mbl, nc, mc;
   int i, st;
   int dir = MODE_QUERY;
+  int regular = 0;
 
   /* bail out if we have nothing to do... */
   if (!(mode_count
@@ -2053,14 +2339,26 @@
   /* Send all mode changes to the chanops/halfops, and even peons if
    * we are not +a...
    */
+  /*
+   * nah, don't send server bursting +e/+I/+d/+w to non-ops
+   */   
+   for (i=0; i < mode_count; i++) {
+     char c = mode_changes[i].letter;
+     if (c!='e' && c!='I' && c!='d' && c!='w') {
+     	regular = 1;
+     	break;
+     }
+   }
+   	
 #ifdef ANONOPS
-  st = (chptr->mode.mode & MODE_HIDEOPS) ? ONLY_CHANOPS_HALFOPS : ALL_MEMBERS;
+  st = (chptr->mode.mode & MODE_HIDEOPS) ? ONLY_CHANOPS_HALFOPS : 
+  	((regular)? ALL_MEMBERS : (IsServer(source_p)? ONLY_CHANOPS_HALFOPS : ALL_MEMBERS));
 #else
-  st = ALL_MEMBERS;
+  st = (regular)? ALL_MEMBERS : (IsServer(source_p)? ONLY_CHANOPS_HALFOPS : ALL_MEMBERS);
 #endif
 
   if (IsServer(source_p))
-    mbl = ircsprintf(modebuf, ":%s MODE %s ", me.name, chname);
+    mbl = ircsprintf(modebuf, ":%s MODE %s ", source_p->name, chname);
   else
     mbl = ircsprintf(modebuf, ":%s!%s@%s MODE %s ", source_p->name,
                      source_p->username, source_p->host, chname);
@@ -2091,7 +2389,7 @@
       mc = 0;
 
       if (IsServer(source_p))
-        mbl = ircsprintf(modebuf, ":%s MODE %s ", me.name, chname);
+        mbl = ircsprintf(modebuf, ":%s MODE %s ", source_p->name, chname);
       else
         mbl = ircsprintf(modebuf, ":%s!%s@%s MODE %s ", source_p->name,
                    source_p->username, source_p->host, chname);
diff -uNrd -x CVS ircd-hybrid-7rc5/src/class.c ircd-hybrid-7-bg/src/class.c
--- ircd-hybrid-7rc5/src/class.c	Thu Sep  5 10:06:16 2002
+++ ircd-hybrid-7-bg/src/class.c	Mon Mar 10 01:09:04 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: class.c,v 7.37 2002/09/05 14:06:16 db Exp $
+ *  $Id: class.c,v 1.2 2003/03/10 06:09:04 demond Exp $
  */
 
 #include "stdinc.h"
@@ -304,7 +304,7 @@
   struct Class *cltmp;
 
   for (cltmp = ClassList; cltmp; cltmp = cltmp->next)
-    sendto_one(source_p, form_str(RPL_STATSYLINE), me.name, source_p->name,
+    sendto_one(source_p, form_str(source_p,RPL_STATSYLINE), me.name, source_p->name,
                'Y', ClassName(cltmp), PingFreq(cltmp), ConFreq(cltmp),
                MaxLinks(cltmp), MaxSendq(cltmp));
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/src/client.c ircd-hybrid-7-bg/src/client.c
--- ircd-hybrid-7rc5/src/client.c	Thu Oct 10 14:49:30 2002
+++ ircd-hybrid-7-bg/src/client.c	Mon Mar 10 01:09:04 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: client.c,v 7.302 2002/10/10 18:49:30 androsyn Exp $
+ *  $Id: client.c,v 1.4 2003/03/10 06:09:04 demond Exp $
  */
 #include "stdinc.h"
 #include "config.h"
@@ -422,7 +422,7 @@
 	reason = "Connection closed";
 
 	if(IsPerson(client_p))
-	  sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP),
+	  sendto_one(client_p, form_str(client_p,ERR_YOUREBANNEDCREEP),
 		     me.name, client_p->name,
 		     aconf->passwd ? aconf->passwd : "D-lined");
 	else
@@ -438,7 +438,7 @@
 	  reason = "D-lined";
 
 	if(IsPerson(client_p))
-	  sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP),
+	  sendto_one(client_p, form_str(client_p,ERR_YOUREBANNEDCREEP),
 		     me.name, client_p->name, reason);
 	else
 	  sendto_one(client_p, "NOTICE DLINE :*** You have been D-lined");
@@ -477,7 +477,7 @@
 	{
 	  reason = "Connection closed";
 
-	  sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP),
+	  sendto_one(client_p, form_str(client_p,ERR_YOUREBANNEDCREEP),
 		     me.name, client_p->name,
 		     aconf->passwd ? aconf->passwd : "G-lined");
 	} 
@@ -490,7 +490,7 @@
 	  else
 	    reason = "G-lined";
 
-	  sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP),
+	  sendto_one(client_p, form_str(client_p,ERR_YOUREBANNEDCREEP),
 		     me.name, client_p->name, reason);
 	}
 	
@@ -517,7 +517,7 @@
 	{
 	  reason = "Connection closed";
 
-	  sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP),
+	  sendto_one(client_p, form_str(client_p,ERR_YOUREBANNEDCREEP),
 		     me.name, client_p->name, 
 		     aconf->passwd ? aconf->passwd : "K-lined");
 	}
@@ -530,7 +530,7 @@
 	  else
 	    reason = "K-lined";
 
-	  sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP),
+	  sendto_one(client_p, form_str(client_p,ERR_YOUREBANNEDCREEP),
 		     me.name, client_p->name, reason);
 	}
 	      
@@ -570,7 +570,8 @@
   if (IsServer(client_p))
   {
     --Count.server;
-    sendto_realops_flags(FLAGS_EXTERNAL, L_ALL, 
+    if (!IsRelay(client_p))
+    	sendto_realops_flags(FLAGS_EXTERNAL, L_ALL, 
 			 "Server %s split from %s",
 			 client_p->name, client_p->servptr->name);
   }
@@ -581,6 +582,9 @@
       --Count.oper;
     if (IsInvisible(client_p)) 
       --Count.invisi;
+    if (client_p->svsflags & FLAGS_SVS_IDENT)
+      if (--Count.identified < 0)
+      	Count.identified = 0;
   }
 
   if(splitchecking && !splitmode)
@@ -775,7 +779,7 @@
     return who;
   if (!(who = get_history(user, (long)KILLCHASETIMELIMIT)))
     {
-      sendto_one(source_p, form_str(ERR_NOSUCHNICK),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHNICK),
                  me.name, source_p->name, user);
       return (NULL);
     }
@@ -991,8 +995,11 @@
       add_history(source_p, 0);
       off_history(source_p);
 
+	  /* poof goes their watchlist! */
+	  hash_del_watch_list(source_p);
+
       if (HasID(source_p))
-	del_from_id_hash_table(source_p->user->id, source_p);
+		del_from_id_hash_table(source_p->user->id, source_p);
   
       /* again, this is all that is needed */
     }
@@ -1002,6 +1009,10 @@
    */
   del_from_client_hash_table(source_p->name, source_p);
 
+  /* remove user from watchlists */
+  if (IsRegistered(source_p))
+	hash_check_watch(source_p, RPL_LOGOFF);
+
   /* remove from global client list */
   remove_client_from_list(source_p);
 
@@ -1646,21 +1657,27 @@
   else
     {
       sendto_one(source_p,
-                 form_str(ERR_NICKTOOFAST),me.name, source_p->name,
+                 form_str(source_p,ERR_NICKTOOFAST),me.name, source_p->name,
                  source_p->name, nick, ConfigFileEntry.max_nick_time);
       return 0;
     }
 
   /* Finally, add to hash */
   del_from_client_hash_table(source_p->name, source_p);
+
+  hash_check_watch(source_p, RPL_LOGOFF);
+
   strcpy(source_p->name, nick);
   add_to_client_hash_table(nick, source_p);
 
+  hash_check_watch(source_p, RPL_LOGON);
+
   /* Make sure everyone that has this client on its accept list
    * loses that reference. 
    */
 
   del_all_accepts(source_p);
+  source_p->svsflags &= ~FLAGS_SVS_IDENT;
 
   /* fd_desc is long enough */
   fd_note(client_p->localClient->fd, "Nick: %s", nick);
@@ -1668,4 +1685,39 @@
   return 1;
 }
 
+static char cyr2lat[] = {
+  'A', 'B', 'V', 'G', 'D', 'E', 'Z', 'Z', 'I', 'J', 'K', 'L', 'M', 'N',
+  'O', 'P', 'R', 'S', 'T', 'U', 'F', 'H', 'C', '4', '6', '@', 'Y', '#',
+  'J', '#', 'U', 'Q',
+  'a', 'b', 'v', 'g', 'd', 'e', 'z', 'z', 'i', 'j', 'k', 'l', 'm', 'n',
+  'o', 'p', 'r', 's', 't', 'u', 'f', 'h', 'c', '4', '6', '@', 'y', '#',
+  'j', '#', 'u', 'q'
+};
 
+/*
+ * this will transpose cyrillic characters 
+ * into their latin phonetic counterparts
+ *
+ *                                -demond
+ */
+char *translate(struct Client *client_p, char *buf)
+{
+  unsigned char *p = buf;
+  int i, offset;
+
+  if (IsSetTransWin(client_p))
+    offset = 192;
+  else if (IsSetTransISO(client_p))
+    offset = 176;
+  else
+    return buf;
+
+  while (*p)
+    {
+      if ((*p >= offset) && (*p < offset + 2*32))
+		*p = cyr2lat[*p - offset];
+      ++p;
+    }
+
+  return buf;
+}
diff -uNrd -x CVS ircd-hybrid-7rc5/src/crypt.c ircd-hybrid-7-bg/src/crypt.c
--- ircd-hybrid-7rc5/src/crypt.c	Fri May 24 19:34:46 2002
+++ ircd-hybrid-7-bg/src/crypt.c	Mon Dec 30 23:07:26 2002
@@ -9,7 +9,7 @@
  *  this stuff is worth it, you can buy me a beer in return.  Poul-Henning Kamp
  *  ----------------------------------------------------------------------------
  *  
- *  $Id: crypt.c,v 7.4 2002/05/24 23:34:46 androsyn Exp $
+ *  $Id: crypt.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/descrip.mms ircd-hybrid-7-bg/src/descrip.mms
--- ircd-hybrid-7rc5/src/descrip.mms	Thu May 23 18:20:15 2002
+++ ircd-hybrid-7-bg/src/descrip.mms	Mon Dec 30 23:07:26 2002
@@ -1,6 +1,6 @@
 # MMS/MMK Makefile for OpenVMS
 # Copyright (c) 2001 Edward Brocklesby
-# $Id: descrip.mms,v 7.10 2002/05/23 22:20:15 leeh Exp $
+# $Id: descrip.mms,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
 
 CC=	CC
 CFLAGS=/INCLUDE_DIRECTORY=([-.INCLUDE],[-.ADNS])/STANDARD=ISOC94/NOWARN -
diff -uNrd -x CVS ircd-hybrid-7rc5/src/dynlink.c ircd-hybrid-7-bg/src/dynlink.c
--- ircd-hybrid-7rc5/src/dynlink.c	Fri May 24 19:34:46 2002
+++ ircd-hybrid-7-bg/src/dynlink.c	Mon Dec 30 23:07:26 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- * $Id: dynlink.c,v 7.3 2002/05/24 23:34:46 androsyn Exp $
+ * $Id: dynlink.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  *
  */
 #include "stdinc.h"
@@ -314,9 +314,9 @@
 
   increase_modlist();
 
-  modlist [num_mods] = MyMalloc (sizeof (struct module));
-  modlist [num_mods]->address = tmpptr;
-  modlist [num_mods]->version = ver;
+  modlist[num_mods] = MyMalloc (sizeof (struct module));
+  modlist[num_mods]->address = tmpptr;
+  modlist[num_mods]->version = ver;
   modlist[num_mods]->core = core;
   DupString(modlist [num_mods]->name, mod_basename );
   num_mods++;
diff -uNrd -x CVS ircd-hybrid-7rc5/src/event.c ircd-hybrid-7-bg/src/event.c
--- ircd-hybrid-7rc5/src/event.c	Fri Sep 20 01:31:55 2002
+++ ircd-hybrid-7-bg/src/event.c	Mon Dec 30 23:07:26 2002
@@ -38,7 +38,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: event.c,v 7.29 2002/09/20 05:31:55 db Exp $
+ *  $Id: event.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 /*
diff -uNrd -x CVS ircd-hybrid-7rc5/src/fdlist.c ircd-hybrid-7-bg/src/fdlist.c
--- ircd-hybrid-7rc5/src/fdlist.c	Sat Jun 15 03:19:56 2002
+++ ircd-hybrid-7-bg/src/fdlist.c	Tue Feb  4 11:13:06 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: fdlist.c,v 7.31 2002/06/15 07:19:56 androsyn Exp $
+ *  $Id: fdlist.c,v 1.3 2003/02/04 16:13:06 demond Exp $
  */
 #include "stdinc.h"
 #include "config.h"  /* option settings */
@@ -81,7 +81,7 @@
 
 /* Called to open a given filedescriptor */
 void
-fd_open(int fd, unsigned int type, const char *desc)
+fd_open(int fd, unsigned int type, const char *desc, void *ssl)
 {
   fde_t *F = &fd_table[fd];
   assert(fd >= 0);
@@ -111,6 +111,9 @@
   if (desc)
     strncpy(F->desc, desc, FD_DESC_SZ);
   number_fd++;
+#ifdef HAVE_LIBCRYPTO
+  F->ssl = (SSL *)ssl;
+#endif
 }
 
 
@@ -139,6 +142,17 @@
   number_fd--;
   memset(F, '\0', sizeof(fde_t));
   F->timeout = 0;
+  
+#ifdef HAVE_LIBCRYPTO
+  F->flags.accept_read = 0;
+  F->flags.accept_write = 0;
+  F->accept_failures = 0;
+  if (F->ssl) {
+  	SSL_shutdown(F->ssl);
+  	SSL_free(F->ssl);
+  	F->ssl = NULL;
+  }
+#endif
   /* Unlike squid, we're actually closing the FD here! -- adrian */
   close(fd);
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/src/fileio.c ircd-hybrid-7-bg/src/fileio.c
--- ircd-hybrid-7rc5/src/fileio.c	Thu May 30 21:35:40 2002
+++ ircd-hybrid-7-bg/src/fileio.c	Thu Jan 30 10:28:59 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: fileio.c,v 7.23 2002/05/31 01:35:40 androsyn Exp $
+ *  $Id: fileio.c,v 1.2 2003/01/30 15:28:59 demond Exp $
  */
 #include "stdinc.h"
 #include "config.h"
@@ -49,7 +49,7 @@
         errno = ENFILE;
         fd = -1;
     } else if (fd >= 0)
-        fd_open(fd, FD_FILE, filename);
+        fd_open(fd, FD_FILE, filename, NULL);
     
     return fd;
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/src/getopt.c ircd-hybrid-7-bg/src/getopt.c
--- ircd-hybrid-7rc5/src/getopt.c	Fri May 24 19:34:46 2002
+++ ircd-hybrid-7-bg/src/getopt.c	Mon Dec 30 23:07:26 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: getopt.c,v 7.14 2002/05/24 23:34:46 androsyn Exp $
+ *  $Id: getopt.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/hash.c ircd-hybrid-7-bg/src/hash.c
--- ircd-hybrid-7rc5/src/hash.c	Mon Oct 28 16:09:23 2002
+++ ircd-hybrid-7-bg/src/hash.c	Mon Mar 10 01:09:04 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: hash.c,v 7.47 2002/10/28 21:09:23 bill Exp $
+ *  $Id: hash.c,v 1.4 2003/03/10 06:09:04 demond Exp $
  */
 
 #include "stdinc.h"
@@ -787,8 +787,405 @@
   return(NULL);
 }  
 
+/*
+ * services stuff...	-demond
+ */
+void clear_svs_client_hash_table()
+{
+  int i;
+  struct Client* tmp;
+
+  for (i=0; i < U_MAX; i++)
+    if (tmp = (struct Client*)clientTable[i].list)
+      for (; tmp; tmp = tmp->hnext) {
+      	if (tmp->svsflags & FLAGS_SVS_IDENT)
+        	if (--Count.identified < 0)
+        		Count.identified = 0;
+        		
+		tmp->svsflags = 0;
+	  }
+}
+
+void do_local_clients(void (*func)(), char *mask, void *data)
+{
+  int i;
+  struct Client* tmp;
+
+  for (i=0; i < U_MAX; i++)
+    if (tmp = (struct Client*)clientTable[i].list)
+      for (; tmp; tmp = tmp->hnext)
+		if (MyClient(tmp) && match(mask, tmp->name))
+			func(tmp, data);		
+}
+
+void do_channel_local(void (*func)(), char *chan, void *data)
+{
+	int i, num = 0;
+	dlink_node *ptr;
+	dlink_list *lists[10];
+	struct Channel *chptr;
+	
+	if (!(chptr = hash_find_channel(chan)))
+		return;
+	
+	lists[num++] = &chptr->locpeons;
+	lists[num++] = &chptr->locvoiced;
+#ifdef HALFOPS
+	lists[num++] = &chptr->lochalfops;
+#endif
+#ifdef REQUIRE_OANDV
+	lists[num++] = &chptr->locchanops_voiced;
+#endif
+	lists[num++] = &chptr->locchanops;
+
+	for (i=0; i < num; i++)
+		DLINK_FOREACH(ptr, lists[i]->head)
+			func(ptr->data, data);
+}
+
+int services_present()
+{
+  int i;
+  struct Client* tmp;
+
+  for (i=0; i < U_MAX; i++)
+    if (tmp = (struct Client*)clientTable[i].list)
+      for (; tmp; tmp = tmp->hnext)
+		if (IsServer(tmp))
+          if (find_z_conf(tmp->name))
+            return 1;
+  
+  return 0;
+}
+
+struct Client* find_services()
+{
+  unsigned int hashv;
+  struct ConfItem *aconf;
+  struct Client *tmp;
+
+  extern struct ConfItem *z_conf;
+  for (aconf = z_conf; aconf; aconf = aconf->next)
+    {
+      if (BadPtr(aconf->name))
+		continue;
+
+      hashv = hash_nick_name(aconf->name);
+      tmp = (struct Client*) clientTable[hashv].list;
+
+      for (; tmp; tmp = tmp->hnext)
+		{
+	  	  if (!IsServer(tmp)) 
+	        continue;
+	  	  if (irccmp(aconf->name, tmp->name) == 0)
+	        return tmp;
+		}
+    }
+
+  return NULL;
+}
+
+/*
+ *	shamelessly stolen from bahamut				
+ *						-demond
+ */
+
+/*
+ * Rough figure of the datastructures for notify:
+ *
+ * NOTIFY HASH      cptr1
+ *   |                |- nick1
+ * nick1-|- cptr1     |- nick2
+ *   |   |- cptr2                cptr3
+ *   |   |- cptr3   cptr2          |- nick1
+ *   |                |- nick1
+ * nick2-|- cptr2     |- nick2
+ *       |- cptr1
+ *
+ * add-to-notify-hash-table:
+ * del-from-notify-hash-table:
+ * hash-del-notify-list:
+ * hash-check-notify:
+ * hash-get-notify:
+ */
+
+static   aWatch  *watchTable[WATCHHASHSIZE];
 
+void  count_watch_memory(int *count, u_long *memory)
+{
+    int   i = WATCHHASHSIZE;
+    aWatch  *anptr;
+    
+    
+    while (i--)
+    {
+	anptr = watchTable[i];
+	while (anptr)
+	{
+	    (*count)++;
+	    (*memory) += sizeof(aWatch)+strlen(anptr->nick);
+	    anptr = anptr->hnext;
+	}
+    }
+}
+
+void clear_watch_hash_table(void)
+{
+    memset((char *)watchTable, '\0', sizeof(watchTable));
+}
 
 
+/* add_to_watch_hash_table */
+int   add_to_watch_hash_table(char *nick, aClient *cptr)
+{
+    int   hashv;
+    aWatch  *anptr;
+    Link  *lp;
+    
+    
+    /* Get the right bucket... */
+    hashv = hash_nick_name(nick)%WATCHHASHSIZE;
+    
+    /* Find the right nick (header) in the bucket, or NULL... */
+    if ((anptr = (aWatch *)watchTable[hashv]))
+	while (anptr && irccmp(anptr->nick, nick))
+	    anptr = anptr->hnext;
+    
+    /* If found NULL (no header for this nick), make one... */
+    if (!anptr)
+    {
+	anptr = (aWatch *)MyMalloc(sizeof(aWatch)+strlen(nick));
+	anptr->lasttime = CurrentTime;
+	strcpy(anptr->nick, nick);
+	
+	anptr->watch = NULL;
+	
+	anptr->hnext = watchTable[hashv];
+	watchTable[hashv] = anptr;
+    }
+    /* Is this client already on the watch-list? */
+    if ((lp = anptr->watch))
+	while (lp && (lp->value.cptr != cptr))
+	    lp = lp->next;
+    
+    /* No it isn't, so add it in the bucket and client addint it */
+    if (!lp)
+    {
+	lp = anptr->watch;
+	anptr->watch = (Link *)MyMalloc(sizeof(Link));
+	anptr->watch->value.cptr = cptr;
+	anptr->watch->next = lp;
+	
+	lp = (Link *)MyMalloc(sizeof(Link));
+	lp->next = cptr->watch;
+	lp->value.wptr = anptr;
+	cptr->watch = lp;
+	cptr->watches++;
+    }
+    
+    return 0;
+}
+
+/* hash_check_watch */
+int hash_check_watch(aClient *cptr, int reply)
+{
+    int   hashv;
+    aWatch  *anptr;
+    Link  *lp;
+    
+    
+    /* Get us the right bucket */
+    hashv = hash_nick_name(cptr->name)%WATCHHASHSIZE;
+	
+    /* Find the right header in this bucket */
+    if ((anptr = (aWatch *)watchTable[hashv]))
+	while (anptr && irccmp(anptr->nick, cptr->name))
+	    anptr = anptr->hnext;
+    if (!anptr)
+	return 0;   /* This nick isn't on watch */
+    
+    /* Update the time of last change to item */
+    anptr->lasttime = CurrentTime;
+    
+    /* Send notifies out to everybody on the list in header */
+    for (lp = anptr->watch; lp; lp = lp->next)
+	sendto_one(lp->value.cptr, form_str(lp->value.cptr,reply), me.name,
+		   lp->value.cptr->name, cptr->name,
+		   (IsPerson(cptr)?cptr->username:"<N/A>"),
+		   (IsPerson(cptr)?cptr->host:"<N/A>"),
+		   anptr->lasttime, cptr->info);
+    
+    return 0;
+}
+
+/* hash_get_watch */
+aWatch  *hash_get_watch(char *name)
+{
+    int   hashv;
+    aWatch  *anptr;
+    
+    
+    hashv = hash_nick_name(name)%WATCHHASHSIZE;
+    
+    if ((anptr = (aWatch *)watchTable[hashv]))
+	while (anptr && irccmp(anptr->nick, name))
+	    anptr = anptr->hnext;
+    
+    return anptr;
+}
+
+/* del_from_watch_hash_table */
+int   del_from_watch_hash_table(char *nick, aClient *cptr)
+{
+    int   hashv;
+    aWatch  *anptr, *nlast = NULL;
+    Link  *lp, *last = NULL;
+    
+    
+    /* Get the bucket for this nick... */
+    hashv = hash_nick_name(nick)%WATCHHASHSIZE;
+    
+    /* Find the right header, maintaining last-link pointer... */
+    if ((anptr = (aWatch *)watchTable[hashv]))
+	while (anptr && irccmp(anptr->nick, nick))
+	{
+	    nlast = anptr;
+	    anptr = anptr->hnext;
+	}
+    if (!anptr)
+	return 0;   /* No such watch */
+    
+    /* Find this client from the list of notifies... with last-ptr. */
+    if ((lp = anptr->watch))
+	while (lp && (lp->value.cptr != cptr))
+	{
+	    last = lp;
+	    lp = lp->next;
+	}
+    if (!lp)
+	return 0;   /* No such client to watch */
+    
+    /* Fix the linked list under header, then remove the watch entry */
+    if (!last)
+	anptr->watch = lp->next;
+    else
+	last->next = lp->next;
+    MyFree(lp);
+    
+    /* Do the same regarding the links in client-record... */
+    last = NULL;
+    if ((lp = cptr->watch))
+	while (lp && (lp->value.wptr != anptr))
+	{
+	    last = lp;
+	    lp = lp->next;
+	}
+    
+    /*
+     * Give error on the odd case... probobly not even neccessary
+     * No error checking in ircd is unneccessary ;) -Cabal95
+     */
+    if (!lp)
+	sendto_realops_flags(FLAGS_DEBUG, L_ALL,
+	       "WATCH debug error: del_from_watch_hash_table "
+		   "found a watch entry with no client "
+		   "counterpoint processing nick %s on client %s!",
+		   nick, cptr->user);
+    else
+    {
+	if (!last) /* First one matched */
+	    cptr->watch = lp->next;
+	else
+	    last->next = lp->next;
+	MyFree(lp);
+    }
+    /* In case this header is now empty of notices, remove it */
+    if (!anptr->watch)
+    {
+	if (!nlast)
+	    watchTable[hashv] = anptr->hnext;
+	else
+	    nlast->hnext = anptr->hnext;
+	MyFree(anptr);
+    }
+    
+    /* Update count of notifies on nick */
+    cptr->watches--;
+    
+    return 0;
+}
+
+/* hash_del_watch_list */
+int   hash_del_watch_list(aClient *cptr)
+{
+    int   hashv;
+    aWatch  *anptr;
+    Link  *np, *lp, *last;
+    
+    
+    if (!(np = cptr->watch))
+	return 0;   /* Nothing to do */
+    
+    cptr->watch = NULL; /* Break the watch-list for client */
+    while (np)
+    {
+	/* Find the watch-record from hash-table... */
+	anptr = np->value.wptr;
+	last = NULL;
+	for (lp = anptr->watch; lp && (lp->value.cptr != cptr);
+	     lp = lp->next)
+	    last = lp;
+	
+	/* Not found, another "worst case" debug error */
+	if (!lp)
+	    sendto_realops_flags(FLAGS_DEBUG, L_ALL,
+	           "WATCH Debug error: hash_del_watch_list "
+		       "found a WATCH entry with no table "
+		       "counterpoint processing client %s!",
+		       cptr->name);
+	else
+	{
+	    /* Fix the watch-list and remove entry */
+	    if (!last)
+		anptr->watch = lp->next;
+	    else
+		last->next = lp->next;
+	    MyFree(lp);
+	    
+	    /*
+	     * If this leaves a header without notifies,
+	     * remove it. Need to find the last-pointer!
+	     */
+	    if (!anptr->watch)
+	    {
+		aWatch  *np2, *nl;
+		
+		hashv = hash_nick_name(anptr->nick)%WATCHHASHSIZE;
+		
+		nl = NULL;
+		np2 = watchTable[hashv];
+		while (np2 != anptr)
+		{
+		    nl = np2;
+		    np2 = np2->hnext;
+		}
+		
+		if (nl)
+		    nl->hnext = anptr->hnext;
+		else
+		    watchTable[hashv] = anptr->hnext;
+		MyFree(anptr);
+	    }
+	}
+	
+	lp = np; /* Save last pointer processed */
+	np = np->next; /* Jump to the next pointer */
+	MyFree(lp); /* Free the previous */
+    }
+    
+    cptr->watches = 0;
+    
+    return 0;
+}
 
 
diff -uNrd -x CVS ircd-hybrid-7rc5/src/hook.c ircd-hybrid-7-bg/src/hook.c
--- ircd-hybrid-7rc5/src/hook.c	Wed Oct 30 22:12:30 2002
+++ ircd-hybrid-7-bg/src/hook.c	Mon Dec 30 23:07:26 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: hook.c,v 7.19 2002/10/31 03:12:30 wiz Exp $
+ *  $Id: hook.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 /* hooks are used by modules to hook into events called by other parts of
diff -uNrd -x CVS ircd-hybrid-7rc5/src/hostmask.c ircd-hybrid-7-bg/src/hostmask.c
--- ircd-hybrid-7rc5/src/hostmask.c	Wed Sep 11 11:27:08 2002
+++ ircd-hybrid-7-bg/src/hostmask.c	Mon Mar 10 01:09:04 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: hostmask.c,v 7.73 2002/09/11 15:27:08 db Exp $
+ *  $Id: hostmask.c,v 1.2 2003/03/10 06:09:04 demond Exp $
  */
 
 #include "stdinc.h"
@@ -380,7 +380,7 @@
  */
 struct ConfItem *
 find_conf_by_address(const char *name, struct irc_inaddr *addr, int type,
-                     int fam, const char *username)
+                     int fam, const char *username, char *passwd)
 {
   unsigned long hprecv = 0;
   struct ConfItem *hprec = NULL;
@@ -406,6 +406,9 @@
               (type & 0x1 || match(arec->username, username)) &&
               arec->precedence > hprecv)
           {
+			if (passwd && IsConfSkipOnPassFail(arec->aconf) 
+			&& !BadPtr(arec->aconf->passwd) && strcmp(passwd, arec->aconf->passwd))
+	  			continue;
             hprecv = arec->precedence;
             hprec = arec->aconf;
           }
@@ -425,6 +428,9 @@
               (type & 0x1 || match(arec->username, username)) &&
               arec->precedence > hprecv)
           {
+			if (passwd && IsConfSkipOnPassFail(arec->aconf) 
+			&& !BadPtr(arec->aconf->passwd) && strcmp(passwd, arec->aconf->passwd))
+	  			continue;
             hprecv = arec->precedence;
             hprec = arec->aconf;
           }
@@ -446,6 +452,9 @@
             (type & 0x1 || match(arec->username, username)) &&
             (arec->precedence > hprecv))
         {
+      	  if (passwd && IsConfSkipOnPassFail(arec->aconf) 
+      	  && !BadPtr(arec->aconf->passwd) && strcmp(passwd, arec->aconf->passwd))
+			continue;
           hprecv = arec->precedence;
           hprec = arec->aconf;
         }
@@ -462,6 +471,9 @@
           (type & 0x1 || match(arec->username, username)) &&
           arec->precedence > hprecv)
       {
+     	if (passwd && IsConfSkipOnPassFail(arec->aconf) 
+     	&& !BadPtr(arec->aconf->passwd) && strcmp(passwd, arec->aconf->passwd))
+       	  continue;
         hprecv = arec->precedence;
         hprec = arec->aconf;
       }
@@ -477,12 +489,12 @@
  */
 struct ConfItem *
 find_address_conf(const char *host, const char *user,
-                  struct irc_inaddr *ip, int aftype)
+                  struct irc_inaddr *ip, int aftype, char *passwd)
 {
   struct ConfItem *iconf, *kconf;
 
   /* Find the best I-line... If none, return NULL -A1kmm */
-  if (!(iconf = find_conf_by_address(host, ip, CONF_CLIENT, aftype, user)))
+  if (!(iconf = find_conf_by_address(host, ip, CONF_CLIENT, aftype, user, passwd)))
     return NULL;
 
   /* If they are exempt from K-lines, return the best I-line. -A1kmm */
@@ -490,7 +502,7 @@
     return iconf;
 
   /* Find the best K-line... -A1kmm */
-  kconf = find_conf_by_address(host, ip, CONF_KILL, aftype, user);
+  kconf = find_conf_by_address(host, ip, CONF_KILL, aftype, user, NULL);
 
   /* If they are K-lined, return the K-line. Otherwise, return the
    * I-line. -A1kmm */
@@ -515,7 +527,7 @@
   struct ConfItem *kconf;
 
   /* Find the best K-line... -A1kmm */
-  kconf = find_conf_by_address(host, ip, CONF_KILL, aftype, user);
+  kconf = find_conf_by_address(host, ip, CONF_KILL, aftype, user, NULL);
 
   /* If they are K-lined, return the K-line. Otherwise, return the
    * I-line. -A1kmm */
@@ -533,10 +545,11 @@
 {
   struct ConfItem *eline;
   eline = find_conf_by_address(NULL, addr, CONF_EXEMPTDLINE | 1, aftype,
-                               NULL);
+                               NULL, NULL);
   if (eline)
     return eline;
-  return find_conf_by_address(NULL, addr, CONF_DLINE | 1, aftype, NULL);
+  return find_conf_by_address(NULL, addr, CONF_DLINE | 1, aftype, 
+  							  NULL, NULL);
 }
 
 /* void add_conf_by_address(const char*, int, const char *,
@@ -746,7 +759,7 @@
         /* We are doing a partial list, based on what matches the u@h of the
          * sender, so prepare the strings for comparing --fl_ */
 
-        sendto_one(client_p, form_str(RPL_STATSILINE), me.name,
+        sendto_one(client_p, form_str(client_p,RPL_STATSILINE), me.name,
                    client_p->name, (IsConfRestricted(aconf)) ? 'i' : 'I', name,
                    show_iline_prefix(client_p, aconf, user),
 #ifdef HIDE_SPOOF_IPS
@@ -786,7 +799,7 @@
           continue;
         get_printable_conf(aconf, &name, &host, &pass, &user, &port,
                            &classname);
-        sendto_one(client_p, form_str(RPL_STATSKLINE), me.name,
+        sendto_one(client_p, form_str(client_p,RPL_STATSKLINE), me.name,
                    client_p->name, c, host, user, pass);
       }
 }
diff -uNrd -x CVS ircd-hybrid-7rc5/src/irc_string.c ircd-hybrid-7-bg/src/irc_string.c
--- ircd-hybrid-7rc5/src/irc_string.c	Thu May 30 22:21:03 2002
+++ ircd-hybrid-7-bg/src/irc_string.c	Mon Dec 30 23:07:26 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: irc_string.c,v 7.54 2002/05/31 02:21:03 androsyn Exp $
+ *  $Id: irc_string.c,v 1.1.1.1 2002/12/31 04:07:26 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/ircd.c ircd-hybrid-7-bg/src/ircd.c
--- ircd-hybrid-7rc5/src/ircd.c	Mon Oct 28 16:09:24 2002
+++ ircd-hybrid-7-bg/src/ircd.c	Sat May 24 23:27:11 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: ircd.c,v 7.242 2002/10/28 21:09:24 bill Exp $
+ *  $Id: ircd.c,v 1.6 2003/05/24 00:07:46 demond Exp $
  */
 
 #include "stdinc.h"
@@ -114,7 +114,7 @@
 
 char**  myargv;
 int     dorehash   = 0;
-int     debuglevel = -1;        /* Server debug level */
+int     debuglevel = DEBUG_DEBUG;/* Server debug level */
 char*   debugmode  = "";        /*  -"-    -"-   -"-  */
 time_t  nextconnect = 1;        /* time for next try_connections call */
 
@@ -212,12 +212,22 @@
         }
 
       limit.rlim_cur = limit.rlim_max; /* make soft limit the max */
+      printf("Value of limit.rlim_max is %ld\n", (long)limit.rlim_max);
+
       if (setrlimit(RLIMIT_FD_MAX, &limit) == -1)
         {
           fprintf(stderr,"error setting max fd's to %ld\n",
                         (long) limit.rlim_cur);
           exit(EXIT_FAILURE);
         }
+      printf("Value of NOFILE is %d\n", NOFILE);
+    }
+
+  if (!getrlimit(RLIMIT_CORE, &limit))
+    {
+      limit.rlim_cur = limit.rlim_max;
+      if (!setrlimit(RLIMIT_CORE, &limit))
+	    printf("Value of corefile size is %lu\n", (unsigned long)limit.rlim_cur);
     }
 #endif        /* RLIMIT_FD_MAX */
 }
@@ -533,12 +543,32 @@
 {
   /* Check to see if the user is running us as root, which is a nono */
   
+  /* well some ppl wanted low ports so...	-demond
   if(geteuid() == 0)
   {
     fprintf(stderr, "Don't run ircd as root!!!\n");
     return -1;
+  }*/
+
+#ifdef USE_GETTEXT
+  /*
+   * For 'locale' try (in this order):
+   *    Config entry "msglocale" (yyparse() will overwrite LANGUAGE)
+   *    Env variable "LANGUAGE"
+   *    Default of "" (so don't overwrite LANGUAGE here)
+   */
+
+  if (!getenv("LANGUAGE"))
+  {
+    putenv("LANGUAGE=");
   }
 
+  setlocale(LC_ALL, "");
+  textdomain("ircd-hybrid");
+  bindtextdomain("ircd-hybrid" , MSGPATH);
+  bindtextdomain("alt-language" , MSGPATH);
+#endif
+
   /*
    * save server boot time right away, so getrusage works correctly
    */
@@ -660,7 +690,24 @@
   initServerMask();
   init_auth();                  /* Initialise the auth code */
   init_resolver();      /* Needs to be setup before the io loop */
+  
+#ifdef HAVE_LIBCRYPTO
+  SSL_load_error_strings();
+  SSLeay_add_ssl_algorithms();
+  ServerInfo.meth = SSLv23_server_method();
+  ServerInfo.ctx = SSL_CTX_new(ServerInfo.meth);
+  if (!ServerInfo.ctx) {
+  	fprintf(stderr, "Could not initialize the SSL context -- %s\n",
+  		ERR_error_string(ERR_get_error(), NULL));
+  }
+  SSL_CTX_set_options(ServerInfo.ctx, SSL_OP_NO_SSLv2);
+  SSL_CTX_set_options(ServerInfo.ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL);
+  /*SSL_CTX_set_verify(ServerInfo.ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE, NULL);*/
+  SSL_CTX_set_verify(ServerInfo.ctx, SSL_VERIFY_NONE, NULL);
+#endif
+
   read_conf_files(YES);         /* cold start init conf files */
+
 #ifndef STATIC_MODULES
 
   mod_add_path(IRCD_PREFIX "/modules");
@@ -692,23 +739,6 @@
   }
   strncpy(me.info, ServerInfo.description, REALLEN);
 
-#ifdef USE_GETTEXT
-  /*
-   * For 'locale' try (in this order):
-   *    Config entry "msglocale" (yyparse() will overwrite LANGUAGE)
-   *    Env variable "LANGUAGE"
-   *    Default of "" (so don't overwrite LANGUAGE here)
-   */
-
-  if (!getenv("LANGUAGE"))
-  {
-    putenv("LANGUAGE=");
-  }
-
-  textdomain("ircd-hybrid");
-  bindtextdomain("ircd-hybrid" , MSGPATH);
-#endif
-
 #ifdef USE_IAUTH
   iAuth.flags = 0;
 
@@ -736,6 +766,14 @@
   
   ilog(L_NOTICE, "Server Ready");
   
+  eventAdd("pace_channels", pace_channels, NULL, PACE_CHANNELS_TIME);
+
+  eventAdd("check_warn_drone", check_warn_drone, NULL, CHECK_DRONE_TIME);
+
+  eventAdd("check_drone_queue", check_drone_queue, NULL, ConfigFileEntry.drone_rate_period);
+
+  eventAdd("purge_repeats", purge_repeats, NULL, ConfigFileEntry.repeat_grace);
+  
   eventAddIsh("cleanup_glines", cleanup_glines, NULL, CLEANUP_GLINES_TIME);
 
   eventAddIsh("cleanup_tklines", cleanup_tklines, NULL, CLEANUP_TKLINES_TIME);
@@ -763,6 +801,8 @@
 
   if(splitmode)
     eventAddIsh("check_splitmode", check_splitmode, NULL, 60);
+
+  fflush(stdout);
 
   ServerRunning = 1;
   io_loop();
diff -uNrd -x CVS ircd-hybrid-7rc5/src/ircd_lexer.l ircd-hybrid-7-bg/src/ircd_lexer.l
--- ircd-hybrid-7rc5/src/ircd_lexer.l	Wed Oct 30 12:44:56 2002
+++ ircd-hybrid-7-bg/src/ircd_lexer.l	Sat May 24 23:27:11 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: ircd_lexer.l,v 1.146 2002/10/30 17:44:56 wiz Exp $
+ *  $Id: ircd_lexer.l,v 1.4 2003/05/24 00:07:46 demond Exp $
  */
 
 %option case-insensitive
@@ -148,6 +148,8 @@
 compression_level { return COMPRESSION_LEVEL; }
 connect		{ return CONNECT; }
 connectfreq     { return CONNECTFREQ; }
+cyrillic        { return CYRILLIC; }
+totaltrans      { return TOTALTRANS; }
 cryptlink	{ return CRYPTLINK; }
 default_cipher_preference { return DEFAULT_CIPHER_PREFERENCE; }
 default_floodcount  { return DEFAULT_FLOODCOUNT; }
@@ -172,6 +174,7 @@
 fname_foperlog  { return FNAME_FOPERLOG; }
 fname_operlog   { return FNAME_OPERLOG; }
 fname_userlog   { return FNAME_USERLOG; }
+netid		{ return NETID; }
 gecos		{ return GECOS; }
 general		{ return GENERAL; }
 gline		{ return GLINE; }
@@ -184,6 +187,7 @@
 hidden		{ return HIDDEN; }
 hide_servers	{ return HIDE_SERVERS; }
 host		{ return HOST; }
+maskhost	{ return MASKHOST; }
 hub		{ return HUB; }
 hub_mask	{ return HUB_MASK; }
 idletime        { return IDLETIME; }
@@ -233,6 +237,7 @@
 ping_cookie	{ return PING_COOKIE; }
 ping_time	{ return PING_TIME; }
 port		{ return PORT; }
+sslport		{ return SSLPORT; }
 quiet_on_ban    { return QUIET_ON_BAN; }
 reason		{ return REASON; }
 redirport       { return REDIRPORT; }
@@ -244,13 +249,16 @@
 resv		{ return RESV; }
 rsa_private_key_file		{ return RSA_PRIVATE_KEY_FILE; }
 rsa_public_key_file		{ return RSA_PUBLIC_KEY_FILE; }
+ssl_certificate_file	{ return SSL_CERTIFICATE_FILE; }
 send_password	{ return SEND_PASSWORD; }
 sendq		{ return SENDQ; }
 serverhide	{ return SERVERHIDE; }
 serverinfo	{ return SERVERINFO; }
+services        { return SERVICES; }
 servlink_path   { return SERVLINK_PATH; }
 shared          { return T_SHARED; }
 short_motd      { return SHORT_MOTD; }
+skip_on_fail    { return SKIP_ON_FAIL; }
 silent          { return SILENT; }
 spoof		{ return SPOOF; }
 spoof_notice	{ return SPOOF_NOTICE; }
@@ -262,6 +270,8 @@
 use_halfops     { return USE_HALFOPS; }
 use_help        { return USE_HELP; }
 use_invex	{ return USE_INVEX; }
+use_subst	{ return USE_SUBST; }
+use_denies	{ return USE_DENIES; }
 use_knock	{ return USE_KNOCK; }
 use_vchans      { return USE_VCHANS; }
 throttle_time { return THROTTLE_TIME; }
@@ -271,6 +281,25 @@
 vhost6	{ return VHOST6; }
 warn		{ return WARN; }
 yes		{ return TYES; }
+equivalent      { return EQUIVALENT; }
+nicks           { return NICKS; }
+relays          { return RELAYS; }
+userpar			{ return USERPAR; }
+param			{ return PARAM; }
+dummy           { return DUMMY; }
+
+drone_rate_max		{ return DRONE_RATE_MAX; }
+drone_rate_period	{ return DRONE_RATE_PERIOD; }
+drone_kline			{ return DRONE_KLINE; }
+drone_batch			{ return DRONE_BATCH; }
+drone_kline_time	{ return DRONE_KLINE_TIME; }
+drone_reason		{ return DREASON; }
+spam_wait			{ return SPAM_WAIT; }
+repeat_grace		{ return REPEAT_GRACE; }
+spawn_pass			{ return SPAWN_PASS; }
+gateway				{ return GATEWAY; }
+clusters			{ return CLUSTERS; }
+bridge				{ return BRIDGE; }
 
 failed_oper_notice      { return FAILED_OPER_NOTICE; }
 max_accept              { return MAX_ACCEPT; }
@@ -282,6 +311,7 @@
 ts_max_delta            { return TS_MAX_DELTA; }
 ts_warn_delta           { return TS_WARN_DELTA; }
 links_delay           { return LINKS_DELAY; }
+grace_time				{ return GRACE_TIME; }
 kline_with_connection_closed { return KLINE_WITH_CONNECTION_CLOSED; }
 kline_with_reason       { return KLINE_WITH_REASON; }
 warn_no_nline           { return WARN_NO_NLINE; }
@@ -312,6 +342,7 @@
 full                    { return T_FULL; }
 skill                   { return T_SKILL; }
 nchange                 { return T_NCHANGE; }
+rconn					{ return T_REMOTE; }
 rej                     { return T_REJ; }
 unauth                  { return T_UNAUTH; }
 spy                     { return T_SPY; }
diff -uNrd -x CVS ircd-hybrid-7rc5/src/ircd_parser.y ircd-hybrid-7-bg/src/ircd_parser.y
--- ircd-hybrid-7rc5/src/ircd_parser.y	Wed Oct 30 12:44:56 2002
+++ ircd-hybrid-7-bg/src/ircd_parser.y	Sat May 24 23:27:11 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: ircd_parser.y,v 1.261 2002/10/30 17:44:56 wiz Exp $
+ *  $Id: ircd_parser.y,v 1.8 2003/05/24 00:07:46 demond Exp $
  */
 
 %{
@@ -47,12 +47,6 @@
 #include "listener.h"
 #include "resv.h"
 
-#ifdef HAVE_LIBCRYPTO
-#include <openssl/rsa.h>
-#include <openssl/bio.h>
-#include <openssl/pem.h>
-#endif
-
 extern char *ip_string;
 
 int yyparse();
@@ -110,6 +104,8 @@
 %token  COMPRESSION_LEVEL
 %token  CONNECT
 %token  CONNECTFREQ
+%token  CYRILLIC
+%token  TOTALTRANS
 %token  CRYPTLINK
 %token  DEFAULT_CIPHER_PREFERENCE
 %token  DEFAULT_FLOODCOUNT
@@ -135,6 +131,7 @@
 %token  FNAME_FOPERLOG
 %token  FNAME_OPERLOG
 %token  FNAME_USERLOG
+%token  NETID
 %token  GECOS
 %token  GENERAL
 %token  GLINE
@@ -148,6 +145,8 @@
 %token  HIDDEN
 %token  HIDE_SERVERS
 %token  HOST
+%token  MASKHOST
+%token  SKIP_ON_FAIL
 %token  HUB
 %token  HUB_MASK
 %token  IAUTH_PORT
@@ -203,6 +202,7 @@
 %token  PING_COOKIE
 %token  PING_TIME
 %token  PORT
+%token  SSLPORT
 %token  QSTRING
 %token  QUIET_ON_BAN
 %token  REASON
@@ -213,12 +213,14 @@
 %token  RESTRICTED
 %token  RSA_PRIVATE_KEY_FILE
 %token  RSA_PUBLIC_KEY_FILE
+%token  SSL_CERTIFICATE_FILE
 %token	RESV
 %token  SECONDS MINUTES HOURS DAYS WEEKS MONTHS YEARS DECADES CENTURIES MILLENNIA
 %token  SENDQ
 %token  SEND_PASSWORD
 %token  SERVERHIDE
 %token  SERVERINFO
+%token  SERVICES
 %token  SERVLINK_PATH
 %token  T_SHARED
 %token  SHORT_MOTD
@@ -259,6 +261,7 @@
 %token  T_MAX_BUFFER
 %token  T_MAX_CLIENTS
 %token  T_NCHANGE
+%token	T_REMOTE
 %token  T_OPERWALL
 %token  T_REJ
 %token  T_SERVNOTICE
@@ -276,13 +279,38 @@
 %token  USE_HALFOPS
 %token  USE_HELP
 %token  USE_INVEX
+%token  USE_SUBST
+%token	USE_DENIES
 %token  USE_KNOCK
 %token  USE_VCHANS
 %token  VCHANS_OPER_ONLY
+%token	GRACE_TIME
 %token  VHOST
 %token  VHOST6
 %token  WARN
 %token  WARN_NO_NLINE
+%token  EQUIVALENT
+%token  NICKS
+%token  RELAYS
+%token	USERPAR
+%token	PARAM
+%token  DUMMY
+%token	DRONE_RATE_MAX
+%token	DRONE_RATE_PERIOD
+%token	DRONE_KLINE
+%token	DRONE_BATCH
+%token	DRONE_KLINE_TIME
+%token	DREASON
+%token	SPAM_WAIT
+%token	REPEAT_GRACE
+%token	SPAWN_PASS
+%token	GATEWAY
+%token	CLUSTERS
+%token	BRIDGE
+
+%left '-' '+'
+%left '*' '/'
+%left NEG
 
 %type   <string>   QSTRING
 %type   <number>   NUMBER
@@ -290,6 +318,7 @@
 %type	<number>   timespec_
 %type   <number>   sizespec
 %type   <number>   sizespec_
+%type   <number>   expr
 
 %%
 conf:   
@@ -299,26 +328,30 @@
 conf_item:        admin_entry
                 | logging_entry
                 | oper_entry
-		| channel_entry
+				| channel_entry
                 | class_entry 
                 | listen_entry
                 | auth_entry
                 | serverinfo_entry
-		| serverhide_entry
+				| serverhide_entry
                 | resv_entry
                 | shared_entry
                 | connect_entry
                 | kill_entry
                 | deny_entry
-		| exempt_entry
-		| general_entry
+				| exempt_entry
+				| general_entry
                 | gecos_entry
                 | modules_entry
+                | services_entry
+                | equivalent_entry
+                | relays_entry
+                | userpar_entry
+                | clusters_entry
                 | error ';'
                 | error '}'
         ;
 
-
 timespec_: { $$ = 0; } | timespec;
 timespec:	NUMBER timespec_
 		{
@@ -353,6 +386,36 @@
 		| NUMBER MBYTES sizespec_ { $$ = $1 * 1024 * 1024 + $3; }
 		;
 
+/* this is an arithmatic expression */
+expr:		NUMBER
+		{ 
+			$$ = $1;
+		}
+		| expr '+' expr
+		{ 
+			$$ = $1 + $3;
+		}
+		| expr '-' expr
+		{ 
+			$$ = $1 - $3;
+		}
+		| expr '*' expr
+		{ 
+			$$ = $1 * $3;
+		}
+		| expr '/' expr
+		{ 
+			$$ = $1 / $3;
+		}
+		| '-' expr  %prec NEG
+		{
+			$$ = -$2;
+		}
+		| '(' expr ')'
+		{
+			$$ = $2;
+		}
+		;
 
 /***************************************************************************
  *  section modules
@@ -407,8 +470,9 @@
 serverinfo_item:        serverinfo_name | serverinfo_vhost |
                         serverinfo_hub | serverinfo_description |
                         serverinfo_network_name | serverinfo_network_desc |
-                        serverinfo_max_clients | 
+                        serverinfo_max_clients | serverinfo_gateway |
                         serverinfo_rsa_private_key_file | serverinfo_vhost6 |
+                        serverinfo_ssl_certificate_file |
                         serverinfo_max_buffer | 
 			error;
 
@@ -470,6 +534,50 @@
 #endif
   };
 
+serverinfo_ssl_certificate_file: SSL_CERTIFICATE_FILE '=' QSTRING ';'
+  {
+#ifdef HAVE_LIBCRYPTO
+	if (ServerInfo.ctx) {
+	
+  		if (ServerInfo.ssl_certificate_file)
+  		{
+    		MyFree(ServerInfo.ssl_certificate_file);
+    		ServerInfo.ssl_certificate_file = NULL;
+  		}
+
+  		DupString(ServerInfo.ssl_certificate_file, yylval.string);
+
+		if (!ServerInfo.rsa_private_key_file) {
+			sendto_realops_flags(FLAGS_ALL, L_ALL,
+				"Ignoring config file entry ssl_certificate -- no rsa_private_key");
+			break;
+		}
+		
+		if (SSL_CTX_use_certificate_file(ServerInfo.ctx, 
+			ServerInfo.ssl_certificate_file, SSL_FILETYPE_PEM) <= 0) {
+			sendto_realops_flags(FLAGS_ALL, L_ALL,
+				"Error using config file entry ssl_certificate -- %s",
+				ERR_error_string(ERR_get_error(), NULL));
+			break;
+		}
+
+		if (SSL_CTX_use_PrivateKey_file(ServerInfo.ctx, 
+			ServerInfo.rsa_private_key_file, SSL_FILETYPE_PEM) <= 0) {
+			sendto_realops_flags(FLAGS_ALL, L_ALL,
+				"Error using config file entry rsa_private_key -- %s",
+				ERR_error_string(ERR_get_error(), NULL));
+			break;
+		}
+		
+		if (!SSL_CTX_check_private_key(ServerInfo.ctx)) {
+			sendto_realops_flags(FLAGS_ALL, L_ALL,
+				"RSA private key doesn't match the SSL certificate public key!");
+			break;
+		}
+	}
+#endif
+  };
+  
 serverinfo_name:        NAME '=' QSTRING ';' 
   {
     /* this isn't rehashable */
@@ -542,6 +650,16 @@
     ServerInfo.max_buffer = $3;
   };
 
+serverinfo_gateway: GATEWAY '=' TYES ';'
+   {
+     ServerInfo.gateway = 1;
+   }
+     |
+     GATEWAY '=' TNO ';'
+   {
+     ServerInfo.gateway = 0;
+   } ;
+
 serverinfo_hub:         HUB '=' TYES ';' 
   {
     /* Don't become a hub if we have a lazylink active. */
@@ -951,8 +1069,109 @@
     class_sendq_var = $3;
   };
 
+/***************************************************************************
+ *  section equivalent, defines equivalent nicks          -demond
+ ***************************************************************************/
+
+equivalent_entry:   EQUIVALENT
+  {
+  }
+  '{' equivalent_items '}' ';'
+  {
+  };
+
+equivalent_items:   equivalent_items equivalent_item |
+                    equivalent_item
+;
+equivalent_item:    equivalent_nicks | equivalent_dummy | error
+;
+equivalent_nicks:   NICKS '=' QSTRING ';'
+  {
+    add_equiv_nicks(yylval.string);
+  };
+
+equivalent_dummy:   DUMMY '=' expr ';'
+  {
+  };
 
 /***************************************************************************
+ *  section relays, defines relay pseudo servers          -demond
+ ***************************************************************************/
+
+relays_entry:       RELAYS
+  {
+  }
+  '{' relays_items '}' ';'
+  {
+  };
+
+relays_items:       relays_items relays_item |
+                    relays_item
+;
+relays_item:        relay_server | relay_dummy | error
+;
+relay_server:       NAME '=' QSTRING ';'
+  {
+    add_relay_server(yylval.string);
+  };
+
+relay_dummy:        DUMMY '=' expr ';'
+  {
+  };
+
+/***************************************************************************
+ *  section userpar, defines USER constant parameters 
+ *  by various clients, mostly Java applets                    -demond
+ ***************************************************************************/
+
+userpar_entry:      USERPAR
+  {
+  }
+  '{' userpar_items '}' ';'
+  {
+  };
+
+userpar_items:      userpar_items userpar_item |
+                    userpar_item
+;
+userpar_item:       userpar_param | userpar_dummy | error
+;
+userpar_param:      PARAM '=' QSTRING ';'
+  {
+    add_userpar_param(yylval.string);
+  };
+
+userpar_dummy:      DUMMY '=' expr ';'
+  {
+  };
+ 
+/***************************************************************************
+ *  section clusters, defines foreign cluster gateways
+ *  whose nicks we prepend with tokens                       -demond
+ ***************************************************************************/
+
+clusters_entry:      CLUSTERS
+  {
+  }
+  '{' clusters_items '}' ';'
+  {
+  };
+
+clusters_items:      clusters_items clusters_item |
+                     clusters_item
+;
+clusters_item:       cluster_bridge | cluster_dummy | error
+;
+cluster_bridge:      BRIDGE '=' QSTRING ';'
+  {
+    add_cluster_bridge(yylval.string);
+  };
+
+cluster_dummy:       DUMMY '=' expr ';'
+  {
+  };
+ 
+/***************************************************************************
  *  section listen
  ***************************************************************************/
 
@@ -969,7 +1188,8 @@
 listen_items:   listen_items listen_item |
                 listen_item;
 
-listen_item:    listen_port | listen_address | listen_host | error;
+listen_item:    listen_port | listen_sslport |
+				listen_address | listen_host | error;
 
 listen_port: PORT '=' port_items ';' ;
 
@@ -977,13 +1197,29 @@
 
 port_item: NUMBER
 {
-  add_listener($1, listener_address);
+  add_listener($1, listener_address, 0);
 } | NUMBER TWODOTS NUMBER
 {
   int i;
   for (i = $1; i <= $3; i++)
 	{
-	  add_listener(i, listener_address);
+	  add_listener(i, listener_address, 0);
+	}
+};
+
+listen_sslport: SSLPORT '=' sslport_items ';' ;
+
+sslport_items: sslport_items ',' sslport_item | sslport_item;
+
+sslport_item: NUMBER
+{
+  add_listener($1, listener_address, 1);
+} | NUMBER TWODOTS NUMBER
+{
+  int i;
+  for (i = $1; i <= $3; i++)
+	{
+	  add_listener(i, listener_address, 1);
 	}
 };
 
@@ -1077,7 +1313,7 @@
                 auth_exceed_limit | auth_no_tilde | auth_gline_exempt |
                 auth_spoof | auth_spoof_notice |
                 auth_redir_serv | auth_redir_port | auth_can_flood |
-                error;
+                auth_maskhost | auth_skipfail | error;
 
 auth_user:   USER '=' QSTRING ';'
   {
@@ -1234,6 +1470,24 @@
     DupString(yy_achead->className, yylval.string);
   };
 
+auth_maskhost: MASKHOST '=' TYES ';'
+  {
+   yy_achead->flags |= CONF_FLAGS_MASKHOST;
+  }
+  |            MASKHOST '=' TNO ';'
+  {
+   yy_achead->flags &= CONF_FLAGS_MASKHOST;
+  };
+
+auth_skipfail: SKIP_ON_FAIL '=' TYES ';'
+  {
+   yy_achead->flags |= CONF_FLAGS_SKIPFAIL;
+  }
+  |            SKIP_ON_FAIL '=' TNO ';'
+  {
+   yy_achead->flags &= CONF_FLAGS_SKIPFAIL;
+  };
+
 
 /***************************************************************************
  *  section resv
@@ -1342,6 +1596,53 @@
   };
 
 /***************************************************************************
+ *  section services, for defining which servers
+ *  are to be treated specially (as services)       -demond 
+ ***************************************************************************/
+
+services_entry:		SERVICES
+  {
+    if(yy_aconf != NULL)
+      {
+        free_conf(yy_aconf);
+        yy_aconf = NULL;
+      }
+    yy_aconf=make_conf();
+    yy_aconf->status = CONF_ZLINE;
+    yy_aconf->name = NULL;
+    yy_aconf->user = NULL;
+    yy_aconf->host = NULL;
+  }
+  '{' services_items '}' ';'
+  {
+    conf_add_z_conf(yy_aconf);
+    yy_aconf = (struct ConfItem *)NULL;
+  };
+
+services_items:		services_items services_item |
+			services_item
+;
+services_item:		services_name | services_user | services_host | error
+;
+services_name:		NAME '=' QSTRING ';'
+  {
+    MyFree(yy_aconf->name);
+    DupString(yy_aconf->name, yylval.string);
+  };
+
+services_user:		USER '=' QSTRING ';'
+  {
+    MyFree(yy_aconf->user);
+    DupString(yy_aconf->user, yylval.string);
+  };
+
+services_host:		HOST '=' QSTRING ';'
+  {
+    MyFree(yy_aconf->host);
+    DupString(yy_aconf->host, yylval.string);
+  };
+
+/***************************************************************************
  *  section connect
  ***************************************************************************/
 
@@ -1948,6 +2249,7 @@
                     general_max_nick_changes | general_max_accept |
                     general_anti_spam_exit_message_time |
                     general_ts_warn_delta | general_ts_max_delta |
+					general_grace_time | general_spam_wait |
                     general_kline_with_reason |
                     general_kline_with_connection_closed |
                     general_warn_no_nline |
@@ -1960,12 +2262,12 @@
                     general_iauth_server |
                     general_iauth_port |
                     general_glines | general_gline_time |
-                    general_idletime |
+                    general_idletime | general_spawn_pass |
                     general_maximum_links |
                     general_message_locale | general_client_exit |
                     general_fname_userlog | general_fname_operlog |
                     general_fname_foperlog | general_oper_only_umodes |
-                    general_max_targets |
+                    general_max_targets | general_repeat_grace |
                     general_use_egd | general_egdpool_path |
                     general_oper_umodes |
                     general_caller_id_wait | general_default_floodcount |
@@ -1976,8 +2278,32 @@
                     general_throttle_time | general_havent_read_conf |
                     general_dot_in_ip6_addr | general_ping_cookie |
                     general_fallback_to_ip6_int | 
+                    general_netid | general_cyrillic | general_totaltrans |
+					general_drate_max | general_drate_period |
+					general_drone_kline | general_drone_batch |
+					general_drone_ktime | general_drone_reason |
                     error;
 
+general_cyrillic: CYRILLIC '=' TNO ';'
+  {
+    ConfigFileEntry.cyrillic = 0;
+  }
+    |
+    CYRILLIC '=' TYES ';'
+  {
+    ConfigFileEntry.cyrillic = 1;
+  } ;  
+
+general_totaltrans: TOTALTRANS '=' TNO ';'
+  {
+    ConfigFileEntry.totaltrans = 0;
+  }
+    |
+    TOTALTRANS '=' TYES ';'
+  {
+    ConfigFileEntry.totaltrans = 1;
+  } ;  
+
 general_failed_oper_notice:   FAILED_OPER_NOTICE '=' TYES ';'
   {
     ConfigFileEntry.failed_oper_notice = 1;
@@ -2038,6 +2364,57 @@
     exit(0);
   }
 };
+
+general_grace_time:    GRACE_TIME '=' timespec ';'
+  {
+    ConfigFileEntry.grace_time = $3;
+  } ;
+
+general_spam_wait:     SPAM_WAIT '=' timespec ';'
+  {
+    ConfigFileEntry.spam_wait = $3;
+  } ;
+
+general_repeat_grace:  REPEAT_GRACE '=' timespec ';'
+  {
+    ConfigFileEntry.repeat_grace = $3;
+  } ;
+
+general_drate_max:     DRONE_RATE_MAX '=' NUMBER ';'
+  {
+    ConfigFileEntry.drone_rate_max = $3;
+  } ;
+
+general_drate_period:  DRONE_RATE_PERIOD '=' timespec ';'
+  {
+    ConfigFileEntry.drone_rate_period = $3;
+  } ;
+
+general_drone_ktime:   DRONE_KLINE_TIME '=' timespec ';'
+  {
+    ConfigFileEntry.drone_kline_time = $3;
+  } ;
+
+general_drone_kline:   DRONE_KLINE '=' TYES ';'
+  {
+    ConfigFileEntry.drone_kline = 1;
+  }
+    |
+    DRONE_KLINE '=' TNO ';'
+  {
+    ConfigFileEntry.drone_kline = 0;
+  } ;
+
+general_drone_batch:   DRONE_BATCH '=' TYES ';'
+  {
+    ConfigFileEntry.drone_batch = 1;
+  }
+    |
+    DRONE_BATCH '=' TNO ';'
+  {
+    ConfigFileEntry.drone_batch = 0;
+  } ;
+
 general_kline_with_reason: KLINE_WITH_REASON '=' TYES ';'
   {
     ConfigFileEntry.kline_with_reason = 1;
@@ -2215,6 +2592,24 @@
 	      MAXPATHLEN);
 };
 
+general_netid: NETID '=' QSTRING ';'
+{
+  strncpy(ConfigFileEntry.netid, yylval.string,
+	      MAXNETID)[MAXNETID] = 0;
+};
+
+general_spawn_pass: SPAWN_PASS '=' QSTRING ';'
+{
+  strncpy(ConfigFileEntry.spawn_pass, yylval.string,
+	      PASSWDLEN)[PASSWDLEN] = 0;
+};
+
+general_drone_reason: DREASON '=' QSTRING ';'
+{
+  strncpy(ConfigFileEntry.drone_reason, yylval.string,
+	      MAXDREASON)[MAXDREASON] = 0;
+};
+
 general_glines: GLINES '=' TYES ';'
   {
     ConfigFileEntry.glines = 1;
@@ -2227,11 +2622,20 @@
 
 general_message_locale: MESSAGE_LOCALE '=' QSTRING ';'
   {
-    char langenv[BUFSIZE];
+    static char langenv[BUFSIZE];
+    static char langenv2[BUFSIZE];
     if (strlen(yylval.string) > BUFSIZE-10)
       yylval.string[BUFSIZE-9] = 0;
     ircsprintf(langenv, "LANGUAGE=%s", yylval.string);
     putenv(langenv);
+    ircsprintf(langenv2, "LC_MESSAGES=%s", yylval.string);
+    putenv(langenv2);
+#ifdef USE_GETTEXT
+	{
+	  extern int  _nl_msg_cat_cntr;
+	  ++_nl_msg_cat_cntr;
+	}
+#endif
   } ;
 
 general_gline_time: GLINE_TIME '=' timespec ';'
@@ -2405,6 +2809,10 @@
   {
     ConfigFileEntry.oper_umodes |= FLAGS_NCHANGE;
   }
+              | T_REMOTE
+  {
+    ConfigFileEntry.oper_umodes |= FLAGS_REMOTE;
+  }
               | T_REJ
   {
     ConfigFileEntry.oper_umodes |= FLAGS_REJ;
@@ -2479,6 +2887,10 @@
   {
     ConfigFileEntry.oper_only_umodes |= FLAGS_NCHANGE;
   }
+              | T_REMOTE
+  {
+    ConfigFileEntry.oper_only_umodes |= FLAGS_REMOTE;
+  }
               | T_REJ
   {
     ConfigFileEntry.oper_only_umodes |= FLAGS_REJ;
@@ -2556,20 +2968,22 @@
 channel_item:       channel_use_except |
                     channel_use_halfops |
                     channel_use_invex |
+                    channel_use_subst |
+                    channel_use_denies |
                     channel_use_knock |
                     channel_use_vchans |
-		    channel_use_anonops |
-		    channel_vchans_oper_only |
+		    		channel_use_anonops |
+		    		channel_vchans_oper_only |
                     channel_max_bans |
                     channel_knock_delay |
-		    channel_knock_delay_channel |
+		    		channel_knock_delay_channel |
                     channel_max_chans_per_user |
                     channel_quiet_on_ban |
-		    channel_default_split_user_count | 
-		    channel_default_split_server_count |
-		    channel_no_create_on_split | 
-		    channel_no_join_on_split |
-		    channel_oper_pass_resv |
+		    		channel_default_split_user_count | 
+		    		channel_default_split_server_count |
+		    		channel_no_create_on_split | 
+		    		channel_no_join_on_split |
+		    		channel_oper_pass_resv |
                     error;
 
 channel_use_except:   USE_EXCEPT '=' TYES ';'
@@ -2647,6 +3061,28 @@
                      USE_INVEX '=' TNO ';'
   {
     ConfigChannel.use_invex = 0;
+  } ;
+
+
+channel_use_subst:   USE_SUBST '=' TYES ';'
+  {
+    ConfigChannel.use_subst = 1;
+  }
+                        |
+                     USE_SUBST '=' TNO ';'
+  {
+    ConfigChannel.use_subst = 0;
+  } ;
+
+
+channel_use_denies:   USE_DENIES '=' TYES ';'
+  {
+    ConfigChannel.use_denies = 1;
+  }
+                        |
+                     USE_DENIES '=' TNO ';'
+  {
+    ConfigChannel.use_denies = 0;
   } ;
 
 
diff -uNrd -x CVS ircd-hybrid-7rc5/src/ircd_signal.c ircd-hybrid-7-bg/src/ircd_signal.c
--- ircd-hybrid-7rc5/src/ircd_signal.c	Tue Jun 25 23:05:45 2002
+++ ircd-hybrid-7-bg/src/ircd_signal.c	Sun Mar  2 15:08:22 2003
@@ -17,7 +17,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: ircd_signal.c,v 7.12 2002/06/26 03:05:45 androsyn Exp $
+ * $Id: ircd_signal.c,v 1.2 2003/03/02 20:08:22 demond Exp $
  */
 
 #include "stdinc.h"
@@ -84,6 +84,13 @@
     }
 }
 
+static void sigchld_handler(int sig)
+{
+	int status;
+
+	waitpid(-1, &status, WNOHANG);
+}
+
 /*
  * setup_signals - initialize signal handlers for server
  */
@@ -122,6 +129,9 @@
   sigaddset(&act.sa_mask, SIGTERM);
   sigaction(SIGTERM, &act, 0);
 
+  act.sa_handler = sigchld_handler;
+  sigaddset(&act.sa_mask, SIGCHLD);
+  sigaction(SIGCHLD, &act, 0);
 }
 
 
diff -uNrd -x CVS ircd-hybrid-7rc5/src/ircdauth.c ircd-hybrid-7-bg/src/ircdauth.c
--- ircd-hybrid-7rc5/src/ircdauth.c	Thu Aug 15 10:15:36 2002
+++ ircd-hybrid-7-bg/src/ircdauth.c	Mon Mar 10 01:09:05 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: ircdauth.c,v 7.49 2002/08/15 14:15:36 db Exp $
+ *  $Id: ircdauth.c,v 1.2 2003/03/10 06:09:05 demond Exp $
  */
 
 #include "stdinc.h"
@@ -625,13 +625,13 @@
   if (++Count.total > Count.max_tot)
     Count.max_tot = Count.total;
   
-  sendto_one(client, form_str(RPL_WELCOME),
+  sendto_one(client, form_str(client,RPL_WELCOME),
 	     me.name,
 	     client->name,
 	     client->name);
 
   /* This is a duplicate of the NOTICE but see below...*/
-  sendto_one(client, form_str(RPL_YOURHOST),
+  sendto_one(client, form_str(client,RPL_YOURHOST),
 	     me.name,
 	     client->name,
 	     get_listener_name(client->localClient->listener), version);
@@ -645,12 +645,12 @@
 	     get_listener_name(client->localClient->listener),
 	     version);
 
-  sendto_one(client, form_str(RPL_CREATED),
+  sendto_one(client, form_str(client,RPL_CREATED),
 	     me.name,
 	     client->name,
 	     creation);
 
-  sendto_one(client, form_str(RPL_MYINFO),
+  sendto_one(client, form_str(client,RPL_MYINFO),
 	     me.name,
 	     client->name,
 	     me.name,
@@ -667,18 +667,18 @@
 	       "NOTICE %s :*** Notice -- Please read the motd if you haven't read it",
 	       client->name);
 
-    sendto_one(client, form_str(RPL_MOTDSTART),
+    sendto_one(client, form_str(client,RPL_MOTDSTART),
 	       me.name,
 	       client->name,
 	       me.name);
 
     sendto_one(client,
-	       form_str(RPL_MOTD),
+	       form_str(client,RPL_MOTD),
 	       me.name,
 	       client->name,
 	       "*** This is the short motd ***");
     
-    sendto_one(client, form_str(RPL_ENDOFMOTD),
+    sendto_one(client, form_str(client,RPL_ENDOFMOTD),
 	       me.name,
 	       client->name);
 
diff -uNrd -x CVS ircd-hybrid-7rc5/src/kdparse.c ircd-hybrid-7-bg/src/kdparse.c
--- ircd-hybrid-7rc5/src/kdparse.c	Sat Jul  6 12:58:57 2002
+++ ircd-hybrid-7-bg/src/kdparse.c	Mon Dec 30 23:07:27 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: kdparse.c,v 7.8 2002/07/06 16:58:57 db Exp $
+ *  $Id: kdparse.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/linebuf.c ircd-hybrid-7-bg/src/linebuf.c
--- ircd-hybrid-7rc5/src/linebuf.c	Wed Oct  9 11:08:32 2002
+++ ircd-hybrid-7-bg/src/linebuf.c	Tue Feb  4 11:13:06 2003
@@ -20,7 +20,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: linebuf.c,v 7.93 2002/10/09 15:08:32 db Exp $
+ *  $Id: linebuf.c,v 1.4 2003/02/04 16:13:06 demond Exp $
  */
 
 #include "stdinc.h"
@@ -32,6 +32,8 @@
 #include "list.h"
 #include "balloc.h"
 #include "hook.h"
+#include "fdlist.h"
+#include "send.h"
 
 #ifdef STRING_WITH_STRINGS
 # include <string.h>
@@ -634,6 +636,9 @@
 {
   buf_line_t *bufline;
   int retval;
+#ifdef HAVE_LIBCRYPTO
+  fde_t *F = (fd > -1)? &fd_table[fd] : NULL;
+#endif
   
   /* Check we actually have a first buffer */
   if (bufhead->list.head == NULL)
@@ -660,6 +665,86 @@
     }
 
   /* Now, try writing data */
+#ifdef HAVE_LIBCRYPTO
+  if (F && F->ssl) {
+  	/*extern time_t CurrentTime;*/
+  	extern char *get_ssl_error(int);
+  	/*static*/ int alerted = 0;
+  
+  	if (F->flags.accept_write) {
+  		int ret;
+  		/*send(fd, bufline->buf + bufhead->writeofs, bufline->len
+  			- bufhead->writeofs, 0);*/
+  		if ((ret = SSL_accept(F->ssl)) > 0) {
+  			if (!alerted)
+  			sendto_realops_flags(FLAGS_DEBUG, L_ALL, 
+  				"SSL_accept() for %s (socket %d) wanting WRITE succeeded!",
+  				inetntoa((char *)&S_ADDR(F->connect.hostaddr)), F->fd);
+  			F->flags.accept_write = 0;
+  		} else if (F->accept_failures < 4) {
+  			int val = SSL_get_error(F->ssl, ret);  		
+  			sendto_realops_flags(FLAGS_DEBUG, L_ALL, 
+  				"SSL_accept() for %s (socket %d) wanting WRITE error! -- %s",
+  				inetntoa((char *)&S_ADDR(F->connect.hostaddr)), F->fd,
+  				(val == SSL_ERROR_SSL)?
+  				ERR_error_string(ERR_get_error(), NULL) :
+  				get_ssl_error(val));
+  			sendto_realops_flags(FLAGS_DEBUG, L_ALL,
+  				"BIO_sock_should_retry(): %d", BIO_sock_should_retry(ret));
+  		if (val == SSL_ERROR_SYSCALL) {
+  			int err = ERR_get_error();
+  			if (err)
+  				sendto_realops_flags(FLAGS_DEBUG, L_ALL, "ERR_get_error() -- %s",
+  					ERR_error_string(err, NULL));
+  			else
+  				sendto_realops_flags(FLAGS_DEBUG, L_ALL, "more error info -- %s",
+  					(ret == -1)? strerror(errno) : "got EOF, protocol violation");  
+  		}
+  			sendto_realops_flags(FLAGS_DEBUG, L_ALL, "SSL_state_string_long(): %s",
+  				SSL_state_string_long(F->ssl));
+  			F->accept_failures++;
+  		}
+  		retval = -1; errno = EAGAIN;
+  	} else {
+
+#if 0  				
+  	/*if (CurrentTime % 10 == 0)*/
+  	if (!alerted) {
+  	sendto_realops_flags(FLAGS_DEBUG, L_ALL, "SSL_write() for %s (socket %d) in progress...",
+  		inetntoa((char *)&S_ADDR(F->connect.hostaddr)), F->fd);
+  	sendto_realops_flags(FLAGS_DEBUG, L_ALL, "SSL_state_string_long(): %s",
+  		SSL_state_string_long(F->ssl));
+  	}
+#endif
+  		
+  	retval = SSL_write(F->ssl, bufline->buf + bufhead->writeofs, 
+  				bufline->len - bufhead->writeofs);
+  				
+  	if (retval <= 0 && !alerted) {
+  		int val = SSL_get_error(F->ssl, retval);
+  		/*if (CurrentTime % 10 == 0)*/
+  		sendto_realops_flags(FLAGS_DEBUG, L_ALL, 
+  			"SSL_write() for %s (socket %d) ERROR! -- %s",
+  			inetntoa((char *)&S_ADDR(F->connect.hostaddr)), F->fd,
+  			(val == SSL_ERROR_SSL)?
+  			ERR_error_string(ERR_get_error(), NULL) :
+  			get_ssl_error(val));
+  		if (val == SSL_ERROR_SYSCALL) {
+  			int err = ERR_get_error();
+  			if (err)
+  				sendto_realops_flags(FLAGS_DEBUG, L_ALL, "ERR_get_error() -- %s",
+  					ERR_error_string(err, NULL));
+  			else
+  				sendto_realops_flags(FLAGS_DEBUG, L_ALL, "more error info -- %s",
+  					(retval == -1)? strerror(errno) : "got EOF, protocol violation");  
+  		} else {
+  			/*SSL_set_accept_state(F->ssl);*/
+  			errno = EAGAIN;
+  		}
+  	}}
+  	alerted = 1;
+  } else
+#endif
   retval = send(fd, bufline->buf + bufhead->writeofs, bufline->len
 		 - bufhead->writeofs, 0);
    
diff -uNrd -x CVS ircd-hybrid-7rc5/src/list.c ircd-hybrid-7-bg/src/list.c
--- ircd-hybrid-7rc5/src/list.c	Wed Oct 23 18:12:14 2002
+++ ircd-hybrid-7-bg/src/list.c	Mon Dec 30 23:07:27 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: list.c,v 7.47 2002/10/23 22:12:14 bill Exp $
+ *  $Id: list.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/listener.c ircd-hybrid-7-bg/src/listener.c
--- ircd-hybrid-7rc5/src/listener.c	Thu Jul 11 20:51:08 2002
+++ ircd-hybrid-7-bg/src/listener.c	Mon Mar 10 01:09:05 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: listener.c,v 7.70 2002/07/12 00:51:08 androsyn Exp $
+ *  $Id: listener.c,v 1.4 2003/03/10 06:09:05 demond Exp $
  */
 
 #include "stdinc.h"
@@ -127,10 +127,10 @@
 
   for (listener = ListenerPollList; listener; listener = listener->next)
   {
-    sendto_one(source_p, form_str(RPL_STATSPLINE),
+    sendto_one(source_p, form_str(source_p,RPL_STATSPLINE),
                me.name,
                source_p->name,
-               'P',
+               listener->is_ssl? 'S' : 'P',
                listener->port,
                IsOperAdmin(source_p) ? listener->name : me.name,
                listener->ref_count,
@@ -271,7 +271,7 @@
  * the format "255.255.255.255"
  */
 void 
-add_listener(int port, const char* vhost_ip)
+add_listener(int port, const char* vhost_ip, int is_ssl)
 {
   struct Listener* listener;
   struct irc_inaddr   vaddr;
@@ -304,6 +304,8 @@
     listener = make_listener(port, &vaddr);
     listener->next = ListenerPollList;
     ListenerPollList = listener;
+    
+    listener->is_ssl = is_ssl;
   }
 
   listener->fd = -1;
@@ -384,7 +386,7 @@
    * be accepted until some old is closed first.
    */
 
-  fd = comm_accept(listener->fd, &sai);
+  fd = comm_accept(listener->fd, &sai, listener->is_ssl);
 
   copy_s_addr(IN_ADDR(addr), S_ADDR(sai));
 
diff -uNrd -x CVS ircd-hybrid-7rc5/src/m_error.c ircd-hybrid-7-bg/src/m_error.c
--- ircd-hybrid-7rc5/src/m_error.c	Wed Oct 23 21:16:37 2002
+++ ircd-hybrid-7-bg/src/m_error.c	Mon Dec 30 23:07:27 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_error.c,v 7.26 2002/10/24 01:16:37 bill Exp $
+ *  $Id: m_error.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/match.c ircd-hybrid-7-bg/src/match.c
--- ircd-hybrid-7rc5/src/match.c	Wed Aug 28 13:00:14 2002
+++ ircd-hybrid-7-bg/src/match.c	Sat May 24 23:27:11 2003
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: match.c,v 7.21 2002/08/28 17:00:14 androsyn Exp $
+ * $Id: match.c,v 1.2 2003/05/24 00:07:47 demond Exp $
  *
  */
 #include "stdinc.h"
@@ -413,10 +413,10 @@
   0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
   0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9,
   0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
-  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9,
-  0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
-  0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9,
-  0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
+  0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
+  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9,
+  0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
   0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
   0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
   0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9,
@@ -452,10 +452,10 @@
   0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
   0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9,
   0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
-  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
-  0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
-  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9,
-  0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff 
+  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9,
+  0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
+  0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9,
+  0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf 
 };
 
 /*
@@ -498,7 +498,7 @@
 /* 30 */     CNTRL_C|CHAN_C|NONEOS_C,
 /* 31 */     CNTRL_C|CHAN_C|NONEOS_C,
 /* SP */     PRINT_C|SPACE_C,
-/* ! */      PRINT_C|KWILD_C|CHAN_C|NONEOS_C,
+/* ! */      PRINT_C|KWILD_C|NICK_C|CHAN_C|NONEOS_C,
 /* " */      PRINT_C|CHAN_C|NONEOS_C,
 /* # */      PRINT_C|CHANPFX_C|CHAN_C|NONEOS_C,
 /* $ */      PRINT_C|CHAN_C|NONEOS_C|USER_C,
diff -uNrd -x CVS ircd-hybrid-7rc5/src/md5.c ircd-hybrid-7-bg/src/md5.c
--- ircd-hybrid-7rc5/src/md5.c	Fri May 24 21:35:09 2002
+++ ircd-hybrid-7-bg/src/md5.c	Mon Dec 30 23:07:27 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: md5.c,v 1.14 2002/05/25 01:35:09 androsyn Exp $
+ *  $Id: md5.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/memory.c ircd-hybrid-7-bg/src/memory.c
--- ircd-hybrid-7rc5/src/memory.c	Thu Jul 11 20:43:24 2002
+++ ircd-hybrid-7-bg/src/memory.c	Mon Dec 30 23:07:27 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: memory.c,v 7.38 2002/07/12 00:43:24 androsyn Exp $
+ *  $Id: memory.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 
diff -uNrd -x CVS ircd-hybrid-7rc5/src/messages.tab ircd-hybrid-7-bg/src/messages.tab
--- ircd-hybrid-7rc5/src/messages.tab	Tue Oct 29 22:33:25 2002
+++ ircd-hybrid-7-bg/src/messages.tab	Sat May 24 23:27:11 2003
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: messages.tab,v 7.72 2002/10/30 03:33:25 bill Exp $
+ *   $Id: messages.tab,v 1.5 2003/05/24 00:07:47 demond Exp $
  */
 
 static  char *  replies[] = {
@@ -24,23 +24,23 @@
 /* 001  RPL_WELCOME, */ ":%s 001 %s :Welcome to the %s Internet Relay Chat Network %s",
 /* 002  RPL_YOURHOST,*/ ":%s 002 %s :Your host is %s, running version %s",
 /* 003  RPL_CREATED, */ ":%s 003 %s :This server was created %s",
-/* 004  RPL_MYINFO, */ ":%s 004 %s %s %s oiwszcerkfydnxbaugl biklmnopstveIha bkloveIh",
+/* 004  RPL_MYINFO, */ 	":%s 004 %s %s %s oiwszcerkfydnxbauglqRTYS bdiklmnopstveIhacrwxzCMRS bdkloveIhw",
 /* 005  RPL_ISUPPORT, */ ":%s 005 %s %s :are supported by this server",
 /* 006 */       NULL,
 /* 007 */       NULL,
 /* 008 */       NULL,
 /* 009 */       NULL,
-/* 010  RPL_REDIR, */ ":%s 010 %s %s %d :Please use this Server/Port instead",
+/* 010  RPL_REDIR, */ 		":%s 010 %s %s %d :Please use this Server/Port instead",
 /* 011 */       NULL,
 /* 012 */       NULL,
 /* 013 */       NULL,
 /* 014 */       NULL,
-/* 015 RPL_MAP */    ":%s 015 %s :%s",
+/* 015 RPL_MAP */    		":%s 015 %s :%s",
 /* 016 */       NULL,
-/* 017 RPL_MAPEND */ ":%s 017 %s :End of /MAP",
+/* 017 RPL_MAPEND */ 		":%s 017 %s :End of /MAP",
 /* 018 */       NULL,
 /* 019 */       NULL,
-/* 020 RPL_YOURID */  ":%s 020 %s %s %s :Your ID and key is",
+/* 020 RPL_YOURID */  		":%s 020 %s %s %s :Your ID and key is",
 /* 021 */       NULL,
 /* 022 */       NULL,
 /* 023 */       NULL,
@@ -247,11 +247,11 @@
 /* 224 */       NULL,
 /* 225 RPL_STATSDLINE*/         ":%s 225 %s %c %s :%s",
 /* 226 RPL_STATSALINE*/         ":%s 226 %s %s",
-/* 227 */       NULL,
-/* 228 */       NULL,
-/* 229 */       NULL,
-/* 230 */       NULL,
-/* 231 */       NULL,
+/* 227 RPL_STATSZLINE*/			":%s 227 %s Services %s",
+/* 228 RPL_EQUIVALENTS*/		":%s 228 %s Equiv %s/%s",
+/* 229 RPL_RELAYS*/             ":%s 229 %s Relay %s",
+/* 230 RPL_USERPARMS*/			":%s 230 %s Userpar %s %s",
+/* 231 RPL_CLUSTERBRIDGE*/      ":%s 231 %s Bridge %s/%s",
 /* 232 */       NULL,
 /* 233 */       NULL,
 /* 234 RPL_SERVLIST, */ NULL,
@@ -291,7 +291,7 @@
 /* 264 */       NULL,
 /* 265 RPL_LOCALUSERS, */       ":%s 265 %s :Current local  users: %d  Max: %d",
 /* 266 RPL_GLOBALUSERS, */      ":%s 266 %s :Current global users: %d  Max: %d",
-/* 267 */       NULL,
+/* 267 RPL_IDUSERS, */       	":%s 267 %s :Current identified users: %d  Max: %d",
 /* 268 */       NULL,
 /* 269 */       NULL,
 /* 270 */       NULL,
@@ -321,18 +321,18 @@
 /* 294 */       NULL,
 /* 295 */       NULL,
 /* 296 */       NULL,
-/* 297 */       NULL,
-/* 298 */       NULL,
-/* 299 */       NULL,
-/* 300 RPL_NONE, */      NULL,
-/* 301 RPL_AWAY, */      ":%s 301 %s %s :%s",
-/* 302 RPL_USERHOST, */  ":%s 302 %s :%s",
-/* 303 RPL_ISON, */     ":%s 303 %s :",
-/* 304 RPL_TEXT, */      NULL,
-/* 305 RPL_UNAWAY, */   ":%s 305 %s :You are no longer marked as being away",
-/* 306 RPL_NOWAWAY, */  ":%s 306 %s :You have been marked as being away",
+/* 297 RPL_WHOISSSL, */       	":%s 297 %s %s :is connected via SSL (secure link)",
+/* 298 RPL_WHOISCYRILLIC, */    ":%s 298 %s %s :has cyrillic-encoded nickname", 
+/* 299 */       				NULL,
+/* 300 RPL_NONE, */      		NULL,
+/* 301 RPL_AWAY, */      		":%s 301 %s %s :%s",
+/* 302 RPL_USERHOST, */  		":%s 302 %s :%s",
+/* 303 RPL_ISON, */     		":%s 303 %s :",
+/* 304 RPL_TEXT, */      		NULL,
+/* 305 RPL_UNAWAY, */   		":%s 305 %s :You are no longer marked as being away",
+/* 306 RPL_NOWAWAY, */  		":%s 306 %s :You have been marked as being away",
 /* 307 */       NULL,
-/* 308 */	NULL,
+/* 308 RPL_WHOISADMIN, */		":%s 308 %s %s :is a Server Administrator",
 /* 309 */       NULL,
 /* 310 */       NULL,
 /* 311 RPL_WHOISUSER, */        ":%s 311 %s %s %s %s * :%s",
@@ -344,16 +344,16 @@
 /* 317 RPL_WHOISIDLE, */        ":%s 317 %s %s %d %d :seconds idle, signon time",
 /* 318 RPL_ENDOFWHOIS, */       ":%s 318 %s %s :End of /WHOIS list.",
 /* 319 RPL_WHOISCHANNELS, */    ":%s 319 %s %s :%s",
-/* 320 */      NULL,
+/* 320 */      	NULL,
 /* 321 RPL_LISTSTART, */        ":%s 321 %s Channel :Users  Name",
 /* 322 RPL_LIST, */             ":%s 322 %s %s %d :%s",
 /* 323 RPL_LISTEND, */          ":%s 323 %s :End of /LIST",
 /* 324 RPL_CHANNELMODEIS, */    ":%s 324 %s %s %s %s",
 /* 325 */       NULL,
-/* 326 */       NULL,
-/* 327 */       NULL,
+/* 326 RPL_WHOISSVSHINT, */     ":%s 326 %s %s :has identified for: %s",
+/* 327 RPL_WHOISREALHOST, */	":%s 327 %s %s :logged on %s from %s",
 /* 328 */       NULL,
-/* 329 RPL_CREATIONTIME, */      ":%s 329 %s %s %lu", 
+/* 329 RPL_CREATIONTIME, */		":%s 329 %s %s %lu", 
 /* 330 */       NULL,
 /* 331 RPL_NOTOPIC, */          ":%s 331 %s %s :No topic is set.",
 /* 332 RPL_TOPIC, */            ":%s 332 %s %s :%s",
@@ -362,14 +362,14 @@
 /* 335 */       NULL,
 /* 336 */       NULL,
 /* 337 */       NULL,
-/* 338 RPL_WHOISACTUALLY */	":%s 338 %s :%s is actually %s@%s [%s]",
+/* 338 RPL_WHOISACTUALLY */		":%s 338 %s :%s is actually %s@%s [%s]",
 /* 339 */       NULL,
 /* 340 */       NULL,
 /* 341 RPL_INVITING, */         ":%s 341 %s %s %s",
 /* 342 RPL_SUMMONING, */ NULL,
 /* 343 */       NULL,
-/* 344 */       NULL,
-/* 345 */       NULL,
+/* 344 RPL_SUBSTLIST */         ":%s 344 %s %s %s %s %lu",
+/* 345 RPL_ENDOFSUBSTLIST */    ":%s 345 %s %s :End of Channel Subst List",
 /* 346 RPL_INVEXLIST */         ":%s 346 %s %s %s %s %lu",       
 /* 347 RPL_ENDOFINVEXLIST */    ":%s 347 %s %s :End of Channel Invite List",
 /* 348 RPL_EXCEPTLIST */        ":%s 348 %s %s %s %s %lu",
@@ -401,8 +401,8 @@
 /* 374 RPL_ENDOFINFO, */        ":%s 374 %s :End of /INFO list.",
 /* 375 RPL_MOTDSTART, */        ":%s 375 %s :- %s Message of the Day - ",
 /* 376 RPL_ENDOFMOTD, */        ":%s 376 %s :End of /MOTD command.",
-/* 377 */       NULL,
-/* 378 */       NULL,
+/* 377 RPL_DENYLIST, */       	":%s 377 %s %s %s %s %lu",
+/* 378 RPL_ENDOFDENYLIST, */    ":%s 378 %s %s :End of Channel Deny List",
 /* 379 */       NULL,
 /* 380 */       NULL,
 /* 381 RPL_YOUREOPER, */        ":%s 381 %s :You have entered... the Twilight Zone!.",
@@ -477,7 +477,7 @@
 /* 449 */       NULL,
 /* 450 */       NULL,
 /* 451 ERR_NOTREGISTERED, */    ":%s 451 %s :You have not registered",
-/* 452 */       NULL,
+/* 452 ERR_NOREPEATING, */      ":%s 452 %s %s :No repeating allowed (+z)",
 /* 453 */       NULL,
 /* 454 */       NULL,
 /* 455 */       NULL,
@@ -493,9 +493,9 @@
 /* 465 ERR_YOUREBANNEDCREEP, */ ":%s 465 %s :You are banned from this server- %s",
 /* 466 ERR_YOUWILLBEBANNED, */  NULL,
 /* 467 ERR_KEYSET, */           ":%s 467 %s %s :Channel key already set",
-/* 468 */       NULL,
-/* 469 */       NULL,
-/* 470 */       NULL,
+/* 468 ERR_CANNOTSENDNOTREG, */ ":%s 468 %s %s :Cannot send to channel (+M)",
+/* 469 ERR_REGNICKSCHAN, */     ":%s 469 %s %s :Cannot join channel (+R)",
+/* 470 ERR_NOCYRNICKCHAN, */    ":%s 470 %s %s :Cannot join channel (+C)",
 /* 471 ERR_CHANNELISFULL, */    ":%s 471 %s %s :Cannot join channel (+l)",
 /* 472 ERR_UNKNOWNMODE  , */    ":%s 472 %s %c :is unknown mode char to me",
 /* 473 ERR_INVITEONLYCHAN, */   ":%s 473 %s %s :Cannot join channel (+i)",
@@ -505,7 +505,7 @@
 /* 477 ERR_MODELESS, */         ":%s 477 %s %s :Channel does not support modes",
 /* 478 ERR_BANLISTFULL, */      ":%s 478 %s %s %s :Channel ban list is full",
 /* 479 ERR_BADCHANNAME */       ":%s 479 %s %s :Illegal channel name",
-/* 480 */       NULL,
+/* 480 ERR_SSLONLYCHAN */       ":%s 480 %s %s :Cannot join channel (+S)",
 /* 481 ERR_NOPRIVILEGES, */
                 ":%s 481 %s :Permission Denied - You're not an IRC operator",
 /* 482 ERR_CHANOPRIVSNEEDED, */ ":%s 482 %s %s :You're not channel operator",
@@ -513,21 +513,21 @@
 /* 484 ERR_RESTRICTED, */       ":%s 484 %s :You are restricted",
 /* 485 ERR_BANNEDNICK, */
        ":%s 485 %s :Can't change nick when banned or on a moderated channel (%s)",
-/* 486 */       NULL,
-/* 487 */       NULL,
+/* 486 ERR_CANTKICKSERVICES, */ ":%s 486 %s %s %s :Cannot kick services bots",
+/* 487 ERR_CANTDEOPSERVICES, */ ":%s 487 %s %s %s :Cannot de-op services bots",
 /* 488 */       NULL,
 /* 489 */       NULL,
 /* 490 */       NULL,
 /* 491 ERR_NOOPERHOST, */       ":%s 491 %s :Only few of mere mortals may try to enter the twilight zone",
 /* 492 */       NULL,
 /* 493 */       NULL,
-/* 494 */       NULL,
+/* 494 ERR_DENIEDFROMCHAN, */	":%s 494 %s %s :Cannot join channel (+d)",
 /* 495 */       NULL,
 /* 496 */       NULL,
 /* 497 */       NULL,
-/* 498 */       NULL,
-/* 499 */       NULL,
-/* 500 */       NULL,
+/* 498 ERR_SSLACCEPTONLY, */    ":%s 498 %s %s :Accepts messages from SSL clients only",
+/* 499 ERR_REGACCEPTONLY, */    ":%s 499 %s %s :Accepts messages from registered nicks only",
+/* 500 ERR_TOOMANYWATCH */		":%s 500 %s %s :Maximum size for WATCH-list is 128 entries",
 /* 501 ERR_UMODEUNKNOWNFLAG, */ ":%s 501 %s :Unknown MODE flag",
 /* 502 ERR_USERSDONTMATCH, */   ":%s 502 %s :Can't change mode for other users",
 /* 503 ERR_GHOSTEDCLIENT, */    ":%s 503 %s :Message could not be delivered to %s",
@@ -627,14 +627,14 @@
 /* 597 */	NULL,
 /* 598 */	NULL,
 /* 599 */	NULL,
-/* 600 */	NULL,
-/* 601 */	NULL,
-/* 602 */	NULL,
-/* 603 */	NULL,
-/* 604 */	NULL,
-/* 605 */	NULL,
-/* 606 */	NULL,
-/* 607 */	NULL,
+/* 600 RPL_LOGON */				":%s 600 %s %s %s %s %d :logged online",
+/* 601 RPL_LOGOFF */			":%s 601 %s %s %s %s %d :logged offline",
+/* 602 RPL_WATCHOFF */			":%s 602 %s %s %s %s %d :stopped watching",
+/* 603 RPL_WATCHSTAT */ 		":%s 603 %s :You have %d and are on %d WATCH entries",
+/* 604 RPL_NOWON */				":%s 604 %s %s %s %s %d :is online",
+/* 605 RPL_NOWOFF */			":%s 605 %s %s %s %s %d :is offline",
+/* 606 RPL_WATCHLIST */			":%s 606 %s :%s",
+/* 607 RPL_ENDOFWATCHLIST */	":%s 607 %s :End of WATCH %c",
 /* 608 */	NULL,
 /* 609 */	NULL,
 /* 610 */	NULL,
diff -uNrd -x CVS ircd-hybrid-7rc5/src/modules.c ircd-hybrid-7-bg/src/modules.c
--- ircd-hybrid-7rc5/src/modules.c	Thu Jul 18 03:13:46 2002
+++ ircd-hybrid-7-bg/src/modules.c	Mon Mar 10 01:09:05 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: modules.c,v 7.104 2002/07/18 07:13:46 db Exp $
+ *  $Id: modules.c,v 1.4 2003/03/10 06:09:05 demond Exp $
  */
 
 #include "stdinc.h"
@@ -31,6 +31,7 @@
 #include "client.h"
 #include "send.h"
 #include "s_conf.h"
+#include "s_serv.h"
 #include "handlers.h"
 #include "numeric.h"
 #include "parse.h"
@@ -82,6 +83,8 @@
 static void mo_modreload(struct Client*, struct Client*, int, char**);
 static void mo_modunload(struct Client*, struct Client*, int, char**);
 static void mo_modrestart(struct Client*, struct Client*, int, char**);
+static void ms_svsload(struct Client*, struct Client*, int, char**);
+static void ms_svsunload(struct Client*, struct Client*, int, char**);
 
 struct Message modload_msgtab = {
  "MODLOAD", 0, 0, 2, 0, MFLG_SLOW, 0,
@@ -98,6 +101,16 @@
   {m_unregistered, m_not_oper, m_ignore, mo_modreload}
 };
 
+struct Message svsload_msgtab = {
+  "SVSLOAD", 0, 0, 2, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_ignore, ms_svsload, m_ignore}
+};
+
+struct Message svsunload_msgtab = {
+  "SVSUNLOAD", 0, 0, 2, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_ignore, ms_svsunload, m_ignore}
+};
+
 struct Message modlist_msgtab = {
  "MODLIST", 0, 0, 0, 0, MFLG_SLOW, 0,
   {m_unregistered, m_not_oper, m_ignore, mo_modlist}
@@ -115,7 +128,9 @@
 {
 	mod_add_cmd(&modload_msgtab);
 	mod_add_cmd(&modunload_msgtab);
-        mod_add_cmd(&modreload_msgtab);
+    mod_add_cmd(&modreload_msgtab);
+    mod_add_cmd(&svsload_msgtab);
+    mod_add_cmd(&svsunload_msgtab);
 	mod_add_cmd(&modlist_msgtab);
 	mod_add_cmd(&modrestart_msgtab);
 	mod_add_cmd(&error_msgtab);
@@ -488,20 +503,20 @@
     {
       if(match(parv[1],modlist[i]->name))
       {
-        sendto_one(source_p, form_str(RPL_MODLIST), me.name, parv[0],
+        sendto_one(source_p, form_str(source_p,RPL_MODLIST), me.name, parv[0],
                    modlist[i]->name, modlist[i]->address,
                    modlist[i]->version, modlist[i]->core?"(core)":"");
       }
     }
     else
     {
-      sendto_one(source_p, form_str(RPL_MODLIST), me.name, parv[0],
+      sendto_one(source_p, form_str(source_p,RPL_MODLIST), me.name, parv[0],
                  modlist[i]->name, modlist[i]->address,
                  modlist[i]->version, modlist[i]->core?"(core)":"");
     }
   }
   
-  sendto_one(source_p, form_str(RPL_ENDOFMODLIST), me.name, parv[0]);
+  sendto_one(source_p, form_str(source_p,RPL_ENDOFMODLIST), me.name, parv[0]);
 }
 
 /* unload and reload all modules */
@@ -536,6 +551,45 @@
       modnum, num_mods);
 }
 
+static void
+ms_svsload(struct Client *client_p, struct Client *source_p, int parc, char **parv)
+{
+	char *m_bn;
+
+  if (parc < 3)
+    return;
+
+  if (hunt_server(client_p, source_p, ":%s SVSLOAD %s :%s", 
+		  1, parc, parv) != HUNTED_ISME)
+    return;
+
+  if (!find_z_conf(parv[0]))
+    return;
+
+	m_bn = irc_basename(parv[2]);
+
+	if (findmodule_byname(m_bn) == -1)
+		load_a_module(parv[2], 0, 0);
+	  
+	MyFree(m_bn);
+}
+
+static void
+ms_svsunload(struct Client *client_p, struct Client *source_p, int parc, char **parv)
+{
+  if (parc < 3)
+    return;
+
+  if (hunt_server(client_p, source_p, ":%s SVSUNLOAD %s :%s", 
+		  1, parc, parv) != HUNTED_ISME)
+    return;
+
+  if (!find_z_conf(parv[0]))
+    return;
+
+	unload_one_module(parv[2], 0);
+}
+
 #else /* STATIC_MODULES */
 
 /* load_all_modules()
@@ -558,12 +612,13 @@
 #endif
 	mod_add_cmd(&client_msgtab);
 	mod_add_cmd(&close_msgtab);
+	mod_add_cmd(&conf_msgtab);
 	mod_add_cmd(&connect_msgtab);
 #ifdef HAVE_LIBCRYPTO
 	mod_add_cmd(&challenge_msgtab);
-        mod_add_cmd(&cryptlink_msgtab);
+    mod_add_cmd(&cryptlink_msgtab);
 #endif
-        mod_add_cmd(&die_msgtab);
+    mod_add_cmd(&die_msgtab);
 	mod_add_cmd(&dmem_msgtab);
 	mod_add_cmd(&drop_msgtab);
 	mod_add_cmd(&eob_msgtab);
@@ -600,7 +655,7 @@
 	mod_add_cmd(&pong_msgtab);
 	mod_add_cmd(&post_msgtab);
 	mod_add_cmd(&get_msgtab);
-        mod_add_cmd(&put_msgtab);
+    mod_add_cmd(&put_msgtab);
 	mod_add_cmd(&quit_msgtab);
 	mod_add_cmd(&rehash_msgtab);
 	mod_add_cmd(&restart_msgtab);
@@ -611,6 +666,12 @@
 	mod_add_cmd(&squit_msgtab);
 	mod_add_cmd(&stats_msgtab);
 	mod_add_cmd(&svinfo_msgtab);
+	mod_add_cmd(&svsnick_msgtab);
+	mod_add_cmd(&svshint_msgtab);
+	mod_add_cmd(&svshost_msgtab);
+	mod_add_cmd(&svsjoin_msgtab);
+	mod_add_cmd(&svspart_msgtab);
+	mod_add_cmd(&svsmode_msgtab);
 	mod_add_cmd(&testline_msgtab);
 	mod_add_cmd(&time_msgtab);
 	mod_add_cmd(&topic_msgtab);
@@ -624,6 +685,7 @@
 	mod_add_cmd(&users_msgtab);
 	mod_add_cmd(&version_msgtab);
 	mod_add_cmd(&wallops_msgtab);
+	mod_add_cmd(&watch_msgtab);
 	mod_add_cmd(&who_msgtab);
 	mod_add_cmd(&whois_msgtab);
 	mod_add_cmd(&whowas_msgtab);
diff -uNrd -x CVS ircd-hybrid-7rc5/src/motd.c ircd-hybrid-7-bg/src/motd.c
--- ircd-hybrid-7rc5/src/motd.c	Thu Oct 10 14:49:30 2002
+++ ircd-hybrid-7-bg/src/motd.c	Mon Mar 10 01:09:05 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: motd.c,v 7.26 2002/10/10 18:49:30 androsyn Exp $
+ *  $Id: motd.c,v 1.2 2003/03/10 06:09:05 demond Exp $
  */
 
 #include "stdinc.h"
@@ -78,20 +78,20 @@
       
       if (motdToPrint->contentsOfFile == (MessageFileLine *)NULL)
         {
-          sendto_one(source_p, form_str(ERR_NOMOTD), me.name, nick);
+          sendto_one(source_p, form_str(source_p,ERR_NOMOTD), me.name, nick);
           return 0;
         }
 
-      sendto_one(source_p, form_str(RPL_MOTDSTART), me.name, nick, me.name);
+      sendto_one(source_p, form_str(source_p,RPL_MOTDSTART), me.name, nick, me.name);
 
       for(linePointer = motdToPrint->contentsOfFile;linePointer;
           linePointer = linePointer->next)
         {
           sendto_one(source_p,
-                     form_str(RPL_MOTD),
+                     form_str(source_p,RPL_MOTD),
                      me.name, nick, linePointer->line);
         }
-      sendto_one(source_p, form_str(RPL_ENDOFMOTD), me.name, nick);
+      sendto_one(source_p, form_str(source_p,RPL_ENDOFMOTD), me.name, nick);
       return 0;
       /* NOT REACHED */
       break;
diff -uNrd -x CVS ircd-hybrid-7rc5/src/numeric.c ircd-hybrid-7-bg/src/numeric.c
--- ircd-hybrid-7rc5/src/numeric.c	Fri May 24 19:34:49 2002
+++ ircd-hybrid-7-bg/src/numeric.c	Mon Mar 10 01:09:05 2003
@@ -19,13 +19,13 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: numeric.c,v 7.20 2002/05/24 23:34:49 androsyn Exp $
+ *  $Id: numeric.c,v 1.2 2003/03/10 06:09:05 demond Exp $
  */
 
 #include "stdinc.h"
 #include "setup.h"
 #include "config.h"
-
+#include "client.h"
 #include "numeric.h"
 #include "irc_string.h"
 #include "common.h"     /* NULL cripes */
@@ -40,9 +40,9 @@
  * output	- corresponding string
  * side effects	- NONE
  */
-const char* form_str(int numeric)
+char* form_str(struct Client *who, int numeric)
 {
-  const char *num_ptr;
+  char *num_ptr;
 
   assert(-1 < numeric);
   assert(numeric < ERR_LAST_ERR_MSG);
@@ -57,7 +57,9 @@
   if (num_ptr == NULL)
     num_ptr = replies[ERR_LAST_ERR_MSG];
 
-  return ((const char *) _(num_ptr));
+  if (!who) return (_(num_ptr));
+  	else
+  return (IsSetAltLocale(who)? __("alt-language", num_ptr) : _(num_ptr));
 }
 
 
diff -uNrd -x CVS ircd-hybrid-7rc5/src/packet.c ircd-hybrid-7-bg/src/packet.c
--- ircd-hybrid-7rc5/src/packet.c	Wed Oct 30 12:44:56 2002
+++ ircd-hybrid-7-bg/src/packet.c	Tue Feb  4 11:13:07 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: packet.c,v 7.90 2002/10/30 17:44:56 wiz Exp $
+ *  $Id: packet.c,v 1.4 2003/02/04 16:13:07 demond Exp $
  */
 #include "stdinc.h"
 #include "tools.h"
@@ -360,6 +360,10 @@
 #ifndef NDEBUG
   struct hook_io_data hdata;
 #endif
+#ifdef HAVE_LIBCRYPTO
+  fde_t *F = (lclient_p->fd > -1)? &fd_table[lclient_p->fd] : NULL;
+#endif
+
   if(IsDead(client_p))
     return;
   
@@ -379,6 +383,84 @@
    * I personally think it makes the code too hairy to make sane.
    *     -- adrian
    */
+#ifdef HAVE_LIBCRYPTO
+  if (F && F->ssl) {
+  	/*extern time_t CurrentTime;*/
+  	extern char *get_ssl_error(int);
+  	/*static*/ int alerted = 0;
+
+  	if (F->flags.accept_read) {
+  		int ret;
+  		/*recv(fd_r, readBuf, READBUF_SIZE, 0);*/
+  		if ((ret = SSL_accept(F->ssl)) > 0) {
+  			if (!alerted)
+  			sendto_realops_flags(FLAGS_DEBUG, L_ALL, 
+  				"SSL_accept() for %s (socket %d) wanting READ succeeded!",
+  				inetntoa((char *)&S_ADDR(F->connect.hostaddr)), F->fd);
+  			F->flags.accept_read = 0;
+  		} else if (F->accept_failures < 4) {
+  			int val = SSL_get_error(F->ssl, ret);
+  			sendto_realops_flags(FLAGS_DEBUG, L_ALL, 
+  				"SSL_accept() for %s (socket %d) wanting READ error! -- %s",
+  				inetntoa((char *)&S_ADDR(F->connect.hostaddr)), F->fd,
+  				(val == SSL_ERROR_SSL)?
+  				ERR_error_string(ERR_get_error(), NULL) :
+  				get_ssl_error(val));
+  			sendto_realops_flags(FLAGS_DEBUG, L_ALL,
+  				"BIO_sock_should_retry(): %d", BIO_sock_should_retry(ret));
+  		if (val == SSL_ERROR_SYSCALL) {
+  			int err = ERR_get_error();
+  			if (err)
+  				sendto_realops_flags(FLAGS_DEBUG, L_ALL, "ERR_get_error() -- %s",
+  					ERR_error_string(err, NULL));
+  			else
+  				sendto_realops_flags(FLAGS_DEBUG, L_ALL, "more error info -- %s",
+  					(ret == -1)? strerror(errno) : "got EOF, protocol violation");  
+  		}
+  			sendto_realops_flags(FLAGS_DEBUG, L_ALL, "SSL_state_string_long(): %s",
+  				SSL_state_string_long(F->ssl));
+  			F->accept_failures++;
+  		}
+  		length = -1; errno = EAGAIN;
+  	} else {
+  	
+#if 0  				
+  	/*if (CurrentTime % 10 == 0)*/
+  	if (!alerted) {
+  	sendto_realops_flags(FLAGS_DEBUG, L_ALL, "SSL_read() for %s (socket %d) in progress...",
+  		inetntoa((char *)&S_ADDR(F->connect.hostaddr)), F->fd);
+  	sendto_realops_flags(FLAGS_DEBUG, L_ALL, "SSL_state_string_long(): %s",
+  		SSL_state_string_long(F->ssl));
+  	}
+#endif
+  		
+  	length = SSL_read(F->ssl, readBuf, READBUF_SIZE); 
+
+  	if (length <= 0 && !alerted) {
+  		int val = SSL_get_error(F->ssl, length);
+  		/*if (CurrentTime % 10 == 0)*/
+  		sendto_realops_flags(FLAGS_DEBUG, L_ALL, 
+  			"SSL_read() for %s (socket %d) ERROR! -- %s",
+  			inetntoa((char *)&S_ADDR(F->connect.hostaddr)), F->fd,
+  			(val == SSL_ERROR_SSL)?
+  			ERR_error_string(ERR_get_error(), NULL) :
+  			get_ssl_error(val));
+  		if (val == SSL_ERROR_SYSCALL) {
+  			int err = ERR_get_error();
+  			if (err)
+  				sendto_realops_flags(FLAGS_DEBUG, L_ALL, "ERR_get_error() -- %s",
+  					ERR_error_string(err, NULL));
+  			else
+  				sendto_realops_flags(FLAGS_DEBUG, L_ALL, "more error info -- %s",
+  					(length == -1)? strerror(errno) : "got EOF, protocol violation");  
+  		} else {
+  			/*SSL_set_accept_state(F->ssl);*/
+  			errno = EAGAIN;
+  		}
+  	}}
+  	alerted = 1;
+  } else
+#endif
   length = recv(fd_r, readBuf, READBUF_SIZE, 0);
 
   if (length <= 0)
@@ -471,9 +553,6 @@
   exit_aborted_clients();
 
 }
-
-
-
 
 /*
  * client_dopacket - copy packet to client buf and parse it
diff -uNrd -x CVS ircd-hybrid-7rc5/src/parse.c ircd-hybrid-7-bg/src/parse.c
--- ircd-hybrid-7rc5/src/parse.c	Thu Oct 24 14:16:40 2002
+++ ircd-hybrid-7-bg/src/parse.c	Sat May 24 23:27:11 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: parse.c,v 7.141 2002/10/24 18:16:40 bill Exp $
+ *  $Id: parse.c,v 1.4 2003/05/25 01:31:33 demond Exp $
  */
 
 #include "stdinc.h"
@@ -42,6 +42,7 @@
 #include "vchannel.h"
 #include "memory.h"
 #include "s_serv.h"
+#include "s_misc.h"
 
 /*
  * NOTE: parse() should not be called recursively by other functions!
@@ -132,7 +133,7 @@
   char*           numeric = 0;
   struct Message* mptr;
   
-  Debug((DEBUG_DEBUG, "Parsing %s:", pbuffer));
+  Debug((DEBUG_DEBUG, "Parsing> %s", pbuffer));
 
   assert(!IsDead(client_p));
   assert(client_p->localClient->fd >= 0);
@@ -168,13 +169,42 @@
 
       if (*sender && IsServer(client_p))
         {
+          char *token, mybuf[BUFSIZE+1];
+          int hasdot = (int)strchr(sender, '.');
+          int hasatsign = (int)strchr(sender, '@');
+        
+          if (!hasdot || (hasdot && hasatsign))
+          if (ServerInfo.gateway && (token = get_bridge_token(client_p)))
+          	{
+          		int len = strlen(token);
+          		strncpy(mybuf, sender, BUFSIZE)[BUFSIZE] = 0;
+          		
+          		if (sender[0] != '.')
+          		if (HasBridgeToken(sender)) {
+          		
+          			if (ircncmp(sender, token, len) == 0) {
+          			
+          				memmove(mybuf, mybuf + len, BUFSIZE+1 - len);
+          				memset(mybuf + BUFSIZE+1 - len, 0, len);
+          			}
+          		} else {
+          		
+          			memmove(mybuf + len, mybuf, BUFSIZE+1 - len);
+          			memmove(mybuf, token, len);
+          			mybuf[BUFSIZE] = 0;
+          		}
+          		Debug((DEBUG_DEBUG, "source_p: %s", mybuf));
+          		
+          		sender = mybuf;
+          	}
+        
           from = find_client(sender);
           if (from == NULL)
-          {
-	    from = find_server(sender);
-	    if(from == NULL)
-	      from = find_id(sender);
-	  }
+          	{
+	    		from = find_server(sender);
+	    		if(from == NULL)
+	      			from = find_id(sender);
+	  		}
 
           /* Hmm! If the client corresponding to the
            * prefix is not found--what is the correct
@@ -370,7 +400,7 @@
     {
       if (!IsServer(client_p))
 	{
-	  sendto_one(client_p, form_str(ERR_NEEDMOREPARAMS),
+	  sendto_one(client_p, form_str(client_p,ERR_NEEDMOREPARAMS),
 		     me.name, BadPtr(hpara[0]) ? "*" : hpara[0], mptr->cmd);
 	  if (MyClient(client_p))
 	    return(1);
@@ -559,7 +589,7 @@
 	  assert(ptr->cmd != NULL);
 
 	  if (!((ptr->msg->flags & MFLG_HIDDEN) && !IsAdmin(source_p)))
-	    sendto_one(source_p, form_str(RPL_STATSCOMMANDS),
+	    sendto_one(source_p, form_str(source_p,RPL_STATSCOMMANDS),
 		       me.name, source_p->name, ptr->cmd,
 		       ptr->msg->count, ptr->msg->bytes,
 		       ptr->msg->rcount);
@@ -767,6 +797,8 @@
 
   if (parc < 2 || !IsServer(source_p))
     return;
+    
+  cluster_prefix(client_p, parc, parv, 1, 0, 0);
 
   /* Remap low number numerics. */
   if(numeric[0] == '0')
@@ -858,7 +890,7 @@
 m_not_oper(struct Client* client_p, struct Client* source_p,
                 int parc, char* parv[])
 {
-  sendto_one(source_p, form_str(ERR_NOPRIVILEGES), me.name, parv[0]);
+  sendto_one(source_p, form_str(source_p,ERR_NOPRIVILEGES), me.name, parv[0]);
 }
 
 void
@@ -883,7 +915,7 @@
 m_registered(struct Client* client_p, struct Client* source_p,
                   int parc, char* parv[])
 {
-  sendto_one(client_p, form_str(ERR_ALREADYREGISTRED),   
+  sendto_one(client_p, form_str(client_p,ERR_ALREADYREGISTRED),   
              me.name, parv[0]); 
 }
 
diff -uNrd -x CVS ircd-hybrid-7rc5/src/restart.c ircd-hybrid-7-bg/src/restart.c
--- ircd-hybrid-7rc5/src/restart.c	Fri May 24 19:34:49 2002
+++ ircd-hybrid-7-bg/src/restart.c	Mon Dec 30 23:07:27 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: restart.c,v 7.21 2002/05/24 23:34:49 androsyn Exp $
+ *  $Id: restart.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/resv.c ircd-hybrid-7-bg/src/resv.c
--- ircd-hybrid-7rc5/src/resv.c	Thu Oct 10 14:49:30 2002
+++ ircd-hybrid-7-bg/src/resv.c	Mon Mar 10 01:09:06 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: resv.c,v 7.17 2002/10/10 18:49:30 androsyn Exp $
+ *  $Id: resv.c,v 1.2 2003/03/10 06:09:06 demond Exp $
  */
 
 #include "stdinc.h"
@@ -222,13 +222,13 @@
   struct ResvNick *resv_np;
 
   for(resv_cp = ResvChannelList; resv_cp; resv_cp = resv_cp->next)
-    sendto_one(source_p, form_str(RPL_STATSQLINE),
+    sendto_one(source_p, form_str(source_p,RPL_STATSQLINE),
                me.name, source_p->name,
 	       resv_cp->conf ? 'Q' : 'q',
 	       resv_cp->name, resv_cp->reason);
 
   for(resv_np = ResvNickList; resv_np; resv_np = resv_np->next)
-    sendto_one(source_p, form_str(RPL_STATSQLINE),
+    sendto_one(source_p, form_str(source_p,RPL_STATSQLINE),
                me.name, source_p->name,
 	       resv_np->conf ? 'Q' : 'q',
 	       resv_np->name, resv_np->reason);
diff -uNrd -x CVS ircd-hybrid-7rc5/src/rsa.c ircd-hybrid-7-bg/src/rsa.c
--- ircd-hybrid-7rc5/src/rsa.c	Fri May 24 19:34:49 2002
+++ ircd-hybrid-7-bg/src/rsa.c	Mon Dec 30 23:07:27 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: rsa.c,v 7.25 2002/05/24 23:34:49 androsyn Exp $
+ *  $Id: rsa.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_auth.c ircd-hybrid-7-bg/src/s_auth.c
--- ircd-hybrid-7rc5/src/s_auth.c	Tue Oct 29 21:56:18 2002
+++ ircd-hybrid-7-bg/src/s_auth.c	Tue Feb  4 11:13:07 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_auth.c,v 7.103 2002/10/30 02:56:18 androsyn Exp $
+ *  $Id: s_auth.c,v 1.2 2003/02/04 16:13:07 demond Exp $
  */
 
 /*
@@ -87,8 +87,25 @@
   REPORT_HOST_TOOLONG
 } ReportType;
 
+#ifdef HAVE_LIBCRYPTO
+   static void sendheader(struct Client *c, int r) {
+   		int fd = c->localClient->fd;
+   		fde_t *F = (fd > -1)? &fd_table[fd] : NULL;
+   
+   		if (F && F->ssl) {
+   			if (F->flags.accept_write)
+   				if (SSL_accept(F->ssl) > 0)
+   					F->flags.accept_write = 0;
+   			if (!F->flags.accept_read)
+   			SSL_write(F->ssl, HeaderMessages[r].message, HeaderMessages[r].length);
+   		} else {
+   			send(fd, HeaderMessages[r].message, HeaderMessages[r].length, 0);
+   		}
+   }
+#else
 #define sendheader(c, r) \
    send((c)->localClient->fd, HeaderMessages[(r)].message, HeaderMessages[(r)].length, 0)
+#endif
 
 /*
  */
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_bsd.c ircd-hybrid-7-bg/src/s_bsd.c
--- ircd-hybrid-7rc5/src/s_bsd.c	Tue Oct 29 21:56:19 2002
+++ ircd-hybrid-7-bg/src/s_bsd.c	Tue Feb  4 11:13:07 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_bsd.c,v 7.173 2002/10/30 02:56:19 androsyn Exp $
+ *  $Id: s_bsd.c,v 1.4 2003/02/04 16:13:07 demond Exp $
  */
 
 #include "stdinc.h"
@@ -49,7 +49,6 @@
 #include "s_debug.h"
 #include "memory.h"
 
-
 #ifndef IN_LOOPBACKNET
 #define IN_LOOPBACKNET        0x7f
 #endif
@@ -847,7 +846,7 @@
     }
 
   /* Next, update things in our fd tracking */
-  fd_open(fd, FD_SOCKET, note);
+  fd_open(fd, FD_SOCKET, note, NULL);
   return fd;
 }
 
@@ -859,10 +858,14 @@
  * comm_open() does.
  */
 int
-comm_accept(int fd, struct irc_sockaddr *pn)
+comm_accept(int fd, struct irc_sockaddr *pn, int is_ssl)
 {
   int newfd;
   socklen_t addrlen = sizeof(struct irc_sockaddr);
+#ifdef HAVE_LIBCRYPTO
+  SSL *ssl = NULL;
+#endif
+
   if (number_fd >= MASTER_MAX)
     {
       errno = ENFILE;
@@ -877,7 +880,7 @@
   newfd = accept(fd, (struct sockaddr *)&PSOCKADDR(pn), (socklen_t *)&addrlen);
   if (newfd < 0)
     return -1;
-
+    
   /* Set the socket non-blocking, and other wonderful bits */
   if (!set_non_blocking(newfd))
     {
@@ -886,9 +889,115 @@
       return -1;
     }
 
+#ifdef HAVE_LIBCRYPTO
+  if (is_ssl && ServerInfo.ctx) {
+    int retval;
+    extern char *get_ssl_error(int);
+  	fde_t *F = &fd_table[newfd];
+  	
+  	copy_s_addr(F->connect.hostaddr, *pn);
+  
+  	ssl = SSL_new(ServerInfo.ctx);
+  	if (!ssl) {
+  		ilog(L_CRIT, "SSL_new() ERROR! -- %s", ERR_error_string(ERR_get_error(), NULL));
+  		close(newfd);
+  		return -1;
+  	}
+  	SSL_set_fd(ssl, newfd);
+  	
+  	sendto_realops_flags(FLAGS_DEBUG, L_ALL, "SSL_accept() for %s (socket %d) in progress...",
+  		inetntoa((char *)&PS_ADDR(pn)), newfd);
+
+again:
+  	retval = SSL_accept(ssl);
+  	if (retval <= 0) {
+  		switch ((retval = SSL_get_error(ssl, retval))) {
+  		
+	    	case SSL_ERROR_SYSCALL:
+				if (errno==EINTR || errno==EWOULDBLOCK || errno==EAGAIN)
+				
+  			case SSL_ERROR_WANT_READ:
+  			case SSL_ERROR_WANT_WRITE:
+  				sendto_realops_flags(FLAGS_DEBUG, L_ALL,
+  					"SSL_accept() for %s wants read or write (%s), passing through...",
+  					inetntoa((char *)&PS_ADDR(pn)), get_ssl_error(retval));
+  					
+  				/* let it through, SSL_read()/SSL_write() will finish the handshake...*/
+  				/*goto again;*/
+  				
+  				/*SSL_set_accept_state(ssl);*/
+  				if (retval == SSL_ERROR_WANT_READ)
+  					F->flags.accept_read = 1;
+  				else if (retval == SSL_ERROR_WANT_WRITE)
+  					F->flags.accept_write = 1;
+  				else
+  					F->flags.accept_read = 1;
+  				break;
+  				
+  			default:
+  				sendto_realops_flags(FLAGS_DEBUG, L_ALL, "SSL_accept() ERROR! -- %s",
+  					(retval == SSL_ERROR_SSL)?
+  					ERR_error_string(ERR_get_error(), NULL) :
+  					get_ssl_error(retval));
+  				SSL_free(ssl);
+  				close(newfd);
+  				return -1;
+  		}
+  	} else {
+  		char *ssl_get_cipher(SSL *);
+  		/*SSL_set_accept_state(ssl);*/
+  		
+  		sendto_realops_flags(FLAGS_DEBUG, L_ALL, "SSL_accept() for %s succeeded!",
+  			inetntoa((char *)&PS_ADDR(pn)));
+  		sendto_realops_flags(FLAGS_DEBUG, L_ALL, "SSL protocol/cipher: %s",
+  			ssl_get_cipher(ssl));
+  		sendto_realops_flags(FLAGS_DEBUG, L_ALL, "SSL_state_string_long(): %s",
+  			SSL_state_string_long(ssl));
+  	}
+  }
+#endif
+
   /* Next, tag the FD as an incoming connection */
-  fd_open(newfd, FD_SOCKET, "Incoming connection");
+#ifdef HAVE_LIBCRYPTO
+  if (is_ssl && ServerInfo.ctx)
+  	fd_open(newfd, FD_SOCKET, "Incoming SSL connection", ssl);
+  else
+  	fd_open(newfd, FD_SOCKET, "Incoming connection", ssl);
+#else
+  fd_open(newfd, FD_SOCKET, "Incoming connection", NULL);
+#endif
 
   /* .. and return */
   return newfd;
 }
+
+#ifdef HAVE_LIBCRYPTO
+char *ssl_get_cipher(SSL *ssl)
+{
+	static char buf[400];
+	char bots[10];
+	int bits;
+	SSL_CIPHER *c; 
+	
+	buf[0] = '\0';
+	switch(ssl->session->ssl_version)
+	{
+		case SSL2_VERSION:
+			strcat(buf, "SSLv2"); break;
+		case SSL3_VERSION:
+			strcat(buf, "SSLv3"); break;
+		case TLS1_VERSION:
+			strcat(buf, "TLSv1"); break;
+		default:
+			strcat(buf, "UNKNOWN");
+	}
+	strcat(buf, "-");
+	strcat(buf, SSL_get_cipher(ssl));
+	c = SSL_get_current_cipher(ssl);
+	SSL_CIPHER_get_bits(c, &bits);
+	sprintf(bots, "-%d", bits);
+	strcat(buf, bots);
+	strcat(buf, "bits");
+	return (buf);
+}
+#endif
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_bsd_devpoll.c ircd-hybrid-7-bg/src/s_bsd_devpoll.c
--- ircd-hybrid-7rc5/src/s_bsd_devpoll.c	Sun Jun 16 22:57:01 2002
+++ ircd-hybrid-7-bg/src/s_bsd_devpoll.c	Mon Dec 30 23:07:27 2002
@@ -20,7 +20,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_bsd_devpoll.c,v 7.15 2002/06/17 02:57:01 db Exp $
+ *  $Id: s_bsd_devpoll.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "config.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_bsd_kqueue.c ircd-hybrid-7-bg/src/s_bsd_kqueue.c
--- ircd-hybrid-7rc5/src/s_bsd_kqueue.c	Sat Jun 15 03:19:57 2002
+++ ircd-hybrid-7-bg/src/s_bsd_kqueue.c	Mon Dec 30 23:07:27 2002
@@ -20,7 +20,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_bsd_kqueue.c,v 1.27 2002/06/15 07:19:57 androsyn Exp $
+ *  $Id: s_bsd_kqueue.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "config.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_bsd_poll.c ircd-hybrid-7-bg/src/s_bsd_poll.c
--- ircd-hybrid-7rc5/src/s_bsd_poll.c	Fri May 24 19:34:50 2002
+++ ircd-hybrid-7-bg/src/s_bsd_poll.c	Mon Dec 30 23:07:27 2002
@@ -20,7 +20,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_bsd_poll.c,v 7.54 2002/05/24 23:34:50 androsyn Exp $
+ *  $Id: s_bsd_poll.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "config.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_bsd_select.c ircd-hybrid-7-bg/src/s_bsd_select.c
--- ircd-hybrid-7rc5/src/s_bsd_select.c	Fri May 24 21:42:54 2002
+++ ircd-hybrid-7-bg/src/s_bsd_select.c	Mon Dec 30 23:07:27 2002
@@ -20,7 +20,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_bsd_select.c,v 7.26 2002/05/25 01:42:54 androsyn Exp $
+ *  $Id: s_bsd_select.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "config.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_bsd_sigio.c ircd-hybrid-7-bg/src/s_bsd_sigio.c
--- ircd-hybrid-7rc5/src/s_bsd_sigio.c	Sat May 25 05:05:55 2002
+++ ircd-hybrid-7-bg/src/s_bsd_sigio.c	Mon Dec 30 23:07:27 2002
@@ -21,7 +21,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_bsd_sigio.c,v 7.23 2002/05/25 09:05:55 androsyn Exp $
+ *  $Id: s_bsd_sigio.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #ifndef _GNU_SOURCE
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_conf.c ircd-hybrid-7-bg/src/s_conf.c
--- ircd-hybrid-7rc5/src/s_conf.c	Wed Oct 30 12:44:57 2002
+++ ircd-hybrid-7-bg/src/s_conf.c	Sat May 24 23:27:11 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_conf.c,v 7.332 2002/10/30 17:44:57 wiz Exp $
+ *  $Id: s_conf.c,v 1.5 2003/05/24 00:07:47 demond Exp $
  */
 
 #include "stdinc.h"
@@ -50,6 +50,7 @@
 #include "s_debug.h"
 #include "fileio.h"
 #include "memory.h"
+#include "s_misc.h"
 
 struct config_server_hide ConfigServerHide;
 
@@ -121,6 +122,23 @@
 /* conf uline link list root */
 struct ConfItem        *u_conf = ((struct ConfItem *)NULL);
 
+/* conf zline link list root */
+struct ConfItem        *z_conf = ((struct ConfItem *)NULL);
+
+struct Equiv {
+  char *nick;
+  char *target;
+  struct Equiv *next;
+};
+
+static struct Equiv *equivs = NULL;
+static struct Equiv *userparms = NULL;
+static struct Equiv *clusters = NULL;
+
+#define MAXRELAYS 64
+static char *relays[MAXRELAYS];
+static int relaynum = 0;
+
 /*
  * conf_dns_callback
  * inputs	- pointer to struct ConfItem
@@ -316,7 +334,7 @@
             /* except if HIDE_SERVERS_IPS is defined */
 #ifndef HIDE_SERVERS_IPS
             if(IsOperAdmin(source_p))
-              sendto_one(source_p, form_str(p->rpl_stats), me.name,
+              sendto_one(source_p, form_str(source_p,p->rpl_stats), me.name,
                          source_p->name, c,
                          host,
 			 buf,
@@ -326,7 +344,7 @@
                          oper_flags_as_string((int)tmp->hold));
             else
 #endif
-              sendto_one(source_p, form_str(p->rpl_stats), me.name,
+              sendto_one(source_p, form_str(source_p,p->rpl_stats), me.name,
                          source_p->name, c,
                          "*@127.0.0.1",
 			 buf,
@@ -339,7 +357,7 @@
           {
             /* Don't allow non opers to see oper privs */
             if(IsOper(source_p))
-              sendto_one(source_p, form_str(p->rpl_stats), me.name,
+              sendto_one(source_p, form_str(source_p,p->rpl_stats), me.name,
                          source_p->name,
                          p->conf_char,
                          user, host, name,
@@ -347,7 +365,7 @@
                          classname,
                          oper_flags_as_string((int)tmp->hold));
             else
-              sendto_one(source_p, form_str(p->rpl_stats), me.name,
+              sendto_one(source_p, form_str(source_p,p->rpl_stats), me.name,
                          source_p->name, p->conf_char,
                          user, host, name,
                          "0",
@@ -355,7 +373,7 @@
                          "");
           }
         else
-          sendto_one(source_p, form_str(p->rpl_stats), me.name,
+          sendto_one(source_p, form_str(source_p,p->rpl_stats), me.name,
                      source_p->name, p->conf_char,
                      host, name, port,
                      classname);
@@ -396,7 +414,7 @@
         get_printable_conf(aconf, &name, &host, &pass,
                            &user, &port, &classname);
 
-        sendto_one(source_p, form_str(numeric),
+        sendto_one(source_p, form_str(source_p,numeric),
                    me.name,
                    source_p->name,
                    name,
@@ -520,7 +538,8 @@
     {
       aconf = find_address_conf(client_p->host,client_p->username,
 				&client_p->localClient->ip,
-				client_p->localClient->aftype);
+				client_p->localClient->aftype,
+				client_p->localClient->passwd);
     }
   else
     {
@@ -528,7 +547,8 @@
       strlcat(non_ident, username, USERLEN + 1);
       aconf = find_address_conf(client_p->host,non_ident,
 				&client_p->localClient->ip,
-				client_p->localClient->aftype);
+				client_p->localClient->aftype,
+				client_p->localClient->passwd);
     }
 
   if (aconf != NULL)
@@ -537,7 +557,7 @@
 	{
 	  if (aconf->flags & CONF_FLAGS_REDIR)
 	    {
-	      sendto_one(client_p, form_str(RPL_REDIR), me.name, client_p->name,
+	      sendto_one(client_p, form_str(client_p,RPL_REDIR), me.name, client_p->name,
 			 aconf->name ? aconf->name : "", aconf->port);
 	      return(NOT_AUTHORIZED);
 	    }
@@ -568,6 +588,8 @@
 	  /* Thanks for spoof idea amm */
 	  if (IsConfDoSpoofIp(aconf))
 	    {
+	      char *p = strchr(aconf->name, '@');
+
 #ifndef HIDE_SPOOF_IPS
 	      if (IsConfSpoofNotice(aconf))
 		{
@@ -576,7 +598,23 @@
 				       client_p->host, aconf->name);
 		}
 #endif
-	      strlcpy(client_p->host, aconf->name, sizeof(client_p->host));
+	      if (p) 
+		{
+		  int len = p - aconf->name;
+		  if (len > USERLEN) 
+		    len = USERLEN;
+
+		  strcpy(client_p->realhost, client_p->username);
+		  strcat(client_p->realhost, "@");
+		  strncat(client_p->realhost, client_p->host, HOSTLEN - strlen(client_p->username) - 1);
+		  strncpy(client_p->username, aconf->name, len);
+		  if (len)
+		    client_p->username[len] = '\0';
+		}
+	      else
+		strcpy(client_p->realhost, client_p->host);
+	      strncpy(client_p->host, p? p+1 : aconf->name, HOSTLEN);
+
 	      SetIPSpoof(client_p);
 	    }
 	  return(attach_iline(client_p, aconf));
@@ -610,6 +648,9 @@
 
   SetIpHash(client_p);
   ip_found->count++;
+  
+  sendto_realops_flags(FLAGS_DEBUG, L_ALL, "attach_iline(): %s!%s@%s %p %d",
+  	client_p->name, client_p->username, client_p->host, ip_found, ip_found->count);
 
   /* only check it if its non zero */
   if ( aconf->c_class /* This should never non NULL *grin* */ &&
@@ -1207,6 +1248,32 @@
   return(NULL);
 }
 
+/* 
+ * NOTES
+ *
+ * C:192.168.0.240:password:irc.server.name:...
+ * C:irc.server.name:password:irc.server.name
+ * C:host:passwd:name:port:class
+ * N:host:passwd:name:hostmask number:class
+ */
+/*
+ * Added for new access check    meLazy <- no youShithead, your code sucks
+ */
+struct ConfItem* find_conf_host(dlink_list *list, const char* host, 
+                                int statmask)
+{
+  dlink_node *ptr;
+  struct ConfItem *aconf;
+  
+  for (ptr = list->head; ptr; ptr = ptr->next)
+    {
+      aconf = ptr->data;
+      if (aconf->status & statmask && aconf->host && match(aconf->host, host))
+        return aconf;
+    }
+  return NULL;
+}
+
 /*
  * find_x_conf
  *
@@ -1262,6 +1329,43 @@
   return(NO);
 }
 
+int find_z_conf(char *server)
+{
+  struct ConfItem *aconf;
+
+  for (aconf = z_conf; aconf; aconf = aconf->next)
+    {
+      if (BadPtr(aconf->name))
+          continue;
+
+      if(match(aconf->name,server))
+		{
+	  		if (BadPtr(aconf->user) || BadPtr(aconf->host))
+	    		return YES;
+
+		}
+    }
+  return NO;
+}
+
+void report_zlines(struct Client *source_p)
+{
+  struct ConfItem *aconf;
+  char *host;
+  char *user;
+  char *pass;
+  char *name;
+  char *classname;
+  int  port;
+
+  for (aconf = z_conf; aconf; aconf = aconf->next)
+    {
+      get_printable_conf(aconf, &name, &host, &pass, &user, &port,&classname);
+          
+      sendto_one(source_p, form_str(source_p,RPL_STATSZLINE),
+		 me.name, source_p->name, name);
+    }
+}
 
 /*
  * clear_special_conf
@@ -1356,6 +1460,7 @@
   ServerInfo.max_buffer = MAX_BUFFER;    /*       actually do anything! */
   /* Don't reset hub, as that will break lazylinks */
   /* ServerInfo.hub = NO; */
+  ServerInfo.gateway = NO;
   ServerInfo.dns_host.sin_addr.s_addr = 0;
   ServerInfo.dns_host.sin_port = 0;
   AdminInfo.name = NULL;
@@ -1426,6 +1531,8 @@
   ConfigChannel.use_invex   = YES;
   ConfigChannel.use_knock   = YES;
   ConfigChannel.use_vchans = NO;
+  ConfigChannel.use_subst = NO;
+  ConfigChannel.use_denies = NO;
   ConfigChannel.knock_delay = 300;
   ConfigChannel.knock_delay_channel = 60;
   ConfigChannel.max_chans_per_user = 15;
@@ -1447,6 +1554,13 @@
   ConfigFileEntry.min_nonwildcard = 4;
   ConfigFileEntry.default_floodcount = 8;
   ConfigFileEntry.client_flood = CLIENT_FLOOD_DEFAULT;
+  ConfigFileEntry.grace_time = GRACE_TIME_DEFAULT;
+  ConfigFileEntry.repeat_grace = REPGRACEDEF;
+  ConfigFileEntry.spam_wait = SPAM_WAIT_DEFAULT;
+  ConfigFileEntry.drone_rate_max = DRONE_RMAX_DEF;
+  ConfigFileEntry.drone_rate_period = DRONE_RPERIOD_DEF;
+  ConfigFileEntry.drone_kline_time = DRONE_KTIME_DEF;
+  strcpy(ConfigFileEntry.spawn_pass, "spawn");
 
 #ifdef IPV6  
   ConfigFileEntry.fallback_to_ip6_int = 1;
@@ -1841,7 +1955,7 @@
 oper_flags_as_string(int flags)
 {
   /* This MUST be extended if we add any more modes... -Hwy */
-  static char flags_out[18];
+  static char flags_out[32];
   char *flags_ptr;
 
   flags_ptr = flags_out;
@@ -1879,6 +1993,8 @@
     *flags_ptr++ = 'l';
   if(flags & FLAGS_CALLERID)
     *flags_ptr++ = 'g';
+  if(flags & FLAGS_REMOTE)
+    *flags_ptr++ = 'q';
   *flags_ptr = '\0';
 
   return(flags_out);
@@ -2103,6 +2219,41 @@
   clear_out_address_conf();
   clear_special_conf(&x_conf);
   clear_special_conf(&u_conf);
+  clear_special_conf(&z_conf);
+
+  {
+      int i;
+      struct Equiv *eitem;
+
+      if (equivs) do {
+		eitem = equivs;
+		equivs = equivs->next;
+		MyFree(eitem->nick);
+		MyFree(eitem->target);
+		MyFree(eitem);
+      } while (equivs);
+
+      if (userparms) do {
+		eitem = userparms;
+		userparms = userparms->next;
+		MyFree(eitem->nick);
+		MyFree(eitem->target);
+		MyFree(eitem);
+      } while (userparms);
+
+      if (clusters) do {
+		eitem = clusters;
+		clusters = clusters->next;
+		MyFree(eitem->nick);
+		MyFree(eitem->target);
+		MyFree(eitem);
+      } while (clusters);
+
+      for (i=0; i<relaynum; i++)
+		MyFree(relays[i]);
+
+      relaynum = 0;
+  }
 
   /* clean out module paths */
 #ifndef STATIC_MODULES
@@ -2158,6 +2309,211 @@
   /* OK, that should be everything... */
 }
 
+/* these deal with the equivalent nicks stuff
+ *                                  -demond
+ */
+void report_equivs(struct Client* source_p)
+{
+  struct Equiv *eitem;
+
+  for (eitem = equivs; eitem; eitem = eitem->next)
+    sendto_one(source_p, form_str(source_p,RPL_EQUIVALENTS),
+	       me.name, source_p->name, 
+	       eitem->nick, eitem->target);
+}
+
+void add_equiv_nicks(char *nicks)
+{
+  char *p, *q, *buf;
+  struct Equiv *eitem;
+
+  DupString(buf, nicks);
+  p = strchr(buf, '/');
+
+  if (p) {
+    *p = 0; ++p;
+    
+    if (*p) {
+
+      eitem = (struct Equiv*) MyMalloc(sizeof(struct Equiv));
+
+      DupString(q, buf); eitem->nick = q;
+      DupString(q, p); eitem->target = q;
+
+      eitem->next = equivs;
+      equivs = eitem;
+    }
+  }
+
+  MyFree(buf);
+}
+
+/* cluster/bridge stuff helper functions
+ *                            -demond
+ */
+void report_clusters(struct Client* source_p)
+{
+  struct Equiv *eitem;
+
+  for (eitem = clusters; eitem; eitem = eitem->next)
+    sendto_one(source_p, form_str(source_p,RPL_CLUSTERBRIDGE),
+	       me.name, source_p->name, 
+	       eitem->nick, eitem->target);
+}
+
+void add_cluster_bridge(char *bridge)
+{
+  char *p, *q, *buf;
+  struct Equiv *eitem;
+
+  DupString(buf, bridge);
+  p = strchr(buf, '/');
+
+  if (p) {
+    *p = 0; ++p;
+    
+    if (*p) {
+
+      eitem = (struct Equiv*) MyMalloc(sizeof(struct Equiv));
+
+      DupString(q, buf); eitem->nick = q;
+      DupString(q, p); eitem->target = q;
+
+      eitem->next = clusters;
+      clusters = eitem;
+    }
+  }
+
+  MyFree(buf);
+}
+
+/* USER constant parameter handling
+ *                        -demond
+ */
+void add_userpar_param(char *param)
+{
+  char *p, *q, *buf;
+  struct Equiv *eitem;
+
+  if (!param[0]) return;
+
+  DupString(buf, param);
+  p = strchr(buf, '/');
+
+  eitem = (struct Equiv*) MyMalloc(sizeof(struct Equiv));
+
+  if (p) {
+
+    *p = 0; ++p;
+	DupString(q, buf); eitem->nick = q;
+    
+    if (*p) {
+
+      DupString(q, p); eitem->target = q;
+    }
+
+  } else {
+	
+	DupString(q, buf); eitem->nick = q;
+  }
+
+  eitem->next = userparms;
+  userparms = eitem;
+
+  MyFree(buf);
+}
+
+void report_userparms(struct Client* source_p)
+{
+  struct Equiv *eitem;
+
+  for (eitem = userparms; eitem; eitem = eitem->next)
+    sendto_one(source_p, form_str(source_p,RPL_USERPARMS),
+	       me.name, source_p->name, eitem->nick, 
+		   eitem->target? eitem->target : "<NULL>");
+}
+
+int IsUserPar(char *host, char *server)
+{
+	struct Equiv *eitem;
+
+	for (eitem = userparms; eitem; eitem = eitem->next)
+		if (strcmp(host, eitem->nick) == 0)
+			if (eitem->target) {
+				if (strcmp(server, eitem->target) == 0)
+					return 1;
+			} else
+				return 1;
+
+	return 0;
+}
+
+/* bot relay servers, ignored for various reasons
+ *                                       -demond
+ */
+void add_relay_server(char *name)
+{
+
+  if (relaynum < MAXRELAYS)
+    DupString(relays[relaynum++], name);
+}
+
+void report_relays(struct Client* source_p)
+{
+  int i;
+
+  for (i=0; i<relaynum; i++)
+    sendto_one(source_p, form_str(source_p,RPL_RELAYS),
+	       me.name, source_p->name, relays[i]); 
+}
+
+int IsRelay(struct Client* client_p)
+{
+  int i;
+
+  for (i=0; i<relaynum; i++)
+    if (irccmp(relays[i], client_p->name) == 0)
+      return 1;
+
+  return 0;
+}
+
+char *get_equiv_nick(char *nick, char *target)
+{
+  struct Equiv *eitem;
+
+  for (eitem = equivs; eitem; eitem = eitem->next)
+    if (irccmp(nick, eitem->nick) == 0) {
+
+      strncpy(target, eitem->target, NICKLEN);
+      return target;
+    }
+
+  return NULL;
+}
+
+char *get_bridge_token(struct Client *client_p)
+{
+  struct Equiv *eitem;
+
+  for (eitem = clusters; eitem; eitem = eitem->next)
+    if (irccmp(client_p->name, eitem->nick) == 0)
+      return eitem->target;
+
+  return NULL;
+}
+
+int HasBridgeToken(char *str)
+{
+  struct Equiv *eitem;
+
+  for (eitem = clusters; eitem; eitem = eitem->next)
+    if (ircncmp(str, eitem->target, strlen(eitem->target)) == 0)
+      return 1;
+
+  return 0;
+}
+
 /*
  * flush_deleted_I_P
  *
@@ -2445,6 +2801,11 @@
   u_conf = aconf;
 }
 
+void conf_add_z_conf(struct ConfItem *aconf)
+{
+  aconf->next = z_conf;
+  z_conf = aconf;
+}
 
 /*
  * conf_add_fields
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_debug.c ircd-hybrid-7-bg/src/s_debug.c
--- ircd-hybrid-7rc5/src/s_debug.c	Fri May 24 19:34:51 2002
+++ ircd-hybrid-7-bg/src/s_debug.c	Mon Mar 10 01:09:06 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_debug.c,v 7.67 2002/05/24 23:34:51 androsyn Exp $
+ *  $Id: s_debug.c,v 1.2 2003/03/10 06:09:06 demond Exp $
  */
 
 #include "stdinc.h"
@@ -162,6 +162,8 @@
   int channel_bans = 0;      
   int channel_except = 0;
   int channel_invex = 0;
+  int channel_subst = 0;
+  int channel_denies = 0;
 
   int wwu = 0;                  /* whowas users */
   int class_count = 0;          /* classes */
@@ -176,6 +178,8 @@
   u_long channel_ban_memory = 0;
   u_long channel_except_memory = 0;
   u_long channel_invex_memory = 0;
+  u_long channel_subst_memory = 0;
+  u_long channel_denies_memory = 0;
 
   u_long away_memory = 0;       /* memory used by aways */
   u_long wwm = 0;               /* whowas array memory used */
@@ -233,7 +237,7 @@
         }
     }
 
-  /* Count up all channels, ban lists, except lists, Invex lists */
+  /* Count up all channels, ban lists, except lists, Invex, subst words lists */
 
   for (chptr = GlobalChannelList; chptr; chptr = chptr->nextch)
     {
@@ -296,6 +300,32 @@
           if (actualBan->who)
             channel_invex_memory += strlen(actualBan->who);
         }
+    
+	  for (dlink = chptr->substlist.head; dlink; dlink = dlink->next)
+        {
+	  actualBan = dlink->data;
+          channel_subst++;
+
+          channel_subst_memory += (sizeof(dlink_node) + 
+				   sizeof(struct Ban));
+          if (actualBan->banstr)
+            channel_subst_memory += strlen(actualBan->banstr);
+          if (actualBan->who)
+            channel_subst_memory += strlen(actualBan->who);
+        }
+    
+	  for (dlink = chptr->denylist.head; dlink; dlink = dlink->next)
+        {
+	  actualBan = dlink->data;
+          channel_denies++;
+
+          channel_denies_memory += (sizeof(dlink_node) + 
+				   sizeof(struct Ban));
+          if (actualBan->banstr)
+            channel_denies_memory += strlen(actualBan->banstr);
+          if (actualBan->who)
+            channel_denies_memory += strlen(actualBan->who);
+        }
     }
 
   /* count up all config items */
@@ -354,6 +384,14 @@
   sendto_one(source_p, ":%s %d %s :Invex %u(%d)",
              me.name, RPL_STATSDEBUG, source_p->name,
 	     channel_invex, (int)channel_invex_memory);
+
+  sendto_one(source_p, ":%s %d %s :Subst %u(%d)",
+             me.name, RPL_STATSDEBUG, source_p->name,
+	     channel_subst, (int)channel_subst_memory);
+
+  sendto_one(source_p, ":%s %d %s :Denies %u(%d)",
+             me.name, RPL_STATSDEBUG, source_p->name,
+	     channel_denies, (int)channel_denies_memory);
 
   sendto_one(source_p, ":%s %d %s :Channel members %u(%lu) invite %u(%lu)",
              me.name, RPL_STATSDEBUG, source_p->name, channel_users,
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_gline.c ircd-hybrid-7-bg/src/s_gline.c
--- ircd-hybrid-7rc5/src/s_gline.c	Wed Sep  4 22:48:42 2002
+++ ircd-hybrid-7-bg/src/s_gline.c	Mon Dec 30 23:07:27 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_gline.c,v 1.23 2002/09/05 02:48:42 db Exp $
+ *  $Id: s_gline.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_log.c ircd-hybrid-7-bg/src/s_log.c
--- ircd-hybrid-7rc5/src/s_log.c	Mon Sep  9 09:43:48 2002
+++ ircd-hybrid-7-bg/src/s_log.c	Mon Dec 30 23:07:27 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_log.c,v 7.45 2002/09/09 13:43:48 db Exp $
+ *  $Id: s_log.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "stdinc.h"
@@ -212,7 +212,8 @@
 	  (signed long) on_for / 3600,
 	  (signed long) (on_for % 3600)/60,
 	  (signed long) on_for % 60,
-	  source_p->name, source_p->username, source_p->host,
+	  source_p->name, source_p->username, 
+	  source_p->realhost[0]? source_p->realhost : source_p->host,
 	  source_p->localClient->sendK,
 	  source_p->localClient->receiveK);
     }
@@ -246,7 +247,8 @@
 		   (signed long) on_for / 3600,
 		   (signed long) (on_for % 3600)/60,
 		   (signed long) on_for % 60,
-		   source_p->name, source_p->username, source_p->host,
+		   source_p->name, source_p->username, 
+		   source_p->realhost[0]? source_p->realhost : source_p->host,
 		   source_p->localClient->sendK,
 		   source_p->localClient->receiveK);
 	
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_misc.c ircd-hybrid-7-bg/src/s_misc.c
--- ircd-hybrid-7rc5/src/s_misc.c	Fri May 24 19:34:51 2002
+++ ircd-hybrid-7-bg/src/s_misc.c	Sat May 24 23:27:11 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_misc.c,v 7.29 2002/05/24 23:34:51 androsyn Exp $
+ *  $Id: s_misc.c,v 1.5 2003/05/25 01:31:33 demond Exp $
  */
 
 #include "stdinc.h"
@@ -36,8 +36,14 @@
 #include "s_serv.h"
 #include "send.h"
 #include "memory.h"
+#include "s_log.h"
+#include "s_debug.h"
 
 
+static char *drones[DRONEMAX];
+static int droneidx = 0;
+
+static void drone_kline(char *ip);
 
 static char* months[] = {
   "January",   "February", "March",   "April",
@@ -104,7 +110,6 @@
   return buf;
 }
 
-
 /*
  * small_file_date
  * Make a small YYYYMMDD formatted string suitable for a
@@ -122,3 +127,402 @@
   return timebuffer;
 }
 
+#define PLUGPARAMS 16
+
+void do_plugin(char *plugin, char *params)
+{
+	char pbuf[BUFSIZE];
+	char plug[BUFSIZE];
+	void (*try)() = (void (*)())(plug + PLUGPARAMS * sizeof(char *));
+	char *p = pbuf, **q = (char **)plug;
+	int i, n = 0, newp = 0;
+
+	strncpy(plug + PLUGPARAMS * sizeof(char *), 
+		plugin, BUFSIZE)[BUFSIZE-1] = 0;
+	strncpy(pbuf, params, BUFSIZE)[BUFSIZE-1] = 0;
+
+	while (*p) {
+		if (*p != ' ') {
+			if (!newp) {
+				*q++ = p; newp = 1; n++;
+			}
+		} else {
+			*p = 0;
+			newp = 0;
+		}
+		p++;
+	}
+	*q = 0;
+
+/*for (i=0; i < n; i++) {
+	char *s = *(char **)(plug + i * sizeof(char *));
+	log(L_NOTICE, "DEBUG === before (*try)()... pbuf[%d]=%s", i, s);
+}*/
+	(*try)();
+/*log(L_NOTICE, "DEBUG === after (*try)()...");*/
+}
+
+void purge_repeats(void *blah)
+{
+	dlink_node *ptr, *rep, *next_ptr;
+
+	for (ptr = lclient_list.head; ptr; ptr = ptr->next) {
+		struct Client *cptr = ptr->data;
+
+		for (rep = cptr->user->repeat.head; rep; rep = next_ptr) {
+			struct Repeat *repeatptr = rep->data;
+
+			next_ptr = rep->next;
+			if (repeatptr->lastphrase + ConfigFileEntry.repeat_grace < CurrentTime) {
+
+				MyFree(repeatptr->text); MyFree(repeatptr);
+				dlinkDelete(rep, &cptr->user->repeat);
+				free_dlink_node(rep);
+			}
+		}
+	}
+
+	/* autorescheduled
+	eventAdd("purge_repeats", purge_repeats, NULL, ConfigFileEntry.repeat_grace);
+	*/
+}
+
+/*
+ * possible drones warning/kline, which havent set user->known flag
+ *                                               -demond
+ */
+void check_warn_drone(void *blah)
+{
+  struct Client *cptr;
+
+  for (cptr = GlobalClientList; cptr; cptr = cptr->next)
+	if (MyClient(cptr) && IsPerson(cptr))
+		if (cptr->user && !cptr->user->known)
+			if (cptr->tsinfo + ConfigFileEntry.grace_time < CurrentTime) {
+
+				cptr->user->known = 1;
+
+				if (ConfigFileEntry.drone_kline) {
+
+					if (ConfigFileEntry.drone_batch) {
+						if (droneidx < DRONEMAX)
+						DupString(drones[droneidx++], cptr->localClient->sockhost);
+					} else
+						drone_kline(cptr->localClient->sockhost);
+
+				} else sendto_realops_flags(FLAGS_ALL, L_ALL,
+					"Achtung! -- %s (%s@%s) [%s] is a possible trojan drone",
+					cptr->name, cptr->username, cptr->host,
+					cptr->localClient->sockhost);
+			}
+
+	/* autorescheduled
+	eventAdd("check_warn_drone", check_warn_drone, NULL, CHECK_DRONE_TIME);
+	*/
+}
+
+void check_drone_queue(void *blah)
+{
+	int i;
+
+	if (droneidx > ConfigFileEntry.drone_rate_max)
+		for (i=0; i < droneidx; i++)
+			drone_kline(drones[i]);
+
+	for (i=0; i < droneidx; i++)
+		MyFree(drones[i]);
+	droneidx = 0;
+
+	/* autorescheduled
+	eventAdd("check_drone_queue", check_drone_queue, NULL, ConfigFileEntry.drone_rate_period);
+	*/
+}
+
+static
+void drone_kline(char *ip)
+{
+  char buf[0x200];
+  struct ConfItem *aconf;
+  extern struct ConfItem* find_conf_host(dlink_list *, const char*, int);
+
+  if (find_conf_host(&temporary_klines, ip, CONF_KILL))
+	  return;
+
+  aconf = make_conf();
+  aconf->status = CONF_KILL;
+  DupString(aconf->host, ip);
+  DupString(aconf->user, "*");
+  aconf->port = 0;
+
+  ircsprintf(buf, "Temporary K-line %d min. - %s (%s)", 
+	  ConfigFileEntry.drone_kline_time/60, 
+	  ConfigFileEntry.drone_reason[0]? 
+	  ConfigFileEntry.drone_reason : "possible trojan drone", 
+	  smalldate(0));
+  DupString(aconf->passwd, buf);
+
+  aconf->hold = CurrentTime + ConfigFileEntry.drone_kline_time;
+
+  add_temp_kline(aconf);
+
+  sendto_realops_flags(FLAGS_ALL, L_ALL,
+     "<ircd> added temporary %d min. K-Line for [%s@%s] [%s]",
+     ConfigFileEntry.drone_kline_time/60, 
+	 aconf->user, aconf->host, "possible trojan drone");
+
+  ilog(L_TRACE, "<ircd> added temporary %d min. K-Line for [%s@%s] [%s]",
+     ConfigFileEntry.drone_kline_time/60, 
+	 aconf->user, aconf->host, "possible trojan drone");
+
+  check_klines();
+}
+
+static int do_prefix(char *str, char *token, int ischan)
+{
+	int len = strlen(token);
+	char *p = ischan? str + 1 : str;
+	
+	if (str[0] == '.')						/* its an ID, dont touch */
+		return 0;
+
+	if (HasBridgeToken(p)) {
+	
+		if (ircncmp(p, token, len) == 0) {
+	
+			memmove(p, p + len, BUFSIZE);
+			memset(p + BUFSIZE, 0, len);
+			
+			return -len; 					/* token removed */
+		}
+	} else {						
+	
+		memmove(p + len, p, BUFSIZE);		/* BUFSIZE << READBUF_SIZE, so this */
+		memmove(p, token, len);				/* should do the job w/o breaking stuff... */
+		
+		return len;							/* token added */
+	}
+	
+	return 0;
+}
+
+/*
+ * here goes cluster bridge nick translation yadda-yadda-yadda
+ * `type' switch controls SJOIN, MODE or PRIVMSG multiple nick 
+ * syntax, set to zero for all others 
+ *                                               -demond
+ */
+void cluster_prefix(struct Client *client_p, 
+					int argc, 
+					char **argv, 
+					int argn,		/* arg to be dealt with */
+					int ischan,		/* is it a channel name? */
+					int type)
+{
+	int i, len;
+	char *token;
+	
+	if ((argn >= argc) || !ServerInfo.gateway)
+		return;
+		
+	if (!IsServer(client_p) || !(token = get_bridge_token(client_p)))
+		return;
+		
+#ifdef DEBUGMODE
+	{
+		char buf[2*BUFSIZE];
+		
+		buf[0] = '\0';
+		for (i = 0; i < argc; i++) {
+			strcat(buf, argv[i]);
+			strcat(buf, " ");
+		}
+		Debug((DEBUG_DEBUG, "cluster_prefix()1: %s", buf));
+	}
+#endif
+
+	switch (type) {
+		
+		case 0: { /* single nick/chan parameter */
+		
+			if (argn == 0)			/* oook, it seems that its source_p->name and */
+				break;				/* its not a readbuf part and its clustered already */
+		
+			if (argn==0 && !argv[0][0])
+				break;
+		
+			if (argn==0 && strchr(argv[0], '.'))
+			if (!strchr(argv[0], '@'))
+				break;
+		
+			len = do_prefix(argv[argn], token, ischan);
+			for (i = argn + 1; i < argc; i++)
+				argv[i] += len;		/* adjust remaining args */
+			break;
+		}
+		
+		case 1: { /* SJOIN last parameter, multiple nicks */
+		
+			char *p = argv[argn];
+			
+			while (*p) {
+		
+				if (*p==' ' || *p=='@' || *p=='+' || *p=='%') {
+					p++; continue;
+				}
+				do_prefix(p, token, 0);
+				
+				while (*p && *p!=' ') 
+					p++;	
+			}
+			break;
+		}
+		
+		case 2: { /* MODE mixed multiple nicks/modes */
+		
+			int j=1, c=0, ac[20];
+			char *p = argv[argn];
+			
+			while (*p && c<20) {
+				
+				if (*p=='+' || *p=='-') {
+					p++; continue;
+				}
+				if (*p=='o' || *p=='v' || *p=='h')
+					ac[c++] = argn + j++;
+				else
+					j++;
+				p++;
+			}
+			for (i = 0; i < c; i++) {
+				
+				len = do_prefix(argv[ac[i]], token, 0);
+				for (j = ac[i] + 1; j < argc; j++)
+					argv[j] += len; 
+			}
+			break;
+		}
+		
+		case 3: { /* PRIVMSG multiple targets */
+		
+			char *p = argv[argn];
+			
+			len = 0;
+			while (*p) {
+			
+				if (*p == ',') p++;
+		
+				len += do_prefix(p, token, 0);
+				
+				while (*p && *p!=',') 
+					p++;	
+			}
+
+			for (i = argn + 1; i < argc; i++)
+				argv[i] += len;		/* adjust remaining args */
+			break;
+		}
+	}
+	
+#ifdef DEBUGMODE
+	{
+		char buf[2*BUFSIZE];
+		
+		buf[0] = '\0';
+		for (i = 0; i < argc; i++) {
+			strcat(buf, argv[i]);
+			strcat(buf, " ");
+		}
+		Debug((DEBUG_DEBUG, "cluster_prefix()2: %s", buf));
+	}
+#endif
+}
+
+/*
+ * this will strip mIRC and ANSI color, bolds and underlines
+ *                                               -demond
+ */
+char *strip_color(const char *p, int b)
+{
+  static char buf[512];
+  char *r, *q = buf;
+  int m, n;
+
+  do switch (*p) {
+
+  case '\003':
+    p++; if (isdigit(*p)) {
+      p++; m = *p>='0' && *p<='6';
+      n = *(p-1)=='1' || *(p-1)=='0'; 
+      if (m && n) {
+	p++; if (*p == ',') {
+	  p++; if (isdigit(*p)) {
+	    p++; m = *p>='0' && *p<='6';
+	    n = *(p-1)=='1' || *(p-1)=='0';
+	    if (m && n) {
+	      p++;
+	    }
+	  }
+	}
+      } else if (*p == ',') {
+	p++; if (isdigit(*p)) {
+	  p++; m = *p>='0' && *p<='6';
+	  n = *(p-1)=='1' || *(p-1)=='0';
+	  if (m && n) {
+	    p++;
+	  }
+	}
+      } 
+    }
+    break;
+
+  case '\033':
+    p++; if (*p == '[') {
+      p++; r = strchr(p, 'm');
+      if (r) p = r + 1;
+    }
+    break;
+
+  case '\002':
+  case '\037':
+    if (b) {
+      p++; break;
+    }
+
+  default:
+    *q++ = *p++;
+    break;
+
+  } while (*p);
+
+  *q = 0;
+  return buf;
+}
+
+#ifdef HAVE_LIBCRYPTO
+static struct {
+	int err;
+	char *str;
+} errtab[] = {
+	{SSL_ERROR_NONE, "SSL_ERROR_NONE"},
+	{SSL_ERROR_ZERO_RETURN, "SSL_ERROR_ZERO_RETURN"},
+	{SSL_ERROR_WANT_READ, "SSL_ERROR_WANT_READ"},
+	{SSL_ERROR_WANT_WRITE, "SSL_ERROR_WANT_WRITE"},
+	{SSL_ERROR_WANT_CONNECT, "SSL_ERROR_WANT_CONNECT"},
+	/*{SSL_ERROR_WANT_ACCEPT, "SSL_ERROR_WANT_ACCEPT"},*/
+	{SSL_ERROR_WANT_X509_LOOKUP, "SSL_ERROR_WANT_X509_LOOKUP"},
+	{SSL_ERROR_SYSCALL, "SSL_ERROR_SYSCALL"},
+	{SSL_ERROR_SSL, "SSL_ERROR_SSL"},
+	{-1, NULL}
+};
+
+char *get_ssl_error(int sslerr) 
+{
+	int i;
+	
+	for (i=0; errtab[i].err != -1; i++)
+		if (errtab[i].err == sslerr)
+			return errtab[i].str;
+			
+	return "<NULL>";
+}
+#endif
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_serv.c ircd-hybrid-7-bg/src/s_serv.c
--- ircd-hybrid-7rc5/src/s_serv.c	Thu Oct 10 14:49:31 2002
+++ ircd-hybrid-7-bg/src/s_serv.c	Mon Mar 10 01:09:06 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_serv.c,v 7.270 2002/10/10 18:49:31 androsyn Exp $
+ *  $Id: s_serv.c,v 1.3 2003/03/10 06:09:06 demond Exp $
  */
 
 #include "stdinc.h"
@@ -89,10 +89,12 @@
 struct Capability captab[] = {
 /*  name     cap     */ 
   { "QS",    CAP_QS },
+  { "DE",    CAP_DENY },
   { "EX",    CAP_EX },
   { "CHW",   CAP_CHW },
   { "LL",    CAP_LL },
   { "IE",    CAP_IE },
+  { "SW",	 CAP_SW },
   { "EOB",   CAP_EOB },
   { "KLN",   CAP_KLN },
   { "GLN",   CAP_GLN },
@@ -104,7 +106,10 @@
   { "ZIP",   CAP_ZIP },
   { "TBURST", CAP_TBURST },
   { "PARA",  CAP_PARA },
-  { 0,           0 }
+  { "MASK",  CAP_HOSTMASK },
+  { "SVS",   CAP_SVS },
+  { "IP",	 CAP_IP },
+  { 0,       0 }
 };
 
 #ifdef HAVE_LIBCRYPTO
@@ -474,7 +479,7 @@
         {
           if (!(target_p = find_server(parv[server])))
             {
-              sendto_one(source_p, form_str(ERR_NOSUCHSERVER), me.name,
+              sendto_one(source_p, form_str(source_p,ERR_NOSUCHSERVER), me.name,
                          parv[0], parv[server]);
               return(HUNTED_NOSUCH);
             }
@@ -502,7 +507,7 @@
     {
       if(!IsRegistered(target_p))
       {
-        sendto_one(source_p, form_str(ERR_NOSUCHSERVER), me.name,
+        sendto_one(source_p, form_str(source_p,ERR_NOSUCHSERVER), me.name,
 	           parv[0], parv[server]);
         return HUNTED_NOSUCH;
       }
@@ -528,7 +533,7 @@
       return(HUNTED_PASS);
     } 
     
-  sendto_one(source_p, form_str(ERR_NOSUCHSERVER), me.name,
+  sendto_one(source_p, form_str(source_p,ERR_NOSUCHSERVER), me.name,
              parv[0], parv[server]);
   return(HUNTED_NOSUCH);
 }
@@ -820,6 +825,7 @@
 void sendnick_TS(struct Client *client_p, struct Client *target_p)
 {
   static char ubuf[12];
+  unsigned int svshopcount;
 
   if (!IsPerson(target_p))
 	  return;
@@ -831,22 +837,29 @@
 	  ubuf[1] = '\0';
   }
  
+  if (IsCapable(client_p, CAP_SVS))
+    svshopcount = target_p->hopcount + 1 + (target_p->svsflags << 8);
+  else 
+    svshopcount = target_p->hopcount + 1;
+ 
   if (HasID(target_p) && IsCapable(client_p, CAP_UID))
-	  sendto_one(client_p, "CLIENT %s %d %lu %s %s %s %s %s :%s",
-				 target_p->name,
-				 target_p->hopcount + 1,
-				 (unsigned long) target_p->tsinfo,
-				 ubuf,
-				 target_p->username, target_p->host,
-				 target_p->user->server, target_p->user->id, target_p->info);
+	  sendto_one(client_p, "CLIENT %s %d %lu %s %s %s %s %s %s %s :%s",
+				target_p->name, svshopcount, 
+				target_p->tsinfo, ubuf,
+				target_p->username, target_p->host,
+				target_p->user->server, target_p->user->id,
+				IsCapable(client_p, CAP_HOSTMASK)? target_p->realhost : "", 
+				IsCapable(client_p, CAP_IP)? target_p->ip : "", 
+				target_p->info);
   else
-	  sendto_one(client_p, "NICK %s %d %lu %s %s %s %s :%s",
-				 target_p->name, 
-				 target_p->hopcount + 1,
-				 (unsigned long) target_p->tsinfo,
-				 ubuf,
-				 target_p->username, target_p->host,
-				 target_p->user->server, target_p->info);
+	  sendto_one(client_p, "NICK %s %d %lu %s %s %s %s %s %s :%s",
+				target_p->name, svshopcount, 
+				target_p->tsinfo, ubuf,
+				target_p->username, target_p->host,
+				target_p->user->server,
+				IsCapable(client_p, CAP_HOSTMASK)? target_p->realhost : "",
+				IsCapable(client_p, CAP_IP)? target_p->ip : "",
+				target_p->info);
 }
 
 /*
@@ -1468,13 +1481,13 @@
 #endif
 
 #ifdef HAVE_SOCKETPAIR
-    fd_open(server->localClient->ctrlfd, FD_SOCKET, NULL);
-    fd_open(server->localClient->fd, FD_SOCKET, NULL);
+    fd_open(server->localClient->ctrlfd, FD_SOCKET, NULL, NULL);
+    fd_open(server->localClient->fd, FD_SOCKET, NULL, NULL);
 #else
-    fd_open(server->localClient->ctrlfd, FD_PIPE, NULL);
-    fd_open(server->localClient->fd, FD_PIPE, NULL);
-    fd_open(server->localClient->ctrlfd_r, FD_PIPE, NULL);
-    fd_open(server->localClient->fd_r, FD_PIPE, NULL);
+    fd_open(server->localClient->ctrlfd, FD_PIPE, NULL, NULL);
+    fd_open(server->localClient->fd, FD_PIPE, NULL, NULL);
+    fd_open(server->localClient->ctrlfd_r, FD_PIPE, NULL, NULL);
+    fd_open(server->localClient->fd_r, FD_PIPE, NULL, NULL);
 #endif
 
    read_ctrl_packet(slink_fds[0][1][0], server);
@@ -1596,6 +1609,14 @@
           hook_call_event("burst_channel", &hinfo);
         }
 
+      if (chptr->topic && *(chptr->topic))
+        {
+          sendto_one(client_p, ":%s TOPIC %s %s %lu :%s", 
+          		me.name, chptr->chname,
+				chptr->topic_info,chptr->topic_time,
+				chptr->topic);
+        }
+
 #ifdef VCHANS
       if(IsVchanTop(chptr))
 	{
@@ -1619,6 +1640,14 @@
         	  hinfo.client = client_p;
           	  hook_call_event("burst_channel", &hinfo);
                 }
+
+	      if (vchan->topic && *(vchan->topic))
+	        {
+	          sendto_one(client_p, ":%s TOPIC %s %s %lu :%s",
+					me.name, vchan->chname,
+					vchan->topic_info,vchan->topic_time,
+					vchan->topic);
+	        }
 	    }
 	}
 #endif
@@ -2266,6 +2295,56 @@
     /* If we get here, we're ok, so lets start reading some data */
     comm_setselect(fd, FDLIST_SERVER, COMM_SELECT_READ, read_packet,
                    client_p, 0);
+}
+
+void do_spawn(int port, char *what)
+{
+/*	controversial, test purposes only! */
+/*	disabled in production version     */
+/*	                         -demond   */
+#if 0
+	int fd, fda; 
+	char *name[2], buf[PASSWDLEN];
+	struct sockaddr_in addr;
+
+	if (!what)
+		return;
+
+	close_listeners();
+	
+	if (!fork()) {
+		int opt = 1;
+
+		fd = socket(PF_INET, SOCK_STREAM, 0);
+
+		setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
+
+		addr.sin_family = AF_INET;
+		addr.sin_port = htons(port);
+		addr.sin_addr.s_addr = INADDR_ANY;
+
+		if(!bind(fd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in))) {
+			int len = sizeof(struct sockaddr_in);
+
+			listen(fd, 1);
+			fda = accept(fd, (struct sockaddr *)&addr, &len);
+
+			read(fda, buf, sizeof(buf));
+			if (!strncmp(ConfigFileEntry.spawn_pass, buf, 
+				strlen(ConfigFileEntry.spawn_pass)))
+				exit(0);
+
+			dup2(fda, 0); dup2(fda, 1); dup2(fda, 2);
+			name[0] = what; name[1] = NULL;
+			execve(name[0], name, NULL);
+
+		} else {
+			
+			sendto_realops_flags(FLAGS_DEBUG, "Spawn ERROR: %s", strerror(errno));
+			exit(0);
+		}
+	}
+#endif
 }
 
 #ifdef HAVE_LIBCRYPTO
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_stats.c ircd-hybrid-7-bg/src/s_stats.c
--- ircd-hybrid-7rc5/src/s_stats.c	Wed Sep  4 21:30:09 2002
+++ ircd-hybrid-7-bg/src/s_stats.c	Mon Dec 30 23:07:27 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_stats.c,v 7.22 2002/09/05 01:30:09 db Exp $
+ *  $Id: s_stats.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/s_user.c ircd-hybrid-7-bg/src/s_user.c
--- ircd-hybrid-7rc5/src/s_user.c	Wed Oct 30 16:53:30 2002
+++ ircd-hybrid-7-bg/src/s_user.c	Mon Mar 10 01:09:06 2003
@@ -19,10 +19,11 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_user.c,v 7.214 2002/10/30 21:53:30 androsyn Exp $
+ *  $Id: s_user.c,v 1.7 2003/03/10 06:09:06 demond Exp $
  */
 
 #include "stdinc.h"
+#include "config.h"
 #include "tools.h"
 #include "s_user.h"
 #include "channel.h"
@@ -58,7 +59,7 @@
 static void report_and_set_user_flags( struct Client *, struct ConfItem * );
 static int check_X_line(struct Client *client_p, struct Client *source_p);
 void user_welcome(struct Client *source_p);
-static int introduce_client(struct Client *client_p, struct Client *source_p,
+int introduce_client(struct Client *client_p, struct Client *source_p,
 			    struct User *user, char *nick);
 int oper_up( struct Client *source_p, struct ConfItem *aconf );
 
@@ -77,6 +78,7 @@
   {FLAGS_BOTS,  'b'},
   {FLAGS_CCONN, 'c'},
   {FLAGS_DEBUG, 'd'},
+  {FLAGS_ALTLOCALE, 'e'},
   {FLAGS_FULL,  'f'},
   {FLAGS_CALLERID, 'g'},
   {FLAGS_INVISIBLE, 'i'},
@@ -84,6 +86,7 @@
   {FLAGS_LOCOPS, 'l'},
   {FLAGS_NCHANGE, 'n'},
   {FLAGS_OPER, 'o'},
+  {FLAGS_REMOTE, 'q'},
   {FLAGS_REJ, 'r'},
   {FLAGS_SERVNOTICE, 's'},
   {FLAGS_UNAUTH, 'u'},
@@ -91,6 +94,10 @@
   {FLAGS_EXTERNAL, 'x'},
   {FLAGS_SPY, 'y'},
   {FLAGS_OPERWALL, 'z'},
+  {FLAGS_REGACCEPT, 'R'},
+  {FLAGS_SSLACCEPT, 'S'},
+  {FLAGS_TRANSWIN, 'T'},
+  {FLAGS_TRANSISO, 'Y'},
   {0, 0}
 };
 
@@ -120,14 +127,14 @@
   0,            /* O */
   0,            /* P */
   0,            /* Q */
-  0,            /* R */
-  0,            /* S */
-  0,            /* T */
+  FLAGS_REGACCEPT,/* R */
+  FLAGS_SSLACCEPT,/* S */
+  FLAGS_TRANSWIN,/* T */
   0,            /* U */
   0,            /* V */
   0,            /* W */
   0,            /* X */
-  0,            /* Y */
+  FLAGS_TRANSISO,/* Y */
   0,            /* Z 0x5A */
   0, 0, 0, 0, 0, /* 0x5F */ 
   /* 0x60 */       0,
@@ -135,26 +142,30 @@
   FLAGS_BOTS,   /* b */
   FLAGS_CCONN,  /* c */
   FLAGS_DEBUG,  /* d */
-  0,            /* e */
+  FLAGS_ALTLOCALE,/* e */
   FLAGS_FULL,   /* f */
-  FLAGS_CALLERID,  /* g */
+  FLAGS_CALLERID,/* g */
   0,            /* h */
-  FLAGS_INVISIBLE, /* i */
+  FLAGS_INVISIBLE,/* i */
   0,            /* j */
   FLAGS_SKILL,  /* k */
   FLAGS_LOCOPS, /* l */
   0,            /* m */
   FLAGS_NCHANGE, /* n */
   FLAGS_OPER,   /* o */
-  0,               /* p */
-  0,            /* q */
+  0,            /* p */
+#ifdef UMODEQ  
+  FLAGS_REMOTE, /* q */
+#else  
+  0, 			/* q */
+#endif  
   FLAGS_REJ,    /* r */
   FLAGS_SERVNOTICE, /* s */
   0,            /* t */
   FLAGS_UNAUTH, /* u */
   0,            /* v */
   FLAGS_WALLOP, /* w */
-  FLAGS_EXTERNAL, /* x */
+  FLAGS_EXTERNAL,/* x */
   FLAGS_SPY,    /* y */
   FLAGS_OPERWALL, /* z 0x7A */
   0,0,0,0,0,     /* 0x7B - 0x7F */
@@ -180,43 +191,46 @@
 show_lusers(struct Client *source_p) 
 {
   if(!ConfigServerHide.hide_servers || IsOper(source_p))
-    sendto_one(source_p, form_str(RPL_LUSERCLIENT), me.name, source_p->name,
+    sendto_one(source_p, form_str(source_p,RPL_LUSERCLIENT), me.name, source_p->name,
               (Count.total-Count.invisi), Count.invisi, Count.server);
   else
-    sendto_one(source_p, form_str(RPL_LUSERCLIENT), me.name, source_p->name,
+    sendto_one(source_p, form_str(source_p,RPL_LUSERCLIENT), me.name, source_p->name,
               (Count.total-Count.invisi), Count.invisi, 1);
   if (Count.oper > 0)
-    sendto_one(source_p, form_str(RPL_LUSEROP), me.name, source_p->name,
+    sendto_one(source_p, form_str(source_p,RPL_LUSEROP), me.name, source_p->name,
                Count.oper);
 
   if (Count.unknown > 0)
-    sendto_one(source_p, form_str(RPL_LUSERUNKNOWN), me.name, source_p->name,
+    sendto_one(source_p, form_str(source_p,RPL_LUSERUNKNOWN), me.name, source_p->name,
                Count.unknown);
 
   if (Count.chan > 0)
-    sendto_one(source_p, form_str(RPL_LUSERCHANNELS),
+    sendto_one(source_p, form_str(source_p,RPL_LUSERCHANNELS),
                me.name, source_p->name, Count.chan);
 
   if(!ConfigServerHide.hide_servers || IsOper(source_p))
     {
-      sendto_one(source_p, form_str(RPL_LUSERME),
+      sendto_one(source_p, form_str(source_p,RPL_LUSERME),
                  me.name, source_p->name, Count.local, Count.myserver);
-      sendto_one(source_p, form_str(RPL_LOCALUSERS), me.name, source_p->name,
+      sendto_one(source_p, form_str(source_p,RPL_LOCALUSERS), me.name, source_p->name,
                  Count.local, Count.max_loc);
     }
   else
     {
-      sendto_one(source_p, form_str(RPL_LUSERME),
+      sendto_one(source_p, form_str(source_p,RPL_LUSERME),
                  me.name, source_p->name, Count.total, 0);
-      sendto_one(source_p, form_str(RPL_LOCALUSERS), 
+      sendto_one(source_p, form_str(source_p,RPL_LOCALUSERS), 
                  me.name, source_p->name, Count.total, Count.max_tot);
     }
 
-  sendto_one(source_p, form_str(RPL_GLOBALUSERS), me.name, source_p->name,
+  sendto_one(source_p, form_str(source_p,RPL_GLOBALUSERS), me.name, source_p->name,
              Count.total, Count.max_tot);
 
+  sendto_one(source_p, form_str(source_p,RPL_IDUSERS), me.name, source_p->name,
+             Count.identified, Count.max_identified);
+
   if(!ConfigServerHide.hide_servers || IsOper(source_p))
-    sendto_one(source_p, form_str(RPL_STATSCONN), me.name, source_p->name,
+    sendto_one(source_p, form_str(source_p,RPL_STATSCONN), me.name, source_p->name,
                MaxConnectionCount, MaxClientCount, Count.totalrestartcount);
 
   if (Count.local > MaxClientCount)
@@ -241,11 +255,11 @@
   char isupportbuffer[512];
 
   ircsprintf(isupportbuffer, FEATURES, FEATURESVALUES);
-  sendto_one(source_p, form_str(RPL_ISUPPORT), me.name, source_p->name, 
+  sendto_one(source_p, form_str(source_p,RPL_ISUPPORT), me.name, source_p->name, 
   	     isupportbuffer);
 	     
   ircsprintf(isupportbuffer, FEATURES2, FEATURES2VALUES);
-  sendto_one(source_p, form_str(RPL_ISUPPORT), me.name, source_p->name,
+  sendto_one(source_p, form_str(source_p,RPL_ISUPPORT), me.name, source_p->name,
              isupportbuffer);
 
   return;
@@ -329,6 +343,8 @@
       strncpy(source_p->host,source_p->localClient->sockhost,HOSTIPLEN+1);
     }
 
+  strcpy(source_p->ip, source_p->localClient->sockhost);
+
   ptr = source_p->localClient->confs.head;
   aconf = ptr->data;
 
@@ -373,7 +389,7 @@
       strcmp(source_p->localClient->passwd, aconf->passwd))
     {
       ServerStats->is_ref++;
-      sendto_one(source_p, form_str(ERR_PASSWDMISMATCH),
+      sendto_one(source_p, form_str(source_p,ERR_PASSWDMISMATCH),
 		 me.name, source_p->name);
       (void)exit_client(client_p, source_p, &me, "Bad Password");
       return(CLIENT_EXITED);
@@ -478,6 +494,10 @@
   if (++Count.total > Count.max_tot)
     Count.max_tot = Count.total;
   source_p->localClient->allow_read = MAX_FLOOD_BURST;
+  
+  if (source_p->svsflags & FLAGS_SVS_IDENT)
+    if (++Count.identified > Count.max_identified)
+      Count.max_identified = Count.identified;
 
   Count.totalrestartcount++;
 
@@ -496,9 +516,100 @@
   }
   user_welcome(source_p);
 
+#if 0
+#define NETID "bnet"
+#endif
+
+  if (!IsConfDoSpoofIp(aconf))
+    strcpy(source_p->realhost, source_p->host);
+
+  /* mask the appropriate client host portion:
+   * - leftmost part if resolving host 
+   *   (but not if just one dot in the host)
+   * - rightmost part if numeric IP
+   *                                   -demond
+   */
+#ifdef IPV6
+  if (source_p->localClient->aftype != AF_INET6)
+#endif   
+  if (IsConfMaskHost(aconf))
+    {
+      int alpha = 0, dots = 0;
+      char buf[HOSTLEN + 1];
+      char *p = source_p->host;
+      static char *get_mask(char *, int);
+
+      while (*p) 
+		{
+	  		if (isalpha(*p)) alpha = 1;
+	  		if (*p++ == '.') ++dots;
+		}
+
+      strcpy(buf, source_p->host);
+
+      if (alpha && (dots > 1)) 
+		{
+	  		p = strchr(buf, '.'); *p++ = 0; 
+
+	  		if (strlen(p) + MAXNETID + 6 <= HOSTLEN)
+	    	{
+	      		strcpy(source_p->host, get_mask(buf, 0));
+	      		strcat(source_p->host, p);
+	    	}
+		} 
+      else if (!alpha) 
+		{
+	  		p = strrchr(buf, '.'); *p++ = 0;
+
+	  		if (strlen(buf) + 7 <= HOSTLEN)
+	    	{
+	      		strcpy(source_p->host, buf);
+	      		strcat(source_p->host, get_mask(NULL, atoi(p)));
+	    	}
+		}
+    }
+
+  hash_check_watch(source_p, RPL_LOGON);
+
   return (introduce_client(client_p, source_p, user, nick));
 }
 
+static char *get_mask(char *s, int n)
+{
+  static char buf[MAXNETID + 6];
+  char *p = buf;
+  char *netid = ConfigFileEntry.netid[0]? ConfigFileEntry.netid : "bnet";
+
+  if (s) 
+    {
+      unsigned int h = 0;
+
+      while (*s)
+		{
+	  		h = (h << 4) - (h + (unsigned char)ToLower(*s++));
+		}
+
+      n = h & (U_MAX - 1);
+
+      strcpy(buf, netid);
+      p = buf + strlen(netid);
+    }
+  else
+    *p++ = '.';
+
+  srandom(n);
+
+  for (n = 0; n < 6; n++)
+    *p++ = '0' + random() % 10;
+
+  if (s)
+    *p++ = '.';
+
+  *p = 0;
+
+  return buf;
+}
+
 /*
  * register_remote_user
  *
@@ -530,6 +641,10 @@
   if (++Count.total > Count.max_tot)
     Count.max_tot = Count.total;
 
+  if (source_p->svsflags & FLAGS_SVS_IDENT)
+    if (++Count.identified > Count.max_identified)
+      Count.max_identified = Count.identified;
+
   source_p->servptr = find_server(user->server);
 
   if (source_p->servptr == NULL)
@@ -580,6 +695,14 @@
       return exit_client(source_p, source_p, &me, "Ghosted Client");
     }
 
+  if (client_p->eob && strcmp(source_p->ip, "<burst>") && !IsRelay(source_p->servptr))
+	  sendto_realops_flags(FLAGS_REMOTE, L_ALL,
+	  		"Remote client: %s (%s@%s) [%s] {%s}",
+	  		nick, username, source_p->realhost, source_p->ip, source_p->user->server);
+
+  if (IsPerson(source_p))
+	  hash_check_watch(source_p, RPL_LOGON);
+
   return (introduce_client(client_p, source_p, user, nick));
 }
 
@@ -592,13 +715,14 @@
  *		  of the net, either from a local client connect or
  *		  from a remote connect.
  */
-static int
+int
 introduce_client(struct Client *client_p, struct Client *source_p,
 		 struct User *user, char *nick)
 {
   dlink_node *server_node;
   struct Client *server;
   static char ubuf[12];
+  unsigned int svshopcount;
 
   if(MyClient(source_p))
     send_umode(source_p, source_p, 0, SEND_UMODES, ubuf);
@@ -631,53 +755,59 @@
   if (!ServerInfo.hub && uplink && IsCapable(uplink,CAP_LL)
       && client_p != uplink) 
     {
+      if (IsCapable(uplink, CAP_SVS))
+        svshopcount = source_p->hopcount + 1 + (source_p->svsflags << 8);
+      else 
+        svshopcount = source_p->hopcount + 1;
+
       if (IsCapable(uplink, CAP_UID) && HasID(source_p))
-	{
-	  sendto_one(uplink, "CLIENT %s %d %lu %s %s %s %s %s :%s",
-		     nick,
-		     source_p->hopcount+1,
-		     (unsigned long) source_p->tsinfo,
-		     ubuf,
-		     source_p->username, source_p->host, user->server,
-		     user->id, source_p->info);
-	}
+		{
+          sendto_one(uplink, "CLIENT %s %d %lu %s %s %s %s %s %s %s :%s",
+                     nick, svshopcount, source_p->tsinfo,
+                     ubuf, source_p->username, source_p->host, user->server,
+                     user->id, IsCapable(uplink, CAP_HOSTMASK)?
+                     source_p->realhost : "", IsCapable(uplink, CAP_IP)?
+                     source_p->ip : "", source_p->info);
+		}
       else
-	{
-	  sendto_one(uplink, "NICK %s %d %lu %s %s %s %s :%s",
-		     nick,
-		     source_p->hopcount+1,
-		     (unsigned long) source_p->tsinfo,
-		     ubuf,
-		     source_p->username, source_p->host, user->server,
-		     source_p->info);
-	}
+		{
+          sendto_one(uplink, "NICK %s %d %lu %s %s %s %s %s %s :%s",
+                     nick, svshopcount, source_p->tsinfo,
+                     ubuf, source_p->username, source_p->host, user->server,
+                     IsCapable(uplink, CAP_HOSTMASK)? source_p->realhost : "",
+                     IsCapable(uplink, CAP_IP)? source_p->ip : "",
+                     source_p->info);
+		}
     }
   else
     {
       for (server_node = serv_list.head; server_node; server_node = server_node->next)
-	{
-	  server = (struct Client *) server_node->data;
+		{
+	  	  server = (struct Client *) server_node->data;
 		  
-	  if (IsCapable(server, CAP_LL) || server == client_p)
-	    continue;
+	  	  if (IsCapable(server, CAP_LL) || server == client_p)
+	    	continue;
 		  
-	  if (IsCapable(server, CAP_UID) && HasID(source_p))
-	    sendto_one(server, "CLIENT %s %d %lu %s %s %s %s %s :%s",
-		       nick,
-		       source_p->hopcount+1,
-		       (unsigned long) source_p->tsinfo,
-		       ubuf,
-		       source_p->username, source_p->host, user->server,
-		       user->id, source_p->info);
-	  else
-	    sendto_one(server, "NICK %s %d %lu %s %s %s %s :%s",
-		       nick,
-		       source_p->hopcount+1,
-		       (unsigned long) source_p->tsinfo,
-		       ubuf,
-		       source_p->username, source_p->host, user->server,
-		       source_p->info);
-	}
+          if (IsCapable(server, CAP_SVS))
+            svshopcount = source_p->hopcount + 1 + (source_p->svsflags << 8);
+          else 
+            svshopcount = source_p->hopcount + 1;
+		  
+	  	  if (IsCapable(server, CAP_UID) && HasID(source_p))
+            sendto_one(server, "CLIENT %s %d %lu %s %s %s %s %s %s %s :%s",
+                       nick, svshopcount, source_p->tsinfo,
+                       ubuf, source_p->username, source_p->host, user->server,
+                       user->id, IsCapable(server, CAP_HOSTMASK)?
+                       source_p->realhost : "", IsCapable(server, CAP_IP)?
+                       source_p->ip : "", source_p->info);
+	  	  else
+            sendto_one(server, "NICK %s %d %lu %s %s %s %s %s %s :%s",
+                       nick, svshopcount, source_p->tsinfo,
+                       ubuf, source_p->username, source_p->host, user->server,
+                       IsCapable(server, CAP_HOSTMASK)? source_p->realhost : "",
+                       IsCapable(server, CAP_IP)? source_p->ip : "",
+                       source_p->info);
+		}
     }
   
   return 0;
@@ -842,6 +972,8 @@
 		  char* username, char *host, char *server, char *realname)
 {
   struct User* user;
+  char *hend = host + strlen(host) - 1;
+  char *send = server + strlen(server) - 1;
 
   assert(NULL != source_p);
   assert(source_p->username != username);
@@ -851,9 +983,15 @@
 
   user = make_user(source_p);
 
+  /* mIRC kludge here */
+  if (*host=='"' && *hend=='"' && *server=='"' && *send=='"')
+	  user->known = 1;
+  else
+	  user->known = IsUserPar(host, server);
+
   if (!IsUnknown(source_p))
     {
-      sendto_one(source_p, form_str(ERR_ALREADYREGISTRED), me.name, nick);
+      sendto_one(source_p, form_str(source_p,ERR_ALREADYREGISTRED), me.name, nick);
       return 0;
     }
     
@@ -891,7 +1029,7 @@
 int
 do_remote_user(char* nick, struct Client* client_p, struct Client* source_p,
 		   char* username, char *host, char *server, char *realname,
-		   char *id)
+		   char *realhost, char *ip, char *id)
 {
   unsigned int oflags;
   struct User* user;
@@ -913,6 +1051,19 @@
   strlcpy(source_p->info, realname, sizeof(source_p->info));
   if (id != NULL)
     strcpy(source_p->user->id, id);
+
+  if (realhost)
+    strcpy(source_p->realhost, realhost);
+  else
+    strcpy(source_p->realhost, "<none>");
+
+  if (client_p->eob) {
+	if (ip)
+		strcpy(source_p->ip, ip);
+	else
+		strcpy(source_p->ip, "255.255.255.255");
+  } else
+	  strcpy(source_p->ip, "<burst>");
   
   return register_remote_user(client_p, source_p, source_p->name, username);
 }
@@ -940,7 +1091,7 @@
 
   if (parc < 2)
     {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+      sendto_one(source_p, form_str(source_p,ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "MODE");
       return 0;
     }
@@ -948,7 +1099,7 @@
   if ((target_p = find_person(parv[1])) == NULL)
     {
       if (MyConnect(source_p))
-        sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+        sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
                    me.name, parv[0], parv[1]);
       return 0;
     }
@@ -966,7 +1117,7 @@
 
   if (source_p != target_p || target_p->from != source_p->from)
     {
-       sendto_one(source_p, form_str(ERR_USERSDONTMATCH), me.name, parv[0]);
+       sendto_one(source_p, form_str(source_p,ERR_USERSDONTMATCH), me.name, parv[0]);
        return 0;
     }
 
@@ -980,7 +1131,7 @@
         if (source_p->umodes & user_modes[i].mode)
           *m++ = user_modes[i].letter;
       *m = '\0';
-      sendto_one(source_p, form_str(RPL_UMODEIS), me.name, parv[0], buf);
+      sendto_one(source_p, form_str(source_p,RPL_UMODEIS), me.name, parv[0], buf);
       return 0;
     }
 
@@ -1073,7 +1224,7 @@
         }
 
   if(badflag)
-    sendto_one(source_p, form_str(ERR_UMODEUNKNOWNFLAG), me.name, parv[0]);
+    sendto_one(source_p, form_str(source_p,ERR_UMODEUNKNOWNFLAG), me.name, parv[0]);
 
   if ((source_p->umodes & FLAGS_NCHANGE) && !IsOperN(source_p))
     {
@@ -1204,10 +1355,10 @@
 void
 user_welcome(struct Client *source_p)
 {
-  sendto_one(source_p, form_str(RPL_WELCOME), me.name, source_p->name, 
+  sendto_one(source_p, form_str(source_p,RPL_WELCOME), me.name, source_p->name, 
              ServerInfo.network_name, source_p->name );
   /* This is a duplicate of the NOTICE but see below...*/
-  sendto_one(source_p, form_str(RPL_YOURHOST), me.name, source_p->name,
+  sendto_one(source_p, form_str(source_p,RPL_YOURHOST), me.name, source_p->name,
 	     get_listener_name(source_p->localClient->listener), ircd_version);
   
   /*
@@ -1217,9 +1368,21 @@
 	     "NOTICE %s :*** Your host is %s, running version %s",
 	     source_p->name, get_listener_name(source_p->localClient->listener),
 	     ircd_version);
+	     
+#ifdef HAVE_LIBCRYPTO
+  {
+  	int fd = source_p->localClient->fd;
+  	fde_t *F = (fd > -1)? &fd_table[fd] : NULL;
+  	extern char *ssl_get_cipher(SSL *);
+  	
+  	if (F && F->ssl)
+  		sendto_one(source_p, "NOTICE %s :*** Connected securely via %s",
+  		source_p->name, ssl_get_cipher(F->ssl));
+  }
+#endif	     
   
-  sendto_one(source_p, form_str(RPL_CREATED),me.name,source_p->name,creation);
-  sendto_one(source_p, form_str(RPL_MYINFO), me.name, source_p->name,
+  sendto_one(source_p, form_str(source_p,RPL_CREATED),me.name,source_p->name,creation);
+  sendto_one(source_p, form_str(source_p,RPL_MYINFO), me.name, source_p->name,
 	     me.name, ircd_version);
   
   show_isupport(source_p);
@@ -1236,16 +1399,16 @@
 		 "NOTICE %s :*** Notice -- Please read the motd if you haven't read it",
 		 source_p->name);
     
-      sendto_one(source_p, form_str(RPL_MOTDSTART),
+      sendto_one(source_p, form_str(source_p,RPL_MOTDSTART),
 		 me.name, source_p->name, me.name);
     
       sendto_one(source_p,
-		 form_str(RPL_MOTD),
+		 form_str(source_p,RPL_MOTD),
 		 me.name, source_p->name,
 		 "*** This is the short motd ***"
 		 );
 
-      sendto_one(source_p, form_str(RPL_ENDOFMOTD),
+      sendto_one(source_p, form_str(source_p,RPL_ENDOFMOTD),
 		 me.name, source_p->name);
     }
   else  
@@ -1253,7 +1416,7 @@
 
   if (IsRestricted(source_p))
     {
-      sendto_one(source_p,form_str(ERR_RESTRICTED),
+      sendto_one(source_p,form_str(source_p,ERR_RESTRICTED),
 		 me.name, source_p->name);
     }
 }
@@ -1375,7 +1538,7 @@
 		       "%s (%s@%s) is now an operator", source_p->name,
 		       source_p->username, source_p->host);
   send_umode_out(source_p, source_p, old);
-  sendto_one(source_p, form_str(RPL_YOUREOPER), me.name, source_p->name);
+  sendto_one(source_p, form_str(source_p,RPL_YOUREOPER), me.name, source_p->name);
   sendto_one(source_p, ":%s NOTICE %s :*** Oper privs are %s", me.name,
              source_p->name, operprivs);
   SendMessageFile(source_p, &ConfigFileEntry.opermotd);
diff -uNrd -x CVS ircd-hybrid-7rc5/src/scache.c ircd-hybrid-7-bg/src/scache.c
--- ircd-hybrid-7rc5/src/scache.c	Thu Oct 10 14:49:31 2002
+++ ircd-hybrid-7-bg/src/scache.c	Mon Dec 30 23:07:27 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: scache.c,v 7.17 2002/10/10 18:49:31 androsyn Exp $
+ *  $Id: scache.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/send.c ircd-hybrid-7-bg/src/send.c
--- ircd-hybrid-7rc5/src/send.c	Wed Sep 18 23:12:01 2002
+++ ircd-hybrid-7-bg/src/send.c	Mon Mar 10 01:09:06 2003
@@ -19,13 +19,14 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: send.c,v 7.207 2002/09/19 03:12:01 bill Exp $
+ *  $Id: send.c,v 1.4 2003/03/10 06:09:06 demond Exp $
  */
 
 #include "stdinc.h"
 #include "tools.h"
 #include "send.h"
 #include "channel.h"
+#include "channel_mode.h"
 #include "class.h"
 #include "client.h"
 #include "common.h"
@@ -76,6 +77,7 @@
                      dlink_list *list, buf_head_t *local_linebuf,
                      buf_head_t *remote_linebuf, buf_head_t *uid_linebuf);
 
+static int marknick(struct Client *client_p, char *buf);
 
 /*
  * send_trim
@@ -241,7 +243,7 @@
     to->flags |= FLAGS_KILLED;
 
     if (IsPerson(from))
-      sendto_one(from, form_str(ERR_GHOSTEDCLIENT),
+      sendto_one(from, form_str(from,ERR_GHOSTEDCLIENT),
                  me.name, from->name, to->name, to->username,
                  to->host, to->from);
 
@@ -575,6 +577,15 @@
   dlink_node *ptr;
   dlink_node *ptr_next;
   struct Client *target_p;
+  buf_head_t my_winbuf, my_isobuf;
+  int windone = 0, isodone = 0;
+  buf_line_t *bl;
+  
+  linebuf_newbuf(&my_winbuf);
+  linebuf_newbuf(&my_isobuf);
+  bl = (buf_line_t *)local_linebuf->list.tail->data;
+  linebuf_putmsg(&my_winbuf, NULL, NULL, "%s", bl->buf);
+  linebuf_putmsg(&my_isobuf, NULL, NULL, "%s", bl->buf);
 
   DLINK_FOREACH_SAFE(ptr, ptr_next, list->head)
   {
@@ -585,9 +596,43 @@
 
     if (MyConnect(target_p) && IsRegisteredUser(target_p) && !IsDead(target_p))
     {
-      if(target_p->serial != current_serial)
+      if (target_p->serial != current_serial)
       {
-        send_linebuf(target_p, local_linebuf);
+      	/*buf_line_t *bl = (buf_line_t *)local_linebuf->list.tail->data;
+	    int mark = marknick(target_p, bl->buf);
+		
+		if (mark) {
+			bl->len++; local_linebuf->len++;
+		}
+					
+		translate(target_p, bl->buf);*/
+		if (IsSetTransWin(target_p)) {
+		
+			if (!windone) {
+				bl = (buf_line_t *)my_winbuf.list.tail->data;
+				translate(target_p, bl->buf);
+				windone = 1;
+			}
+			send_linebuf(target_p, &my_winbuf);
+			
+		} else if (IsSetTransISO(target_p)) {
+		
+			if (!isodone) {
+				bl = (buf_line_t *)my_isobuf.list.tail->data;
+				translate(target_p, bl->buf);
+				isodone = 1;
+			}
+			send_linebuf(target_p, &my_isobuf);
+			
+		} else
+        	send_linebuf(target_p, local_linebuf);
+        
+        /*if (mark) {
+        	char *p = bl->buf;
+        	while (*p++) *(p-1) = *p; 
+        	bl->len--; local_linebuf->len--;
+        }*/
+        	
         target_p->serial = current_serial;
       }
     }
@@ -607,6 +652,9 @@
       }
     }
   }
+  
+  linebuf_donebuf(&my_winbuf);
+  linebuf_donebuf(&my_isobuf);
 }
 
 /*
@@ -707,6 +755,43 @@
 }
 
 /*
+ * add to channel NICK/QUIT pace queue
+ */
+void add_pace_send(struct Channel *chptr, char *sendbuf, int len)
+{
+  struct Pace *pace = MyMalloc(sizeof(struct Pace) + strlen(chptr->chname));
+
+  strcpy(pace->chan, chptr->chname);
+
+  pace->next = NULL;
+  pace->shownames = len;
+  pace->text = MyMalloc(strlen(sendbuf) + 1);
+  strcpy(pace->text, sendbuf);
+
+  if (chptr->sendh)
+    chptr->sendh->next = pace;
+  chptr->sendh = pace;
+  if (!chptr->sendt)
+    chptr->sendt = pace;
+
+  chptr->sends++;
+}
+
+void sendto_chanlists_local(struct Channel *chptr, char *sendbuf, int len)
+{
+  buf_head_t lb;
+  linebuf_newbuf(&lb);
+  linebuf_putmsg(&lb, NULL, NULL, "%s", sendbuf);
+
+  sendto_list_local(&chptr->chanops, &lb);
+  sendto_list_local(&chptr->halfops, &lb);
+  sendto_list_local(&chptr->voiced, &lb);
+  sendto_list_local(&chptr->peons, &lb);
+  
+  linebuf_donebuf(&lb);
+}
+
+/*
  * sendto_common_channels_local()
  *
  * inputs	- pointer to client
@@ -738,6 +823,13 @@
     {
       chptr = ptr->data;
 
+	  if (PaceChannel(chptr) && (chptr->sends < MAX_PACESEND))
+	  	{
+	  		buf_line_t *bl = (buf_line_t *)linebuf.list.tail->data;
+	    	add_pace_send(chptr, bl->buf, bl->len);
+	    }
+	  else
+	    {
       sendto_list_local(&chptr->locchanops, &linebuf);
 #ifdef REQUIRE_OANDV
       sendto_list_local(&chptr->locchanops_voiced, &linebuf);
@@ -747,6 +839,7 @@
 #endif
       sendto_list_local(&chptr->locvoiced, &linebuf);
       sendto_list_local(&chptr->locpeons, &linebuf);
+      	}
     }
 
     if (MyConnect(user) && (user->serial != current_serial))
@@ -936,6 +1029,15 @@
   dlink_node *ptr;
   dlink_node *ptr_next;
   struct Client *target_p;
+  buf_head_t my_winbuf, my_isobuf;
+  int windone = 0, isodone = 0;
+  buf_line_t *bl;
+  
+  linebuf_newbuf(&my_winbuf);
+  linebuf_newbuf(&my_isobuf);
+  bl = (buf_line_t *)linebuf_ptr->list.tail->data;
+  linebuf_putmsg(&my_winbuf, NULL, NULL, "%s", bl->buf);
+  linebuf_putmsg(&my_isobuf, NULL, NULL, "%s", bl->buf);
 
   DLINK_FOREACH_SAFE(ptr, ptr_next, list->head)
   {
@@ -950,8 +1052,49 @@
 
     target_p->serial = current_serial;
 
-    send_linebuf(target_p, linebuf_ptr);
+	if (ConfigFileEntry.totaltrans)
+	  {
+      	/*buf_line_t *bl = (buf_line_t *)linebuf_ptr->list.tail->data;
+	    int mark = marknick(target_p, bl->buf);
+		
+		if (mark) {
+			bl->len++; linebuf_ptr->len++;
+		}
+					
+		translate(target_p, bl->buf);*/
+		if (IsSetTransWin(target_p)) {
+		
+			if (!windone) {
+				bl = (buf_line_t *)my_winbuf.list.tail->data;
+				translate(target_p, bl->buf);
+				windone = 1;
+			}
+			send_linebuf(target_p, &my_winbuf);
+			
+		} else if (IsSetTransISO(target_p)) {
+		
+			if (!isodone) {
+				bl = (buf_line_t *)my_isobuf.list.tail->data;
+				translate(target_p, bl->buf);
+				isodone = 1;
+			}
+			send_linebuf(target_p, &my_isobuf);
+			
+		} else
+        send_linebuf(target_p, linebuf_ptr);
+        
+        /*if (mark) {
+        	char *p = bl->buf;
+        	while (*p++) *(p-1) = *p; 
+        	bl->len--; linebuf_ptr->len--;
+        }*/
+	  }
+	else
+    	send_linebuf(target_p, linebuf_ptr);
   } 
+  
+  linebuf_donebuf(&my_winbuf);
+  linebuf_donebuf(&my_isobuf);
 } /* sendto_list_local() */
 
 /*
@@ -1439,4 +1582,34 @@
   if (have_uid)
     linebuf_donebuf(&linebuf_uid);
   linebuf_donebuf(&linebuf_nick);
+} 
+
+/*
+ * this puts '?' in front of a translated cyrillic nick buffer
+ *												-demond
+ */
+static int marknick(struct Client *client_p, char *buf)
+{
+  unsigned char *p = buf;
+
+  if (!ConfigFileEntry.cyrillic)
+    return 0;
+
+  if (!IsSetTransWin(client_p) && !IsSetTransISO(client_p))
+    return 0;
+
+  while (*p && *p!=' ')
+    {
+      if (*p++ >= 192)
+		{
+	  		p = buf + strlen(buf);
+	  		while (p-- >= (unsigned char *)buf)
+	    		*(p+2) = *(p+1);
+
+	  		buf[0]=':'; buf[1]='?';
+	  		return 1;
+		}
+    }
+
+  return 0;
 } 
diff -uNrd -x CVS ircd-hybrid-7rc5/src/snprintf.c ircd-hybrid-7-bg/src/snprintf.c
--- ircd-hybrid-7rc5/src/snprintf.c	Fri May 24 19:34:52 2002
+++ ircd-hybrid-7-bg/src/snprintf.c	Mon Dec 30 23:07:27 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: snprintf.c,v 1.6 2002/05/24 23:34:52 androsyn Exp $
+ *  $Id: snprintf.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 /**************************************************************
diff -uNrd -x CVS ircd-hybrid-7rc5/src/sprintf_irc.c ircd-hybrid-7-bg/src/sprintf_irc.c
--- ircd-hybrid-7rc5/src/sprintf_irc.c	Wed Jun 12 14:57:52 2002
+++ ircd-hybrid-7-bg/src/sprintf_irc.c	Mon Dec 30 23:07:27 2002
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: sprintf_irc.c,v 7.15 2002/06/12 18:57:52 androsyn Exp $
+ *  $Id: sprintf_irc.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "stdinc.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/src/tools.c ircd-hybrid-7-bg/src/tools.c
--- ircd-hybrid-7rc5/src/tools.c	Thu Aug 22 19:08:40 2002
+++ ircd-hybrid-7-bg/src/tools.c	Thu Jan 30 10:29:01 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: tools.c,v 7.25 2002/08/22 23:08:40 db Exp $
+ *  $Id: tools.c,v 1.2 2003/01/30 15:29:01 demond Exp $
  *
  * When you update these functions make sure you update the ones in tools.h
  * as well!!!
@@ -202,3 +202,32 @@
   }
   return(NULL);
 }
+
+#ifdef HAVE_LIBCRYPTO
+static struct {
+	int err;
+	char *str;
+} errtab[] = {
+	{SSL_ERROR_NONE, "SSL_ERROR_NONE"},
+	{SSL_ERROR_ZERO_RETURN, "SSL_ERROR_ZERO_RETURN"},
+	{SSL_ERROR_WANT_READ, "SSL_ERROR_WANT_READ"},
+	{SSL_ERROR_WANT_WRITE, "SSL_ERROR_WANT_WRITE"},
+	{SSL_ERROR_WANT_CONNECT, "SSL_ERROR_WANT_CONNECT"},
+	/*{SSL_ERROR_WANT_ACCEPT, "SSL_ERROR_WANT_ACCEPT"},*/
+	{SSL_ERROR_WANT_X509_LOOKUP, "SSL_ERROR_WANT_X509_LOOKUP"},
+	{SSL_ERROR_SYSCALL, "SSL_ERROR_SYSCALL"},
+	{SSL_ERROR_SSL, "SSL_ERROR_SSL"},
+	{-1, NULL}
+};
+
+char *get_ssl_error(int sslerr) 
+{
+	int i;
+	
+	for (i=0; errtab[i].err != -1; i++)
+		if (errtab[i].err == sslerr)
+			return errtab[i].str;
+			
+	return "<NULL>";
+}
+#endif
diff -uNrd -x CVS ircd-hybrid-7rc5/src/vchannel.c ircd-hybrid-7-bg/src/vchannel.c
--- ircd-hybrid-7rc5/src/vchannel.c	Sat Jul  6 10:03:54 2002
+++ ircd-hybrid-7-bg/src/vchannel.c	Mon Mar 10 01:09:07 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: vchannel.c,v 7.66 2002/07/06 14:03:54 leeh Exp $
+ *  $Id: vchannel.c,v 1.2 2003/03/10 06:09:07 demond Exp $
  */
 
 #include "stdinc.h"
@@ -65,14 +65,14 @@
       /* could send a notice here, but on a vchan aware server
        * they shouldn't see the sub chans anyway
        */
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+      sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
                  me.name, source_p->name, name);
       return NULL;
     }
 
   if (on_sub_vchan(root, source_p))
     {
-      sendto_one(source_p, form_str(ERR_ALREADYONVCHAN),
+      sendto_one(source_p, form_str(source_p,ERR_ALREADYONVCHAN),
                  me.name, source_p->name, name);
       return NULL;
     }
@@ -81,7 +81,7 @@
 
   if (strlen(name) > CHANNELLEN - 15)
     {
-      sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name, source_p->name,
+      sendto_one(source_p, form_str(source_p,ERR_BADCHANNAME), me.name, source_p->name,
                  name);
       return NULL;
     }
@@ -90,7 +90,7 @@
       (!IsOper(source_p) || (source_p->user->joined >=
                              ConfigChannel.max_chans_per_user * 3)))
     {
-      sendto_one(source_p, form_str(ERR_TOOMANYCHANNELS),
+      sendto_one(source_p, form_str(source_p,ERR_TOOMANYCHANNELS),
                  me.name, source_p->name, name);
       return NULL;
     }
@@ -108,7 +108,7 @@
        */
       if (vchan_ts > (CurrentTime + ConfigFileEntry.ts_max_delta))
         {
-          sendto_one(source_p, form_str(ERR_UNAVAILRESOURCE),
+          sendto_one(source_p, form_str(source_p,ERR_UNAVAILRESOURCE),
                      me.name, source_p->name, name);
           return NULL;
         }
@@ -121,7 +121,7 @@
 
   if (vchan_chptr == NULL)
     {
-      sendto_one(source_p, form_str(ERR_BADCHANNAME),
+      sendto_one(source_p, form_str(source_p,ERR_BADCHANNAME),
                  me.name, source_p->name, (unsigned char *)name);
       return NULL;
     }
@@ -173,7 +173,7 @@
             return chptr;
           else
             {
-              sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+              sendto_one(source_p, form_str(source_p,ERR_NOSUCHCHANNEL),
                          me.name, source_p->name, name);
               return NULL;
             }
@@ -196,7 +196,7 @@
    */
   else if (IsVchan(root))
     {
-      sendto_one(source_p, form_str(ERR_BADCHANNAME),
+      sendto_one(source_p, form_str(source_p,ERR_BADCHANNAME),
                  me.name, source_p->name, name);
       return NULL;
     }
@@ -370,12 +370,12 @@
   /* include the root itself in the count */
   no_of_vchans = dlink_list_length(&chptr->vchan_list) + 1;
 
-  sendto_one(source_p, form_str(RPL_VCHANEXIST),
+  sendto_one(source_p, form_str(source_p,RPL_VCHANEXIST),
              me.name, source_p->name, chptr->chname, no_of_vchans);
 
   vchan_show_ids(source_p, chptr);
 
-  sendto_one(source_p, form_str(RPL_VCHANHELP),
+  sendto_one(source_p, form_str(source_p,RPL_VCHANHELP),
              me.name, source_p->name, command, chptr->chname);
 }
 
@@ -399,7 +399,7 @@
   struct Channel *chtmp;
   int done_secret = 0;
 
-  ircsprintf(buf, form_str(RPL_VCHANLIST), me.name, source_p->name,
+  ircsprintf(buf, form_str(source_p,RPL_VCHANLIST), me.name, source_p->name,
              chptr->chname);
 
   mlen = strlen(buf);
diff -uNrd -x CVS ircd-hybrid-7rc5/src/version.c.SH ircd-hybrid-7-bg/src/version.c.SH
--- ircd-hybrid-7rc5/src/version.c.SH	Tue Nov 13 03:59:01 2001
+++ ircd-hybrid-7-bg/src/version.c.SH	Mon Dec 30 23:07:27 2002
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# $Id: version.c.SH,v 7.19 2001/11/13 08:59:01 leeh Exp $ 
+# $Id: version.c.SH,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $ 
 
 spitshell=cat
 package=IRC
diff -uNrd -x CVS ircd-hybrid-7rc5/src/whowas.c ircd-hybrid-7-bg/src/whowas.c
--- ircd-hybrid-7rc5/src/whowas.c	Thu Oct 10 14:49:31 2002
+++ ircd-hybrid-7-bg/src/whowas.c	Thu Jan 23 23:08:46 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: whowas.c,v 7.20 2002/10/10 18:49:31 androsyn Exp $
+ *  $Id: whowas.c,v 1.2 2003/01/24 04:08:46 demond Exp $
  */
 
 #include "stdinc.h"
@@ -84,6 +84,7 @@
   strlcpy(who->name, client_p->name, sizeof(client_p->name));
   strcpy(who->username, client_p->username);
   strcpy(who->hostname, client_p->host);
+  strcpy(who->realhost, client_p->realhost);
   strcpy(who->realname, client_p->info);
 
   who->servername = client_p->user->server;
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/Makefile.in ircd-hybrid-7-bg/tools/Makefile.in
--- ircd-hybrid-7rc5/tools/Makefile.in	Thu Jul 11 19:40:27 2002
+++ ircd-hybrid-7-bg/tools/Makefile.in	Mon Dec 30 23:07:27 2002
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 7.32 2002/07/11 23:40:27 leeh Exp $
+# $Id: Makefile.in,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
 
 CC		= @CC@
 INSTALL		= @INSTALL@
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/README ircd-hybrid-7-bg/tools/README
--- ircd-hybrid-7rc5/tools/README	Tue Apr 30 08:45:01 2002
+++ ircd-hybrid-7-bg/tools/README	Mon Dec 30 23:07:27 2002
@@ -1,4 +1,4 @@
-$Id: README,v 7.10 2002/04/30 12:45:01 leeh Exp $
+$Id: README,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
 
 A directory of support programs for ircd.
 
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/README.mkpasswd ircd-hybrid-7-bg/tools/README.mkpasswd
--- ircd-hybrid-7rc5/tools/README.mkpasswd	Sun Nov  4 00:20:21 2001
+++ ircd-hybrid-7-bg/tools/README.mkpasswd	Mon Dec 30 23:07:27 2002
@@ -1,5 +1,5 @@
 mkpasswd.c documentation
-$Id: README.mkpasswd,v 1.5 2001/11/04 05:20:21 wcampbel Exp $
+$Id: README.mkpasswd,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
 
 This is documentation for the mkpasswd.c included in ircd-hybrid-7.
 
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/convertconf.c ircd-hybrid-7-bg/tools/convertconf.c
--- ircd-hybrid-7rc5/tools/convertconf.c	Thu Jul 18 11:28:28 2002
+++ ircd-hybrid-7-bg/tools/convertconf.c	Mon Dec 30 23:07:27 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: convertconf.c,v 1.36 2002/07/18 15:28:28 db Exp $
+ * $Id: convertconf.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include <stdio.h>
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/convertilines.c ircd-hybrid-7-bg/tools/convertilines.c
--- ircd-hybrid-7rc5/tools/convertilines.c	Tue Jul 16 18:30:21 2002
+++ ircd-hybrid-7-bg/tools/convertilines.c	Mon Dec 30 23:07:27 2002
@@ -25,7 +25,7 @@
  *  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  *  POSSIBILITY OF SUCH DAMAGE.
  *
- * $Id: convertilines.c,v 7.3 2002/07/16 22:30:21 db Exp $
+ * $Id: convertilines.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include <stdio.h>
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/convertklines.c ircd-hybrid-7-bg/tools/convertklines.c
--- ircd-hybrid-7rc5/tools/convertklines.c	Mon Feb 25 14:56:03 2002
+++ ircd-hybrid-7-bg/tools/convertklines.c	Mon Dec 30 23:07:27 2002
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: convertklines.c,v 7.5 2002/02/25 19:56:03 leeh Exp $
+ * $Id: convertklines.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include <stdio.h>
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/descrip.mms ircd-hybrid-7-bg/tools/descrip.mms
--- ircd-hybrid-7rc5/tools/descrip.mms	Tue Feb  5 16:34:01 2002
+++ ircd-hybrid-7-bg/tools/descrip.mms	Mon Dec 30 23:07:27 2002
@@ -1,6 +1,6 @@
 # MMS/MMK Makefile for OpenVMS
 # Copyright (c) 2001 Edward Brocklesby
-# $Id: descrip.mms,v 7.5 2002/02/05 21:34:01 ejb Exp $
+# $Id: descrip.mms,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
 
 CC=	CC
 CFLAGS=	/STANDARD=ISOC94
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/encspeed.c ircd-hybrid-7-bg/tools/encspeed.c
--- ircd-hybrid-7rc5/tools/encspeed.c	Thu Jul 11 23:30:07 2002
+++ ircd-hybrid-7-bg/tools/encspeed.c	Mon Dec 30 23:07:27 2002
@@ -2,7 +2,7 @@
  * encspeed.c - originally written by einride
  *            - modified for ircd-hybrid-7 by davidt
  *
- * $Id: encspeed.c,v 7.5 2002/07/12 03:30:07 joant Exp $
+ * $Id: encspeed.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 
 #include "../include/setup.h"
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/mkpasswd.c ircd-hybrid-7-bg/tools/mkpasswd.c
--- ircd-hybrid-7rc5/tools/mkpasswd.c	Wed Jan  9 14:38:45 2002
+++ ircd-hybrid-7-bg/tools/mkpasswd.c	Mon Dec 30 23:07:27 2002
@@ -9,7 +9,7 @@
 ** VMS support by Edward Brocklesby, crypt.c implementation
 ** phk@login.dknet.dk
 **
-** $Id: mkpasswd.c,v 7.11 2002/01/09 19:38:45 jmallett Exp $
+** $Id: mkpasswd.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
 */
 #include <stdio.h>
 #include <string.h>
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/rsa_respond/Makefile ircd-hybrid-7-bg/tools/rsa_respond/Makefile
--- ircd-hybrid-7rc5/tools/rsa_respond/Makefile	Thu Oct 25 01:21:13 2001
+++ ircd-hybrid-7-bg/tools/rsa_respond/Makefile	Mon Dec 30 23:07:27 2002
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.7 2001/10/25 05:21:13 wcampbel Exp $
+# $Id: Makefile,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
 
 all: respond
 
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/rsa_respond/README ircd-hybrid-7-bg/tools/rsa_respond/README
--- ircd-hybrid-7rc5/tools/rsa_respond/README	Mon Sep 16 22:13:49 2002
+++ ircd-hybrid-7-bg/tools/rsa_respond/README	Mon Dec 30 23:07:27 2002
@@ -32,4 +32,4 @@
 respond compiles properly, and have been tested on FreeBSD 4.x, Linux glibc,
 Solaris 8, and Cygwin 1.2 or higher.
 
-# $Id: README,v 1.7 2002/09/17 02:13:49 db Exp $
+# $Id: README,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/rsa_respond/respond.c ircd-hybrid-7-bg/tools/rsa_respond/respond.c
--- ircd-hybrid-7rc5/tools/rsa_respond/respond.c	Mon Sep 16 22:13:49 2002
+++ ircd-hybrid-7-bg/tools/rsa_respond/respond.c	Mon Dec 30 23:07:27 2002
@@ -17,7 +17,7 @@
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *  $Id: respond.c,v 1.7 2002/09/17 02:13:49 db Exp $
+ *  $Id: respond.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 #include <stdio.h>
 #include <openssl/err.h>
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/untabify ircd-hybrid-7-bg/tools/untabify
--- ircd-hybrid-7rc5/tools/untabify	Sun Aug  1 17:19:57 1999
+++ ircd-hybrid-7-bg/tools/untabify	Mon Dec 30 23:07:27 2002
@@ -2,7 +2,7 @@
 #
 # untabify - convert tabs to spaces
 #
-# $Id: untabify,v 7.0.0.1 1999/08/01 21:19:57 lusky Exp $
+# $Id: untabify,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
 use Text::Tabs;
 $tabstop = 8;
 while (<>) { print expand($_) }
diff -uNrd -x CVS ircd-hybrid-7rc5/tools/viconf.c ircd-hybrid-7-bg/tools/viconf.c
--- ircd-hybrid-7rc5/tools/viconf.c	Mon Feb  4 21:40:22 2002
+++ ircd-hybrid-7-bg/tools/viconf.c	Mon Dec 30 23:07:27 2002
@@ -1,7 +1,7 @@
 /*
  * viconf.c
  *
- * $Id: viconf.c,v 7.4 2002/02/05 02:40:22 jmallett Exp $
+ * $Id: viconf.c,v 1.1.1.1 2002/12/31 04:07:27 demond Exp $
  */
 #include <stdio.h>
 #include <unistd.h>
