diff -uNrd ircd-hybrid-7.0rc10/.indent.pro ircd-hybrid7-shakeit/.indent.pro
--- ircd-hybrid-7.0rc10/.indent.pro	Mon Jun 18 02:09:42 2001
+++ ircd-hybrid7-shakeit/.indent.pro	Wed Dec 31 19:00:00 1969
@@ -1,17 +0,0 @@
-/* $Id: .indent.pro,v 1.3 2001/06/18 06:09:42 a1kmm Exp $ */
-/* copy this file to the source dir then run indent file.c */
-
---gnu-style
-/* Disable tabs... */
--nut
-/* This is the indent before the brace not inside the block. */
---brace-indent0
-/* Indent case: by 2 and braces inside case by 0(then by 0)... */
---case-brace-indentation0
---case-indentation2
-/* Put while() on the brace from do... */
---cuddle-do-while
-/* Disable an annoying format... */
---no-space-after-function-call-names
-/* Disable an annoying format... */
---no-space-after-casts
diff -uNrd ircd-hybrid-7.0rc10/README.txt ircd-hybrid7-shakeit/README.txt
--- ircd-hybrid-7.0rc10/README.txt	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid7-shakeit/README.txt	Tue Jun 10 13:33:19 2003
@@ -0,0 +1,69 @@
+KRATKO IRCD HOW-TO
+==================
+
+---------
+zabelezhka: ako tozi install vi zatrudnyava, i iskate plugotovi configs
+s komentari na buglarski, ima takiva na http://help.4at.info/ -> twilight zone
+-T0sh
+---------
+
+Tova e instalacionen paket za IRC server na mrejata, koiato v momenta niama ime.
+
+SUDURJANIE:
+===========
+Paketcheto vkliuchva slednite direktorii i filove:
+
++ example-conf/:
+  Primerni nastroiki na IRC servera.
++ example-INSTALL.sh:
+  Primeren instalacionen script.
++ example-ircd.check.sh:
+  Primeren script za proverka na funkcioniraneto na IRC servera.
++ ircd-hybrid7.0rc10.tgz:
+  Bazov IRC server daemon, vurhu koito se nadgrajda
++ shakeit-x.y.diff:
++ shakeit-x.y.txt:
+  Specifichnite/zaduljitelni za mrejata patches
+
+UPOTREBA:
+=========
+
+1) Tova, koeto triabva da se napravi za instalacia na IRC server-a, e napraveno
+   PRIMERNO v example-INSTALL.sh. Razbira se, mojete da go izpolzvate, sled kato
+   nanesete neobhodimite promeni po nego. A mojete da napravite vsichko na ruka.
+
+2) Ako tova e purva instalacia na IRC server-a, mojete da izkopirate primernata
+   direktoria "example-conf/" v direktoriata na veche instalirania IRC server,
+   naprimer taka:
+      cp example-conf/* /home/irc/ircd.test/etc/
+   Estestveno, triabva da popravite files suobrazno vashata mashina i
+   svurzanostta i v mrejata (ircd.conf i hubs.conf osnovno).
+3) Primerniat "example-ircd.check.sh" mojete da izpolzvate za proverka v crontab
+   dali IRC server-a vi raboti.
+
+PODSKAZKI:
+==========
+
+1) Niama da e zle ot vreme na vreme da si sveriavate vremeto na mashinata. Ako
+   polzvate komandata "netdate", tova stava s:
+      netdate time.server.net
+   Ako ste na "ntpdate":
+      ntpdate time.server.net
+   Na miastoto na "time.server.net" mojete da polzvate niakoi ot slednite:
+      ttp.mobikom.net
+      sofia.digsys.bg
+      www.lirex.com
+      copern.bas.bg
+      time.nist.gov
+   Tui kato ima dva chasovnika - sistemen i tozi, na komputara, a gornite
+   komandi opresniavat samo sistemnia, pishete i po edno:
+      hwclock --systohc
+2) Ne se seshtam ;-)
+
+VRUZKI:
+=======
+
+Komentari, pohvali, popravki, bira, kartichki i t.n. izprashtaite na avtora.
+
+Valery Dachev <valery@bgit.net>
+
diff -uNrd ircd-hybrid-7.0rc10/cfg ircd-hybrid7-shakeit/cfg
--- ircd-hybrid-7.0rc10/cfg	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid7-shakeit/cfg	Tue Jun 10 13:34:02 2003
@@ -0,0 +1,2 @@
+# primeren file za ./configure opciite - osven prefixa, drugite sa standartni
+./configure --prefix=/home/ircd/ircd --enable-openssl --enable-zlib --enable-small-net --with-nicklen=15 --with-topiclen=150
\ No newline at end of file
diff -uNrd ircd-hybrid-7.0rc10/configure ircd-hybrid7-shakeit/configure
--- ircd-hybrid-7.0rc10/configure	Sat Feb 15 11:32:39 2003
+++ ircd-hybrid7-shakeit/configure	Sat May 24 08:50:57 2003
@@ -6768,7 +6768,7 @@
 
 fi;
 
-ac_cv_nicklen="9"
+ac_cv_nicklen="15"
 ac_cv_maxclients="200"
 ac_cv_topiclen="120"
 
diff -uNrd ircd-hybrid-7.0rc10/contrib/m_map.c ircd-hybrid7-shakeit/contrib/m_map.c
--- ircd-hybrid-7.0rc10/contrib/m_map.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid7-shakeit/contrib/m_map.c	Sat May 24 08:50:57 2003
@@ -116,7 +116,7 @@
     users++;
         
   snprintf(buf + USER_COL, BUFSIZE - USER_COL,
-           " | Users: %5d (%4.1f%%)", users,
+           " | Server 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);
diff -uNrd ircd-hybrid-7.0rc10/doc/example.conf ircd-hybrid7-shakeit/doc/example.conf
--- ircd-hybrid-7.0rc10/doc/example.conf	Wed Oct 30 12:44:51 2002
+++ ircd-hybrid7-shakeit/doc/example.conf	Sat May 24 08:50:57 2003
@@ -238,6 +238,10 @@
 
 	/* have ident: require the user has identd to connect (OLD I: + flag) */
 	have_ident = yes;
+
+	/* mask hostnames */
+	mask_host = yes;
+	mask_host_prefix = "mynet-";
 };
 
 /* operator {}: defines ircd operators. (OLD O:)
diff -uNrd ircd-hybrid-7.0rc10/example-conf/add-vhost ircd-hybrid7-shakeit/example-conf/add-vhost
--- ircd-hybrid-7.0rc10/example-conf/add-vhost	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid7-shakeit/example-conf/add-vhost	Tue Apr  8 11:28:14 2003
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+VHOSTS_FILE="vhosts.conf"
+
+if [ "$1" == "" ] || [ "$2" == "" ] || [ "$3" == "" ]; then
+        echo "Usage: $0 <hostmask> <password> <virtual host>"
+        exit
+fi
+
+HOSTMASK="$1"
+PASSWORD="$2"
+HOSTNAME="$3"
+
+cat >> $VHOSTS_FILE << EOF
+
+auth {
+        user = "$HOSTMASK"; password = "$PASSWORD";
+        spoof = "$HOSTNAME"; spoof_notice = yes; no_tilde = yes;
+};
+EOF
diff -uNrd ircd-hybrid-7.0rc10/example-conf/classes.conf ircd-hybrid7-shakeit/example-conf/classes.conf
--- ircd-hybrid-7.0rc10/example-conf/classes.conf	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid7-shakeit/example-conf/classes.conf	Fri Mar 28 13:51:54 2003
@@ -0,0 +1,58 @@
+# Users Connection Classes
+class {
+	name = "opers";
+	ping_time = 5 minutes;
+	number_per_ip = 10;
+	max_number = 30;
+	sendq = 100 kbytes;
+};
+
+class {
+	name = "users";
+	ping_time = 2 minutes;
+	number_per_ip = 3;
+	max_number = 300;
+	sendq = 100 kbytes;
+};
+
+class {
+	name = "zala1";
+	ping_time = 2 minutes;
+	number_per_ip = 30;
+	max_number = 300;
+	sendq = 100 kbytes;
+};
+
+
+class {
+	name = "restricted";
+	ping_time = 1 minute;
+	number_per_ip = 2;
+	max_number = 100;
+	sendq = 60 kbytes;
+};
+
+# Server Connection Classes
+class {
+	name = "primary_hub";
+	ping_time = 3 minutes;
+	connectfreq = 1 minutes;
+	max_number = 1;
+	sendq = 10 megabytes;
+};
+
+class {
+	name = "secondary_hub";
+	ping_time = 5 minutes;
+	connectfreq = 2 minutes 30 seconds;
+	max_number = 1;
+	sendq = 10 megabytes;
+};
+
+class {
+	name = "leaf";
+	ping_time = 5 minutes;
+	connectfreq = 1 hours;
+	max_number = 30;
+	sendq = 5 megabytes;
+};
diff -uNrd ircd-hybrid-7.0rc10/example-conf/hubs.conf ircd-hybrid7-shakeit/example-conf/hubs.conf
--- ircd-hybrid-7.0rc10/example-conf/hubs.conf	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid7-shakeit/example-conf/hubs.conf	Tue Apr  8 11:26:55 2003
@@ -0,0 +1,23 @@
+# Bulgarian Hubs
+
+connect {
+	host = "194.12.244.99";
+	name = "irc.index.bg";
+	send_password = "bgleaf";
+	accept_password = "bgleaf";
+	port = 7777;
+	hub_mask = "*";
+	class = "primary_hub";
+	autoconn = no;
+};
+
+connect {
+	host="193.68.150.142";
+	name="irc.zonebg.com";
+	send_password="bgleaf";
+	accept_password="bgleaf";
+	port=7777;
+	hub_mask="*";
+	class="secondary_hub";
+	autoconn = yes;
+};
diff -uNrd ircd-hybrid-7.0rc10/example-conf/ircd.conf ircd-hybrid7-shakeit/example-conf/ircd.conf
--- ircd-hybrid-7.0rc10/example-conf/ircd.conf	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid7-shakeit/example-conf/ircd.conf	Wed May 14 13:49:08 2003
@@ -0,0 +1,211 @@
+serverinfo {
+	name = "irc.bgIT.net";
+	vhost = "212.116.156.66";
+	description = "Bulgarian IT Network IRC Server";
+	network_name = "BGIRC Network";
+	network_desc = "Bulgarian IRC Network";
+	max_clients = 150;
+	hub = no;
+	rsa_private_key_file = "etc/rsa.key";
+};
+
+administrator {
+	name = "Valery Dachev";
+	description = "IRC Server Administrator";
+	email = "Valery Dachev <valery@bgIT.net>";
+};
+
+.include "classes.conf"
+.include "redirects.conf"
+/* vhosts.conf has to be included before users.conf in order to work */
+.include "vhosts.conf"
+.include "users.conf"
+.include "opers.conf"
+.include "hubs.conf"
+.include "shared.conf"
+.include "qlines.conf"
+
+listen {
+	# port for users
+	host = "212.116.156.66";
+	port = 6666;
+	port = 6667;
+	port = 6668;
+	
+	# port for web users
+	#host = "127.0.0.1";
+	#port = 6667;
+	
+	# port for server links
+	host = "212.116.156.66";
+	port = 7777;
+};
+
+channel {
+	use_anonops = yes;
+	max_bans = 40;
+	quiet_on_ban = yes;
+
+	use_vchans = no;
+	vchans_oper_only = yes;
+};
+
+general {
+	stats_o_oper_only = yes;
+};
+
+general {
+	/* Specify the default setting of FLOODCOUNT at startup.
+	 * This is how many lines per second we allow before we throttle
+	 * users MSGs/Notices ONLY affects the startup value, otherwise
+	 * use: /quote set floodcount.
+	*/
+	default_floodcount=8;
+
+	/* Send a notice to all opers on the server when someone tries
+	 * to OPER and uses the wrong password.
+	*/
+	failed_oper_notice=yes;
+
+	/* If failed_oper_notice is set to "yes", also notify when someone
+	 * fails to OPER because of an identity mismatch (wrong host or nick).
+	*/
+	failed_oper_notice = yes;
+
+	/* Define how many 'dot' characters are permitted in an ident reply
+	 * before rejecting the user.
+	*/
+	dots_in_ident=2;
+
+	/* Define how many non-wildcard (not: '.' '*' '?' '@') characters are
+	 * needed in klines for them to be placed.  Does not affect
+	 * klines hand-placed in kline.conf.  eg to disallow *@*.com.
+	*/
+	min_nonwildcard = 4;
+
+	/* Enable the nick flood control code. */
+	anti_nick_flood = yes;
+	/* These settings will allow 5 nick changes in 20 seconds. */
+	max_nick_time = 60 seconds;
+	max_nick_changes = 3;
+
+	/* Do not allow the clients exit message to be
+	 * sent to a channel if the client has been on for less than
+	 * anti_spam_exit_message_time
+	 * The idea is, some spambots exit with their spam, thus advertising
+	 * this way. (idea due to ThaDragon, I just couldn't find =his= code).
+	*/
+	anti_spam_exit_message_time = 5 minutes;
+
+	/* Define the time delta permissible for a remote server connection.
+	 * If our timestamp and the remote server's timestamp are over
+	 * ts_max_delta different, the connection will be dropped.  If it
+	 * is less than ts_max_delta but more than ts_warn_delta, send
+	 * a notice to opers on the server, but still allow the connection.
+	ts_warn_delta = 30 seconds;
+	ts_max_delta = 5 minutes;
+
+	/* When a user QUITs, prepend their QUIT message with "Client exit:"
+	 * in order to help prevent against faking server error messages (eg.
+	 * ping timeout, connection reset by peer).
+	*/
+	client_exit = yes;
+
+	/* Show the reason why the user was K-lined or D-lined to the "victim"
+	 * It's a neat feature except for one thing... If you use a tcm
+	 * and it shows the nick of the oper doing the kline (as it does by
+	 * default) Your opers can be hit with retaliation... Or if your
+	 * opers use scripts that stick an ID into the comment field. etc.
+	*/
+	kline_with_reason = yes;
+
+	/* Force the sign-off reason to be "Connection closed" when a user is
+	 * K-lined.  The user will still see the real reason.  This prevents
+	 * other users seeing the client disconnect from harassing the IRCops.
+	*/
+	kline_with_connection_closed = no;
+
+	/* Set to yes if you wish your server to flag and not apply redundant
+	* K-lines.
+	*/
+	non_redundant_klines = yes;
+
+	/* Enable this if you want opers to get noticed about "things" trying
+	 * to connect as servers that don't have N: lines.  Twits with
+	 * misconfigured servers can get really annoying with this enabled.
+	*/
+	warn_no_nline = yes;
+
+	/* minimum time between uses of MOTD, INFO, HELP, LINKS, TRACE */
+	pace_wait = 10 seconds;
+
+	/* Amount of time between notifying users in +g mode that someone
+	 * is messaging them.
+	*/
+	caller_id_wait = 1 minute;
+
+	/* There are clients ignoring the FORCE_MOTD numeric.  There is no
+	 * no point forcing MOTD on connecting clients IMO.  Give them a short
+	 * NOTICE telling them they should read the MOTD, and leave it at that.
+	*/
+	short_motd = no;
+
+	/* Set to yes to disable flood control for opers. */
+	no_oper_flood = yes;
+
+	/* Enable G-lines */
+	glines = yes;
+
+	/* Set the time for how long G-lines will last. */
+	gline_time = 1 day;
+
+	/* Define the maximum amount of time a user can idle before
+	* disconnecting them.  Set to 0 to disable.
+	*/
+	idletime = 0;
+
+	/* How many servers to autoconnect to if theres no class
+	maximum_links = 1;
+
+	/* Define these to the log files you want to use for user connections
+	 * (userlog), successful use of /oper (operlog), and failed use of
+	 * /oper (foperlog).  Logging will stop if either these files do not
+	 * exist, or if they are not defined.
+	*/
+	fname_userlog = "logs/users.log";
+	fname_operlog = "logs/opers.log";
+	fname_foperlog = "logs/fopers.log";
+
+	/* max_targets
+	 * only max_target targets can be PRIVMSG'ed / NOTICE'd in a single
+	 * command. default is 4 if not defined here. setting to 0 will have
+	 * broken results (ie PRIVMSG/NOTICE won't work).
+	*/
+	max_targets = 4;
+
+	/* message_locale
+	 * default message locale to use if gettext() is enabled
+	 * Use "custom" for the (in)famous Hybrid custom messages.
+	 * Use "standard" for the compiled in defaults.
+	*/
+	message_locale = "custom";
+
+	/* List of user modes that only opers can set, see example.conf for a list. */
+	oper_umodes = locops, servnotice, operwall, wallop;
+
+	/* List of usermodes that get set when a user /oper's */
+	oper_umodes = locops, servnotice, operwall, wallop;
+};
+
+modules {
+	/* set paths for module.  these paths are searched both for
+	 * module="" and /quote modload, when a relative pathname
+	 * is specified.
+	*/
+	path = "modules";
+	path = "modules/local";
+	path = "modules/autoload";
+
+	/* load a module upon startup (or rehash) */
+#	module = "some_module.so";
+};
diff -uNrd ircd-hybrid-7.0rc10/example-conf/opers.conf ircd-hybrid7-shakeit/example-conf/opers.conf
--- ircd-hybrid-7.0rc10/example-conf/opers.conf	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid7-shakeit/example-conf/opers.conf	Fri Mar 28 13:55:00 2003
@@ -0,0 +1,29 @@
+operator {
+	name = "exodus";
+	user = "*valery@*";
+	password = "$1$CEN$URED";
+	class = "opers";
+	global_kill = yes;
+	remote = yes;
+	kline = yes;
+	unkline = yes;
+	gline = yes;
+	die = yes;
+	rehash = yes;
+	nick_changes = yes;
+	admin = yes;
+};
+
+operator {
+	name = "BEER_MAN";
+	user = "*zagorka@special.fan";
+	password = "$1$CEN$URED";
+	class = "opers";
+	global_kill = yes;
+	remote = yes;
+	kline = yes;
+	unkline = yes;
+	gline = yes;
+	rehash = yes;
+	nick_changes = yes;
+};
diff -uNrd ircd-hybrid-7.0rc10/example-conf/qlines.conf ircd-hybrid7-shakeit/example-conf/qlines.conf
--- ircd-hybrid-7.0rc10/example-conf/qlines.conf	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid7-shakeit/example-conf/qlines.conf	Fri Mar 28 13:55:18 2003
@@ -0,0 +1,24 @@
+resv {
+	reason = "NetworkName nicks are forbidden.";
+	nick = "BulgariaNet";
+	nick = "BNet";
+	nick = "IRCBG";
+	nick = "BGIRC";
+
+	reason = "Services nicks are forbidden.";
+	nick = "NickServ";
+	nick = "ChanServ";
+	nick = "MemoServ";
+	nick = "OperServ";
+	nick = "StatServ";
+	nick = "SeenServ";
+	nick = "HelpServ";
+	nick = "HostServ";
+	nick = "NS";
+	nick = "CS";
+	nick = "MS";
+	nick = "OS";
+	nick = "SS";
+	nick = "HS";
+};
+
diff -uNrd ircd-hybrid-7.0rc10/example-conf/redirects.conf ircd-hybrid7-shakeit/example-conf/redirects.conf
--- ircd-hybrid-7.0rc10/example-conf/redirects.conf	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid7-shakeit/example-conf/redirects.conf	Fri Mar 28 13:51:54 2003
@@ -0,0 +1,6 @@
+#auth {
+#	user = "10.10.10.10";
+#	redirserv = "irc.server.com";
+#	redirport = 6667;
+#	class = "users";
+#};
diff -uNrd ircd-hybrid-7.0rc10/example-conf/shared.conf ircd-hybrid7-shakeit/example-conf/shared.conf
--- ircd-hybrid-7.0rc10/example-conf/shared.conf	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid7-shakeit/example-conf/shared.conf	Wed May 14 13:51:19 2003
@@ -0,0 +1,18 @@
+# SERVICES
+shared {
+	name = "services.bg";
+};
+
+# BG HUBS
+shared {
+	name = "irc.zonebg.com";
+};
+
+shared {
+	name = "irc.index.bg";
+};
+
+# NONBG HUBS
+shared {
+	name = "eu.bgit.net";
+};
diff -uNrd ircd-hybrid-7.0rc10/example-conf/users.conf ircd-hybrid7-shakeit/example-conf/users.conf
--- ircd-hybrid-7.0rc10/example-conf/users.conf	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid7-shakeit/example-conf/users.conf	Fri Mar 28 13:51:54 2003
@@ -0,0 +1,41 @@
+auth {
+	user="*@62.176.113.131";
+	class="zala1";
+	mask_host = yes;
+	mask_host_prefix = "shakeit-";
+};
+
+auth {
+	user="*@*ppp*";
+	class="restricted";
+	mask_host = yes;
+	mask_host_prefix = "shakeit-";
+};
+
+auth {
+	user="*@*slip*";
+	class="restricted";
+	mask_host = yes;
+	mask_host_prefix = "shakeit-";
+};
+
+auth {
+	user="*@*ts*";
+	class="restricted";
+	mask_host = yes;
+	mask_host_prefix = "shakeit-";
+};
+
+auth {
+	user="*@*dialup*";
+	class="restricted";
+	mask_host = yes;
+	mask_host_prefix = "shakeit-";
+};
+
+auth {
+	user="*@*";
+	mask_host = yes;
+	mask_host_prefix = "shakeit-";
+	class="users";
+};
diff -uNrd ircd-hybrid-7.0rc10/include/channel_mode.h ircd-hybrid7-shakeit/include/channel_mode.h
--- ircd-hybrid-7.0rc10/include/channel_mode.h	Mon Oct 28 16:09:20 2002
+++ ircd-hybrid7-shakeit/include/channel_mode.h	Sat May 24 08:50:57 2003
@@ -99,7 +99,12 @@
 #define MODE_BAN        0x0400
 #define MODE_EXCEPTION  0x0800
 #define MODE_INVEX	0x2000
+#ifdef ANONOPS
 #define MODE_HIDEOPS    0x4000
+#endif
+#ifdef NOCODES
+#define MODE_NOCODES	0x8000
+#endif
 
 /*
  * mode flags which take another parameter (With PARAmeterS)
@@ -118,6 +123,7 @@
 #define ParanoidChannel(x)	((x) && ((x)->mode.mode &\
 			        (MODE_PRIVATE|MODE_INVITEONLY))==\
 		                (MODE_PRIVATE|MODE_INVITEONLY))
+#define NoCodesChannel(x)	((x) && ((x)->mode.mode & MODE_NOCODES))
 
 struct ChModeChange
 {
diff -uNrd ircd-hybrid-7.0rc10/include/client.h ircd-hybrid7-shakeit/include/client.h
--- ircd-hybrid-7.0rc10/include/client.h	Sun Feb 16 17:54:35 2003
+++ ircd-hybrid7-shakeit/include/client.h	Mon Jun  9 10:22:31 2003
@@ -180,6 +180,8 @@
    * considered a read-only field after the client has registered.
    */
   char              host[HOSTLEN + 1];     /* client's hostname */
+  char              realhost[HOSTLEN + 1];
+
   /*
    * client->info for unix clients will normally contain the info from the 
    * gcos field in /etc/passwd but anything can go here.
@@ -258,6 +260,7 @@
   unsigned long     serverMask; /* Only used for Lazy Links */
   time_t            last_nick_change;
   int               number_of_nick_changes;
+  int               svschange;
   /*
    * client->sockhost contains the ip address gotten from the socket as a
    * string, this field should be considered read-only once the connection
diff -uNrd ircd-hybrid-7.0rc10/include/config.h ircd-hybrid7-shakeit/include/config.h
--- ircd-hybrid-7.0rc10/include/config.h	Thu Feb  6 03:46:11 2003
+++ ircd-hybrid7-shakeit/include/config.h	Sat May 24 08:50:57 2003
@@ -299,6 +299,8 @@
 #define VCHANS
 #define ANONOPS
 #define HALFOPS
+#define CYRNICKS
+#define NOCODES
 
 /*
  * The maximum number of local clients that are likely to close at once. If
diff -uNrd ircd-hybrid-7.0rc10/include/config.h.dist ircd-hybrid7-shakeit/include/config.h.dist
--- ircd-hybrid-7.0rc10/include/config.h.dist	Fri Jan 17 00:21:28 2003
+++ ircd-hybrid7-shakeit/include/config.h.dist	Sat May 24 08:50:57 2003
@@ -299,6 +299,8 @@
 #define VCHANS
 #define ANONOPS
 #define HALFOPS
+#define CYRNICKS
+#define NOCODES
 
 /* END OF CONFIGURABLE OPTIONS */
 
diff -uNrd ircd-hybrid-7.0rc10/include/hostmask.h ircd-hybrid7-shakeit/include/hostmask.h
--- ircd-hybrid-7.0rc10/include/hostmask.h	Wed Sep 11 11:27:07 2002
+++ ircd-hybrid7-shakeit/include/hostmask.h	Sat May 24 08:50:57 2003
@@ -53,6 +53,8 @@
 void init_host_hash(void);
 struct ConfItem* find_address_conf(const char*, const char*,
                                    struct irc_inaddr*, int);
+struct ConfItem* find_address_conf_ext(const char*, const char*,
+                                   struct irc_inaddr*, int, const char*);
 struct ConfItem* find_kline_conf(const char*, const char*,
 				 struct irc_inaddr*, int);
 struct ConfItem* find_dline_conf(struct irc_inaddr *, int);
diff -uNrd ircd-hybrid-7.0rc10/include/irc_string.h ircd-hybrid7-shakeit/include/irc_string.h
--- ircd-hybrid-7.0rc10/include/irc_string.h	Wed Aug 28 13:00:12 2002
+++ ircd-hybrid7-shakeit/include/irc_string.h	Sat May 24 08:50:57 2003
@@ -46,6 +46,10 @@
 extern char* collapse(char *pattern);
 extern char *collapse_esc(char *pattern);
 
+/* stripcodes()
+ */
+char *stripcodes(char *source);
+
 /*
  * irccmp - case insensitive comparison of s1 and s2
  */
@@ -140,6 +144,9 @@
 #define NONEOS_C 0x1000
 #define SERV_C   0x2000
 #define EOL_C    0x4000
+#ifdef CYRNICKS
+#define CYR_C    0x8000
+#endif
 
 #define IsHostChar(c)   (CharAttrs[(unsigned char)(c)] & HOST_C)
 #define IsUserChar(c)   (CharAttrs[(unsigned char)(c)] & USER_C)
@@ -162,6 +169,9 @@
 #define IsGraph(c) (IsPrint((c)) && ((unsigned char)(c) != 0x32))
 #define IsPunct(c) (!(CharAttrs[(unsigned char)(c)] & \
                                            (CNTRL_C | ALPHA_C | DIGIT_C)))
+#ifdef CYRNICKS
+#define IsCyrChar(c)    (CharAttrs[(unsigned char)(c)] & CYR_C)
+#endif
 
 #define IsNonEOS(c) (CharAttrs[(unsigned char)(c)] & NONEOS_C)
 #define IsEol(c) (CharAttrs[(unsigned char)(c)] & EOL_C)
diff -uNrd ircd-hybrid-7.0rc10/include/ircd_defs.h ircd-hybrid7-shakeit/include/ircd_defs.h
--- ircd-hybrid-7.0rc10/include/ircd_defs.h	Sat Feb 15 11:32:43 2003
+++ ircd-hybrid7-shakeit/include/ircd_defs.h	Sat May 24 08:50:57 2003
@@ -42,6 +42,8 @@
 
 #define HOSTLEN         63      /* Length of hostname.  Updated to         */
                                 /* comply with RFC1123                     */
+#define MASKPREFIXLEN	15
+#define STRFIXLEN	7
 
 #define USERLEN         10
 #define REALLEN         50
diff -uNrd ircd-hybrid-7.0rc10/include/numeric.h ircd-hybrid7-shakeit/include/numeric.h
--- ircd-hybrid-7.0rc10/include/numeric.h	Wed Nov 27 10:46:24 2002
+++ ircd-hybrid7-shakeit/include/numeric.h	Sat May 24 08:50:57 2003
@@ -238,6 +238,7 @@
 /*      RPL_UNIQOPIS         325           IRCnet extension */
 /*      RPL_NOCHANPASS       326           IRCnet extension */
 /*      RPL_CHPASSUNKNOWN    327           IRCnet extension */
+#define RPL_WHOISREALHOST    327
 /*      RPL_CHANNEL_URL      328           dalnet, anothernet */
 #define RPL_CREATIONTIME     329
 /*      RPL_WHOWAS_TIME      330               ? */
diff -uNrd ircd-hybrid-7.0rc10/include/patchlevel.h ircd-hybrid7-shakeit/include/patchlevel.h
--- ircd-hybrid-7.0rc10/include/patchlevel.h	Tue May  6 21:20:12 2003
+++ ircd-hybrid7-shakeit/include/patchlevel.h	Tue Jun 10 13:26:10 2003
@@ -23,5 +23,5 @@
  */
 
 #ifndef PATCHLEVEL
-#define PATCHLEVEL   "hybrid-7.0rc10"
+#define PATCHLEVEL   "hybrid-7.0rc10-shakeit-p5"
 #endif
diff -uNrd ircd-hybrid-7.0rc10/include/s_conf.h ircd-hybrid7-shakeit/include/s_conf.h
--- ircd-hybrid-7.0rc10/include/s_conf.h	Sat Feb 15 19:22:21 2003
+++ ircd-hybrid7-shakeit/include/s_conf.h	Sat May 24 08:50:57 2003
@@ -75,6 +75,7 @@
   struct Class *   c_class;     /* Class of connection */
   struct DNSQuery* dns_query;
   int              aftype;
+  char *           mask_host_prefix;
 #ifdef HAVE_LIBCRYPTO
   char *           rsa_public_key_file;
   RSA *            rsa_public_key;
@@ -124,6 +125,7 @@
 #define CONF_FLAGS_EXEMPTGLINE          0x00001000
 #define CONF_FLAGS_RESTRICTED           0x00002000
 #define CONF_FLAGS_CAN_FLOOD            0x00100000
+#define CONF_FLAGS_MASK_HOST            0x00200000
 /* server flags */
 #define CONF_FLAGS_ALLOW_AUTO_CONN      0x00004000
 #define CONF_FLAGS_LAZY_LINK            0x00008000
@@ -145,6 +147,7 @@
 #define IsConfIdlelined(x)      ((x)->flags & CONF_FLAGS_IDLE_LINED)
 #define IsConfDoIdentd(x)       ((x)->flags & CONF_FLAGS_DO_IDENTD)
 #define IsConfDoSpoofIp(x)      ((x)->flags & CONF_FLAGS_SPOOF_IP)
+#define IsConfDoMaskHost(x)     ((x)->flags & CONF_FLAGS_MASK_HOST)
 /* jdc -- flip logic since YES/NO are reversed in the conf code */
 #define IsConfSpoofNotice(x)    (!((x)->flags & CONF_FLAGS_SPOOF_NOTICE))
 #define IsConfRestricted(x)     ((x)->flags & CONF_FLAGS_RESTRICTED)
diff -uNrd ircd-hybrid-7.0rc10/include/s_serv.h ircd-hybrid7-shakeit/include/s_serv.h
--- ircd-hybrid-7.0rc10/include/s_serv.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid7-shakeit/include/s_serv.h	Sat Jul 19 05:54:17 2003
@@ -74,12 +74,13 @@
 
 #define CAP_TBURST	0x00040000   /* supports TBURST */
 #define CAP_PARA	0x00080000   /* supports invite broadcasting for +p */
+#define CAP_SVSNICK	0x00100000   /* supports SVSNICK */
 
 #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_KNOCK  | CAP_PARA | CAP_SVSNICK)
 
 #ifdef HAVE_LIBZ
 #define CAP_ZIP_SUPPORTED       CAP_ZIP
diff -uNrd ircd-hybrid-7.0rc10/include/serno.h ircd-hybrid7-shakeit/include/serno.h
--- ircd-hybrid-7.0rc10/include/serno.h	Tue May  6 21:20:15 2003
+++ ircd-hybrid7-shakeit/include/serno.h	Sat Jul 19 05:53:02 2003
@@ -1 +1 @@
-#define SERIALNUM "20030507_0"
+#define SERIALNUM "20030720_1"
diff -uNrd ircd-hybrid-7.0rc10/include/whowas.h ircd-hybrid7-shakeit/include/whowas.h
--- ircd-hybrid-7.0rc10/include/whowas.h	Thu Jun  6 15:28:50 2002
+++ ircd-hybrid7-shakeit/include/whowas.h	Sat May 24 08:50:57 2003
@@ -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 ircd-hybrid-7.0rc10/modules/Makefile.in ircd-hybrid7-shakeit/modules/Makefile.in
--- ircd-hybrid-7.0rc10/modules/Makefile.in	Sun Jun 16 12:31:25 2002
+++ ircd-hybrid7-shakeit/modules/Makefile.in	Sat May 24 08:50:57 2003
@@ -46,7 +46,8 @@
   core/m_quit.c \
   core/m_server.c \
   core/m_sjoin.c \
-  core/m_squit.c
+  core/m_squit.c \
+  core/m_svsnick.c
 
 SRCS =                          \
   m_accept.c \
diff -uNrd ircd-hybrid-7.0rc10/modules/core/m_message.c ircd-hybrid7-shakeit/modules/core/m_message.c
--- ircd-hybrid-7.0rc10/modules/core/m_message.c	Sun Apr  6 12:47:37 2003
+++ ircd-hybrid7-shakeit/modules/core/m_message.c	Sat May 24 08:50:57 2003
@@ -283,6 +283,18 @@
        nick = strtoken(&p, (char *)NULL, ","))
   {
     char *with_prefix;
+    // BEGIN: services nick aliases patch (by T0sh) 
+    if (*nick != '#') 
+    {
+	if (!irccmp(nick,"ns")) nick = "nickserv";
+	else if (!irccmp(nick,"cs")) nick = "chanserv";	
+	else if (!irccmp(nick,"ss")) nick = "seenserv";
+	else if (!irccmp(nick,"ms")) nick = "memoserv";
+	else if (!irccmp(nick,"os")) nick = "operserv";
+	else if (!irccmp(nick,"hs")) nick = "helpserv";
+    }
+    // END: services nick aliases patch
+    
     /*
      * channels are privmsg'd a lot more than other clients, moved up
      * here plain old channel msg?
@@ -482,6 +494,10 @@
     if (result == CAN_SEND_OPV ||
         !flood_attack_channel(p_or_n, source_p, vchan, chname))
     {
+#ifdef NOCODES
+      if (NoCodesChannel(vchan))
+        stripcodes(text);
+#endif
       sendto_channel_butone(client_p, source_p, vchan, command, ":%s", text);
     }
   }
@@ -542,6 +558,11 @@
 
   if (!vchan)
     vchan = chptr;
+
+#ifdef NOCODES
+  if (NoCodesChannel(vchan))
+    stripcodes(text);
+#endif
 
   if (MyClient(source_p))
   {
diff -uNrd ircd-hybrid-7.0rc10/modules/core/m_nick.c ircd-hybrid7-shakeit/modules/core/m_nick.c
--- ircd-hybrid-7.0rc10/modules/core/m_nick.c	Wed Apr  2 20:29:02 2003
+++ ircd-hybrid7-shakeit/modules/core/m_nick.c	Sat May 24 08:50:57 2003
@@ -622,6 +622,11 @@
 static int
 clean_nick_name(char *nick)
 {
+#ifdef CYRNICKS
+  int cyrillic = FALSE;
+  char *letter;
+#endif
+
   assert(nick);
   if(nick == NULL)
     return (0);
@@ -632,10 +637,20 @@
   if (*nick == '-' || IsDigit(*nick) || *nick == '\0')
     return (0);
 
+#ifdef CYRNICKS
+  for(letter = nick; *letter && !cyrillic; letter++)
+    if(IsCyrChar(*letter))
+      cyrillic = TRUE;
+#endif
+
   for(; *nick; nick++)
   {
     if(!IsNickChar(*nick))
       return (0);
+#ifdef CYRNICKS
+    if(cyrillic && isalpha(*nick))
+      return(0);
+#endif
   }
 
   return (1);
diff -uNrd ircd-hybrid-7.0rc10/modules/core/m_part.c ircd-hybrid7-shakeit/modules/core/m_part.c
--- ircd-hybrid-7.0rc10/modules/core/m_part.c	Thu Feb  6 03:46:06 2003
+++ ircd-hybrid7-shakeit/modules/core/m_part.c	Sat May 24 08:50:57 2003
@@ -94,6 +94,10 @@
   if (parc > 2)
     strlcpy(reason, parv[2], TOPICLEN);
 
+#ifdef NOCODES
+  stripcodes(reason);
+#endif
+  
   name = strtoken( &p, parv[1], ",");
 
   /* Finish the flood grace period... */
@@ -169,6 +173,14 @@
          (source_p->firsttime + ConfigFileEntry.anti_spam_exit_message_time)
          < CurrentTime))))
   {
+
+  // BEGIN: anti-spam patch (by T0sh)
+  if (match("*tp:*", reason) || match("*www*", reason))
+                reason = "<URL spammer>";
+  if (match("*irc.*", reason) || match("*/serv*", reason))
+                reason = "<server spammer>";
+  // END: anti-spam patch (by T0sj)
+
     sendto_server(client_p, NULL, chptr, CAP_UID, NOCAPS, NOFLAGS,
                   ":%s PART %s :%s", ID(source_p), chptr->chname,
                   reason);
diff -uNrd ircd-hybrid-7.0rc10/modules/core/m_quit.c ircd-hybrid7-shakeit/modules/core/m_quit.c
--- ircd-hybrid-7.0rc10/modules/core/m_quit.c	Fri Feb 14 18:01:53 2003
+++ ircd-hybrid7-shakeit/modules/core/m_quit.c	Sat May 24 08:50:57 2003
@@ -73,6 +73,17 @@
   if (strlen(comment) > (size_t) TOPICLEN)
     comment[TOPICLEN] = '\0';
 
+#ifdef NOCODES
+  stripcodes(comment);
+#endif
+  
+  // BEGIN: anti-spam patch (by T0sh)
+  if (match("*tp:*", comment) || match("*www*", comment)) 
+                comment = "<URL spammer>";
+  if (match("*irc.*", comment) || match("*/serv*", comment)) 
+                comment = "<server spammer>";
+  // END: anti-spam patch
+
   if (ConfigFileEntry.client_exit && comment[0])
     {
 #ifndef VMS
diff -uNrd ircd-hybrid-7.0rc10/modules/core/m_sjoin.c ircd-hybrid7-shakeit/modules/core/m_sjoin.c
--- ircd-hybrid-7.0rc10/modules/core/m_sjoin.c	Thu Jul  4 12:07:23 2002
+++ ircd-hybrid7-shakeit/modules/core/m_sjoin.c	Sat May 24 08:50:57 2003
@@ -184,6 +184,12 @@
           mode.mode |= MODE_HIDEOPS;
         break;
 #endif
+#ifdef NOCODES
+      case 'c':
+        mode.mode |= MODE_NOCODES;
+        break;
+#endif
+
       case 'k':
         strlcpy(mode.key, parv[4 + args], KEYLEN);
         args++;
@@ -739,6 +745,9 @@
   { MODE_PRIVATE,    'p' },
 #ifdef ANONOPS
   { MODE_HIDEOPS,    'a' },
+#endif
+#ifdef NOCODES
+  { MODE_NOCODES,    'c' },
 #endif
   { 0, 0 }
 };
diff -uNrd ircd-hybrid-7.0rc10/modules/core/m_svsnick.c ircd-hybrid7-shakeit/modules/core/m_svsnick.c
--- ircd-hybrid-7.0rc10/modules/core/m_svsnick.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid7-shakeit/modules/core/m_svsnick.c	Mon Jun  9 10:22:31 2003
@@ -0,0 +1,203 @@
+/* $Id: m_svsnick.c,v 1.1 2003/02/10 19:09:41 kreator Exp $ */
+
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "hash.h"
+#include "fdlist.h"
+#include "irc_string.h"
+#include "ircd.h"
+#include "numeric.h"
+#include "s_conf.h"
+#include "s_stats.h"
+#include "s_user.h"
+#include "hash.h"
+#include "whowas.h"
+#include "s_serv.h"
+#include "send.h"
+#include "list.h"
+#include "channel.h"
+#include "s_log.h"
+#include "resv.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "common.h"
+#include "packet.h"
+
+static void ms_svsnick(struct Client *, struct Client *, int, char**);
+
+static int clean_nick_name(char *);
+                            
+
+struct Message svsnick_msgtab = {
+  "SVSNICK", 0, 0, 3, 0, MFLG_SLOW, 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.1 $";
+#endif
+
+/*
+ * ms_svsnick()
+ *
+ *     parv[0] = sender prefix
+ *     parv[1] = oldnick
+ *     parv[2] = newnick
+ */
+static void ms_svsnick(struct Client *client_p, struct Client *source_p,
+                   int parc, char *parv[])
+{
+  char     oldnick[NICKLEN];
+  char     newnick[NICKLEN];
+  struct   Client *oldnickname;
+  struct   Client *newnickname;
+  
+  if (!IsServer(source_p))
+    return;
+
+  /* XXX BadPtr is needed */
+  if(parc < 3 || BadPtr(parv[1]) || BadPtr(parv[2]))
+  {
+    sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+               me.name, parv[0]);
+    return;
+  }
+
+  /* terminate nick to NICKLEN */
+  strlcpy(oldnick, parv[1], NICKLEN);
+  strlcpy(newnick, parv[2], NICKLEN);
+
+  if(!clean_nick_name(oldnick))
+  {
+    sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME),
+               me.name, parv[0], oldnick);
+    return;
+  }
+
+  /* check the nickname is ok */
+  if(!clean_nick_name(newnick))
+  {
+    sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME),
+               me.name, parv[0], newnick);
+    return;
+  }
+
+  if(find_nick_resv(newnick) &&
+     !(IsOper(source_p) && ConfigChannel.oper_pass_resv))
+  {
+    sendto_one(source_p, form_str(ERR_UNAVAILRESOURCE),
+               me.name, parv[0], newnick);
+    return;
+  }
+  if(!(oldnickname = find_client(oldnick)))
+  {
+    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, source_p->name, oldnick);
+    return;
+  }
+  if(newnickname = find_client(newnick))
+  {
+        sendto_one(source_p, form_str(ERR_NICKNAMEINUSE), me.name,
+                 parv[0], newnick);    
+        return;
+  }
+  if(MyConnect(oldnickname))
+  {
+    if(!IsFloodDone(oldnickname))
+    flood_endgrace(oldnickname);
+    if (newnickname = find_client(oldnick))
+    {
+      if(newnickname == oldnickname)
+      {
+      /* check the nick isnt exactly the same */
+      if(strcmp(oldnickname->name, newnick))
+      {
+        oldnickname->localClient->svschange = 1;
+        change_local_nick(oldnickname->servptr, oldnickname, newnick);
+        return;
+      }
+      else 
+      {
+        /* client is doing :old NICK old
+	 * ignore it..
+	 */
+        return;
+      }
+  }
+    /* if the client that has the nick isnt registered yet (nick but no
+     * user) then drop the unregged client
+     */
+    if(IsUnknown(newnickname))
+    {
+      /* the old code had an if(MyConnect(target_p)) here.. but I cant see
+       * how that can happen, m_nick() is local only --fl_
+       */
+      
+      exit_client(NULL, newnickname, &me, "Overridden");
+        change_local_nick(oldnickname->servptr, oldnickname, newnick);
+      return;
+    }
+    else
+    {
+      sendto_one(source_p, form_str(ERR_NICKNAMEINUSE), me.name,
+                 parv[0], newnick);
+      return;
+    }
+  }
+  else
+  {
+    if(!ServerInfo.hub && uplink && IsCapable(uplink, CAP_LL))
+    {
+      /* The uplink might know someone by this name already. */
+      sendto_one(uplink, ":%s NBURST %s %s %s", me.name, newnick,
+                 newnick, oldnickname->name);
+      return;
+    }
+    else
+    {
+        change_local_nick(oldnickname->servptr, oldnickname, newnick);
+      return;
+    }
+  }
+  }
+  else
+  {
+    sendto_server(client_p, source_p, NULL, CAP_SVSNICK, NOCAPS, NOFLAGS,
+":%s SVSNICK %s %s", me.name, oldnick, newnick);
+    return;
+  }
+}
+static int
+clean_nick_name(char *nick)
+{
+  assert(nick);
+  if(nick == NULL)
+    return 0;
+
+  /* nicks cant start with a digit or - or be 0 length */
+  /* This closer duplicates behaviour of hybrid-6 */
+
+  if (*nick == '-' || IsDigit(*nick) || *nick == '\0')
+    return 0;
+
+  for(; *nick; nick++)
+  {
+    if(!IsNickChar(*nick))
+      return 0;
+  }
+
+  return 1;
+}
diff -uNrd ircd-hybrid-7.0rc10/modules/m_operwall.c ircd-hybrid7-shakeit/modules/m_operwall.c
--- ircd-hybrid-7.0rc10/modules/m_operwall.c	Fri May 24 19:34:21 2002
+++ ircd-hybrid7-shakeit/modules/m_operwall.c	Sat May 24 08:50:57 2003
@@ -78,7 +78,7 @@
 
   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, "[OW] %s", message);
 }
 
 /*
@@ -103,7 +103,7 @@
 
   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, "[OW] %s", message);
 }
 
 
diff -uNrd ircd-hybrid-7.0rc10/modules/m_wallops.c ircd-hybrid7-shakeit/modules/m_wallops.c
--- ircd-hybrid-7.0rc10/modules/m_wallops.c	Thu Jan  9 01:20:07 2003
+++ ircd-hybrid7-shakeit/modules/m_wallops.c	Sat May 24 08:50:57 2003
@@ -77,7 +77,7 @@
       return;
     }
 
-  sendto_wallops_flags(FLAGS_OPERWALL, source_p, "OPERWALL - %s", message);
+  sendto_wallops_flags(FLAGS_OPERWALL, source_p, "[WO] %s", message);
   sendto_server(NULL, source_p, NULL, NOCAPS, NOCAPS, LL_ICLIENT,
                 ":%s WALLOPS :%s", parv[0], message);
 }
@@ -102,7 +102,7 @@
     }
 
   if(IsClient(source_p))
-    sendto_wallops_flags(FLAGS_OPERWALL, source_p, "OPERWALL - %s", message);
+    sendto_wallops_flags(FLAGS_OPERWALL, source_p, "[WO] %s", message);
   else
     sendto_wallops_flags(FLAGS_WALLOP, source_p, "%s", message); 
 
diff -uNrd ircd-hybrid-7.0rc10/modules/m_whois.c ircd-hybrid7-shakeit/modules/m_whois.c
--- ircd-hybrid-7.0rc10/modules/m_whois.c	Sat Feb  8 19:02:28 2003
+++ ircd-hybrid7-shakeit/modules/m_whois.c	Sat May 24 08:50:57 2003
@@ -393,6 +393,11 @@
 	 target_p->username, target_p->host, target_p->info);
   server_name = (char *)target_p->user->server;
 
+  if (IsOper(source_p) || (target_p == source_p))
+    sendto_one(source_p, form_str(RPL_WHOISREALHOST), me.name,
+      source_p->name, target_p->name,
+      ServerInfo.network_name, target_p->realhost);
+
   ircsprintf(buf, form_str(RPL_WHOISCHANNELS),
 	       me.name, source_p->name, target_p->name, "");
 
diff -uNrd ircd-hybrid-7.0rc10/modules/m_whowas.c ircd-hybrid7-shakeit/modules/m_whowas.c
--- ircd-hybrid-7.0rc10/modules/m_whowas.c	Fri Jan 17 08:00:51 2003
+++ ircd-hybrid7-shakeit/modules/m_whowas.c	Sat May 24 08:50:57 2003
@@ -153,6 +153,11 @@
                      temp->username,
                      temp->hostname,
                      temp->realname);
+          if (IsOper(source_p))
+            sendto_one(source_p, form_str(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),
diff -uNrd ircd-hybrid-7.0rc10/src/Makefile.in ircd-hybrid7-shakeit/src/Makefile.in
--- ircd-hybrid-7.0rc10/src/Makefile.in	Tue Nov 26 22:56:24 2002
+++ ircd-hybrid7-shakeit/src/Makefile.in	Sat May 24 08:50:57 2003
@@ -174,6 +174,6 @@
 	lint -aacgprxhH $(CPPFLAGS) -DIRCD_PREFIX=\"@prefix@\" $(SRCS) >>../lint.out
 
 distclean: clean
-	${RM} -f Makefile version.c.last
+	${RM} -f Makefile version.c.last version.c
 
 include .depend
diff -uNrd ircd-hybrid-7.0rc10/src/channel_mode.c ircd-hybrid7-shakeit/src/channel_mode.c
--- ircd-hybrid-7.0rc10/src/channel_mode.c	Sat Apr 19 22:33:41 2003
+++ ircd-hybrid7-shakeit/src/channel_mode.c	Sat May 24 08:50:57 2003
@@ -499,6 +499,10 @@
   if (chptr->mode.mode & MODE_HIDEOPS)
     *mbuf++ = 'a';
 #endif
+#ifdef NOCODES
+  if (chptr->mode.mode & MODE_NOCODES)
+    *mbuf++ = 'c';
+#endif
   if (chptr->mode.limit)
   {
     *mbuf++ = 'l';
@@ -1870,7 +1874,11 @@
   {chm_nosuch, NULL},				  /* a */
 #endif
   {chm_ban, NULL},                                /* b */
+#ifdef NOCODES
+  {chm_simple, (void *) MODE_NOCODES},            /* c */
+#else
   {chm_nosuch, NULL},                             /* c */
+#endif
   {chm_nosuch, NULL},                             /* d */
   {chm_except, NULL},                             /* e */
   {chm_nosuch, NULL},                             /* f */
diff -uNrd ircd-hybrid-7.0rc10/src/client.c ircd-hybrid7-shakeit/src/client.c
--- ircd-hybrid-7.0rc10/src/client.c	Sun Mar  2 02:30:54 2003
+++ ircd-hybrid7-shakeit/src/client.c	Mon Jun  9 10:22:31 2003
@@ -1685,7 +1685,7 @@
       (source_p->localClient->number_of_nick_changes
        <= ConfigFileEntry.max_nick_changes)) ||
      !ConfigFileEntry.anti_nick_flood || 
-     (IsOper(source_p) && ConfigFileEntry.no_oper_flood))
+     (IsOper(source_p) && ConfigFileEntry.no_oper_flood) || source_p->localClient->svschange)
     {
       /* XXX - the format of this notice should eventually be changed
        * to either %s[%s@%s], or even better would be get_client_name() -bill
@@ -1699,6 +1699,9 @@
                                    ":%s!%s@%s NICK :%s",
 				   source_p->name, source_p->username,
 				   source_p->host, nick);
+      if (source_p->localClient->svschange)
+        source_p->localClient->svschange = 0;
+
       if (source_p->user)
 	{
 	  add_history(source_p, 1);
diff -uNrd ircd-hybrid-7.0rc10/src/hostmask.c ircd-hybrid7-shakeit/src/hostmask.c
--- ircd-hybrid-7.0rc10/src/hostmask.c	Sun May  4 19:25:21 2003
+++ ircd-hybrid7-shakeit/src/hostmask.c	Sat May 24 08:50:57 2003
@@ -31,6 +31,8 @@
 #include "send.h"
 #include "irc_string.h"
 
+struct ConfItem *find_conf_by_address_ext(const char *, struct irc_inaddr *,
+                     int, int, const char *, const char *);
 #ifdef IPV6
 static int try_parse_v6_netmask(const char *, struct irc_inaddr *, int *);
 static unsigned long hash_ipv6(struct irc_inaddr *, int);
@@ -376,12 +378,29 @@
  *        family, the username.
  * Output: The matching value with the highest precedence.
  * Side-effects: None
- * Note: Setting bit 0 of the type means that the username is ignored.
+ * Note: Frontend function for find_conf_by_address_ext() that does not check
+ *        password.
  */
 struct ConfItem *
 find_conf_by_address(const char *name, struct irc_inaddr *addr, int type,
                      int fam, const char *username)
 {
+  return (find_conf_by_address_ext(name, addr, type, fam, username, NULL));
+}
+
+/* struct ConfItem* find_conf_by_address_ext(const char*, struct irc_inaddr*,
+ *         int type, int fam, const char *username, const char *passwd)
+ * Input: The hostname, the address, the type of mask to find, the address
+ *        family, the username and the password.
+ * Output: The matching value with the highest precedence.
+ * Side-effects: None
+ * Note: Setting bit 0 of the type means that the username is ignored.
+ *       It falls through the config, if password doesn't match.
+ */
+struct ConfItem *
+find_conf_by_address_ext(const char *name, struct irc_inaddr *addr, int type,
+                     int fam, const char *username, const char *passwd)
+{
   unsigned long hprecv = 0;
   struct ConfItem *hprec = NULL;
   struct AddressRec *arec;
@@ -406,6 +425,9 @@
               (type & 0x1 || match(arec->username, username)) &&
               arec->precedence > hprecv)
           {
+            if (passwd != NULL && !BadPtr(arec->aconf->passwd)
+              && strcmp(passwd, arec->aconf->passwd))
+              continue;
             hprecv = arec->precedence;
             hprec = arec->aconf;
           }
@@ -425,6 +447,9 @@
               (type & 0x1 || match(arec->username, username)) &&
               arec->precedence > hprecv)
           {
+            if (passwd != NULL && !BadPtr(arec->aconf->passwd)
+              && strcmp(passwd, arec->aconf->passwd))
+              continue;
             hprecv = arec->precedence;
             hprec = arec->aconf;
           }
@@ -446,6 +471,9 @@
             (type & 0x1 || match(arec->username, username)) &&
             (arec->precedence > hprecv))
         {
+          if (passwd != NULL && !BadPtr(arec->aconf->passwd)
+            && strcmp(passwd, arec->aconf->passwd))
+            continue;
           hprecv = arec->precedence;
           hprec = arec->aconf;
         }
@@ -462,6 +490,9 @@
           (type & 0x1 || match(arec->username, username)) &&
           arec->precedence > hprecv)
       {
+        if (passwd != NULL && !BadPtr(arec->aconf->passwd)
+          && strcmp(passwd, arec->aconf->passwd))
+          continue;
         hprecv = arec->precedence;
         hprec = arec->aconf;
       }
@@ -470,19 +501,34 @@
 }
 
 /* struct ConfItem* find_address_conf(const char*, const char*,
- * 	                               struct irc_inaddr*, int);
+ * 	                               struct irc_inaddr*, int, const char*);
  * Input: The hostname, username, address, address family.
  * Output: The applicable ConfItem.
- * Side-effects: None
+ * Side-effects: Returns the result of find_address_conf_ext() with NULL
+ *       password parameter.
  */
 struct ConfItem *
 find_address_conf(const char *host, const char *user,
                   struct irc_inaddr *ip, int aftype)
 {
+  return(find_address_conf_ext(host, user, ip, aftype, NULL));
+}
+
+/* struct ConfItem* find_address_conf(const char*, const char*,
+ * 	                               struct irc_inaddr*, int, const char*);
+ * Input: The hostname, username, address, address family, password.
+ * Output: The applicable ConfItem.
+ * Side-effects: None
+ */
+struct ConfItem *
+find_address_conf_ext(const char *host, const char *user,
+                  struct irc_inaddr *ip, int aftype, const 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_ext(host, ip, CONF_CLIENT, aftype, user,
+    passwd)))
     return NULL;
 
   /* If they are exempt from K-lines, return the best I-line. -A1kmm */
diff -uNrd ircd-hybrid-7.0rc10/src/irc_string.c ircd-hybrid7-shakeit/src/irc_string.c
--- ircd-hybrid-7.0rc10/src/irc_string.c	Fri Apr  4 20:37:57 2003
+++ ircd-hybrid7-shakeit/src/irc_string.c	Sat May 24 08:50:57 2003
@@ -66,6 +66,47 @@
   return buf;
 }
 
+char *stripcodes(char *source)
+{
+  unsigned char *p, *c;
+  int color = 0, digits;
+
+  if( source == NULL )
+    return NULL;
+
+  c = source;
+  for( p = source; *p; p++ )
+  {
+    if( *p == 0x03 )
+    {
+      digits = 0;
+      color = 1;
+      continue;
+    }
+    if( color )
+    {
+      if( isdigit( *p ) && digits < 2 )
+      {
+	digits++;
+        continue;
+      }
+      if( *p == ',' && isdigit( *(p+1) ) )
+      {
+        color = 2;
+	digits = 0;
+	continue;
+      }
+      color = 0;
+    }
+    if( *p <= 0x01 || *p >= 0x20 )
+    {
+      *c++ = *p;
+    }
+  }
+  *c = '\0';
+
+  return source;
+}
 
 /*
  * clean_string - clean up a string possibly containing garbage
diff -uNrd ircd-hybrid-7.0rc10/src/ircd_lexer.l ircd-hybrid7-shakeit/src/ircd_lexer.l
--- ircd-hybrid-7.0rc10/src/ircd_lexer.l	Wed Oct 30 12:44:56 2002
+++ ircd-hybrid7-shakeit/src/ircd_lexer.l	Sat May 24 08:50:57 2003
@@ -207,6 +207,8 @@
 logging         { return LOGGING; }
 logpath         { return T_LOGPATH; }
 masked		{ return TMASKED; }
+mask_host	{ return MASK_HOST; }
+mask_host_prefix { return MASK_HOST_PREFIX; }
 max_buffer	{ return T_MAX_BUFFER; }
 max_clients     { return T_MAX_CLIENTS; }
 max_number	{ return MAX_NUMBER; }
diff -uNrd ircd-hybrid-7.0rc10/src/ircd_parser.y ircd-hybrid7-shakeit/src/ircd_parser.y
--- ircd-hybrid-7.0rc10/src/ircd_parser.y	Tue Nov 12 08:45:42 2002
+++ ircd-hybrid7-shakeit/src/ircd_parser.y	Sat May 24 08:50:57 2003
@@ -167,6 +167,8 @@
 %token  LISTEN
 %token  LOGGING
 %token  LOG_LEVEL
+%token  MASK_HOST
+%token  MASK_HOST_PREFIX
 %token  MAXIMUM_LINKS
 %token  MAX_ACCEPT
 %token  MAX_BANS
@@ -1077,7 +1079,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_mask_host | auth_mask_host_prefix | error;
 
 auth_user:   USER '=' QSTRING ';'
   {
@@ -1234,6 +1236,26 @@
     DupString(yy_achead->className, yylval.string);
   };
 
+auth_mask_host:     MASK_HOST '=' TYES ';'
+  {
+    yy_achead->flags |= CONF_FLAGS_MASK_HOST;
+    DupString(yy_achead->mask_host_prefix,"");
+  }
+  |
+  MASK_HOST '=' TNO ';'
+  {
+    yy_achead->flags &= ~CONF_FLAGS_MASK_HOST;
+  };
+
+auth_mask_host_prefix:   MASK_HOST_PREFIX '=' QSTRING ';'
+  {
+    if(strlen(yylval.string) < MASKPREFIXLEN)
+    {
+      MyFree(yy_achead->mask_host_prefix);
+      DupString(yy_achead->mask_host_prefix, yylval.string);
+    } else
+      ilog(L_ERROR, "Host mask prefix must be less than %d..ignoring it", MASKPREFIXLEN);
+  };
 
 /***************************************************************************
  *  section resv
diff -uNrd ircd-hybrid-7.0rc10/src/match.c ircd-hybrid7-shakeit/src/match.c
--- ircd-hybrid-7.0rc10/src/match.c	Wed Aug 28 13:00:14 2002
+++ ircd-hybrid7-shakeit/src/match.c	Sat May 24 08:50:57 2003
@@ -413,10 +413,17 @@
   0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
   0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9,
   0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
+#ifndef CYRNICKS
   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,
+#else
+  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,
+#endif
   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 +459,17 @@
   0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
   0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9,
   0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
+#ifndef CYRNICKS
   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 
+#else
+  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
+#endif
 };
 
 /*
@@ -657,6 +671,7 @@
 /* 0xBD */   CHAN_C|NONEOS_C,
 /* 0xBE */   CHAN_C|NONEOS_C,
 /* 0xBF */   CHAN_C|NONEOS_C,
+#ifndef CYRNICKS
 /* 0xC0 */   CHAN_C|NONEOS_C,
 /* 0xC1 */   CHAN_C|NONEOS_C,
 /* 0xC2 */   CHAN_C|NONEOS_C,
@@ -721,6 +736,70 @@
 /* 0xFD */   CHAN_C|NONEOS_C,
 /* 0xFE */   CHAN_C|NONEOS_C,
 /* 0xFF */   CHAN_C|NONEOS_C
+#else
+/* 0xC0 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xC1 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xC2 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xC3 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xC4 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xC5 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xC6 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xC7 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xC8 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xC9 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xCA */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xCB */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xCC */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xCD */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xCE */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xCF */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xD0 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xD1 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xD2 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xD3 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xD4 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xD5 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xD6 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xD7 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xD8 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xD9 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xDA */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xDB */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xDC */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xDD */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xDE */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xDF */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xE0 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xE1 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xE2 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xE3 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xE4 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xE5 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xE6 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xE7 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xE8 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xE9 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xEA */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xEB */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xEC */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xED */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xEE */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xEF */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xF0 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xF1 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xF2 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xF3 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xF4 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xF5 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xF6 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xF7 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xF8 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xF9 */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xFA */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xFB */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xFC */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xFD */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xFE */   NICK_C|CHAN_C|NONEOS_C|CYR_C,
+/* 0xFF */   NICK_C|CHAN_C|NONEOS_C|CYR_C
+#endif
 };
-
-
diff -uNrd ircd-hybrid-7.0rc10/src/messages.tab ircd-hybrid7-shakeit/src/messages.tab
--- ircd-hybrid-7.0rc10/src/messages.tab	Tue May  6 01:32:17 2003
+++ ircd-hybrid7-shakeit/src/messages.tab	Sat May 24 08:50:57 2003
@@ -351,7 +351,7 @@
 /* 324 RPL_CHANNELMODEIS, */    ":%s 324 %s %s %s %s",
 /* 325 */       NULL,
 /* 326 */       NULL,
-/* 327 */       NULL,
+/* 327 RPL_WHOISREALHOST, */	":%s 327 %s %s :logged on %s from %s",
 /* 328 */       NULL,
 /* 329 RPL_CREATIONTIME, */      ":%s 329 %s %s %lu", 
 /* 330 */       NULL,
diff -uNrd ircd-hybrid-7.0rc10/src/modules.c ircd-hybrid7-shakeit/src/modules.c
--- ircd-hybrid-7.0rc10/src/modules.c	Tue Jan 21 09:26:51 2003
+++ ircd-hybrid7-shakeit/src/modules.c	Sat May 24 08:50:57 2003
@@ -68,6 +68,7 @@
   "m_server.s",
   "m_sjoin.s",
   "m_squit.s",
+  "m_svsnick.s",
   NULL
 };
 
diff -uNrd ircd-hybrid-7.0rc10/src/s_conf.c ircd-hybrid7-shakeit/src/s_conf.c
--- ircd-hybrid-7.0rc10/src/s_conf.c	Sun Feb 16 17:06:46 2003
+++ ircd-hybrid7-shakeit/src/s_conf.c	Sat May 24 08:50:57 2003
@@ -216,6 +216,7 @@
   MyFree(aconf->className);
   MyFree(aconf->user);
   MyFree(aconf->fakename);
+  MyFree(aconf->mask_host_prefix);
 #ifdef HAVE_LIBCRYPTO
   if (aconf->rsa_public_key)        { RSA_free(aconf->rsa_public_key); }
   if (aconf->rsa_public_key_file)   { MyFree(aconf->rsa_public_key_file); }
@@ -522,17 +523,17 @@
 
   if (IsGotId(client_p))
     {
-      aconf = find_address_conf(client_p->host,client_p->username,
-				&client_p->localClient->ip,
-				client_p->localClient->aftype);
+      aconf = find_address_conf_ext(client_p->host,client_p->username,
+				&client_p->localClient->ip, client_p->localClient->aftype,
+				client_p->localClient->passwd);
     }
   else
     {
       strlcpy(non_ident, "~", sizeof(non_ident));
       strlcat(non_ident, username, USERLEN + 1);
-      aconf = find_address_conf(client_p->host,non_ident,
-				&client_p->localClient->ip,
-				client_p->localClient->aftype);
+      aconf = find_address_conf_ext(client_p->host,non_ident,
+				&client_p->localClient->ip, client_p->localClient->aftype,
+				client_p->localClient->passwd);
     }
 
   if (aconf != NULL)
@@ -2347,6 +2348,12 @@
       DupString(aconf->className,"default");
       return;
     }
+
+  if(aconf->mask_host_prefix == NULL)
+  {
+    DupString(aconf->mask_host_prefix, "");
+    return;
+  }
 }
 
 #define MAXCONFLINKS 150
diff -uNrd ircd-hybrid-7.0rc10/src/s_serv.c ircd-hybrid7-shakeit/src/s_serv.c
--- ircd-hybrid-7.0rc10/src/s_serv.c	Wed Apr  2 20:29:04 2003
+++ ircd-hybrid7-shakeit/src/s_serv.c	Sat May 24 08:50:57 2003
@@ -106,6 +106,7 @@
   { "ZIP",   CAP_ZIP },
   { "TBURST", CAP_TBURST },
   { "PARA",  CAP_PARA },
+  { "SVSNICK", CAP_SVSNICK },
   { 0,           0 }
 };
 
diff -uNrd ircd-hybrid-7.0rc10/src/s_user.c ircd-hybrid7-shakeit/src/s_user.c
--- ircd-hybrid-7.0rc10/src/s_user.c	Sun Apr 20 00:29:59 2003
+++ ircd-hybrid7-shakeit/src/s_user.c	Sat May 24 08:50:57 2003
@@ -61,7 +61,7 @@
 static 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 );
-
+static char *get_string_fix(char *str);
 
 /* table of ascii char letters to corresponding bitmask */
 
@@ -320,6 +320,7 @@
   /* Straight up the maximum rate of flooding... */
   source_p->localClient->allow_read = MAX_FLOOD_BURST;
 
+  strlcpy(source_p->realhost, source_p->host, sizeof(source_p->realhost));
 
   if( ( status = check_client(client_p, source_p, username )) < 0 )
     return(CLIENT_EXITED);
@@ -493,9 +494,66 @@
   }
   user_welcome(source_p);
 
+#ifdef IPV6
+  if (source_p->localClient->aftype != AF_INET6)
+#endif   
+  if (IsConfDoMaskHost(aconf))
+  {
+    int resolved = FALSE, dots = 0;
+    char *pchr = source_p->host, buf[HOSTLEN + 1], *fix;
+
+    while(*pchr)
+    {
+      if(isalpha(*pchr)) resolved = TRUE;
+      if(*pchr == '.') dots++;
+      *pchr++;
+    }
+
+    strcpy(buf, source_p->host);
+    fix = get_string_fix(buf);
+    
+    if(dots > 1)
+      if(resolved)
+      {
+        pchr = strchr(buf, '.');
+        *pchr = 0;
+        *pchr++;
+
+        if(strlen(pchr) + strlen(aconf->mask_host_prefix) + strlen(fix) <= sizeof(source_p->host))
+          sprintf(source_p->host, "%s%s.%s", aconf->mask_host_prefix, fix, pchr);
+      } 
+      else
+      {
+         pchr = strrchr(buf, '.');
+         *pchr = 0;
+         if(strlen(buf) + strlen(fix) <= sizeof(source_p->host))
+           sprintf(source_p->host, "%s.%s", buf, fix);
+      }
+    }
+
   return (introduce_client(client_p, source_p, user, nick));
 }
 
+static char *get_string_fix(char *str)
+{
+  unsigned int h = 0;
+  static char fix[STRFIXLEN + 1];
+
+  while(*str)
+    h = (h << 4) - (h + (unsigned char)ToLower(*str++));
+
+  h = h & (U_MAX - 1);
+
+  srandom(h);
+
+  for(h = 0; h < STRFIXLEN; h++)
+    fix[h] = '0' + random() % 10;
+
+  fix[++h] = 0;
+
+  return fix;
+}
+
 /*
  * register_remote_user
  *
@@ -519,6 +577,7 @@
 
   user->last = CurrentTime;
 
+  strlcpy(source_p->realhost, source_p->host, sizeof(source_p->realhost));
   strlcpy(source_p->username, username, sizeof(source_p->username));
 
   SetClient(source_p);
diff -uNrd ircd-hybrid-7.0rc10/src/whowas.c ircd-hybrid7-shakeit/src/whowas.c
--- ircd-hybrid-7.0rc10/src/whowas.c	Thu Oct 10 14:49:31 2002
+++ ircd-hybrid7-shakeit/src/whowas.c	Sat May 24 08:50:57 2003
@@ -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;
