[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Unblock request for inspircd



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Release Team,

  Inspircd 1.1.22 has about a dozen fixes over the current version in
lenny .20. Including several low risk security fixes and a fix for a
memory leak. Please consider an unblock for lenny. Full diff is
attached, but in case you don't want to accept a version with such a
large delta upstream has prepared an annotated changelog [1], so you can
cherry pick patches if you wish.

Cheers
Matt

[1] http://www.rburchell.com/coding/debian/changelog


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklSfswACgkQfGeS0kace82FJwCfSXs99awr4j4NgZ3jnELNoPtq
c2IAoIJv0Qc+UeXDNUUNWfWQOxf1THYb
=2oGg
-----END PGP SIGNATURE-----
diff -Nru inspircd-1.1.20+dfsg/conf/aliases/atheme.conf.example inspircd-1.1.22+dfsg/conf/aliases/atheme.conf.example
--- inspircd-1.1.20+dfsg/conf/aliases/atheme.conf.example	2007-07-16 13:30:04.000000000 -0400
+++ inspircd-1.1.22+dfsg/conf/aliases/atheme.conf.example	2008-11-10 08:09:07.000000000 -0500
@@ -4,6 +4,7 @@
 <alias text="OPERSERV" replace="PRIVMSG OperServ :$2-" requires="OperServ" uline="yes" operonly="yes">
 <alias text="MEMOSERV" replace="PRIVMSG MemoServ :$2-" requires="MemoServ" uline="yes">
 <alias text="GAMESERV" replace="PRIVMSG GameServ :$2-" requires="GameServ" uline="yes">
+<alias text="ALIS" replace="PRIVMSG ALIS :$2-" requires="ALIS" uline="yes">
 
 # Shorthand aliases for nickserv, chanserv, operserv, memoserv
 <alias text="NS" replace="PRIVMSG NickServ :$2-" requires="NickServ" uline="yes">
@@ -11,6 +12,7 @@
 <alias text="OS" replace="PRIVMSG OperServ :$2-" requires="OperServ" uline="yes" operonly="yes">
 <alias text="MS" replace="PRIVMSG MemoServ :$2-" requires="MemoServ" uline="yes">
 <alias text="GS" replace="PRIVMSG GameServ :$2-" requires="GameServ" uline="yes">
+<alias text="LS" replace="PRIVMSG ALIS :$2-" requires="ALIS" uline="yes">
 
 # /id [channel] <password>
 # Identify for a channel or nickname
diff -Nru inspircd-1.1.20+dfsg/conf/inspircd.helpop-full.example inspircd-1.1.22+dfsg/conf/inspircd.helpop-full.example
--- inspircd-1.1.20+dfsg/conf/inspircd.helpop-full.example	2008-05-01 16:37:09.000000000 -0400
+++ inspircd-1.1.22+dfsg/conf/inspircd.helpop-full.example	2008-11-10 06:58:02.000000000 -0500
@@ -540,7 +540,6 @@
 h                Will receive helpops notification (requires helpop module)
 r                Nickname is registered
 d                Hides all non-private messages and notices
-R                Only registered users can PRIVMSG this nickname
 B                Is a bot
 G                Messages are censored to user
 W                Can see when a user uses WHOIS on them
@@ -549,7 +548,7 @@
 H                Hides an oper's WHOIS line
 I                Hides a user's channel list from non-opers
 Q                Hides an oper completely
-R                Only +r users can message you">
+R                Only registered users can message you">
 
 <helpop key="chmodes" value="Channel Modes
 -------------
diff -Nru inspircd-1.1.20+dfsg/conf/inspircd.quotes.example inspircd-1.1.22+dfsg/conf/inspircd.quotes.example
--- inspircd-1.1.20+dfsg/conf/inspircd.quotes.example	2007-07-16 13:30:04.000000000 -0400
+++ inspircd-1.1.22+dfsg/conf/inspircd.quotes.example	2008-06-10 13:17:22.000000000 -0400
@@ -52,21 +52,18 @@
 InspIRCd, now with excessive ammounts of Cheeze
 I'm in the computer business, I make Out-Of-Order signs
 Kevorkian Virus: helps your computer shut down whenever it wants to.
-      [OUT OF QUOTES, PLEASE ORDER MORE]
-Error, no keyboard . press F1 to continue.
+          [OUT OF QUOTES, PLEASE ORDER MORE]
 Insert Something Funkeh.. err.. There! -->
 Cannot delete tmp150---3.tmp: There is not enough free disk space. Delete one or more files to free disk space, and then try again
 File not found. Should I fake it ? (Y/N)
 The definition of an upgrade: Take old bugs out, put new ones in
 If it's not on fire, it's a software problem
-My software never has bugs. It just develops random features
 It's a little-known fact that the Y1K problem caused the Dark Ages
 Artificial Intelligence usually beats natural stupidity
 Making fun of AOL users is like making fun of the kid in the wheel chair
 Daddy, why doesn't this magnet pick up this floppy disk?
 Daddy, what does FORMATTING DRIVE C mean?
 See daddy ? All the keys are in alphabetical order now.
-If you can't beat your computer at chess, do what I did . try kick-boxing.
 Enter any 11-digit prime number to continue...
 ASCII and ye shall receive.
 The web is a dominatrix. Every where I turn, I see little buttons ordering me to Submit.
@@ -116,13 +113,11 @@
 For a funny quote, call back later.
 Famous last words: 'You saw a WHAT around the corner?!'
 I like work ... I can sit and watch it for hours.
-If debugging is the process of removing bugs, then programming must be the process of putting them in.
 Copywight 1994 Elmer Fudd. All wights wesewved.
 Cannot find REALITY.SYS. Universe halted.
 BUFFERS=20 FILES=15 2nd down, 4th quarter, 5 yards to go!
 My software never has bugs. It just develops random features.
 Why doesn't DOS ever say 'EXCELLENT command or filename!?
-Who's General Failure & why's he reading my disk?
 Shell to DOS... Come in DOS, do you copy? Shell to DOS...
 Computing Definition - Network-Admin: Primary person who just got set up for the blame of the system crash.
 An expert is a person who has made all the mistakes which can be made in a very narrow field.
@@ -172,4 +167,36 @@
 "Reality is a thing of the past" - Matrix
 "The future will not be user friendly" - Matrix
 "The general idea in chat is to make yourself understandable... ..." - Peer
-"heh i am talkin to someone...she not dead...yet anyways" - Stinky
+"heh i am talkin to someone...she's not dead...yet anyways" - Stinky
+"He who must die, must die in the dark, even though he sells candles"
+"If at first you don't succeed, skydiving is not for you."
+"Friendship is like peeing on yourself: everyone can see it, but only you get the warm feeling that it brings."
+"France sucks, but Paris swallows"
+"A computer once beat me at chess, but it was no match for me at kick boxing.
+"Ever wonder why the SAME PEOPLE make up ALL the conspiracy theories?
+"Don't think of it as being outnumbered. Think of it as having a wide target selection."
+"Sysadmins can't be sued for malpractice, but surgeons don't have to deal with patients who install new versions of their own innards."
+"FACE!"
+"Dirka Dirka Mohammed JIHAD!"
+We can learn much from wise words, little from wisecracks, and less from wise guys.
+"Blessed are the young, for they shall inherit the national debt." - Herbert Hoover
+If you have five dollars and Chuck Norris has five dollars, Chuck Norris has more money than you.
+Apple pays Chuck Norris 99 cents every time he listens to a song.
+If Chuck Norris and InspIRCd met in a dark alley, Chuck Norris would get his first black eye. Ever.
+Chuck Norris can sneeze with his eyes open.
+Chuck Norris can kill two stones with one bird.
+There is no theory of evolution. Just a list of animals Chuck Norris allows to live. 
+The Great Wall of China was originally created to keep Chuck Norris out. It failed miserably.
+Chuck Norris can win a game of Connect Four in only three moves.
+Chuck Norris is not hung like a horse... horses are hung like Chuck Norris.
+Chuck Norris is currently suing NBC, claiming Law and Order are trademarked names for his left and right legs.
+Chuck Norris CAN believe it's not butter.
+Chuck Norris is so fast, he can run around the world and punch himself in the back of the head.
+When the Boogeyman goes to sleep every night, he checks his closet for Chuck Norris.
+Outer space exists because it's afraid to be on the same planet with Chuck Norris.
+Chuck Norris counted to infinity - twice.
+Chuck Norris only fears one thing in this world, and that is InspIRCd.
+InspIRCd's core is ran by donated Chuck Norris DNA.
+Chuck Norris exists because InspIRCd allows him to.
+Chuck Norris CAN punch you in the face over the internet.
+When Chuck Norris uses InspIRCd, he doesn't use the /kill command, he uses the /ROUND-HOUSE-TO-THE-FACE command.
\ No newline at end of file
diff -Nru inspircd-1.1.20+dfsg/configure inspircd-1.1.22+dfsg/configure
--- inspircd-1.1.20+dfsg/configure	2008-05-10 20:19:59.000000000 -0400
+++ inspircd-1.1.22+dfsg/configure	2008-11-30 16:10:12.000000000 -0500
@@ -8,7 +8,7 @@
 # Licensed under GPL, please see the COPYING file
 # for more information
 #
-# $Id: configure 9701 2008-05-11 00:19:59Z brain $
+# $Id: configure 10834 2008-11-30 21:10:12Z psychon $
 #
 ###################################################
 
@@ -139,10 +139,10 @@
 chomp($config{HAS_OPENSSL}  = `pkg-config --modversion openssl 2>/dev/null`);		# Openssl version
 chomp($gnutls_ver = $config{HAS_GNUTLS});
 chomp($openssl_ver = $config{HAS_OPENSSL});
-$config{USE_GNUTLS}	    = "n";
+$config{HAS_GNUTLS}	    = "n";
 if (defined $opt_use_gnutls)
 {
-	$config{USE_GNUTLS} = "y";					# Use gnutls.
+	$config{HAS_GNUTLS} = "y";					# Use gnutls.
 }
 $config{USE_OPENSSL}	= "n";						# Use openssl.
 if (defined $opt_use_openssl)
@@ -187,6 +187,7 @@
 {
 	$config{USE_KQUEUE} = "n";
 }
+$config{USE_POLL}     = "y";					# poll enabled
 $config{USE_EPOLL}	  = "y";					# epoll enabled
 if (defined $opt_epoll)
 {
@@ -673,22 +674,37 @@
 	dir_check("is the IRCd binary to be placed", "BINARY_DIR");
 	dir_check("are the IRCd libraries to be placed", "LIBRARY_DIR");
 
+	$chose_hiperf = 1;
+
 	if ($has_kqueue) {
 		yesno(USE_KQUEUE,"You are running a BSD operating system, and kqueue\nwas detected. Would you like to enable kqueue support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable kqueue?");
 		print "\n";
+		if ($config{USE_KQUEUE} ne "y") {
+			$chose_hiperf = 0;
+		}
 	}
 	if ($has_epoll) {
 		yesno(USE_EPOLL,"You are running a Linux 2.6+ operating system, and epoll\nwas detected. Would you like to enable epoll support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable epoll?");
 		print "\n";
+		if ($config{USE_EPOLL} ne "y") {
+			$chose_hiperf = 0;
+		}
 	}
 	if ($has_ports) {
 		yesno(USE_PORTS,"You are running Solaris 10.\nWould you like to enable I/O completion ports support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable support for I/O completion ports?");
 		print "\n";
+		if ($config{USE_PORTS} ne "y") {
+			$chose_hiperf = 0;
+		}
 	}
-	$chose_hiperf = (($config{USE_EPOLL} eq "y") || ($config{USE_KQUEUE} eq "y") || ($config{USE_PORTS} eq "y"));
+
 	if (!$chose_hiperf) {
-		print "No high-performance socket engines are available, or you chose\n";
-		print "not to enable one. Defaulting to select() engine.\n\n";
+		yesno(USE_POLL, "Would you like to use poll?\n This is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable poll?\n");
+		if ($config{USE_POLL} ne "y")
+		{
+			print "No high-performance socket engines are available, or you chose\n";
+			print "not to enable one. Defaulting to select() engine.\n\n";
+		}
 	}
 
 	yesno(IPV6,"Would you like to build InspIRCd with IPv6 support?");
@@ -1135,23 +1151,38 @@
 		if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
 			print FILEHANDLE "#define USE_KQUEUE\n";
 			$se = "socketengine_kqueue";
-			$use_hiperf = 1;
+			if ($config{USE_KQUEUE} eq "y") {
+				$use_hiperf = 1;
+			}
 		}
 		if (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
 			print FILEHANDLE "#define USE_EPOLL\n";
 			$se = "socketengine_epoll";
-			$use_hiperf = 1;
+			if ($config{USE_EPOLL} eq "y") {
+				$use_hiperf = 1;
+			}
 		}
 		if (($has_ports) && ($config{USE_PORTS} eq "y")) {
 			print FILEHANDLE "#define USE_PORTS\n";
 			$se = "socketengine_ports";
-			$use_hiperf = 1;
+			if ($config{USE_PORTS} eq "y") {
+				$use_hiperf = 1;
+			}
 		}
+
 		# user didn't choose either epoll or select for their OS.
 		# default them to USE_SELECT (ewwy puke puke)
 		if (!$use_hiperf) {
-			print FILEHANDLE "#define USE_SELECT\n";
-			$se = "socketengine_select";
+			if ($config{USE_POLL} eq "y")
+			{
+				print FILEHANDLE "#define USE_POLL\n";
+				$se = "socketengine_poll";
+			}
+			else
+			{
+				print FILEHANDLE "#define USE_SELECT\n";
+				$se = "socketengine_select";
+			}
 		}
 		print FILEHANDLE "\n#endif\n";
 		close(FILEHANDLE);
@@ -1542,6 +1573,10 @@
 elsif (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
 	$se = "socketengine_epoll";
 }
+elsif ($config{USE_POLL} eq "y")
+{
+	$se = "socketengine_poll";
+}
 elsif (($has_ports) && ($config{USE_PORTS} eq "y")) {
 	$se = "socketengine_ports";
 }
@@ -1679,6 +1714,9 @@
 	elsif (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
 		$se = "socketengine_epoll";
 	}
+	elsif ($config{USE_POLL} eq "y") {
+		$se = "socketengine_poll";
+	}
 	elsif (($has_ports) && ($config{USE_PORTS} eq "y")) {
 		$se = "socketengine_ports";
 	}
@@ -1818,99 +1856,80 @@
 	}
 
 	print FH <<EOM;
-all: libIRCDtimer.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so $cmdobjs libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so libIRCDsnomasks.so inspircd
+all: libIRCDtimer.o libIRCDcull_list.o libIRCDuserprocess.o libIRCDsocketengine.o libIRCDsocket.o libIRCDhash.o libIRCDchannels.o libIRCDmode.o libIRCDxline.o libIRCDstring.o libIRCDasyncdns.o libIRCDbase.o libIRCDconfigreader.o libIRCDinspsocket.o $cmdobjs libIRCDcommands.o libIRCDdynamic.o libIRCDusers.o libIRCDmodules.o libIRCDwildcard.o libIRCDhelper.o libIRCDcommand_parse.o libIRCDsnomasks.o inspircd
 
-inspircd: inspircd.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/channels.h ../include/globals.h ../include/inspircd_config.h ../include/socket.h libIRCDtimer.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so $cmdobjs libIRCDsnomasks.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so
-	\$(CC) -pipe -I../include $extra $RPATH \$(FLAGS) $freebsd4libs -rdynamic -L. inspircd.cpp -o inspircd \$(LDLIBS) libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDhash.so libIRCDsocket.so libIRCDsocketengine.so libIRCDuserprocess.so libIRCDcull_list.so libIRCDcommand_parse.so libIRCDtimer.so libIRCDsnomasks.so
+inspircd: inspircd.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/channels.h ../include/globals.h ../include/inspircd_config.h ../include/socket.h libIRCDtimer.o libIRCDcull_list.o libIRCDuserprocess.o libIRCDsocketengine.o libIRCDsocket.o libIRCDhash.o libIRCDchannels.o libIRCDmode.o libIRCDxline.o libIRCDstring.o libIRCDasyncdns.o libIRCDbase.o libIRCDconfigreader.o libIRCDinspsocket.o $cmdobjs libIRCDsnomasks.o libIRCDcommands.o libIRCDdynamic.o libIRCDusers.o libIRCDmodules.o libIRCDwildcard.o libIRCDhelper.o libIRCDcommand_parse.o socketengine.o
+	\${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS) CPPFILES="\$(CPPFILES)"
+	\$(CC) -pipe -I../include $extra $RPATH \$(FLAGS) $freebsd4libs -rdynamic -L. inspircd.cpp -o inspircd \$(LDLIBS) libIRCDchannels.o libIRCDmode.o libIRCDxline.o libIRCDstring.o libIRCDasyncdns.o libIRCDbase.o libIRCDconfigreader.o libIRCDinspsocket.o libIRCDcommands.o libIRCDdynamic.o libIRCDusers.o libIRCDmodules.o libIRCDwildcard.o libIRCDhelper.o libIRCDhash.o libIRCDsocket.o libIRCDsocketengine.o libIRCDuserprocess.o libIRCDcull_list.o libIRCDcommand_parse.o libIRCDtimer.o libIRCDsnomasks.o socketengine.o modes/modeclasses.a
 
-libIRCDsocketengine.so: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDsocketengine.so socketengine.o $se.o
+socketengine.o: $se.cpp ../include/$se.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ $se.cpp
 
-libIRCDsnomasks.so: snomasks.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/channels.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDsnomasks.so snomasks.o
+libIRCDsocketengine.o: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ socketengine.cpp
 
-libIRCDcommand_parse.so: command_parse.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDcommand_parse.so command_parse.o
+libIRCDsnomasks.o: snomasks.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/channels.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ snomasks.cpp
 
-libIRCDcull_list.so: cull_list.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/users.h ../include/channels.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDcull_list.so cull_list.o
+libIRCDcommand_parse.o: command_parse.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ command_parse.cpp
 
-libIRCDuserprocess.so: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDuserprocess.so userprocess.o
+libIRCDcull_list.o: cull_list.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/users.h ../include/channels.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ cull_list.cpp
 
-libIRCDhash.so: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDhash.so hashcomp.o
+libIRCDuserprocess.o: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ userprocess.cpp
 
-libIRCDhelper.so: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDhelper.so helperfuncs.o
+libIRCDhash.o: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ hashcomp.cpp
 
-libIRCDchannels.so: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDchannels.so channels.o
+libIRCDhelper.o: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ helperfuncs.cpp
 
-libIRCDmode.so: mode.cpp ../include/base.h ../include/mode.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h \$(RELCPPFILES)
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
-	\${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS) CPPFILES="\$(CPPFILES)"
-	\$(CC) -pipe $RPATH -shared -o libIRCDmode.so mode.o modes/modeclasses.a
+libIRCDchannels.o: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ channels.cpp
 
-libIRCDxline.so: xline.cpp ../include/base.h ../include/xline.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDxline.so xline.o
+libIRCDmode.o: mode.cpp ../include/base.h ../include/mode.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h \$(RELCPPFILES)
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ mode.cpp
 
-libIRCDstring.so: inspstring.cpp ../include/base.h ../include/inspstring.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDstring.so inspstring.o
+libIRCDxline.o: xline.cpp ../include/base.h ../include/xline.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ xline.cpp
 
-libIRCDasyncdns.so: dns.cpp ../include/base.h ../include/dns.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDasyncdns.so dns.o
+libIRCDstring.o: inspstring.cpp ../include/base.h ../include/inspstring.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ inspstring.cpp
 
-libIRCDbase.so: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDbase.so base.o
+libIRCDasyncdns.o: dns.cpp ../include/base.h ../include/dns.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ dns.cpp
 
-libIRCDconfigreader.so: configreader.cpp ../include/base.h ../include/configreader.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDconfigreader.so configreader.o
+libIRCDbase.o: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ base.cpp
 
-libIRCDcommands.so: commands.cpp ../include/base.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDcommands.so commands.o
+libIRCDconfigreader.o: configreader.cpp ../include/base.h ../include/configreader.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ configreader.cpp
 
-libIRCDdynamic.so: dynamic.cpp ../include/base.h ../include/dynamic.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDdynamic.so dynamic.o
+libIRCDcommands.o: commands.cpp ../include/base.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ commands.cpp
 
-libIRCDusers.so: users.cpp ../include/base.h ../include/users.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDusers.so users.o
+libIRCDdynamic.o: dynamic.cpp ../include/base.h ../include/dynamic.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ dynamic.cpp
 
-libIRCDmodules.so: modules.cpp ../include/base.h ../include/modules.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDmodules.so modules.o
+libIRCDusers.o: users.cpp ../include/base.h ../include/users.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ users.cpp
 
-libIRCDwildcard.so: wildcard.cpp ../include/base.h ../include/wildcard.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDwildcard.so wildcard.o
+libIRCDmodules.o: modules.cpp ../include/base.h ../include/modules.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ modules.cpp
 
-libIRCDsocket.so: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDsocket.so socket.o
+libIRCDwildcard.o: wildcard.cpp ../include/base.h ../include/wildcard.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ wildcard.cpp
 
-libIRCDinspsocket.so: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDinspsocket.so inspsocket.o
+libIRCDsocket.o: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ socket.cpp
 
-libIRCDtimer.so: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
-	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
-	\$(CC) -pipe $RPATH -shared -o libIRCDtimer.so timer.o
+libIRCDinspsocket.o: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ inspsocket.cpp
+
+libIRCDtimer.o: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
+	\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c -o \$@ timer.cpp
 
 EOM
 }
diff -Nru inspircd-1.1.20+dfsg/debian/changelog inspircd-1.1.22+dfsg/debian/changelog
--- inspircd-1.1.20+dfsg/debian/changelog	2008-12-23 15:20:59.000000000 -0500
+++ inspircd-1.1.22+dfsg/debian/changelog	2008-12-23 15:21:00.000000000 -0500
@@ -1,16 +1,43 @@
+inspircd (1.1.22+dfsg-2) unstable; urgency=low
+
+  * 01_fix_config_reload.dpatch - Fix crash on config reload.
+
+ -- Bradley Smith <bradsmith@debian.org>  Mon, 15 Dec 2008 20:23:01 +0000
+
+inspircd (1.1.22+dfsg-1) unstable; urgency=low
+
+  [ Matt Arnold ]
+  * New upstream release.
+  * Remove nenolod from Uploaders as requested.
+  * Merge with upstream discontinue our patch series 02, 03.
+  * Upstream change to staticlly linked core. Closes: #506862.
+
+  [ Bradley Smith ]
+  * Add myself to uploaders.
+  * Misc whitespace fixes.
+
+ -- Bradley Smith <bradsmith@debian.org>  Wed, 03 Dec 2008 17:05:27 +0000
+
+inspircd (1.1.21+dfsg-1) unstable; urgency=low
+
+  * New upstream release
+    - Upstream reported buffer overrun
+
+ -- Matt Arnold <mattarnold5@gmail.com>  Sat, 13 Sep 2008 14:11:16 -0400
+
 inspircd (1.1.20+dfsg-1) unstable; urgency=low
 
   * New upstream release
   * add debian/README.source and 'source' target in debian/rules
-  * changed debian policy to 3.8.0 
+  * changed debian policy to 3.8.0
 
  -- Giacomo Catenazzi <cate@debian.org>  Thu, 03 Jul 2008 09:02:48 +0200
 
 inspircd (1.1.19+dfsg-1) unstable; urgency=medium
 
   * New upstream version
- 
- -- Darren Blaber <dmbtech@gmail.com>  Mon, 21 Apr 2008 12:51:01 -0500 
+
+ -- Darren Blaber <dmbtech@gmail.com>  Mon, 21 Apr 2008 12:51:01 -0500
 
 inspircd (1.1.18+dfsg-1) unstable; urgency=medium
 
@@ -33,7 +60,7 @@
   * New upstream release, fix /etc/init.d/inspircd stop.
   * Fix the postrm script so there is no duplicate update-rc.d
   * Fix the manpage so there are no more errors in it
-  
+
   [ Matt Arnold ]
   *  Fix prerm so it works (Closes: #466924)
 
@@ -48,7 +75,7 @@
  -- Giacomo Catenazzi <cate@debian.org>  Thu, 06 Mar 2008 07:56:47 +0100
 
 inspircd (1.1.16+dfsg-1) unstable; urgency=low
-  
+
   [ William Pitcock ]
   * New upstream release.
     - Upstream has new --disable-rpath feature, dropped patch series.
@@ -67,7 +94,7 @@
   [ William Pitcock ]
   * Prepare for uploading to unstable since Mario is on
     vacation until 2008.
-  
+
   [ Darren Blaber ]
   * Repackaged upstream tarball without non-free components (rfcs were removed)
 
diff -Nru inspircd-1.1.20+dfsg/debian/control inspircd-1.1.22+dfsg/debian/control
--- inspircd-1.1.20+dfsg/debian/control	2008-12-23 15:20:59.000000000 -0500
+++ inspircd-1.1.22+dfsg/debian/control	2008-12-23 15:21:00.000000000 -0500
@@ -1,4 +1,4 @@
-# $Id: control 177M 2008-07-03 07:02:04Z (local) $
+# $Id: control 229 2008-12-03 17:00:39Z bradsmith $
 
 Source: inspircd
 Section: net
@@ -6,9 +6,9 @@
 Maintainer: Debian IRC Team <pkg-irc-maintainers@lists.alioth.debian.org>
 Uploaders: Darren Blaber <dmbtech@gmail.com>,
   Mario Iseli <mario@debian.org>,
-  William Pitcock <nenolod@sacredspiral.co.uk>,
   Matt Arnold <mattarnold5@gmail.com>,
-  Giacomo Catenazzi <cate@debian.org>
+  Giacomo Catenazzi <cate@debian.org>,
+  Bradley Smith <bradsmith@debian.org>
 Build-Depends: debhelper (>= 5), perl-modules, libgnutls-dev, dpatch
 Standards-Version: 3.8.0
 Homepage: http://www.inspircd.org/
@@ -20,7 +20,7 @@
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Provides: ircd
 Description: Modular IRCd written in C++
- InspIRCd is a modular C++ IRC Daemon for several operating systems created 
+ InspIRCd is a modular C++ IRC Daemon for several operating systems created
  to provide a stable, modern, lightweight irc server from scratch and provide
  a vast number of features in a modularised form using an advanced module API.
  By keeping the functionality of the main core to a minimum, the server is very
@@ -33,7 +33,7 @@
 Depends: ${shlibs:Depends}, ${misc:Depends}, inspircd
 Priority: extra
 Description: Modular IRCd written in C++ - debugging symbols
- InspIRCd is a modular C++ IRC Daemon for several operating systems created 
+ InspIRCd is a modular C++ IRC Daemon for several operating systems created
  to provide a stable, modern, lightweight irc server from scratch and provide
  a vast number of features in a modularised form using an advanced module API.
  By keeping the functionality of the main core to a minimum, the server is very
diff -Nru inspircd-1.1.20+dfsg/debian/patches/00list inspircd-1.1.22+dfsg/debian/patches/00list
--- inspircd-1.1.20+dfsg/debian/patches/00list	2008-12-23 15:20:59.000000000 -0500
+++ inspircd-1.1.22+dfsg/debian/patches/00list	2008-12-23 15:21:00.000000000 -0500
@@ -1,2 +1 @@
-02_makeclean.dpatch
-03_disable_chmod.dpatch
+01_fix_config_reload.dpatch
diff -Nru inspircd-1.1.20+dfsg/debian/patches/01_fix_config_reload.dpatch inspircd-1.1.22+dfsg/debian/patches/01_fix_config_reload.dpatch
--- inspircd-1.1.20+dfsg/debian/patches/01_fix_config_reload.dpatch	1969-12-31 19:00:00.000000000 -0500
+++ inspircd-1.1.22+dfsg/debian/patches/01_fix_config_reload.dpatch	2008-12-23 15:21:00.000000000 -0500
@@ -0,0 +1,71 @@
+#!/bin/sh -e
+## 01_fix_config_reload.dpatch
+##
+## DP: Fix crash on config reload
+## DP: Cherry picked from upstream.
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+                exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff --git a/src/command_parse.cpp b/src/command_parse.cpp
+index 1ca24fc..2ee7daa 100644
+--- a/src/command_parse.cpp
++++ b/src/command_parse.cpp
+@@ -552,14 +552,6 @@ const char* CommandParser::LoadCommand(const char* name)
+ 
+ void CommandParser::SetupCommandTable(userrec* user)
+ {
+-	for (SharedObjectList::iterator command = RFCCommands.begin(); command != RFCCommands.end(); command++)
+-	{
+-		command_t *cmdptr = cmdlist.find(command->first)->second;
+-		cmdlist.erase(cmdlist.find(command->first));
+-		RFCCommands.erase(command);
+-		delete cmdptr;
+-	}
+-
+ 	if (!user)
+ 	{
+ 		printf("\nLoading core commands");
+diff --git a/src/configreader.cpp b/src/configreader.cpp
+index 4eac5a6..65b33f3 100644
+--- a/src/configreader.cpp
++++ b/src/configreader.cpp
+@@ -935,9 +935,6 @@ void ServerConfig::Read(bool bail, userrec* user)
+ 		ServerInstance->Log(DEFAULT,"Successfully unloaded %lu of %lu modules and loaded %lu of %lu modules.",(unsigned long)rem,(unsigned long)removed_modules.size(),(unsigned long)add,(unsigned long)added_modules.size());
+ 	}
+ 
+-	/** Note: This is safe, the method checks for user == NULL */
+-	ServerInstance->Parser->SetupCommandTable(user);
+-
+ 	if (user)
+ 		user->WriteServ("NOTICE %s :*** Successfully rehashed server.", user->nick);
+ 	else
+diff --git a/src/inspircd.cpp b/src/inspircd.cpp
+index 344d0af..df211df 100644
+--- a/src/inspircd.cpp
++++ b/src/inspircd.cpp
+@@ -585,6 +585,8 @@ InspIRCd::InspIRCd(int argc, char** argv)
+ 	Config->ClearStack();
+ 	Config->Read(true, NULL);
+ 
++	this->Parser->SetupCommandTable(NULL);
++
+ 	if (!do_root)
+ 		this->CheckRoot();
+ 	else
diff -Nru inspircd-1.1.20+dfsg/debian/patches/02_makeclean.dpatch inspircd-1.1.22+dfsg/debian/patches/02_makeclean.dpatch
--- inspircd-1.1.20+dfsg/debian/patches/02_makeclean.dpatch	2008-12-23 15:20:59.000000000 -0500
+++ inspircd-1.1.22+dfsg/debian/patches/02_makeclean.dpatch	1969-12-31 19:00:00.000000000 -0500
@@ -1,29 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## makeclean.dpatch by  <cate@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: add -f flag, allowing to do twice make clean
-## DP: remove also ./inspircd file
-
-@DPATCH@
-diff -urNad trunk~/.Makefile.inc trunk/.Makefile.inc
---- trunk~/.Makefile.inc	2007-07-16 20:18:03.000000000 +0200
-+++ trunk/.Makefile.inc	2008-03-05 08:54:54.000000000 +0100
-@@ -201,11 +201,12 @@
- 
- configureclean:
- 	rm -f .config.cache
--	rm src/modules/Makefile
--	rm src/Makefile
--	rm Makefile
--	rm include/inspircd_config.h
--	rm include/inspircd_se_config.h
-+	rm -f src/modules/Makefile
-+	rm -f src/Makefile
-+	rm -f Makefile
-+	rm -f include/inspircd_config.h
-+	rm -f include/inspircd_se_config.h
-+	rm -f inspircd
- 
- distclean: modclean clean configureclean
- 
diff -Nru inspircd-1.1.20+dfsg/debian/patches/03_disable_chmod.dpatch inspircd-1.1.22+dfsg/debian/patches/03_disable_chmod.dpatch
--- inspircd-1.1.20+dfsg/debian/patches/03_disable_chmod.dpatch	2008-12-23 15:20:59.000000000 -0500
+++ inspircd-1.1.22+dfsg/debian/patches/03_disable_chmod.dpatch	1969-12-31 19:00:00.000000000 -0500
@@ -1,20 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03_disable_chmod.dpatch by  <cate@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Don't change permission of configuration file!
-## DP: we don't want to override sysadmin policies!
-
-@DPATCH@
-diff -urNad trunk~/src/configreader.cpp trunk/src/configreader.cpp
---- trunk~/src/configreader.cpp	2008-01-10 14:45:53.000000000 +0100
-+++ trunk/src/configreader.cpp	2008-03-05 08:57:49.000000000 +0100
-@@ -967,7 +967,7 @@
- 	}
- 
- 	/* Fix the chmod of the file to restrict it to the current user and group */
--	chmod(filename,0600);
-+	//chmod(filename,0600);
- 
- 	for (unsigned int t = 0; t < include_stack.size(); t++)
- 	{
diff -Nru inspircd-1.1.20+dfsg/debian/rules inspircd-1.1.22+dfsg/debian/rules
--- inspircd-1.1.20+dfsg/debian/rules	2008-12-23 15:20:59.000000000 -0500
+++ inspircd-1.1.22+dfsg/debian/rules	2008-12-23 15:21:00.000000000 -0500
@@ -1,5 +1,5 @@
 #!/usr/bin/make -f
-# $Id: rules 209 2008-07-03 07:00:46Z cate $
+# $Id: rules 229 2008-12-03 17:00:39Z bradsmith $
 
 export DH_VERBOSE=1
 
@@ -14,20 +14,21 @@
 
 DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
 
-ifeq ($(DEB_HOST_ARCH_OS), linux) 
+ifeq ($(DEB_HOST_ARCH_OS), linux)
     SOCKET_ENGINE=--enable-epoll
-else ifeq ($(DEB_HOST_ARCH_OS), kfreebsd) 
+else ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
     SOCKET_ENGINE=--enable-kqueue
 else ifeq ($(DEB_HOST_ARCH_OS), solaris)
     SOCKET_ENGINE=--enable-ports
 else
     SOCKET_ENGINE=--enable-poll
-endif 
+endif
 
 build: build-stamp
 build-stamp: patch-stamp
 	dh_testdir
-	./configure --disable-interactive --disable-rpath=1 --enable-gnutls $(SOCKET_ENGINE) \
+	./configure --disable-interactive --disable-rpath=1 \
+		--enable-gnutls $(SOCKET_ENGINE) \
 		--enable-ipv6 --prefix=/usr/lib/inspircd \
 		--config-dir=/etc/inspircd \
 		--module-dir=/usr/lib/inspircd/modules \
@@ -41,7 +42,8 @@
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp
-	#Making distclean should remove the symlink, but it doesn't, so we do it here
+	# Making distclean should remove the symlink, but it doesn't, so we do
+	# it here
 	[ ! -f Makefile ] || $(MAKE) distclean
 	rm -rf src/modules/m_ssl_gnutls.cpp
 	dh_clean
@@ -53,11 +55,15 @@
 	dh_installdirs
 	# Use 755 for correct permissions
 	$(MAKE) INSTMODE=755 install DESTDIR=$(CURDIR)/debian/inspircd
-	install -m 640 $(CURDIR)/debian/inspircd.default $(CURDIR)/debian/inspircd/etc/default/inspircd
+	install -m 640 $(CURDIR)/debian/inspircd.default \
+		$(CURDIR)/debian/inspircd/etc/default/inspircd
 	rm -f $(CURDIR)/debian/inspircd/etc/inspircd/*
-	install -o irc -m 640 $(CURDIR)/debian/inspircd.conf $(CURDIR)/debian/inspircd/etc/inspircd/inspircd.conf
-	install -o irc -m 644 $(CURDIR)/debian/inspircd.motd $(CURDIR)/debian/inspircd/etc/inspircd/motd
-	install -o irc -m 644 $(CURDIR)/debian/inspircd.rules $(CURDIR)/debian/inspircd/etc/inspircd/rules
+	install -o irc -m 640 $(CURDIR)/debian/inspircd.conf \
+		$(CURDIR)/debian/inspircd/etc/inspircd/inspircd.conf
+	install -o irc -m 644 $(CURDIR)/debian/inspircd.motd \
+		$(CURDIR)/debian/inspircd/etc/inspircd/motd
+	install -o irc -m 644 $(CURDIR)/debian/inspircd.rules \
+		$(CURDIR)/debian/inspircd/etc/inspircd/rules
 
 binary-indep: build install
 
@@ -88,4 +94,3 @@
 
 .PHONY: binary clean binary-indep binary-arch build install patch unpatch \
         clean1 source
-
diff -Nru inspircd-1.1.20+dfsg/docs/inspircd.conf.example inspircd-1.1.22+dfsg/docs/inspircd.conf.example
--- inspircd-1.1.20+dfsg/docs/inspircd.conf.example	2008-03-30 08:03:37.000000000 -0400
+++ inspircd-1.1.22+dfsg/docs/inspircd.conf.example	2008-08-04 10:38:31.000000000 -0400
@@ -20,7 +20,7 @@
 #         This is an example of the config file for InspIRCd.          #
 #             Change the options to suit your network                  #
 #                                                                      #
-#     $Id: inspircd.conf.example 9221 2008-03-30 12:03:37Z peavey $
+#     $Id: inspircd.conf.example 10079 2008-08-04 14:38:31Z peavey $
 #                                                                      #
 #    ____                _   _____ _     _       ____  _ _   _         #
 #   |  _ \ ___  __ _  __| | |_   _| |__ (_)___  | __ )(_) |_| |        #
@@ -1529,7 +1529,7 @@
 #<module name="m_globalload.so">
 
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
-# Globops module: gives /GLOBOPS and usermode +g
+# Globops module: gives /GLOBOPS and SNOMASK +g
 #<module name="m_globops.so">
 
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
diff -Nru inspircd-1.1.20+dfsg/include/inspircd.h inspircd-1.1.22+dfsg/include/inspircd.h
--- inspircd-1.1.20+dfsg/include/inspircd.h	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/include/inspircd.h	2008-07-17 16:19:13.000000000 -0400
@@ -29,6 +29,7 @@
 #include <string>
 #include <sstream>
 #include <list>
+#include <climits>
 #include "inspircd_config.h"
 #include "users.h"
 #include "channels.h"
@@ -39,6 +40,12 @@
 #include "snomasks.h"
 #include "cull_list.h"
 
+#include <limits.h> // needed for PATH_MAX on some POSIX systems, may break windows
+#ifndef PATH_MAX
+#warning PATH_MAX undefined, potentially broken system
+#define PATH_MAX 4096
+#endif
+
 /** Returned by some functions to indicate failure.
  */
 #define ERROR -1
@@ -297,7 +304,7 @@
 };
 
 /** A list of failed port bindings, used for informational purposes on startup */
-typedef std::vector<std::pair<std::string, long> > FailedPortList;
+typedef std::vector<std::pair<std::string, std::string> > FailedPortList;
 
 /** A list of ip addresses cross referenced against clone counts */
 typedef std::map<irc::string, unsigned int> clonemap;
diff -Nru inspircd-1.1.20+dfsg/include/socketengine_poll.h inspircd-1.1.22+dfsg/include/socketengine_poll.h
--- inspircd-1.1.20+dfsg/include/socketengine_poll.h	1969-12-31 19:00:00.000000000 -0500
+++ inspircd-1.1.22+dfsg/include/socketengine_poll.h	2008-08-24 16:44:09.000000000 -0400
@@ -0,0 +1,66 @@
+/*       +------------------------------------+
+ *       | Inspire Internet Relay Chat Daemon |
+ *       +------------------------------------+
+ *
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
+ * This program is free but copyrighted software; see
+ *            the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
+
+#ifndef __SOCKETENGINE_POLL__
+#define __SOCKETENGINE_POLL__
+
+#include <vector>
+#include <string>
+#include <map>
+#include "inspircd_config.h"
+#include "globals.h"
+#include "inspircd.h"
+#include "socketengine.h"
+#ifndef __USE_XOPEN
+        #define __USE_XOPEN /* fuck every fucking OS ever made. needed by poll.h to work.*/
+#endif
+#include <poll.h>
+
+class InspIRCd;
+
+/** A specialisation of the SocketEngine class, designed to use poll().
+ */
+class PollEngine : public SocketEngine
+{
+private:
+	/** These are used by poll() to hold socket events
+	 */
+	struct pollfd events[MAX_DESCRIPTORS];
+public:
+	/** Create a new PollEngine
+	 * @param Instance The creator of this object
+	 */
+	PollEngine(InspIRCd* Instance);
+	/** Delete a PollEngine
+	 */
+	virtual ~PollEngine();
+	virtual bool AddFd(EventHandler* eh);
+	virtual int GetMaxFds();
+	virtual int GetRemainingFds();
+	virtual bool DelFd(EventHandler* eh, bool force = false);
+	virtual int DispatchEvents();
+	virtual std::string GetName();
+	virtual void WantWrite(EventHandler* eh);
+};
+
+/** Creates a SocketEngine
+ */
+class SocketEngineFactory
+{
+public:
+	/** Create a new instance of SocketEngine based on PollEngine
+	 */
+	SocketEngine* Create(InspIRCd* Instance) { return new PollEngine(Instance); }
+};
+
+#endif
diff -Nru inspircd-1.1.20+dfsg/include/u_listmode.h inspircd-1.1.22+dfsg/include/u_listmode.h
--- inspircd-1.1.20+dfsg/include/u_listmode.h	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/include/u_listmode.h	2008-09-30 05:10:30.000000000 -0400
@@ -168,7 +168,7 @@
 		{
 			for (modelist::reverse_iterator it = el->rbegin(); it != el->rend(); ++it)
 			{
-				user->WriteServ("%s %s %s %s %s %s", listnumeric.c_str(), user->nick, channel->name, it->mask.c_str(), it->nick.c_str(), it->time.c_str());
+				user->WriteServ("%s %s %s %s %s %s", listnumeric.c_str(), user->nick, channel->name, it->mask.c_str(), (it->nick.length() ? it->nick.c_str() : ServerInstance->Config->ServerName), it->time.c_str());
 			}
 		}
 		user->WriteServ("%s %s %s :%s", endoflistnumeric.c_str(), user->nick, channel->name, endofliststring.c_str());
diff -Nru inspircd-1.1.20+dfsg/include/users.h inspircd-1.1.22+dfsg/include/users.h
--- inspircd-1.1.20+dfsg/include/users.h	2008-02-11 17:09:24.000000000 -0500
+++ inspircd-1.1.22+dfsg/include/users.h	2008-10-28 19:47:33.000000000 -0400
@@ -784,9 +784,10 @@
 	 */
 	void Oper(const std::string &opertype);
 
-	/** Call this method to find the matching <connect> for a user, and to check them against it.
+	/** Call this method to check a user against a connect class.
+	 * @param a The connect class to match them against.
 	 */
-	void CheckClass();
+	void CheckClass(ConnectClass *a);
 
 	/** Use this method to fully connect a user.
 	 * This will send the message of the day, check G/K/E lines, etc.
diff -Nru inspircd-1.1.20+dfsg/.Makefile.inc inspircd-1.1.22+dfsg/.Makefile.inc
--- inspircd-1.1.20+dfsg/.Makefile.inc	2008-05-06 17:09:05.000000000 -0400
+++ inspircd-1.1.22+dfsg/.Makefile.inc	2008-11-27 09:16:54.000000000 -0500
@@ -201,11 +201,11 @@
 
 configureclean:
 	rm -f .config.cache
-	rm src/modules/Makefile
-	rm src/Makefile
-	rm Makefile
-	rm include/inspircd_config.h
-	rm include/inspircd_se_config.h
+	rm -f src/modules/Makefile
+	rm -f src/Makefile
+	rm -f Makefile
+	rm -f include/inspircd_config.h
+	rm -f include/inspircd_se_config.h
 
 distclean: modclean clean configureclean
 
diff -Nru inspircd-1.1.20+dfsg/src/cmd_commands.cpp inspircd-1.1.22+dfsg/src/cmd_commands.cpp
--- inspircd-1.1.20+dfsg/src/cmd_commands.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/cmd_commands.cpp	2008-10-05 07:59:06.000000000 -0400
@@ -26,8 +26,8 @@
 {
 	for (command_table::iterator i = ServerInstance->Parser->cmdlist.begin(); i != ServerInstance->Parser->cmdlist.end(); i++)
 	{
-		user->WriteServ("902 %s :%s %s %d",user->nick,i->second->command.c_str(),i->second->source.c_str(),i->second->min_params);
+		user->WriteServ("702 %s :%s %s %d",user->nick,i->second->command.c_str(),i->second->source.c_str(),i->second->min_params);
 	}
-	user->WriteServ("903 %s :End of COMMANDS list",user->nick);
+	user->WriteServ("704 %s :End of COMMANDS list",user->nick);
 	return CMD_SUCCESS;
 }
diff -Nru inspircd-1.1.20+dfsg/src/cmd_info.cpp inspircd-1.1.22+dfsg/src/cmd_info.cpp
--- inspircd-1.1.20+dfsg/src/cmd_info.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/cmd_info.cpp	2008-08-18 18:42:35.000000000 -0400
@@ -40,7 +40,7 @@
 	user->WriteServ( "371 %s :    satmd           nenolod         BuildSmart     HiroP", user->nick);
 	user->WriteServ( "371 %s :    jilles          Stskeeps        eggy           Trystan", user->nick);
 	user->WriteServ( "371 %s :    Bricker         danieldg        DarkStorm      Majic", user->nick);
-	user->WriteServ( "371 %s :    ThaPrince       Thunderhacker   praetorian", user->nick);
+	user->WriteServ( "371 %s :    ThaPrince       Thunderhacker   praetorian     Namegduf", user->nick);
 	user->WriteServ( "371 %s :    searchirc.com   irc-junkie.org", user->nick);
 	user->WriteServ( "371 %s : ", user->nick);
 	user->WriteServ( "371 %s :\2Other Contributors\2:", user->nick);
diff -Nru inspircd-1.1.20+dfsg/src/cmd_modules.cpp inspircd-1.1.22+dfsg/src/cmd_modules.cpp
--- inspircd-1.1.20+dfsg/src/cmd_modules.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/cmd_modules.cpp	2008-10-05 07:56:48.000000000 -0400
@@ -62,14 +62,14 @@
 		strlcpy(modulename,ServerInstance->Config->module_names[i].c_str(),256);
 		if (IS_OPER(user))
 		{
-			user->WriteServ("900 %s :0x%08lx %d.%d.%d.%d %s (%s)",user->nick,ServerInstance->modules[i],V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2);
+			user->WriteServ("702 %s :0x%08lx %d.%d.%d.%d %s (%s)",user->nick,ServerInstance->modules[i],V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2);
 		}
 		else
 		{
-			user->WriteServ("900 %s :%s",user->nick,ServerConfig::CleanFilename(modulename));
+			user->WriteServ("702 %s :%s",user->nick,ServerConfig::CleanFilename(modulename));
 		}
 	}
-	user->WriteServ("901 %s :End of MODULES list",user->nick);
+	user->WriteServ("703 %s :End of MODULES list",user->nick);
 
 	return CMD_SUCCESS;
 }
diff -Nru inspircd-1.1.20+dfsg/src/cmd_rehash.cpp inspircd-1.1.22+dfsg/src/cmd_rehash.cpp
--- inspircd-1.1.20+dfsg/src/cmd_rehash.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/cmd_rehash.cpp	2008-08-08 12:17:20.000000000 -0400
@@ -33,7 +33,9 @@
 	{
 		parameter = parameters[0];
 	}
-	else
+
+	// If it's not got a param or the param doesn't look like a module-owned one (e.g. servermask)
+	if (!pcnt || parameters[0][0] != '-')
 	{
 		ServerInstance->WriteOpers("*** %s is rehashing config file %s",user->nick,ServerConfig::CleanFilename(ServerInstance->ConfigFileName));
 		ServerInstance->CloseLog();
diff -Nru inspircd-1.1.20+dfsg/src/cmd_topic.cpp inspircd-1.1.22+dfsg/src/cmd_topic.cpp
--- inspircd-1.1.20+dfsg/src/cmd_topic.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/cmd_topic.cpp	2008-08-05 15:48:00.000000000 -0400
@@ -100,7 +100,7 @@
 			else
 				strlcpy(Ptr->setby,user->nick,127);
 
-			Ptr->topicset = ServerInstance->Time();
+			Ptr->topicset = ServerInstance->Time(true);
 			Ptr->WriteChannel(user, "TOPIC %s :%s", Ptr->name, Ptr->topic);
 
 			if (IS_LOCAL(user))
diff -Nru inspircd-1.1.20+dfsg/src/cmd_userhost.cpp inspircd-1.1.22+dfsg/src/cmd_userhost.cpp
--- inspircd-1.1.20+dfsg/src/cmd_userhost.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/cmd_userhost.cpp	2008-08-27 14:50:49.000000000 -0400
@@ -35,13 +35,18 @@
 
 			if (IS_OPER(u))
 			{
-				retbuf = retbuf + "*=+";
+				retbuf = retbuf + "*=";
 			}
 			else
 			{
-				retbuf = retbuf + "=+";
+				retbuf = retbuf + "=";
 			}
 
+			if (IS_AWAY(u))
+				retbuf += "-";
+			else
+				retbuf += "+";
+
 			retbuf = retbuf + u->ident + "@";
 
 			if (IS_OPER(user))
diff -Nru inspircd-1.1.20+dfsg/src/command_parse.cpp inspircd-1.1.22+dfsg/src/command_parse.cpp
--- inspircd-1.1.20+dfsg/src/command_parse.cpp	2008-05-04 15:36:34.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/command_parse.cpp	2008-11-02 00:18:52.000000000 -0400
@@ -552,7 +552,13 @@
 
 void CommandParser::SetupCommandTable(userrec* user)
 {
-	RFCCommands.clear();
+	for (SharedObjectList::iterator command = RFCCommands.begin(); command != RFCCommands.end(); command++)
+	{
+		command_t *cmdptr = cmdlist.find(command->first)->second;
+		cmdlist.erase(cmdlist.find(command->first));
+		RFCCommands.erase(command);
+		delete cmdptr;
+	}
 
 	if (!user)
 	{
diff -Nru inspircd-1.1.20+dfsg/src/configreader.cpp inspircd-1.1.22+dfsg/src/configreader.cpp
--- inspircd-1.1.20+dfsg/src/configreader.cpp	2008-05-12 12:01:32.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/configreader.cpp	2008-11-27 09:15:27.000000000 -0500
@@ -417,10 +417,11 @@
 	int recvq = values[8].GetInteger();
 	int localmax = values[9].GetInteger();
 	int globalmax = values[10].GetInteger();
+	int port = values[11].GetInteger();
 
 	if (*allow)
 	{
-		ConnectClass c(timeout, flood, allow, pingfreq, password, threshold, sendq, recvq, localmax, globalmax);
+		ConnectClass c(timeout, flood, allow, pingfreq, password, threshold, sendq, recvq, localmax, globalmax, port);
 		conf->Classes.push_back(c);
 	}
 	else
@@ -885,7 +886,7 @@
 			int j = 1;
 			for (FailedPortList::iterator i = pl.begin(); i != pl.end(); i++, j++)
 			{
-				user->WriteServ("NOTICE %s :*** %d.   IP: %s     Port: %lu", user->nick, j, i->first.empty() ? "<all>" : i->first.c_str(), (unsigned long)i->second);
+				user->WriteServ("NOTICE %s :*** %d.   IP: %s     Port: %s", user->nick, j, i->first.empty() ? "<all>" : i->first.c_str(), i->second.c_str());
 			}
 		}
 
@@ -966,9 +967,6 @@
 		return false;
 	}
 
-	/* Fix the chmod of the file to restrict it to the current user and group */
-	chmod(filename,0600);
-
 	for (unsigned int t = 0; t < include_stack.size(); t++)
 	{
 		if (std::string(filename) == include_stack[t])
diff -Nru inspircd-1.1.20+dfsg/src/helperfuncs.cpp inspircd-1.1.22+dfsg/src/helperfuncs.cpp
--- inspircd-1.1.20+dfsg/src/helperfuncs.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/helperfuncs.cpp	2008-06-27 09:19:11.000000000 -0400
@@ -450,11 +450,7 @@
 	{
 		if (Config->logpath.empty())
 		{
-#ifndef DARWIN
 			Config->logpath = Config->MyDir + "/ircd.log";
-#else
-			Config->logpath = "/var/log/ircd.log";
-#endif
 		}
 
 		Config->log_file = fopen(Config->logpath.c_str(),"a+");
@@ -476,17 +472,10 @@
 
 void InspIRCd::CheckRoot()
 {
-#ifndef DARWIN
 	if (geteuid() == 0)
 	{
 		printf("WARNING!!! You are running an irc server as ROOT!!! DO NOT DO THIS!!!\n\n");
 		this->Log(DEFAULT,"Cant start as root");
-#else
-	if (geteuid() != 16)
-	{
-		printf("WARNING!!! You are not running inspircd as the ircdaemon user!!! YOU CAN NOT DO THIS!!!\n\n");
-		this->Log(DEFAULT,"Must start as user ircdaemon");
-#endif
 		Exit(EXIT_STATUS_ROOT);
 	}
 }
diff -Nru inspircd-1.1.20+dfsg/src/inspircd.cpp inspircd-1.1.22+dfsg/src/inspircd.cpp
--- inspircd-1.1.20+dfsg/src/inspircd.cpp	2008-06-08 13:33:35.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/inspircd.cpp	2008-08-12 12:17:20.000000000 -0400
@@ -639,13 +639,6 @@
 	this->BuildISupport();
 	InitializeDisabledCommands(Config->DisabledCommands, this);
 
-	if ((Config->ports.size() == 0) && (found_ports > 0))
-	{
-		printf("\nERROR: I couldn't bind any ports! Are you sure you didn't start InspIRCd twice?\n");
-		Log(DEFAULT,"ERROR: I couldn't bind any ports! Are you sure you didn't start InspIRCd twice?");
-		Exit(EXIT_STATUS_BIND);
-	}
-
 	if (Config->ports.size() != (unsigned int)found_ports)
 	{
 		printf("\nWARNING: Not all your client ports could be bound --\nstarting anyway with %d of %d client ports bound.\n\n", bounditems, found_ports);
@@ -653,9 +646,17 @@
 		int j = 1;
 		for (FailedPortList::iterator i = pl.begin(); i != pl.end(); i++, j++)
 		{
-			printf("%d.\tIP: %s\tPort: %lu\n", j, i->first.empty() ? "<all>" : i->first.c_str(), (unsigned long)i->second);
+			printf("%d.\tAddress: %s\tReason: %s\n", j, i->first.empty() ? "<all>" : i->first.c_str(), i->second.c_str());
 		}
 	}
+
+	if ((Config->ports.size() == 0) && (found_ports > 0))
+	{
+		printf("\nERROR: I couldn't bind any ports! Are you sure you didn't start InspIRCd twice?\n");
+		Log(DEFAULT,"ERROR: I couldn't bind any ports! Are you sure you didn't start InspIRCd twice?");
+		Exit(EXIT_STATUS_BIND);
+	}
+
 #ifndef WINDOWS
 	if (!Config->nofork)
 	{
diff -Nru inspircd-1.1.20+dfsg/src/inspsocket.cpp inspircd-1.1.22+dfsg/src/inspsocket.cpp
--- inspircd-1.1.20+dfsg/src/inspsocket.cpp	2008-05-19 18:10:46.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/inspsocket.cpp	2008-08-18 18:50:20.000000000 -0400
@@ -400,7 +400,7 @@
 		int MOD_RESULT = 0;
 		try
 		{
-			MOD_RESULT = Instance->Config->GetIOHook(this)->OnRawSocketRead(this->fd,this->ibuf,sizeof(this->ibuf),result2);
+			MOD_RESULT = Instance->Config->GetIOHook(this)->OnRawSocketRead(this->fd,this->ibuf,sizeof(this->ibuf) - 1,result2);
 		}
 		catch (CoreException& modexcept)
 		{
@@ -418,10 +418,16 @@
 	}
 	else
 	{
-		n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0);
+		n = recv(this->fd,this->ibuf,sizeof(this->ibuf) - 1,0);
 	}
 
-	if ((n > 0) && (n <= (int)sizeof(this->ibuf)))
+	/*
+	 * This used to do some silly bounds checking instead of just passing bufsize - 1 to recv.
+	 * Not only does that make absolutely no sense, but it could potentially result in a read buffer's worth
+	 * of data being thrown into the bit bucket for no good reason, which is just *stupid*.. do things correctly now.
+	 * --w00t (july 2, 2008)
+	 */
+	if (n > 0)
 	{
 		ibuf[n] = 0;
 		return ibuf;
diff -Nru inspircd-1.1.20+dfsg/src/modes/umode_o.cpp inspircd-1.1.22+dfsg/src/modes/umode_o.cpp
--- inspircd-1.1.20+dfsg/src/modes/umode_o.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modes/umode_o.cpp	2008-08-24 19:41:57.000000000 -0400
@@ -24,7 +24,9 @@
 ModeAction ModeUserOperator::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
 {
 	/* Only opers can execute this class at all */
-	if (!*source->oper)
+	if (!ServerInstance->ULine(source->nick) &&
+		!ServerInstance->ULine(source->server) &&
+		!*source->oper)
 		return MODEACTION_DENY;
 
 	/* Not even opers can GIVE the +o mode, only take it away */
diff -Nru inspircd-1.1.20+dfsg/src/modules/extra/m_ldapauth.cpp inspircd-1.1.22+dfsg/src/modules/extra/m_ldapauth.cpp
--- inspircd-1.1.20+dfsg/src/modules/extra/m_ldapauth.cpp	2008-04-04 15:56:58.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/modules/extra/m_ldapauth.cpp	2008-08-16 06:04:22.000000000 -0400
@@ -175,6 +175,13 @@
 			ldap_msgfree(msg);
 			return false;
 		}
+		if (!*user->password)
+		{
+			if (verbose)
+				ServerInstance->WriteOpers("Forbidden connection from %s!%s@%s (No password provided)", user->nick, user->ident, user->host);
+			ldap_msgfree(msg);
+			return false;
+		}
 		cred.bv_val = user->password;
 		cred.bv_len = strlen(user->password);
 		if ((res = ldap_sasl_bind_s(conn, ldap_get_dn(conn, entry), LDAP_SASL_SIMPLE, &cred, NULL, NULL, NULL)) == LDAP_SUCCESS)
diff -Nru inspircd-1.1.20+dfsg/src/modules/extra/m_mysql.cpp inspircd-1.1.22+dfsg/src/modules/extra/m_mysql.cpp
--- inspircd-1.1.20+dfsg/src/modules/extra/m_mysql.cpp	2008-03-29 16:16:55.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/modules/extra/m_mysql.cpp	2008-08-09 10:20:21.000000000 -0400
@@ -205,7 +205,7 @@
 	virtual SQLfieldList& GetRow()
 	{
 		if (currentrow < rows)
-			return fieldlists[currentrow];
+			return fieldlists[currentrow++];
 		else
 			return emptyfieldlist;
 	}
@@ -686,6 +686,7 @@
 				pthread_mutex_lock(&results_mutex);
 				ResultQueue::iterator n = iter->second->rq.begin();
 				(*n)->Send();
+				delete (*n);
 				iter->second->rq.pop_front();
 				pthread_mutex_unlock(&results_mutex);
 				return true;
diff -Nru inspircd-1.1.20+dfsg/src/modules/extra/m_sqlv2.h inspircd-1.1.22+dfsg/src/modules/extra/m_sqlv2.h
--- inspircd-1.1.20+dfsg/src/modules/extra/m_sqlv2.h	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/extra/m_sqlv2.h	2008-07-23 04:38:00.000000000 -0400
@@ -464,7 +464,7 @@
  */
 bool operator== (const SQLhost& l, const SQLhost& r)
 {
-	return (l.id == r.id && l.host == r.host && l.port == r.port && l.name == r.name && l.user == l.user && l.pass == r.pass && l.ssl == r.ssl);
+	return (l.id == r.id && l.host == r.host && l.port == r.port && l.name == r.name && l.user == r.user && l.pass == r.pass && l.ssl == r.ssl);
 }
 
 
diff -Nru inspircd-1.1.20+dfsg/src/modules/extra/m_ssl_gnutls.cpp inspircd-1.1.22+dfsg/src/modules/extra/m_ssl_gnutls.cpp
--- inspircd-1.1.20+dfsg/src/modules/extra/m_ssl_gnutls.cpp	2008-04-02 14:37:17.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/modules/extra/m_ssl_gnutls.cpp	2008-09-26 06:52:27.000000000 -0400
@@ -53,6 +53,10 @@
 class issl_session : public classbase
 {
 public:
+	issl_session()
+	{
+		sess = NULL;
+	}
 	gnutls_session_t sess;
 	issl_status status;
 	std::string outbuf;
@@ -84,6 +88,7 @@
 	int dh_bits;
 
 	int clientactive;
+	bool cred_alloc;
 
  public:
 
@@ -96,14 +101,8 @@
 		inbufsize = ServerInstance->Config->NetBufferSize;
 
 		gnutls_global_init(); // This must be called once in the program
-
-		if(gnutls_certificate_allocate_credentials(&x509_cred) != 0)
-			ServerInstance->Log(DEFAULT, "m_ssl_gnutls.so: Failed to allocate certificate credentials");
-
-		// Guessing return meaning
-		if(gnutls_dh_params_init(&dh_params) < 0)
-			ServerInstance->Log(DEFAULT, "m_ssl_gnutls.so: Failed to initialise DH parameters");
-
+		
+		cred_alloc = false;
 		// Needs the flag as it ignores a plain /rehash
 		OnRehash(NULL,"ssl");
 
@@ -207,7 +206,22 @@
 			keyfile = confdir + keyfile;
 
 		int ret;
-
+		
+		if (cred_alloc)
+		{
+			// Deallocate the old credentials
+			gnutls_dh_params_deinit(dh_params);
+			gnutls_certificate_free_credentials(x509_cred);
+		}
+		else
+			cred_alloc = true;
+		
+		if((ret = gnutls_certificate_allocate_credentials(&x509_cred)) < 0)
+			ServerInstance->Log(DEFAULT, "m_ssl_gnutls.so: Failed to allocate certificate credentials: %s", gnutls_strerror(ret));
+		
+		if((ret = gnutls_dh_params_init(&dh_params)) < 0)
+			ServerInstance->Log(DEFAULT, "m_ssl_gnutls.so: Failed to initialise DH parameters: %s", gnutls_strerror(ret));
+		
 		if((ret =gnutls_certificate_set_x509_trust_file(x509_cred, cafile.c_str(), GNUTLS_X509_FMT_PEM)) < 0)
 			ServerInstance->Log(DEFAULT, "m_ssl_gnutls.so: Failed to set X.509 trust file '%s': %s", cafile.c_str(), gnutls_strerror(ret));
 
@@ -496,7 +510,7 @@
 				{
 					memcpy(buffer, session->inbuf, count);
 					// Move the stuff left in inbuf to the beginning of it
-					memcpy(session->inbuf, session->inbuf + count, (length - count));
+					memmove(session->inbuf, session->inbuf + count, (length - count));
 					// Now we need to set session->inbufoffset to the amount of data still waiting to be handed to insp.
 					session->inbufoffset = length - count;
 					// Insp uses readresult as the count of how much data there is in buffer, so:
diff -Nru inspircd-1.1.20+dfsg/src/modules/extra/m_ssl_openssl.cpp inspircd-1.1.22+dfsg/src/modules/extra/m_ssl_openssl.cpp
--- inspircd-1.1.20+dfsg/src/modules/extra/m_ssl_openssl.cpp	2008-04-02 14:37:17.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/modules/extra/m_ssl_openssl.cpp	2008-08-18 18:56:06.000000000 -0400
@@ -148,6 +148,9 @@
 		ctx = SSL_CTX_new( SSLv23_server_method() );
 		clictx = SSL_CTX_new( SSLv23_client_method() );
 
+		SSL_CTX_set_mode(ctx, SSL_MODE_ENABLE_PARTIAL_WRITE | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
+		SSL_CTX_set_mode(clictx, SSL_MODE_ENABLE_PARTIAL_WRITE | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
+
 		SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, OnVerify);
 		SSL_CTX_set_verify(clictx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, OnVerify);
 
@@ -525,7 +528,7 @@
 					{
 						memcpy(buffer, session->inbuf, count);
 						// Move the stuff left in inbuf to the beginning of it
-						memcpy(session->inbuf, session->inbuf + count, (session->inbufoffset - count));
+						memmove(session->inbuf, session->inbuf + count, (session->inbufoffset - count));
 						// Now we need to set session->inbufoffset to the amount of data still waiting to be handed to insp.
 						session->inbufoffset -= count;
 						// Insp uses readresult as the count of how much data there is in buffer, so:
diff -Nru inspircd-1.1.20+dfsg/src/modules/extra/m_ziplink.cpp inspircd-1.1.22+dfsg/src/modules/extra/m_ziplink.cpp
--- inspircd-1.1.20+dfsg/src/modules/extra/m_ziplink.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/extra/m_ziplink.cpp	2008-08-27 16:31:24.000000000 -0400
@@ -153,7 +153,7 @@
 		ServerInstance->PublishInterface("InspSocketHook", this);
 
 		total_out_compressed = total_in_compressed = 0;
-		total_out_uncompressed = total_out_uncompressed = 0;
+		total_out_uncompressed = total_in_uncompressed = 0;
 	}
 
 	virtual ~ModuleZLib()
@@ -231,13 +231,13 @@
 			 * (we dont count 64 bit ints because not all systems have 64 bit ints, and floats
 			 * can still hold more.
 			 */
-			float outbound_r = 100 - ((total_out_compressed / (total_out_uncompressed + 0.001)) * 100);
-			float inbound_r = 100 - ((total_in_compressed / (total_in_uncompressed + 0.001)) * 100);
+			float outbound_r = (total_out_compressed / (total_out_uncompressed + 0.001)) * 100;
+			float inbound_r = (total_in_compressed / (total_in_uncompressed + 0.001)) * 100;
 
 			float total_compressed = total_in_compressed + total_out_compressed;
 			float total_uncompressed = total_in_uncompressed + total_out_uncompressed;
 
-			float total_r = 100 - ((total_compressed / (total_uncompressed + 0.001)) * 100);
+			float total_r = (total_compressed / (total_uncompressed + 0.001)) * 100;
 
 			char outbound_ratio[MAXBUF], inbound_ratio[MAXBUF], combined_ratio[MAXBUF];
 
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_cgiirc.cpp inspircd-1.1.22+dfsg/src/modules/m_cgiirc.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_cgiirc.cpp	2008-04-12 11:56:57.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/modules/m_cgiirc.cpp	2008-11-02 00:20:54.000000000 -0400
@@ -101,6 +101,8 @@
 
 			strlcpy(them->host, result.c_str(), 63);
 			strlcpy(them->dhost, result.c_str(), 63);
+			if (querytype)
+				them->SetSockAddr(them->GetProtocolFamily(), result.c_str(), them->GetPort());
 			strlcpy(them->ident, "~cgiirc", 8);
 			them->InvalidateCache();
 		}
@@ -172,6 +174,18 @@
 				userrec::QuitUser(ServerInstance, user, reason);
 				return;
 			}
+			
+			ZLine *z = ServerInstance->XLines->matches_zline(user->GetIPString());
+			
+			if (z)
+			{
+				char reason[MAXBUF];
+				if (*ServerInstance->Config->MoronBanner)
+					user->WriteServ("NOTICE %s :*** %s", user->nick, ServerInstance->Config->MoronBanner);
+				snprintf(reason,MAXBUF,"Z-Lined: %s",z->reason);
+				userrec::QuitUser(ServerInstance, user, reason);
+				return;
+			}
 		}
 	}
 
@@ -330,25 +344,25 @@
 		}
 		if(user->GetExt("cgiirc_webirc_ip", webirc_ip))
 		{
-			bool valid=false;
 			user->RemoveCloneCounts();
-#ifdef IPV6
-			valid = (inet_pton(AF_INET6, webirc_ip->c_str(), &((sockaddr_in6*)user->ip)->sin6_addr) > 0); 
-
-			if(!valid)
-				valid = (inet_aton(webirc_ip->c_str(), &((sockaddr_in*)user->ip)->sin_addr));
-#else
-			if (inet_aton(webirc_ip->c_str(), &((sockaddr_in*)user->ip)->sin_addr))
-				valid = true;
-#endif
-
+			user->SetSockAddr(user->GetProtocolFamily(), webirc_ip->c_str(), user->GetPort());
 			delete webirc_ip;
 			user->InvalidateCache();
 			user->Shrink("cgiirc_webirc_ip");
 			ServerInstance->AddLocalClone(user);
 			ServerInstance->AddGlobalClone(user);
-			user->CheckClass();
 			Recheck(user);
+
+			ConnectClass *i = user->GetClass();
+			if (!i)
+			{
+				userrec::QuitUser(ServerInstance, user, "Access denied by configuration");
+				return;
+			}
+			else
+			{
+				user->CheckClass(i);
+			}
 		}
 	}
 
@@ -375,7 +389,6 @@
 #endif
 			ServerInstance->AddLocalClone(user);
 			ServerInstance->AddGlobalClone(user);
-			user->CheckClass();
 
 			if (valid)
 			{
@@ -405,6 +418,17 @@
 			/*if(NotifyOpers)
 				ServerInstance->WriteOpers("*** Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from PASS", user->nick, user->host, user->password);*/
 
+			ConnectClass *i = user->GetClass();
+			if (!i)
+			{
+				userrec::QuitUser(ServerInstance, user, "Access denied by configuration");
+				return false;
+			}
+			else
+			{
+				user->CheckClass(i);
+			}
+
 			return true;
 		}
 		
@@ -434,15 +458,9 @@
 		user->Extend("cgiirc_realhost", new std::string(user->host));
 		user->Extend("cgiirc_realip", new std::string(user->GetIPString()));
 		user->RemoveCloneCounts();
-#ifdef IPV6
-		if (user->GetProtocolFamily() == AF_INET6)
-			inet_pton(AF_INET6, newip, &((sockaddr_in6*)user->ip)->sin6_addr);
-		else
-#endif
-		inet_aton(newip, &((sockaddr_in*)user->ip)->sin_addr);
+		user->SetSockAddr(user->GetProtocolFamily(), newip, user->GetPort());
 		ServerInstance->AddLocalClone(user);
 		ServerInstance->AddGlobalClone(user);
-		user->CheckClass();
 		try
 		{
 			strlcpy(user->host, newip, 16);
@@ -463,9 +481,17 @@
 			if(NotifyOpers)
 				 ServerInstance->WriteOpers("*** Connecting user %s detected as using CGI:IRC (%s), but i could not resolve their hostname!", user->nick, user->host);
 		}
-		/*strlcpy(user->host, newip, 16);
-		strlcpy(user->dhost, newip, 16);
-		strlcpy(user->ident, "~cgiirc", 8);*/
+
+		ConnectClass *i = user->GetClass();
+		if (!i)
+		{
+			userrec::QuitUser(ServerInstance, user, "Access denied by configuration");
+			return true;
+		}
+		else
+		{
+			user->CheckClass(i);
+		}
 
 		return true;
 	}
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_chanprotect.cpp inspircd-1.1.22+dfsg/src/modules/m_chanprotect.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_chanprotect.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_chanprotect.cpp	2008-08-10 18:12:12.000000000 -0400
@@ -135,7 +135,7 @@
 	bool CanRemoveOthers(userrec* u1, userrec* u2, chanrec* c)
 	{
 		std::string item = extend+std::string(c->name);
-		return (u1->GetExt(item, dummyptr) && u2->GetExt(item, dummyptr));
+		return (remove_other_privs && u1->GetExt(item, dummyptr) && u2->GetExt(item, dummyptr));
 	}
 
 	ModeAction HandleChange(userrec* source, userrec* theuser, bool adding, chanrec* channel, std::string &parameter)
@@ -408,11 +408,10 @@
 		// a relatively small number of them relevent to our module using a switch statement.
 		// don't allow action if:
 		// (A) Theyre founder (no matter what)
-		// (B) Theyre protected, and you're not
+		// (B) Theyre protected, unless you're founder or are protected and DeprivOthers is enabled
 		// always allow the action if:
 		// (A) The source is ulined
-		
-		
+				
 		// firstly, if a ulined nick, or a server, is setting the mode, then allow them to set the mode
 		// without any access checks, we're not worthy :p
 		if ((ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server))
@@ -421,16 +420,22 @@
 		std::string founder = "cm_founder_"+std::string(channel->name);
 		std::string protect = "cm_protect_"+std::string(channel->name);
 
+		if (DeprivSelf && source == dest)
+			return ACR_DEFAULT;
+
+		bool candepriv_founder = (DeprivOthers && source->GetExt(founder,dummyptr));
+		bool candepriv_protected = (source->GetExt(founder,dummyptr) || (DeprivOthers && source->GetExt(protect,dummyptr))); // Can the source remove +a?
+
 		switch (access_type)
 		{
 			// a user has been deopped. Do we let them? hmmm...
 			case AC_DEOP:
-				if (dest->GetExt(founder,dummyptr))
+				if (dest->GetExt(founder,dummyptr) && !candepriv_founder)
 				{
 					source->WriteServ("484 "+std::string(source->nick)+" "+std::string(channel->name)+" :Can't deop "+std::string(dest->nick)+" as they're a channel founder");
 					return ACR_DENY;
 				}
-				if ((dest->GetExt(protect,dummyptr)) && (!source->GetExt(protect,dummyptr)))
+				if ((dest->GetExt(protect,dummyptr)) && !candepriv_protected)
 				{
 					source->WriteServ("484 "+std::string(source->nick)+" "+std::string(channel->name)+" :Can't deop "+std::string(dest->nick)+" as they're protected (+a)");
 					return ACR_DENY;
@@ -439,12 +444,12 @@
 
 			// a user is being kicked. do we chop off the end of the army boot?
 			case AC_KICK:
-				if (dest->GetExt(founder,dummyptr))
+				if (dest->GetExt(founder,dummyptr) && !candepriv_founder)
 				{
 					source->WriteServ("484 "+std::string(source->nick)+" "+std::string(channel->name)+" :Can't kick "+std::string(dest->nick)+" as they're a channel founder");
 					return ACR_DENY;
 				}
-				if ((dest->GetExt(protect,dummyptr)) && (!source->GetExt(protect,dummyptr)))
+				if ((dest->GetExt(protect,dummyptr)) && !candepriv_protected)
 				{
 					source->WriteServ("484 "+std::string(source->nick)+" "+std::string(channel->name)+" :Can't kick "+std::string(dest->nick)+" as they're protected (+a)");
 					return ACR_DENY;
@@ -453,12 +458,12 @@
 
 			// a user is being dehalfopped. Yes, we do disallow -h of a +ha user
 			case AC_DEHALFOP:
-				if (dest->GetExt(founder,dummyptr))
+				if (dest->GetExt(founder,dummyptr) && !candepriv_founder)
 				{
 					source->WriteServ("484 "+std::string(source->nick)+" "+std::string(channel->name)+" :Can't de-halfop "+std::string(dest->nick)+" as they're a channel founder");
 					return ACR_DENY;
 				}
-				if ((dest->GetExt(protect,dummyptr)) && (!source->GetExt(protect,dummyptr)))
+				if ((dest->GetExt(protect,dummyptr)) && !candepriv_protected)
 				{
 					source->WriteServ("484 "+std::string(source->nick)+" "+std::string(channel->name)+" :Can't de-halfop "+std::string(dest->nick)+" as they're protected (+a)");
 					return ACR_DENY;
@@ -467,12 +472,12 @@
 
 			// same with devoice.
 			case AC_DEVOICE:
-				if (dest->GetExt(founder,dummyptr))
+				if (dest->GetExt(founder,dummyptr) && !candepriv_founder)
 				{
 					source->WriteServ("484 "+std::string(source->nick)+" "+std::string(channel->name)+" :Can't devoice "+std::string(dest->nick)+" as they're a channel founder");
 					return ACR_DENY;
 				}
-				if ((dest->GetExt(protect,dummyptr)) && (!source->GetExt(protect,dummyptr)))
+				if ((dest->GetExt(protect,dummyptr)) && !candepriv_protected)
 				{
 					source->WriteServ("484 "+std::string(source->nick)+" "+std::string(channel->name)+" :Can't devoice "+std::string(dest->nick)+" as they're protected (+a)");
 					return ACR_DENY;
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_conn_umodes.cpp inspircd-1.1.22+dfsg/src/modules/m_conn_umodes.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_conn_umodes.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_conn_umodes.cpp	2008-10-27 15:05:37.000000000 -0400
@@ -35,7 +35,7 @@
 
 	void Implements(char* List)
 	{
-		List[I_OnPostConnect] = List[I_OnRehash] = 1;
+		List[I_OnUserConnect] = List[I_OnRehash] = 1;
 	}
 
 	virtual void OnRehash(userrec* user, const std::string &parameter)
@@ -54,7 +54,7 @@
 		return Version(1,1,0,1,VF_VENDOR,API_VERSION);
 	}
 	
-	virtual void OnPostConnect(userrec* user)
+	virtual void OnUserConnect(userrec* user)
 	{
 		if (!IS_LOCAL(user))
 			return;
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_customtitle.cpp inspircd-1.1.22+dfsg/src/modules/m_customtitle.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_customtitle.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_customtitle.cpp	2008-08-10 12:49:18.000000000 -0400
@@ -68,9 +68,7 @@
 			if (!strcmp(name.c_str(),parameters[0]) && !strcmp(pass.c_str(),parameters[1]) && OneOfMatches(TheHost,TheIP,host.c_str()) && !title.empty())
 			{
 				std::string* text;
-				user->GetExt("ctitle", text);
-
-				if (text)
+				if (user->GetExt("ctitle", text))
 				{
 					user->Shrink("ctitle");
 					DELETE(text);
@@ -135,8 +133,7 @@
 		{
 			/* Insert our numeric before 312 */
 			std::string* ctitle;
-			dest->GetExt("ctitle", ctitle);
-			if (ctitle)
+			if (dest->GetExt("ctitle", ctitle))
 			{
 				ServerInstance->SendWhoisLine(user, dest, 320, "%s %s :%s",user->nick,dest->nick,ctitle->c_str());
 			}
@@ -157,8 +154,7 @@
 		{
 			// check if this user has an ctitle field to send
 			std::string* ctitle;
-			user->GetExt("ctitle", ctitle);
-			if (ctitle)
+			if (user->GetExt("ctitle", ctitle))
 			{
 				// call this function in the linking module, let it format the data how it
 				// sees fit, and send it on its way. We dont need or want to know how.
@@ -171,8 +167,7 @@
 	virtual void OnUserQuit(userrec* user, const std::string &message, const std::string &oper_message)
 	{
 		std::string* ctitle;
-		user->GetExt("ctitle", ctitle);
-		if (ctitle)
+		if (user->GetExt("ctitle", ctitle))
 		{
 			user->Shrink("ctitle");
 			DELETE(ctitle);
@@ -186,8 +181,7 @@
 		{
 			userrec* user = (userrec*)item;
 			std::string* ctitle;
-			user->GetExt("ctitle", ctitle);
-			if (ctitle)
+			if (user->GetExt("ctitle", ctitle))
 			{
 				user->Shrink("ctitle");
 				DELETE(ctitle);
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_dccallow.cpp inspircd-1.1.22+dfsg/src/modules/m_dccallow.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_dccallow.cpp	2008-03-28 05:50:04.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/modules/m_dccallow.cpp	2008-10-15 19:23:38.000000000 -0400
@@ -84,6 +84,11 @@
 					DisplayHelp(user);
 					return CMD_FAILURE;
 				}
+				else
+				{
+					user->WriteServ("998 %s :DCCALLOW command not understood. For help on DCCALLOW, type /DCCALLOW HELP", user->nick);
+					return CMD_FAILURE;
+				}
 			}
 			
 			std::string nick = parameters[0] + 1;
@@ -127,6 +132,12 @@
 				}
 				else if (action == '+')
 				{
+					if (target == user)
+					{
+						user->WriteServ("996 %s %s :You cannot add yourself to your own DCCALLOW list!", user->nick, user->nick);
+						return CMD_FAILURE;
+					}
+					
 					if (!user->GetExt("dccallow_list", dl))
 					{
 						dl = new dccallowlist;
@@ -134,6 +145,7 @@
 						// add this user to the userlist
 						ul.push_back(user);
 					}
+					
 					for (dccallowlist::const_iterator k = dl->begin(); k != dl->end(); ++k)
 					{
 						if (k->nickname == target->nick)
@@ -141,11 +153,6 @@
 							user->WriteServ("996 %s %s :%s is already on your DCCALLOW list", user->nick, user->nick, target->nick);
 							return CMD_FAILURE;
 						}
-						else if (ServerInstance->MatchText(user->GetFullHost(), k->hostmask))
-						{
-							user->WriteServ("996 %s %s :You cannot add yourself to your own DCCALLOW list!", user->nick, user->nick);
-							return CMD_FAILURE;
-						}
 					}
 				
 					std::string mask = std::string(target->nick)+"!"+std::string(target->ident)+"@"+std::string(target->dhost);
@@ -352,11 +359,13 @@
 								if (defaultaction == "allow")
 									return 0;
 							}
-							user->WriteServ("NOTICE %s :The user %s is not accepting DCC SENDs from you. Your file %s was not sent.", user->nick, u->nick, filename.c_str());
-							u->WriteServ("NOTICE %s :%s (%s@%s) attempted to send you a file named %s, which was blocked.", u->nick, user->nick, user->ident, user->dhost, filename.c_str());
-							u->WriteServ("NOTICE %s :If you trust %s and were expecting this, you can type /DCCALLOW HELP for information on the DCCALLOW system.", u->nick, user->nick);
-							return 1;
 						}
+						
+						user->WriteServ("NOTICE %s :The user %s is not accepting DCC SENDs from you. Your file %s was not sent.", user->nick, u->nick, filename.c_str());
+						u->WriteServ("NOTICE %s :%s (%s@%s) attempted to send you a file named %s, which was blocked.", u->nick, user->nick, user->ident, user->dhost, filename.c_str());
+						u->WriteServ("NOTICE %s :If you trust %s and were expecting this, you can type /DCCALLOW HELP for information on the DCCALLOW system.", u->nick, user->nick);
+						
+						return 1;
 					}
 					else if ((type == "CHAT") && (blockchat))
 					{
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_helpop.cpp inspircd-1.1.22+dfsg/src/modules/m_helpop.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_helpop.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_helpop.cpp	2008-10-08 07:34:51.000000000 -0400
@@ -126,14 +126,14 @@
 
 		virtual void ReadConfig()
 		{
-			ConfigReader *MyConf = new ConfigReader(ServerInstance);
+			ConfigReader MyConf(ServerInstance);
 
 			helpop_map.clear();
 
-			for (int i = 0; i < MyConf->Enumerate("helpop"); i++)
+			for (int i = 0; i < MyConf.Enumerate("helpop"); i++)
 			{
-				irc::string key = assign(MyConf->ReadValue("helpop", "key", i));
-				std::string value = MyConf->ReadValue("helpop", "value", i, true); /* Linefeeds allowed! */
+				irc::string key = assign(MyConf.ReadValue("helpop", "key", i));
+				std::string value = MyConf.ReadValue("helpop", "value", i, true); /* Linefeeds allowed! */
 
 				if (key == "index")
 				{
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_ident.cpp inspircd-1.1.22+dfsg/src/modules/m_ident.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_ident.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_ident.cpp	2008-08-27 15:00:21.000000000 -0400
@@ -51,6 +51,8 @@
 		if (GetFd() == -1)
 			throw ModuleException("Could not create socket");
 
+		done = false;
+
 		sockaddr* s = new sockaddr[2];
 		sockaddr* addr = new sockaddr[2];
 	
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_invisible.cpp inspircd-1.1.22+dfsg/src/modules/m_invisible.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_invisible.cpp	2008-02-26 10:43:10.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_invisible.cpp	2008-11-24 03:58:07.000000000 -0500
@@ -65,20 +65,23 @@
 		{
 			bool ok = false;
 
-			for (int j = 0; j < conf->Enumerate("type"); j++)
+			if (IS_LOCAL(source))
 			{
-				std::string opertype = conf->ReadValue("type","name",j);
-				if (opertype == source->oper)
+				for (int j = 0; j < conf->Enumerate("type"); j++)
 				{
-					ok = conf->ReadFlag("type", "canquiet", j);
-					break;
+					std::string opertype = conf->ReadValue("type","name",j);
+					if (opertype == source->oper)
+					{
+						ok = conf->ReadFlag("type", "canquiet", j);
+						break;
+					}
 				}
-			}
 
-			if (!ok)
-			{
-				source->WriteServ("481 %s :Permission Denied - You do not have access to become invisible via user mode +Q", source->nick);
-				return MODEACTION_DENY;
+				if (!ok)
+				{
+					source->WriteServ("481 %s :Permission Denied - You do not have access to become invisible via user mode +Q", source->nick);
+					return MODEACTION_DENY;
+				}
 			}
 
 			dest->SetMode('Q', adding);
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_jumpserver.cpp inspircd-1.1.22+dfsg/src/modules/m_jumpserver.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_jumpserver.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_jumpserver.cpp	2008-07-18 20:37:01.000000000 -0400
@@ -65,58 +65,62 @@
 		port = 0;
 		redirect_to.clear();
 
-		for (const char* n = parameters[2]; *n; n++)
+		if (pcnt >= 3)
 		{
-			switch (*n)
+			for (const char* n = parameters[2]; *n; n++)
 			{
-				case '+':
-					direction = true;
-				break;
-				case '-':
-					direction = false;
-				break;
-				case 'a':
-					redirect_all_immediately = direction;
-				break;
-				case 'n':
-					redirect_new_users = direction;
-				break;
+				switch (*n)
+				{
+					case '+':
+						direction = true;
+					break;
+					case '-':
+						direction = false;
+					break;
+					case 'a':
+						redirect_all_immediately = direction;
+					break;
+					case 'n':
+						redirect_new_users = direction;
+					break;
+				}
 			}
-		}
 
-		if (redirect_all_immediately)
-		{
-			/* Redirect everyone but the oper sending the command */
-			for (std::vector<userrec*>::const_iterator i = ServerInstance->local_users.begin(); i != ServerInstance->local_users.end(); i++)
+			if (redirect_all_immediately)
 			{
-				userrec* t = *i;
-				if (!IS_OPER(t))
+				/* Redirect everyone but the oper sending the command */
+				for (std::vector<userrec*>::const_iterator i = ServerInstance->local_users.begin(); i != ServerInstance->local_users.end(); i++)
+				{
+					userrec* t = *i;
+					if (!IS_OPER(t))
+					{
+						t->WriteServ("010 %s %s %s :Please use this Server/Port instead", user->nick, parameters[0], parameters[1]);
+						userrec::QuitUser(ServerInstance, t, reason);
+						n_done++;
+					}
+				}
+				if (n_done)
 				{
-					t->WriteServ("010 %s %s %s :Please use this Server/Port instead", user->nick, parameters[0], parameters[1]);
-					userrec::QuitUser(ServerInstance, t, reason);
-					n_done++;
+					n_done_s = ConvToStr(n_done);
 				}
 			}
-			if (n_done)
+
+			if (redirect_new_users)
 			{
-				n_done_s = ConvToStr(n_done);
+				redirect_to = parameters[0];
+				port = atoi(parameters[1]);
 			}
-		}
 
-		if (redirect_new_users)
-		{
-			redirect_to = parameters[0];
-			port = atoi(parameters[1]);
+			user->WriteServ("NOTICE %s :*** Set jumpserver to server '%s' port '%s', flags '+%s%s'%s%s%s: %s", user->nick, parameters[0], parameters[1],
+					redirect_all_immediately ? "a" : "",
+					redirect_new_users ? "n" : "",
+					n_done ? " (" : "",
+					n_done ? n_done_s.c_str() : "",
+					n_done ? " user(s) redirected)" : "",
+					reason.c_str());
+	
 		}
 
-		user->WriteServ("NOTICE %s :*** Set jumpserver to server '%s' port '%s', flags '+%s%s'%s%s%s: %s", user->nick, parameters[0], parameters[1],
-				redirect_all_immediately ? "a" : "",
-				redirect_new_users ? "n" : "",
-				n_done ? " (" : "",
-				n_done ? n_done_s.c_str() : "",
-				n_done ? " user(s) redirected)" : "",
-				reason.c_str());
-
 		return CMD_LOCALONLY;
 	}
 };
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_override.cpp inspircd-1.1.22+dfsg/src/modules/m_override.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_override.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_override.cpp	2008-08-04 10:59:36.000000000 -0400
@@ -109,7 +109,8 @@
 	{
 		if (IS_OPER(source) && CanOverride(source,"KICK"))
 		{
-			if (((chan->GetStatus(source) == STATUS_HOP) && (chan->GetStatus(user) == STATUS_OP)) || (chan->GetStatus(source) < STATUS_VOICE))
+			// If the kicker's status is less than the target's,			or	the kicker's status is less than or equal to voice
+			if ((chan->GetStatus(source) < chan->GetStatus(user))			|| (chan->GetStatus(source) <= STATUS_VOICE))
 			{
 				ServerInstance->SNO->WriteToSnoMask('O',std::string(source->nick)+" Override-Kicked "+std::string(user->nick)+" on "+std::string(chan->name)+" ("+reason+")");
 			}
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_restrictchans.cpp inspircd-1.1.22+dfsg/src/modules/m_restrictchans.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_restrictchans.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_restrictchans.cpp	2008-08-21 09:50:24.000000000 -0400
@@ -59,6 +59,10 @@
 	virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
 	{
 		irc::string x = cname;
+
+		if (!IS_LOCAL(user))
+			return 0;
+
 		// user is not an oper and its not in the allow list
 		if ((!IS_OPER(user)) && (allowchans.find(x) == allowchans.end()))
 		{
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_services_account.cpp inspircd-1.1.22+dfsg/src/modules/m_services_account.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_services_account.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_services_account.cpp	2008-10-31 12:29:55.000000000 -0400
@@ -197,6 +197,9 @@
 	 
 	virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
 	{
+		if (!IS_LOCAL(user))
+			return 0;
+
 		std::string *account;
 		user->GetExt("accountname", account);
 		
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_services.cpp inspircd-1.1.22+dfsg/src/modules/m_services.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_services.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_services.cpp	2008-10-31 12:29:55.000000000 -0400
@@ -31,10 +31,20 @@
 	ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
 	{
 		// only a u-lined server may add or remove the +r mode.
-		if ((ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server || (strchr(source->nick,'.'))))
+		if ((ServerInstance->ULine(source->nick)) ||
+		    (ServerInstance->ULine(source->server)) || 
+		    (!*source->server ||
+		    (strchr(source->nick,'.'))))
 		{
-			channel->SetMode('r',adding);
-			return MODEACTION_ALLOW;
+			// Only show modechange if not redundant
+			if ((adding && !channel->IsModeSet('r')) || (!adding && channel->IsModeSet('r')))
+			{
+				channel->SetMode('r', adding);
+				return MODEACTION_ALLOW;
+				
+			}
+
+			return MODEACTION_DENY;
 		}
 		else
 		{
@@ -265,6 +275,9 @@
  	
 	virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
 	{
+		if (!IS_LOCAL(user))
+			return 0;
+
 		if (chan)
 		{
 			if (chan->IsModeSet('R'))
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_spanningtree/main.cpp inspircd-1.1.22+dfsg/src/modules/m_spanningtree/main.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_spanningtree/main.cpp	2008-03-30 21:27:46.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/modules/m_spanningtree/main.cpp	2008-09-11 12:33:56.000000000 -0400
@@ -168,9 +168,9 @@
 }
 
 // WARNING: NOT THREAD SAFE - DONT GET ANY SMART IDEAS.
-void ModuleSpanningTree::ShowMap(TreeServer* Current, userrec* user, int depth, char matrix[128][128], float &totusers, float &totservers)
+void ModuleSpanningTree::ShowMap(TreeServer* Current, userrec* user, int depth, char matrix[250][250], float &totusers, float &totservers)
 {
-	if (line < 128)
+	if (line < 250)
 	{
 		for (int t = 0; t < depth; t++)
 		{
@@ -178,19 +178,19 @@
 		}
 		// For Aligning, we need to work out exactly how deep this thing is, and produce
 		// a 'Spacer' String to compensate.
-		char spacer[40];
-		memset(spacer,' ',40);
-		if ((40 - Current->GetName().length() - depth) > 1) {
-			spacer[40 - Current->GetName().length() - depth] = '\0';
+		char spacer[80];
+		memset(spacer,' ',80);
+		if ((80 - Current->GetName().length() - depth) > 1) {
+			spacer[80 - Current->GetName().length() - depth] = '\0';
 		}
 		else
 		{
 			spacer[5] = '\0';
 		}
 		float percent;
-		char text[128];
+		char text[250];
 		/* Neat and tidy default values, as we're dealing with a matrix not a simple string */
-		memset(text, 0, 128);
+		memset(text, 0, 250);
 
 		if (ServerInstance->clientlist->size() == 0) {
 			// If there are no users, WHO THE HELL DID THE /MAP?!?!?!
@@ -201,10 +201,10 @@
 			percent = ((float)Current->GetUserCount() / (float)ServerInstance->clientlist->size()) * 100;
 		}
 		const std::string operdata = IS_OPER(user) ? MapOperInfo(Current) : "";
-		snprintf(text, 126, "%s %s%5d [%5.2f%%]%s", Current->GetName().c_str(), spacer, Current->GetUserCount(), percent, operdata.c_str());
+		snprintf(text, 249, "%s %s%5d [%5.2f%%]%s", Current->GetName().c_str(), spacer, Current->GetUserCount(), percent, operdata.c_str());
 		totusers += Current->GetUserCount();
 		totservers++;
-		strlcpy(&matrix[line][depth],text,126);
+		strlcpy(&matrix[line][depth], text, 249);
 		line++;
 		for (unsigned int q = 0; q < Current->ChildCount(); q++)
 		{
@@ -336,8 +336,8 @@
 	// client does not provide for a proper terminal.
 	float totusers = 0;
 	float totservers = 0;
-	char matrix[128][128];
-	for (unsigned int t = 0; t < 128; t++)
+	char matrix[250][250];
+	for (unsigned int t = 0; t < 250; t++)
 	{
 		matrix[t][0] = '\0';
 	}
@@ -1119,6 +1119,7 @@
 
 void ModuleSpanningTree::OnRemoteKill(userrec* source, userrec* dest, const std::string &reason, const std::string &operreason)
 {
+	if (!IS_LOCAL(source)) return; // Don't need to do anything for a non-local source.
 	std::deque<std::string> params;
 	params.push_back(":"+reason);
 	Utils->DoOneToMany(dest->nick,"OPERQUIT",params);
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_spanningtree/main.h inspircd-1.1.22+dfsg/src/modules/m_spanningtree/main.h
--- inspircd-1.1.20+dfsg/src/modules/m_spanningtree/main.h	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_spanningtree/main.h	2008-08-18 15:25:17.000000000 -0400
@@ -84,7 +84,7 @@
 
 	/** Show MAP output to a user (recursive)
 	 */
-	void ShowMap(TreeServer* Current, userrec* user, int depth, char matrix[128][128], float &totusers, float &totservers);
+	void ShowMap(TreeServer* Current, userrec* user, int depth, char matrix[250][250], float &totusers, float &totservers);
 
 	/** Handle remote MOTD
 	 */
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_spanningtree/treesocket1.cpp inspircd-1.1.22+dfsg/src/modules/m_spanningtree/treesocket1.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_spanningtree/treesocket1.cpp	2008-05-20 18:29:00.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/modules/m_spanningtree/treesocket1.cpp	2008-08-05 15:08:59.000000000 -0400
@@ -225,13 +225,13 @@
 				Utils->DoFailOver(MyLink);
 		break;
 		case I_ERR_SOCKET:
-			Utils->Creator->RemoteMessage(NULL,"Connection failed: Could not create socket");
+			Utils->Creator->RemoteMessage(NULL,"Connection failed: Could not create socket (%s)", strerror(errno));
 		break;
 		case I_ERR_BIND:
-			Utils->Creator->RemoteMessage(NULL,"Connection failed: Error binding socket to address or port");
+			Utils->Creator->RemoteMessage(NULL,"Connection failed: Error binding socket to address or port (%s)", strerror(errno));
 		break;
 		case I_ERR_WRITE:
-			Utils->Creator->RemoteMessage(NULL,"Connection failed: I/O error on connection");
+			Utils->Creator->RemoteMessage(NULL,"Connection failed: I/O error on connection (%s)", strerror(errno));
 		break;
 		case I_ERR_NOMOREFDS:
 			Utils->Creator->RemoteMessage(NULL,"Connection failed: Operating system is out of file descriptors!");
@@ -728,17 +728,13 @@
 	{
 		if ((ts >= c->topicset) || (!*c->topic))
 		{
-			std::string oldtopic = c->topic;
-			strlcpy(c->topic,params[3].c_str(),MAXTOPIC);
-			strlcpy(c->setby,params[2].c_str(),127);
-			c->topicset = ts;
-			/* if the topic text is the same as the current topic,
-			 * dont bother to send the TOPIC command out, just silently
-			 * update the set time and set nick.
-			 */
-			if (oldtopic != params[3])
+			userrec* user = this->Instance->FindNick(source);
+
+			if (c->topic != params[3])
 			{
-				userrec* user = this->Instance->FindNick(source);
+				// Update topic only when it differs from current topic
+				strlcpy(c->topic, params[3].c_str(), MAXTOPIC);
+
 				if (!user)
 				{
 					c->WriteChannelWithServ(Instance->Config->ServerName, "TOPIC %s :%s", c->name, c->topic);
@@ -746,10 +742,27 @@
 				else
 				{
 					c->WriteChannel(user, "TOPIC %s :%s", c->name, c->topic);
-					nsource = user->server;
 				}
 			}
 
+			// But always update set time and setter
+			strlcpy(c->setby, params[2].c_str(), 127);
+			c->topicset = ts;
+
+			/*
+			 * Take careful note of what happens here;
+			 * Above, we display the topic change to the server IF the topic incoming is different to the topic already set.
+			 * HERE, we find the server the user that sent this topic is on, so we *do not* send topics back to the link they just
+			 * came from. This *cannot* be easily merged with the above check!
+			 *
+			 * Thanks to Anope and Namegduf for finally helping me isolate this
+			 *			-- w00t (5th/aug/2008)
+			 */
+			if (user)
+			{
+				nsource = user->server;
+			}
+
 			/* all done, send it on its way */
 			params[3] = ":" + params[3];
 			Utils->DoOneToAllButSender(source,"FTOPIC",params,nsource);
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_spanningtree/treesocket2.cpp inspircd-1.1.22+dfsg/src/modules/m_spanningtree/treesocket2.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_spanningtree/treesocket2.cpp	2008-05-19 18:34:06.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/modules/m_spanningtree/treesocket2.cpp	2008-11-27 18:22:59.000000000 -0500
@@ -94,16 +94,16 @@
 		strlcpy(modulename,Instance->Config->module_names[i].c_str(),256);
 		if (*source->oper)
 		{
-			snprintf(strbuf, MAXBUF, "::%s 900 %s :0x%08lx %d.%d.%d.%d %s (%s)",Instance->Config->ServerName,source->nick,(long unsigned int)Instance->modules[i],V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2);
+			snprintf(strbuf, MAXBUF, "::%s 702 %s :0x%08lx %d.%d.%d.%d %s (%s)",Instance->Config->ServerName,source->nick,(long unsigned int)Instance->modules[i],V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2);
 		}
 		else
 		{
-			snprintf(strbuf, MAXBUF, "::%s 900 %s :%s",Instance->Config->ServerName,source->nick,ServerConfig::CleanFilename(modulename));
+			snprintf(strbuf, MAXBUF, "::%s 702 %s :%s",Instance->Config->ServerName,source->nick,ServerConfig::CleanFilename(modulename));
 		}
 		par[1] = strbuf;
 		Utils->DoOneToOne(Instance->Config->ServerName, "PUSH", par, source->server);
 	}
-	snprintf(strbuf, MAXBUF, "::%s 901 %s :End of MODULES list", Instance->Config->ServerName, source->nick);
+	snprintf(strbuf, MAXBUF, "::%s 703 %s :End of MODULES list", Instance->Config->ServerName, source->nick);
 	par[1] = strbuf;
 	Utils->DoOneToOne(Instance->Config->ServerName, "PUSH", par, source->server);
 	return true;
@@ -344,12 +344,19 @@
 		return false;
 
 	std::string servermask = params[0];
+	std::string parameter;
+
+	if (params.size() > 1)
+	{
+		parameter = params[1];
+	}
 
 	if (this->Instance->MatchText(this->Instance->Config->ServerName,servermask))
 	{
 		this->Instance->SNO->WriteToSnoMask('l',"Remote rehash initiated by \002"+prefix+"\002.");
 		this->Instance->RehashServer();
 		Utils->ReadConfiguration(true);
+		FOREACH_MOD_I(this->Instance, I_OnRehash, OnRehash(NULL, parameter));
 		InitializeDisabledCommands(Instance->Config->DisabledCommands, Instance);
 	}
 	Utils->DoOneToAllButSender(prefix,"REHASH",params,prefix);
@@ -365,10 +372,10 @@
 
 	if (who)
 	{
-		/* Prepend kill source, if we don't have one */ 	 
-		if (*(params[1].c_str()) != '[')
+		/* Prepend kill source, if we don't have one -- '[' is check for older 1.1 servers, and services, that prefix reason with servername. */
+		if ((*(params[1].c_str()) != 'K') && (*(params[1].c_str()) != '['))
 		{
-			params[1] = "[" + prefix + "] Killed (" + params[1] +")";
+			params[1] = "Killed (" + params[1] +")";
 		}
 		std::string reason = params[1];
 		params[1] = ":" + params[1];
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_sslmodes.cpp inspircd-1.1.22+dfsg/src/modules/m_sslmodes.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_sslmodes.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_sslmodes.cpp	2008-06-26 13:34:38.000000000 -0400
@@ -38,7 +38,7 @@
 					CUList* userlist = channel->GetUsers();
 					for(CUList::iterator i = userlist->begin(); i != userlist->end(); i++)
 					{
-						if(!i->first->GetExt("ssl", dummy))
+						if(!i->first->GetExt("ssl", dummy) && !ServerInstance->ULine(i->first->server))
 						{
 							source->WriteServ("490 %s %s :all members of the channel must be connected via SSL", source->nick, channel->name);
 							return MODEACTION_DENY;
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_svshold.cpp inspircd-1.1.22+dfsg/src/modules/m_svshold.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_svshold.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_svshold.cpp	2008-07-02 10:19:40.000000000 -0400
@@ -129,12 +129,10 @@
 				if(length > 0)
 				{
 					user->WriteServ( "385 %s %s :Added %lu second SVSHOLD (%s)", user->nick, parameters[0], length, reason.c_str());
-					ServerInstance->WriteOpers("*** %s added %lu second SVSHOLD on %s (%s)", user->nick, length, parameters[0], reason.c_str());
 				}
 				else
 				{
 					user->WriteServ( "385 %s %s :Added permanent SVSHOLD on %s (%s)", user->nick, parameters[0], parameters[0], reason.c_str());
-					ServerInstance->WriteOpers("*** %s added permanent SVSHOLD on %s (%s)", user->nick, parameters[0], reason.c_str());
 				}
 			}
 			else
@@ -267,7 +265,6 @@
 				if ((*iter)->set_on + (*iter)->length <= ServerInstance->Time())
 				{
 					ServerInstance->Log(DEBUG, "m_svshold.so: hold on %s expired, removing...", (*iter)->nickname.c_str());
-					ServerInstance->WriteOpers("*** %li second SVSHOLD on %s (%s) set %u seconds ago expired", (*iter)->length, (*iter)->nickname.c_str(), (*iter)->reason.c_str(), ServerInstance->Time() - (*iter)->set_on);
 					HoldMap.erase(assign((*iter)->nickname));
 					delete *iter;
 					safeiter = iter;
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_swhois.cpp inspircd-1.1.22+dfsg/src/modules/m_swhois.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_swhois.cpp	2008-03-28 10:41:13.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/modules/m_swhois.cpp	2008-08-10 12:49:18.000000000 -0400
@@ -56,9 +56,7 @@
 		}
 		
 		std::string* text;
-		dest->GetExt("swhois", text);
-
-		if (text)
+		if (dest->GetExt("swhois", text))
 		{
 			// We already had it set...
 			
@@ -117,8 +115,7 @@
 		{
 			/* Insert our numeric before 312 */
 			std::string* swhois;
-			dest->GetExt("swhois", swhois);
-			if (swhois)
+			if (dest->GetExt("swhois", swhois))
 			{
 				ServerInstance->SendWhoisLine(user, dest, 320, "%s %s :%s",user->nick,dest->nick,swhois->c_str());
 			}
@@ -139,8 +136,7 @@
 		{
 			// check if this user has an swhois field to send
 			std::string* swhois;
-			user->GetExt("swhois", swhois);
-			if (swhois)
+			if (user->GetExt("swhois", swhois))
 			{
 				// call this function in the linking module, let it format the data how it
 				// sees fit, and send it on its way. We dont need or want to know how.
@@ -153,8 +149,7 @@
 	virtual void OnUserQuit(userrec* user, const std::string &message, const std::string &oper_message)
 	{
 		std::string* swhois;
-		user->GetExt("swhois", swhois);
-		if (swhois)
+		if (user->GetExt("swhois", swhois))
 		{
 			user->Shrink("swhois");
 			DELETE(swhois);
@@ -168,8 +163,7 @@
 		{
 			userrec* user = (userrec*)item;
 			std::string* swhois;
-			user->GetExt("swhois", swhois);
-			if (swhois)
+			if (user->GetExt("swhois", swhois))
 			{
 				user->Shrink("swhois");
 				DELETE(swhois);
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_taxonomy.cpp inspircd-1.1.22+dfsg/src/modules/m_taxonomy.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_taxonomy.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_taxonomy.cpp	2008-07-22 09:44:52.000000000 -0400
@@ -43,7 +43,7 @@
 			for (unsigned int j = 0; j < list.size(); j++)
 			{
 				claimed = false;
-				FOREACH_MOD(I_OnSyncUserMetaData, OnSyncUserMetaData(user, Creator, dest, list[j], true));
+				FOREACH_MOD(I_OnSyncUserMetaData, OnSyncUserMetaData(dest, Creator, user, list[j], true));
 				if (!claimed)
 				{
 					user->WriteServ("304 " + std::string(user->nick) + ":TAXONOMY METADATA " + list[j] + " = <unknown>");
@@ -78,7 +78,7 @@
 	{
 		if (target_type == TYPE_USER)
 		{
-			userrec *spoolto = (userrec*)target;
+			userrec *spoolto = (userrec*)opaque;
 			std::string taxstr = "304 " + std::string(spoolto->nick) + ":TAXONOMY METADATA "+extname+" = "+extdata;
 			spoolto->WriteServ(taxstr);
 			claimed = true;
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_uninvite.cpp inspircd-1.1.22+dfsg/src/modules/m_uninvite.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_uninvite.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_uninvite.cpp	2008-09-24 15:02:04.000000000 -0400
@@ -63,7 +63,7 @@
 
 		if (!u->IsInvited(xname))
 		{
-			user->WriteServ("491 %s %s %s :Is not invited to channel %s",user->nick,u->nick,c->name,c->name);
+			user->WriteServ("505 %s %s %s :Is not invited to channel %s",user->nick,u->nick,c->name,c->name);
 			return CMD_FAILURE;
 		}
 		if (!c->HasUser(user))
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_userip.cpp inspircd-1.1.22+dfsg/src/modules/m_userip.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_userip.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_userip.cpp	2008-08-27 15:00:34.000000000 -0400
@@ -38,7 +38,12 @@
 			userrec *u = ServerInstance->FindNick(parameters[i]);
 			if ((u) && (u->registered == REG_ALL))
 			{
-				retbuf = retbuf + u->nick + (IS_OPER(u) ? "*" : "") + "=+" + u->ident + "@" + u->GetIPString() + " ";
+				retbuf = retbuf + u->nick + (IS_OPER(u) ? "*" : "") + "=";
+				if (IS_AWAY(u))
+					retbuf += "-";
+				else
+					retbuf += "+";
+				retbuf += std::string(u->ident) + "@" + u->GetIPString() + " ";
 			}
 		}
 
diff -Nru inspircd-1.1.20+dfsg/src/modules/m_watch.cpp inspircd-1.1.22+dfsg/src/modules/m_watch.cpp
--- inspircd-1.1.20+dfsg/src/modules/m_watch.cpp	2008-01-26 16:39:13.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules/m_watch.cpp	2008-11-03 17:42:50.000000000 -0500
@@ -244,7 +244,7 @@
 									x->second.erase(n);
 
 								if (!x->second.size())
-									whos_watching_me->erase(user->nick);
+									whos_watching_me->erase(x);
 							}
 						}
 
@@ -341,7 +341,7 @@
 		{
 			for (std::deque<userrec*>::iterator n = x->second.begin(); n != x->second.end(); n++)
 			{
-				if (!user->Visibility || user->Visibility->VisibleTo(user))
+				if (!user->Visibility || user->Visibility->VisibleTo(*n))
 					(*n)->WriteServ("601 %s %s %s %s %lu :went offline", (*n)->nick ,user->nick, user->ident, user->dhost, ServerInstance->Time());
 
 				watchlist* wl;
@@ -368,7 +368,7 @@
 							x->second.erase(n);
 	
 						if (!x->second.size())
-							whos_watching_me->erase(user->nick);
+							whos_watching_me->erase(x);
 				}
 			}
 
@@ -411,7 +411,7 @@
 		{
 			for (std::deque<userrec*>::iterator n = x->second.begin(); n != x->second.end(); n++)
 			{
-				if (!user->Visibility || user->Visibility->VisibleTo(user))
+				if (!user->Visibility || user->Visibility->VisibleTo(*n))
 					(*n)->WriteServ("600 %s %s %s %s %lu :arrived online", (*n)->nick, user->nick, user->ident, user->dhost, user->age);
 
 				watchlist* wl;
@@ -434,7 +434,7 @@
 				watchlist* wl;
 				if ((*n)->GetExt("watchlist", wl))
 				{
-					if (!user->Visibility || user->Visibility->VisibleTo(user))
+					if (!user->Visibility || user->Visibility->VisibleTo(*n))
 	 					(*n)->WriteServ("601 %s %s %s %s %lu :went offline", (*n)->nick, oldnick.c_str(), user->ident, user->dhost, user->age);
 					(*wl)[oldnick.c_str()] = "";
 				}
@@ -449,7 +449,7 @@
 				if ((*n)->GetExt("watchlist", wl))
 				{
 					(*wl)[user->nick] = std::string(user->ident).append(" ").append(user->dhost).append(" ").append(ConvToStr(user->age));
-					if (!user->Visibility || user->Visibility->VisibleTo(user))
+					if (!user->Visibility || user->Visibility->VisibleTo(*n))
 						(*n)->WriteServ("600 %s %s %s :arrived online", (*n)->nick, user->nick, (*wl)[user->nick].c_str());
 				}
 			}
diff -Nru inspircd-1.1.20+dfsg/src/modules.cpp inspircd-1.1.22+dfsg/src/modules.cpp
--- inspircd-1.1.20+dfsg/src/modules.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/modules.cpp	2008-11-02 00:20:54.000000000 -0400
@@ -557,6 +557,7 @@
 	
 	this->data = &ServerInstance->Config->config_data;
 	this->privatehash = false;
+	this->error = 0;
 }
 
 
@@ -579,6 +580,7 @@
 	this->readerror = ServerInstance->Config->LoadConf(*this->data, filename, *this->errorlog);
 	if (!this->readerror)
 		this->error = CONF_FILE_NOT_FOUND;
+	this->error = 0;
 }
 
 
diff -Nru inspircd-1.1.20+dfsg/src/socket.cpp inspircd-1.1.22+dfsg/src/socket.cpp
--- inspircd-1.1.20+dfsg/src/socket.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/socket.cpp	2008-08-30 15:08:16.000000000 -0400
@@ -524,7 +524,7 @@
 					}
 					else
 					{
-						failed_ports.push_back(std::make_pair(Addr, portno));
+						failed_ports.push_back(std::make_pair((*Addr ? Addr : "*") + std::string(":") + ConvToStr(portno), strerror(errno)));
 					}
 					ports_found++;
 				}
diff -Nru inspircd-1.1.20+dfsg/src/socketengine_epoll.cpp inspircd-1.1.22+dfsg/src/socketengine_epoll.cpp
--- inspircd-1.1.20+dfsg/src/socketengine_epoll.cpp	2008-01-10 08:45:53.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/socketengine_epoll.cpp	2008-08-23 19:22:53.000000000 -0400
@@ -113,7 +113,7 @@
 
 int EPollEngine::DispatchEvents()
 {
-	socklen_t codesize;
+	socklen_t codesize = sizeof(int);
 	int errcode;
 	int i = epoll_wait(EngineHandle, events, MAX_DESCRIPTORS, 1000);
 	for (int j = 0; j < i; j++)
diff -Nru inspircd-1.1.20+dfsg/src/socketengine_poll.cpp inspircd-1.1.22+dfsg/src/socketengine_poll.cpp
--- inspircd-1.1.20+dfsg/src/socketengine_poll.cpp	1969-12-31 19:00:00.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/socketengine_poll.cpp	2008-08-24 19:03:42.000000000 -0400
@@ -0,0 +1,147 @@
+/*       +------------------------------------+
+ *       | Inspire Internet Relay Chat Daemon |
+ *       +------------------------------------+
+ *
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
+ * This program is free but copyrighted software; see
+ *            the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
+
+#include "inspircd.h"
+#include "exitcodes.h"
+#include "socketengine_poll.h"
+
+PollEngine::PollEngine(InspIRCd* Instance) : SocketEngine(Instance)
+{
+	// Poll requires no special setup (which is nice).
+	CurrentSetSize = 0;
+	memset(&events, 0, MAX_DESCRIPTORS);
+}
+
+PollEngine::~PollEngine()
+{
+	// No destruction required, either.
+}
+
+bool PollEngine::AddFd(EventHandler* eh)
+{
+	int fd = eh->GetFd();
+	if ((fd < 0) || (fd > MAX_DESCRIPTORS))
+		return false;
+
+	if (GetRemainingFds() <= 1)
+		return false;
+
+	if (ref[fd])
+		return false;
+
+	ref[fd] = eh;
+	events[fd].fd = fd;
+	if (eh->Readable())
+	{
+		events[fd].events = POLLIN;
+	}
+	else
+	{
+		events[fd].events = POLLOUT;
+	}
+
+	ServerInstance->Log(DEBUG,"New file descriptor: %d (%d)", fd, events[fd].events);
+	CurrentSetSize++;
+	return true;
+}
+
+void PollEngine::WantWrite(EventHandler* eh)
+{
+	events[eh->GetFd()].events = POLLIN | POLLOUT;
+}
+
+bool PollEngine::DelFd(EventHandler* eh, bool force)
+{
+	int fd = eh->GetFd();
+	if ((fd < 0) || (fd > MAX_DESCRIPTORS))
+		return false;
+
+	events[fd].fd = -1;
+	events[fd].events = 0;
+
+	CurrentSetSize--;
+	ref[fd] = NULL;
+
+	ServerInstance->Log(DEBUG,"Remove file descriptor: %d", fd);
+	return true;
+}
+
+int PollEngine::GetMaxFds()
+{
+	return MAX_DESCRIPTORS;
+}
+
+int PollEngine::GetRemainingFds()
+{
+	return MAX_DESCRIPTORS - CurrentSetSize;
+}
+
+int PollEngine::DispatchEvents()
+{
+	int i = poll(events, MAX_DESCRIPTORS, 1000);
+	int fd = 0;
+	socklen_t codesize = sizeof(int);
+	int errcode;
+	int processed = 0;
+
+	if (i > 0)
+	{
+		for (fd = 0; fd < MAX_DESCRIPTORS && processed != i; fd++)
+		{
+			if (events[fd].revents)
+				processed++;
+
+			if (events[fd].revents & POLLHUP)
+			{
+				if (ref[fd])
+					ref[fd]->HandleEvent(EVENT_ERROR, 0);
+				continue;
+			}
+
+			if (events[fd].revents & POLLERR)
+			{
+				// Get error number
+				if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &errcode, &codesize) < 0)
+					errcode = errno;
+				if (ref[fd])
+					ref[fd]->HandleEvent(EVENT_ERROR, errcode);
+				continue;
+			}
+
+			if (events[fd].revents & POLLOUT)
+			{
+				// Switch to wanting read again
+				// event handlers have to request to write again if they need it
+				events[fd].events = POLLIN;
+
+
+				if (ref[fd])
+					ref[fd]->HandleEvent(EVENT_WRITE);
+			}
+
+			if (events[fd].revents & POLLIN)
+			{
+				if (ref[fd])
+					ref[fd]->HandleEvent(EVENT_READ);
+			}
+		}
+	}
+
+	return i;
+}
+
+std::string PollEngine::GetName()
+{
+	return "poll";
+}
+
diff -Nru inspircd-1.1.20+dfsg/src/socketengine_select.cpp inspircd-1.1.22+dfsg/src/socketengine_select.cpp
--- inspircd-1.1.20+dfsg/src/socketengine_select.cpp	2008-02-10 18:29:29.000000000 -0500
+++ inspircd-1.1.22+dfsg/src/socketengine_select.cpp	2008-08-24 16:45:28.000000000 -0400
@@ -88,7 +88,7 @@
 	timeval tval;
 	int sresult = 0;
 	EventHandler* ev[MAX_DESCRIPTORS];
-	socklen_t codesize;
+	socklen_t codesize = sizeof(int);
 	int errcode;
 
 	FD_ZERO(&wfdset);
diff -Nru inspircd-1.1.20+dfsg/src/users.cpp inspircd-1.1.22+dfsg/src/users.cpp
--- inspircd-1.1.20+dfsg/src/users.cpp	2008-06-08 13:33:35.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/users.cpp	2008-10-28 19:47:33.000000000 -0400
@@ -218,6 +218,7 @@
 					strlcpy(this->bound_user->host, hostname.c_str(),64);
 					/* Invalidate cache */
 					this->bound_user->InvalidateCache();
+					ServerInstance->next_call = ServerInstance->Time();
 				}
 			}
 			else
@@ -528,6 +529,13 @@
 
 void userrec::InviteTo(const irc::string &channel)
 {
+	for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+	{
+		if (channel == *i)
+		{
+			return;
+		}
+	}
 	invites.push_back(channel);
 }
 
@@ -922,7 +930,7 @@
 	 * Check connect class settings and initialise settings into userrec.
 	 * This will be done again after DNS resolution. -- w00t
 	 */
-	New->CheckClass();
+	New->CheckClass(i);
 
 	Instance->local_users.push_back(New);
 
@@ -1001,10 +1009,8 @@
 /*
  * Check class restrictions
  */
-void userrec::CheckClass()
+void userrec::CheckClass(ConnectClass *a)
 {
-	ConnectClass* a = this->GetClass();
-
 	if ((!a) || (a->GetType() == CC_DENY))
 	{
 		userrec::QuitUser(ServerInstance, this, "Unauthorised connection");
@@ -1037,13 +1043,29 @@
 	ServerInstance->stats->statsConnects++;
 	this->idle_lastmsg = ServerInstance->Time();
 
+
+	ConnectClass *a = this->GetClass();
+	if (!a)
+	{
+		/*
+		 * This can happen:
+		 *  - user connects
+		 *  - /rehash, removing <connect> tag they matched
+		 *  - dns completes (putting us here) ...but they no longer have a connect tag
+		 * Catch it here. Thanks Szymek!
+		 *  -- w00t
+		 */
+		userrec::QuitUser(ServerInstance, this, "Invalid password");
+		return;
+	}
+	
 	/*
 	 * You may be thinking "wtf, we checked this in userrec::AddClient!" - and yes, we did, BUT.
 	 * At the time AddClient is called, we don't have a resolved host, by here we probably do - which
 	 * may put the user into a totally seperate class with different restrictions! so we *must* check again.
 	 * Don't remove this! -- w00t
 	 */
-	this->CheckClass();
+	this->CheckClass(a);
 	
 	/* Check the password, if one is required by the user's connect class.
 	 * This CANNOT be in CheckClass(), because that is called prior to PASS as well!
diff -Nru inspircd-1.1.20+dfsg/src/version.sh inspircd-1.1.22+dfsg/src/version.sh
--- inspircd-1.1.20+dfsg/src/version.sh	2008-06-08 14:28:59.000000000 -0400
+++ inspircd-1.1.22+dfsg/src/version.sh	2008-12-02 15:14:16.000000000 -0500
@@ -1,2 +1,2 @@
 #!sh
-echo "InspIRCd-1.1.20+Asiago"
+echo "InspIRCd-1.1.22+Azeitao"
diff -Nru inspircd-1.1.20+dfsg/win/inspircdVC80.vcproj inspircd-1.1.22+dfsg/win/inspircdVC80.vcproj
--- inspircd-1.1.20+dfsg/win/inspircdVC80.vcproj	2008-04-20 17:11:12.000000000 -0400
+++ inspircd-1.1.22+dfsg/win/inspircdVC80.vcproj	2008-06-19 19:55:49.000000000 -0400
@@ -1175,22 +1175,20 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\src\modules\extra\m_filter_pcre.cpp"
+				RelativePath="..\src\modules\m_filter_pcre.cpp"
 				>
 				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
+					Name="Debug|Win32"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\$(InputName)1.obj"
+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
 					/>
 				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\src\modules\m_filter_pcre.cpp"
-				>
 				<FileConfiguration
-					Name="Debug|Win32"
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
@@ -1198,14 +1196,16 @@
 						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
 					/>
 				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\modules\extra\m_filter_pcre.cpp"
+				>
 				<FileConfiguration
 					Name="Release|Win32"
 					ExcludedFromBuild="true"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\$(InputName)1.obj"
-						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
 					/>
 				</FileConfiguration>
 			</File>
@@ -2110,30 +2110,19 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\src\modules\m_ssl_gnutls.cpp"
+				RelativePath="..\src\modules\extra\m_ssl_openssl.cpp"
 				>
 				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\$(InputName)1.obj"
-						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
 					Name="Release|Win32"
 					ExcludedFromBuild="true"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\$(InputName)1.obj"
-						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
 					/>
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\src\modules\extra\m_ssl_openssl.cpp"
+				RelativePath="..\src\modules\extra\m_ssl_oper_cert.cpp"
 				>
 				<FileConfiguration
 					Name="Release|Win32"
@@ -2168,7 +2157,7 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\src\modules\extra\m_ssl_oper_cert.cpp"
+				RelativePath="..\src\modules\extra\m_sslinfo.cpp"
 				>
 				<FileConfiguration
 					Name="Release|Win32"
@@ -2203,18 +2192,6 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\src\modules\extra\m_sslinfo.cpp"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
 				RelativePath="..\src\modules\m_sslmodes.cpp"
 				>
 				<FileConfiguration

Reply to: