--- Config	Sat Jun 17 01:29:12 2006
+++ Config	Fri Dec  1 22:06:46 2006
@@ -62,6 +62,13 @@
 ARG="$ARG--enable-ziplinks=$ZIPLINKSDIR "
 fi
 fi
+if [ "$ICONV" = "1" ] ; then
+if test x"$ICONVDIR" = "x" ; then
+ARG="$ARG--enable-iconv "
+else
+ARG="$ARG--enable-iconv=$ICONVDIR "
+fi
+fi
 if [ "$REMOTEINC" = "1" ] ; then
 ARG="$ARG--enable-libcurl=$CURLDIR "
 fi
@@ -296,6 +303,8 @@
 MAXCONNECTIONS="1024"
 INET6=""
 REMOTEINC=""
+ICONV=""
+ICONVDIR=""
 CURLDIR=""
 PREFIXAQ="1"
 SHOWLISTMODES="1"
@@ -696,6 +705,48 @@
     esac
 done
 
+TEST=""
+while [ -z "$TEST" ] ; do
+    if [ "$ICONV" = "1" ] ; then
+        TEST="Yes"
+    else
+        TEST="No"
+    fi
+    echo ""
+    echo "Do you want to enable iconv (codepage) support?"
+    echo $n "[$TEST] -> $c"
+        read cc
+    if [ -z "$cc" ] ; then
+        cc=$TEST
+    fi
+    case "$cc" in
+        [Yy]*)
+	    ICONV="1"
+	    ;;
+	[Nn]*)
+	    ICONV=""
+	    ;;
+	*)
+	    echo ""
+	    echo "You must enter either Yes or No"
+	    TEST=""
+	    ;;
+    esac
+done
+
+if [ "$ICONV" = "1" ] ; then
+TEST=""
+echo ""
+echo "If you know the path to iconv on your system, enter it here. If not"
+echo "leave this blank"
+echo $n "[$TEST] -> $c"
+    read cc
+if [ -z "$cc" ] ; then
+    ICONVDIR=""
+else
+    ICONVDIR=`eval echo $cc` # modified
+fi
+fi
 
 TEST=""
 while [ -z "$TEST" ] ; do
--- Makefile.in	Sat Jun 17 01:29:12 2006
+++ Makefile.in	Wed Nov 29 11:16:35 2006
@@ -219,6 +219,8 @@
 	$(INSTALL) -m 0700 unreal $(IRCDDIR)
 	$(INSTALL) -m 0700 -d $(IRCDDIR)/modules
 	$(INSTALL) -m 0700 src/modules/*.so $(IRCDDIR)/modules
+	$(INSTALL) -m 0700 -d $(IRCDDIR)/locales
+	$(INSTALL) -m 0600 locales/* $(IRCDDIR)/locales
 	-@if [ ! -f "$(IRCDDIR)/curl-ca-bundle.crt" ] ; then \
 		$(INSTALL) -m 0700 curl-ca-bundle.crt $(IRCDDIR) ; \
 	fi
--- badwords.all.conf	Thu Jan  1 06:00:00 1970
+++ badwords.all.conf	Wed Nov 29 11:16:35 2006
@@ -0,0 +1,401 @@
+/******************************************************************************
+ * The official ByNets.org all badwords file
+ * version: 3.2.4-1
+ * date modified: 03.02.2006
+ * last modified by: Bock
+ * contacts: #nn@irc.bynets.org:6667
+ ******************************************************************************
+
+ Unreal Internet Relay Chat Daemon
+
+ Copyright (C) Carsten V. Munk 2000
+
+
+
+ NOTE: Those words are not meant to insult you (the user)
+
+       but is meant to be a list of words so that the +G all/user mode 
+
+       will work properly. You can easily modify this file at your will.
+
+       If you got words to add to this file, please mail badwords@tspre.org
+
+
+
+ 
+
+
+
+
+
+
+
+ 
+
+                This is some filling space, scroll down to see the words
+
+
+
+ 
+
+
+
+
+
+ 
+
+
+
+
+
+ 
+
+
+
+
+
+ 
+
+
+
+
+
+ 
+
+
+
+
+
+*/
+
+badword all { word "pussy"; };
+badword all { word "fuck"; };
+/*badword all { word "whore"; }; :P не трожьте мой ник! :)*/
+badword all { word "slut"; };
+badword all { word "shit"; };
+badword all { word "asshole"; };
+badword all { word "bitch"; };
+badword all { word "cunt"; };
+badword all { word "vagina"; };
+badword all { word "penis"; };
+badword all { word "jackass"; };
+badword all { word "*fucker*"; };
+badword all { word "faggot"; };
+badword all { word "fag"; };
+badword all { word "horny"; };
+badword all { word "gay"; };
+badword all { word "dickhead"; };
+badword all { word "sonuvabitch"; };
+badword all { word "*fuck*"; };
+badword all { word "tits"; };
+badword all { word "huj"; };
+badword all { word "pizda"; };
+badword all { word "blya"; };
+badword all { word "Ebat"; };
+badword all { word " zaebal "; };
+badword all { word "архипиздрит"; };
+badword all { word "басран"; };
+badword all { word "бздение"; };
+badword all { word "бздеть"; };
+badword all { word "бздех"; };
+badword all { word "бзднуть"; };
+badword all { word "бздун"; };
+badword all { word "бздунья"; };
+badword all { word "бздюха"; };
+badword all { word "бикса"; };
+badword all { word "блежник"; };
+badword all { word "блудилище"; };
+badword all { word "бля "; };
+badword all { word " бля"; };
+badword all { word "бляд"; };
+badword all { word "блябу"; };
+badword all { word "блябуду"; };
+badword all { word "блядун"; };
+badword all { word "блядунья"; };
+badword all { word "блядь"; };
+badword all { word "блять"; };
+badword all { word "блядюга"; };
+badword all { word " взъебка "; };
+badword all { word "взьебка"; };
+badword all { word "волосянка"; };
+badword all { word "взьебывать"; };
+badword all { word "вз'ебывать"; };
+badword all { word "выблядок"; };
+badword all { word "выблядыш"; };
+badword all { word "выебать"; };
+badword all { word "выеть"; };
+badword all { word "выкусить"; };
+badword all { word "выкуси"; };
+badword all { word "выпердеть"; };
+badword all { word "высраться"; };
+badword all { word "выссаться"; };
+badword all { word "говенка"; };
+badword all { word "говенный"; };
+badword all { word "говешка"; };
+badword all { word "говназия"; };
+badword all { word "говнецо"; };
+badword all { word "говно"; };
+badword all { word "говноед"; };
+badword all { word "говночист"; };
+badword all { word "говнюк"; };
+badword all { word "говнюха"; };
+badword all { word "говнядина"; };
+badword all { word "говняк"; };
+badword all { word "говняный"; };
+badword all { word "говнять"; };
+badword all { word "гондон"; };
+badword all { word "дермо"; };
+badword all { word "дерьмо"; };
+badword all { word "долбоеб"; };
+badword all { word "дрисня"; };
+badword all { word "дрист"; };
+badword all { word "дристать"; };
+badword all { word "дристануть"; };
+badword all { word "дристун"; };
+badword all { word "дристуха"; };
+badword all { word "дрочена"; };
+badword all { word "дрочила"; };
+badword all { word "дрочилка"; };
+badword all { word "дрочить"; };
+badword all { word "дрочка"; };
+badword all { word " еблан "; };
+badword all { word "ебало"; };
+badword all { word "ебальник"; };
+badword all { word "ебануть"; };
+badword all { word "ебаный"; };
+badword all { word "ебарь"; };
+badword all { word "ебатория"; };
+badword all { word "ебать"; };
+badword all { word "ебаться"; };
+badword all { word " ебашь "; };
+badword all { word " ебешь "; };
+badword all { word " ебал "; };
+badword all { word " ебет "; };
+badword all { word " ебан "; };
+badword all { word " ебар "; };
+badword all { word " ебать "; };
+badword all { word "ебец"; };
+badword all { word "ебливый"; };
+badword all { word "ебля"; };
+badword all { word "ебнуть"; };
+badword all { word "ебнуться"; };
+badword all { word "ебня"; };
+badword all { word " ебу "; };
+badword all { word "ебун"; };
+badword all { word "елда"; };
+badword all { word "елдак"; };
+badword all { word "елдачить"; };
+badword all { word "еть"; };
+badword all { word "заговнять"; };
+badword all { word "задристать"; };
+badword all { word "задрока"; };
+badword all { word "заеба"; };
+badword all { word " заебал "; };
+badword all { word " заеби "; };
+badword all { word "заебанец"; };
+badword all { word "заебать"; };
+badword all { word "заебаться"; };
+badword all { word "заебываться"; };
+badword all { word "заеть"; };
+badword all { word "залупа"; };
+badword all { word "залупаться"; };
+badword all { word "залупить"; };
+badword all { word "залупиться"; };
+badword all { word "замудохаться"; };
+badword all { word "засерун"; };
+badword all { word "засеря"; };
+badword all { word "засерать"; };
+badword all { word "засирать"; };
+badword all { word "засранец"; };
+badword all { word "засрун"; };
+badword all { word "захуячить"; };
+badword all { word "злоебучий"; };
+badword all { word "изговнять"; };
+badword all { word "изговняться"; };
+badword all { word "кляпыжиться"; };
+badword all { word "курва"; };
+badword all { word "курвенок"; };
+badword all { word "курвин"; };
+badword all { word "курвяжник"; };
+badword all { word "курвяжница"; };
+badword all { word "курвяжный"; };
+badword all { word "манда"; };
+badword all { word "мандавошка"; };
+badword all { word "мандей"; };
+badword all { word "мандеть"; };
+badword all { word "мандища"; };
+badword all { word "мандюк"; };
+badword all { word "минетчик"; };
+badword all { word "минетчица"; };
+badword all { word "мокрохвостка"; };
+badword all { word "мокрощелка"; };
+badword all { word " мудак "; };
+badword all { word "мудак"; };
+badword all { word "муде"; };
+badword all { word "мудеть"; };
+badword all { word "мудила"; };
+badword all { word " мудило "; };
+badword all { word "мудистый"; };
+badword all { word "мудня"; };
+badword all { word "мудоеб"; };
+badword all { word "мудозвон"; };
+badword all { word "муйня"; };
+badword all { word "набздеть"; };
+badword all { word "наговнять"; };
+badword all { word "надристать"; };
+badword all { word "надрочить"; };
+badword all { word "наебать"; };
+badword all { word "наебнуться"; };
+badword all { word "наебывать"; };
+badword all { word "нассать"; };
+badword all { word "нахезать"; };
+badword all { word "нахуй"; };
+badword all { word "нахуйник"; };
+badword all { word "насцать"; };
+badword all { word "обдристаться"; };
+badword all { word "обдристаться"; };
+badword all { word "обосранец"; };
+badword all { word "обосрать"; };
+badword all { word "обосцать"; };
+badword all { word "обосцаться"; };
+badword all { word "обсирать"; };
+badword all { word "опизде"; };
+badword all { word "отпиздячить"; };
+badword all { word "отпороть"; };
+badword all { word "отъеть"; };
+badword all { word "охуевательский"; };
+badword all { word "охуевать"; };
+badword all { word "охуевающий"; };
+badword all { word "охуеть"; };
+badword all { word "охуительный"; };
+badword all { word "охуячивать"; };
+badword all { word "охуячить"; };
+badword all { word "*пизд*"; };
+badword all { word "*пидор*"; };
+badword all { word "*пидар*"; };
+badword all { word "педрик"; };
+badword all { word "пердеж"; };
+badword all { word "пердение"; };
+badword all { word "пердеть"; };
+badword all { word "пердильник"; };
+badword all { word "перднуть"; };
+badword all { word "пердун"; };
+badword all { word "пердунец"; };
+badword all { word "пердунина"; };
+badword all { word "пердунья"; };
+badword all { word "пердуха"; };
+badword all { word "пердь"; };
+badword all { word "передок"; };
+badword all { word "пернуть"; };
+badword all { word " пезда "; };
+badword all { word " песда "; };
+badword all { word "пидор"; };
+badword all { word " пидрил"; };
+badword all { word "пизда"; };
+badword all { word "пиздануть"; };
+badword all { word "пизденка"; };
+badword all { word "пиздеть"; };
+badword all { word "пиздить"; };
+badword all { word "пиздища"; };
+badword all { word "пиздобратия"; };
+badword all { word "пиздоватый"; };
+badword all { word "пиздорванец"; };
+badword all { word "пиздорванка"; };
+badword all { word "пиздострадатель"; };
+badword all { word "пиздун"; };
+badword all { word "пиздюга"; };
+badword all { word "пиздюк"; };
+badword all { word "пиздячить"; };
+badword all { word "питишка"; };
+badword all { word "плеха"; };
+badword all { word "плыва"; };
+badword all { word "плывун"; };*/
+badword all { word "подговнять"; };
+badword all { word " подъебка "; };
+badword all { word "подъебнуться"; };
+badword all { word "поебать"; };
+badword all { word "поеть"; };
+badword all { word "попысать"; };
+badword all { word "посрать"; };
+badword all { word "проблядь"; };
+badword all { word "проебать"; };
+badword all { word "промандеть"; };
+badword all { word "промудеть"; };
+badword all { word "пропиздеть"; };
+badword all { word "пропиздячить"; };
+badword all { word "пысать"; };
+badword all { word "разъеба"; };
+badword all { word "разъебай"; };
+badword all { word "распиздай"; };
+badword all { word "распиздеться"; };
+badword all { word "распиздяй"; };
+badword all { word "распроеть"; };
+badword all { word "растыка"; };
+badword all { word "сговнять"; };
+badword all { word "секель"; };
+badword all { word "серун"; };
+badword all { word "серька"; };
+badword all { word "сика"; };
+badword all { word "сикать"; };
+badword all { word "сикель"; };
+badword all { word "сирать"; };
+badword all { word "сирывать"; };
+badword all { word "скурвиться"; };
+badword all { word "скуреха"; };
+badword all { word "скурея"; };
+badword all { word "скуряга"; };
+badword all { word "скуряжничать"; };
+badword all { word "спиздить"; };
+badword all { word "срака"; };
+badword all { word "сраный"; };
+badword all { word "сранье"; };
+badword all { word "срать"; };
+badword all { word "срун"; };
+badword all { word "ссака"; };
+badword all { word "ссаки"; };
+badword all { word "ссать"; };
+badword all { word "старпер"; };
+badword all { word "*сука*"; };
+badword all { word "суходрочка"; };
+badword all { word "сцавинье"; };
+badword all { word "сцака"; };
+badword all { word "сцаки"; };
+badword all { word "сцание"; };
+badword all { word "сцать"; };
+badword all { word "сциха"; };
+badword all { word "сцуль"; };
+badword all { word "сцыха"; };
+badword all { word "сыкун"; };
+badword all { word " трахнутый "; };
+badword all { word "уеть"; };
+badword all { word "усраться"; };
+badword all { word "усцаться"; };
+badword all { word "фик"; };
+badword all { word "хезать"; };
+badword all { word "хер"; };
+badword all { word "херня"; };
+badword all { word "херовина"; };
+badword all { word "херовый"; };
+badword all { word "хитрожопый"; };
+badword all { word "хлюха"; };
+badword all { word "хуевина"; };
+badword all { word "хуевый"; };
+badword all { word " хуе "; };
+badword all { word "хуек"; };
+badword all { word "хуепромышленник"; };
+badword all { word "хуерик"; };
+badword all { word "хуесос"; };
+badword all { word "хуище"; };
+badword all { word "хуй"; };
+badword all { word "хуй"; };
+badword all { word "xуй"; };
+badword all { word "хyй"; };
+badword all { word "xyй"; };
+badword all { word "хуйня"; };
+badword all { word "хуйрик"; };
+badword all { word " хуя "; };
+badword all { word "хуякать"; };
+badword all { word "хуякнуть"; };
+badword all { word "целка"; };
+badword all { word " шалава "; };
+badword all { word "шлюха"; };
\ No newline at end of file
--- configure	Sat Jun 17 01:29:12 2006
+++ configure	Fri Dec  1 22:08:08 2006
@@ -309,7 +309,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RM CP TOUCH OPENSSLPATH INSTALL MAKER GMAKE GUNZIP PKGCONFIG IRCDLIBS MKPASSWDLIBS CPP EGREP ALLOCA STRTOUL CRYPTOLIB MODULEFLAGS HAVE_ZLIB URL IRCDDIR BINDIR FD_SETSIZE TREINCDIR TRELIBS CARESINCDIR CARESLIBDIR CARESLIBS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RM CP TOUCH OPENSSLPATH INSTALL MAKER GMAKE GUNZIP PKGCONFIG IRCDLIBS MKPASSWDLIBS CPP EGREP ALLOCA STRTOUL CRYPTOLIB MODULEFLAGS HAVE_ZLIB URL HAVE_ICONV IRCDDIR BINDIR FD_SETSIZE TREINCDIR TRELIBS CARESINCDIR CARESLIBDIR CARESLIBS LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -847,6 +847,7 @@
                           /usr/ssl /usr/pkg /usr/local /usr
   --enable-ziplinks       enable ziplinks will check /usr/local /usr /usr/pkg
   --enable-libcurl=DIR    enable libcurl (remote include) support
+  --enable-iconv=DIR      enable iconv (codepage changing) support
   --enable-dynamic-linking
                           Make the IRCd dynamically link shared objects rather
                           than statically
@@ -12165,6 +12166,47 @@
 
 fi;
 
+# Check whether --enable-iconv or --disable-iconv was given.
+if test "${enable_iconv+set}" = set; then
+  enableval="$enable_iconv"
+
+echo "$as_me:$LINENO: checking for iconv" >&5
+echo $ECHO_N "checking for iconv... $ECHO_C" >&6
+    for dir in $enableval /usr/local /usr /usr/pkg; do
+        iconvdir="$dir"
+        if test -f "$dir/include/iconv.h" ; then
+	   echo "$as_me:$LINENO: result: found in $iconvdir" >&5
+echo "${ECHO_T}found in $iconvdir" >&6
+            found_iconv="yes" ;
+           if test "$iconvdir" = "/usr" ; then
+	       CFLAGS="$CFLAGS -DWITH_ICONV" ;
+           else
+	       CFLAGS="$CFLAGS -I$iconvdir/include -DWITH_ICONV" ;
+           fi
+	    break ;
+        fi
+    done
+    if test x_$found_iconv != x_yes ; then
+       echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6
+       { echo "$as_me:$LINENO: WARNING: disabling iconv support" >&5
+echo "$as_me: WARNING: disabling iconv support" >&2;}
+    else
+       case `uname -s` in
+       *BSD*)
+           IRCDLIBS="$IRCDLIBS -liconv" ;
+          if test "$iconvdir" != "/usr" ; then
+               LDFLAGS="$LDFLAGS -L$iconvdir/lib" ;
+           fi
+           ;;
+       esac
+        HAVE_ICONV=yes
+
+    fi
+
+
+fi;
+
 # Check whether --enable-dynamic-linking or --disable-dynamic-linking was given.
 if test "${enable_dynamic_linking+set}" = set; then
   enableval="$enable_dynamic_linking"
@@ -13374,6 +13416,7 @@
 s,@MODULEFLAGS@,$MODULEFLAGS,;t t
 s,@HAVE_ZLIB@,$HAVE_ZLIB,;t t
 s,@URL@,$URL,;t t
+s,@HAVE_ICONV@,$HAVE_ICONV,;t t
 s,@IRCDDIR@,$IRCDDIR,;t t
 s,@BINDIR@,$BINDIR,;t t
 s,@FD_SETSIZE@,$FD_SETSIZE,;t t
--- doc/example.bg.conf	Sat Jun 17 01:29:14 2006
+++ doc/example.bg.conf	Fri Dec  1 21:31:59 2006
@@ -257,6 +257,7 @@
 
 listen         *:6697
 {
+	codepage "CP1251";
 	options
 	{
 		ssl;
@@ -264,8 +265,14 @@
 	};
 };
 
-listen         *:8067;
-listen         *:6667;
+listen         *:8067
+{
+	codepage "CP1251";
+}
+listen         *:6667
+{
+	codepage "CP1251";
+}
 
 /*
  * NEW: link {}
--- doc/example.conf	Sat Jun 17 01:29:14 2006
+++ doc/example.conf	Fri Dec  1 21:31:52 2006
@@ -32,13 +32,19 @@
  * You need at least the commands module and a cloaking module.
  */
 
-/* FOR *NIX, uncomment the following 2lines: */
+/* FOR *NIX, uncomment the following 3 lines: */
 //loadmodule "src/modules/commands.so";
 //loadmodule "src/modules/cloak.so";
+//loadmodule "src/modules/m_codepage.so";
+//loadmodule "src/modules/m_ircops.so";
+//loadmodule "src/modules/m_swhois.so";
 
-/* FOR Windows, uncomment the following 2 lines: */
+/* FOR Windows, uncomment the following 3 lines: */
 //loadmodule "modules/commands.dll";
 //loadmodule "modules/cloak.dll";
+//loadmodule "modules/m_codepage.dll";
+//loadmodule "modules/m_ircops.dll";
+//loadmodule "modules/m_swhois.dll";
 
 /*
  * You can also include other configuration files.
@@ -252,6 +258,7 @@
  */
 listen         *:6697
 {
+	codepage "CP1251";
 	options
 	{
 		ssl;
@@ -259,8 +266,14 @@
 	};
 };
 
-listen         *:8067;
-listen         *:6667;
+listen         *:8067
+{
+	codepage "CP1251";
+}
+listen         *:6667
+{
+	codepage "CP1251";
+}
 
 /* NOTE: If you are on an IRCd shell with multiple IP's you are
  *       likely to get 'Address already in use' errors in your log
@@ -733,6 +746,22 @@
 /* Server specific configuration */
 
 set {
+	codepage {
+		default "CP1251";
+		codepages {
+			CP1251;
+			KOI8-R;
+			UTF-8;
+			iso8859-5;
+		};
+	};
+
+	minnicklen 3;
+	
+	allowed-nickchars {
+		"windows-1251";
+	};
+
 	kline-address "set.this.email";
 	modes-on-connect "+ixw";
 	modes-on-oper	 "+xwgs";
@@ -795,3 +824,5 @@
  * 3) If you still have problems you can go irc.ircsystems.net #unreal-support,
  *    note that we require you to READ THE DOCUMENTATION and FAQ first!
  */
+
+include "modules.conf";
--- doc/example.de.conf	Sat Jun 17 01:29:14 2006
+++ doc/example.de.conf	Fri Dec  1 21:31:47 2006
@@ -253,6 +253,7 @@
  */
 listen         *:6697
 {
+	codepage "CP1251";
 	options
 	{
 		ssl;
@@ -260,8 +261,14 @@
 	};
 };
 
-listen         *:8067;
-listen         *:6667;
+listen         *:8067
+{
+	codepage "CP1251";
+}
+listen         *:6667
+{
+	codepage "CP1251";
+}
 
 /* ACHTUNG: Wird der IRCd auf einer Shell mit verschiedenen IP's ausgefьhrt, kann
  *          die Fehlermeldung 'Address already in use' ('Adresse wird schon benutzt')
@@ -723,6 +730,22 @@
 /* Server spezifische Configuration */
 
 set {
+	codepage {
+		default "CP1251";
+		codepages {
+			CP1251;
+			KOI8-R;
+			UTF-8;
+			iso8859-5;
+		};
+	};
+
+	minnicklen 3;
+	
+	allowed-nickchars {
+		"windows-1251";
+	};
+
 	kline-address "setze.diese.email";
 	modes-on-connect "+ixw";
 	modes-on-oper	 "+xwgs";
--- doc/example.fr.conf	Sat Jun 17 01:29:14 2006
+++ doc/example.fr.conf	Fri Dec  1 21:31:42 2006
@@ -254,6 +254,7 @@
  */
 listen         *:6697
 {
+	codepage "CP1251";
 	options
 	{
 		ssl;
@@ -261,8 +262,14 @@
 	};
 };
 
-listen         *:8067;
-listen         *:6667;
+listen         *:8067
+{
+	codepage "CP1251";
+}
+listen         *:6667
+{
+	codepage "CP1251";
+}
 
 /* NOTE: Si vous кtes sur un shell shell avec de multiples IP's vous кtes 
  *       susceptibles d'avoir l'erreur 'Address already in use' (adresse dйjа utilisйe) 
@@ -740,6 +747,22 @@
 /* Configuration spйcifique d'un serveur */
 
 set {
+	codepage {
+		default "CP1251";
+		codepages {
+			CP1251;
+			KOI8-R;
+			UTF-8;
+			iso8859-5;
+		};
+	};
+
+	minnicklen 3;
+	
+	allowed-nickchars {
+		"windows-1251";
+	};
+
 	kline-address "mettre.cet.email";
 	modes-on-connect "+ixw";
 	modes-on-oper	 "+xwgs";
--- doc/example.hu.conf	Sat Jun 17 01:29:14 2006
+++ doc/example.hu.conf	Fri Dec  1 21:31:35 2006
@@ -254,6 +254,7 @@
  */
 listen         *:6697
 {
+	codepage "CP1251";
 	options
 	{
 		ssl;
@@ -261,8 +262,14 @@
 	};
 };
 
-listen         *:8067;
-listen         *:6667;
+listen         *:8067
+{
+	codepage "CP1251";
+}
+listen         *:6667
+{
+	codepage "CP1251";
+}
 
 /* MEGJEGYZЙS: Ha egy tцbb IP cнmes IRCd shellen vagyunk, elхfordulhat, hogy
  *       "Address already in use" ("A cнm mбr hasznбlatban van") hibaьzeneteket
@@ -750,6 +757,22 @@
 /* Szerverszintы beбllнtбsok */
 
 set {
+	codepage {
+		default "CP1251";
+		codepages {
+			CP1251;
+			KOI8-R;
+			UTF-8;
+			iso8859-5;
+		};
+	};
+
+	minnicklen 3;
+	
+	allowed-nickchars {
+		"windows-1251";
+	};
+
 	kline-address "бllнtsuk.be.ezt.az.emailt";
 	modes-on-connect "+ixw";
 	modes-on-oper	 "+xwgs";
--- doc/example.nl.conf	Sat Jun 17 01:29:14 2006
+++ doc/example.nl.conf	Fri Dec  1 21:31:30 2006
@@ -256,6 +256,7 @@
  
 listen         *:6697
 {
+	codepage "CP1251";
 	options
 	{
 		ssl;
@@ -263,8 +264,14 @@
 	};
 };
 
-listen         *:8067;
-listen         *:6667;
+listen         *:8067
+{
+	codepage "CP1251";
+}
+listen         *:6667
+{
+	codepage "CP1251";
+}
 
 
 /* Opmerking: Als je een IRCd shell gebruikt met meerdere IPs, krijg
@@ -751,6 +758,22 @@
 /* Server gerelateerde configuratie */
 
 set {
+	codepage {
+		default "CP1251";
+		codepages {
+			CP1251;
+			KOI8-R;
+			UTF-8;
+			iso8859-5;
+		};
+	};
+
+	minnicklen 3;
+	
+	allowed-nickchars {
+		"windows-1251";
+	};
+
 	kline-address "stel.dit.adres.in";
 	modes-on-connect "+ixw";
 	modes-on-oper	 "+xwgs";
--- doc/example.ru.conf	Sat Jun 17 01:29:14 2006
+++ doc/example.ru.conf	Fri Dec  1 21:31:07 2006
@@ -254,6 +254,7 @@
  */
 listen         *:6697
 {
+	codepage "CP1251";
     options
     {
         ssl;
@@ -261,8 +262,14 @@
     };
 };
 
-listen         *:8067;
-listen         *:6667;
+listen         *:8067
+{
+	codepage "CP1251";
+}
+listen         *:6667
+{
+	codepage "CP1251";
+}
 
 /* ЗАМЕЧАНИЕ: Если вы используете шелл IRCd, где несколько IP адресов, вы можете получить сообщение типа
  *            'Address already in use', ошибки в вашем лог-файле и ircd не запустится.
@@ -697,6 +704,22 @@
 
 /* Конфигурация Сети */
 set {
+	codepage {
+		default "CP1251";
+		codepages {
+			CP1251;
+			KOI8-R;
+			UTF-8;
+			iso8859-5;
+		};
+	};
+
+	minnicklen 3;
+	
+	allowed-nickchars {
+		"windows-1251";
+	};
+
     network-name         "ROXnet";
     default-server         "irc.roxnet.org";
     services-server     "services.roxnet.org";
--- doc/modules.conf	Thu Jan  1 06:00:00 1970
+++ doc/modules.conf	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,35 @@
+loadmodule "modules/operpasswd.so";
+loadmodule "modules/m_operSSL.so";
+loadmodule "modules/randquote.so";
+loadmodule "modules/nocolorumode.so";
+loadmodule "modules/m_antidccbug.so";
+loadmodule "modules/callerid.so";
+loadmodule "modules/m_regexcept.so";
+loadmodule "modules/textban.so";
+
+operpasswd
+{
+    /*
+	 * With these directives you can enable or disable specific
+	 * features this module provides. Values "yes", "on", "true",
+     * "1" means the feature is enabled, others mean not.
+     */		
+    enable-snomask yes;	/* snomask +O */
+    enable-logging yes;	/* uses log flag "oper" */
+	enable-global-notices yes;
+    max-failed-operups 3;
+};
+				    
+operssl
+{
+	enable yes;
+    enable-snomask yes;	/* snomask +o */
+	enable-logging yes;	/* uses log flag "oper" */
+    enable-global-notices yes;
+	max-failed-operups 3;
+};
+
+randquote
+{
+    on_connect yes;
+};
--- include/common.h	Sat Jun 17 01:29:14 2006
+++ include/common.h	Wed Nov 29 11:16:45 2006
@@ -175,16 +175,17 @@
 #undef isspace
 #undef iscntrl
 #endif
-extern MODVAR unsigned char char_atribs[];
+extern MODVAR unsigned short char_atribs[];
 
-#define PRINT 1
-#define CNTRL 2
-#define ALPHA 4
-#define PUNCT 8
-#define DIGIT 16
-#define SPACE 32
-#define ALLOW 64
-#define ALLOWN 128
+#define PRINT    0x001
+#define CNTRL    0x002
+#define ALPHA    0x004
+#define PUNCT    0x008
+#define DIGIT    0x010
+#define SPACE    0x020
+#define ALLOW    0x040
+#define ALLOWN   0x080
+#define HICHAR   0x100
 
 #ifndef KLINE_TEMP
 #define KLINE_PERM 0
@@ -198,8 +199,8 @@
 #define	iscntrl(c) (char_atribs[(u_char)(c)]&CNTRL)
 #define isalpha(c) (char_atribs[(u_char)(c)]&ALPHA)
 #define isspace(c) (char_atribs[(u_char)(c)]&SPACE)
-#define islower(c) ((char_atribs[(u_char)(c)]&ALPHA) && ((u_char)(c) > 0x5f))
-#define isupper(c) ((char_atribs[(u_char)(c)]&ALPHA) && ((u_char)(c) < 0x60))
+#define islower(c) ((char_atribs[(u_char)(c)]&ALPHA) && (!(char_atribs[(u_char)(c)]&HICHAR)))
+#define isupper(c) ((char_atribs[(u_char)(c)]&ALPHA) && (char_atribs[(u_char)(c)]&HICHAR))
 #define isdigit(c) (char_atribs[(u_char)(c)]&DIGIT)
 #define	isxdigit(c) (isdigit(c) || ('a' <= (c) && (c) <= 'f') || \
 		     ('A' <= (c) && (c) <= 'F'))
--- include/config.h	Sat Jun 17 01:29:14 2006
+++ include/config.h	Fri Dec  1 22:48:22 2006
@@ -619,5 +619,8 @@
 # define SOCK_LEN_TYPE int
 #endif
 
+#define USE_SPACES_IN_NICKS
+#define USE_MINNICKLEN
+
 #endif				/* __config_include__ */
 
--- include/dynconf.h	Sat Jun 17 01:29:14 2006
+++ include/dynconf.h	Fri Dec  1 22:38:40 2006
@@ -83,6 +83,10 @@
 	unsigned allow_part_if_shunned:1;
 	unsigned check_target_nick_bans:1;
 	unsigned use_egd;
+#ifdef WITH_ICONV
+	char *default_codepage;
+	ConfigItem_codepage *cp;
+#endif
 	long host_timeout;
 	int  host_retries;
 	char *name_server;
@@ -104,6 +108,9 @@
 	int  maxchannelsperuser;
 	int  maxdccallow;
 	int  anti_spam_quit_message_time;
+ #ifdef USE_MINNICKLEN
+ 	int  minnicklen;
+ #endif
 	char *egd_path;
 	char *static_quit;
 	char *static_part;
@@ -256,11 +263,17 @@
 
 #define MAXBANS		iConf.maxbans
 #define MAXBANLENGTH	iConf.maxbanlength
+#ifdef USE_MINNICKLEN
+#define MINNICKLEN			iConf.minnicklen
+#endif
 
 #define TIMESYNCH	iConf.timesynch_enabled
 #define TIMESYNCH_TIMEOUT	iConf.timesynch_timeout
 #define TIMESYNCH_SERVER	iConf.timesynch_server
 
+#ifdef WITH_ICONV
+#define	DEFAULT_CODEPAGE iConf.default_codepage
+#endif
 
 /* Used for "is present?" and duplicate checking */
 struct SetCheck {
@@ -300,6 +313,14 @@
 	unsigned has_egd_path:1;
 	unsigned has_static_quit:1;
 	unsigned has_static_part:1;
+#ifdef USE_MINNICKLEN
+	unsigned has_minnicklen:1;
+#endif
+#ifdef WITH_ICONV
+	unsigned has_codepage:1;
+	unsigned has_cp_default:1;
+	unsigned has_cplist:1;
+#endif
 #ifdef USE_SSL
 	unsigned has_ssl_certificate:1;
 	unsigned has_ssl_key:1;
--- include/h.h	Sat Jun 17 01:29:14 2006
+++ include/h.h	Fri Dec  1 23:34:12 2006
@@ -130,6 +130,9 @@
 ConfigItem_deny_channel *Find_channel_allowed(char *name);
 ConfigItem_alias	*Find_alias(char *name);
 ConfigItem_help 	*Find_Help(char *command);
+#ifdef WITH_ICONV 
+ConfigItem_codepage	*Find_codepage(char *name);
+#endif
 int			AllowClient(aClient *cptr, struct hostent *hp, char *sockhost, char *username);
 int parse_netmask(const char *text, struct irc_netmask *netmask);
 int match_ip(struct IN_ADDR addr, char *uhost, char *mask, struct irc_netmask *netmask);
@@ -756,6 +759,8 @@
 extern void charsys_reset(void);
 extern void charsys_addmultibyterange(char s1, char e1, char s2, char e2);
 extern void charsys_addallowed(char *s);
+extern void charsys_addtolower(char *s, char *l);
+extern void charsys_addtoupper(char *s, char *l);
 extern void charsys_reset(void);
 extern MODVAR char langsinuse[4096];
 extern MODVAR aTKline *tklines[TKLISTLEN];
--- include/msg.h	Sat Jun 17 01:29:14 2006
+++ include/msg.h	Fri Dec  1 22:10:28 2006
@@ -297,6 +297,13 @@
 #define MSG_EOS		"EOS"
 #define TOK_EOS		"ES"
 
+#ifdef WITH_ICONV
+#define MSG_CODEPAGE 	"CODEPAGE"
+#define TOK_CODEPAGE 	"CP"
+#define MSG_CODEPAGES 	"CODEPAGES"
+#define TOK_CODEPAGES 	"CPS"
+#endif
+
 #define MAXPARA    	15
 
 extern int m_error();
--- include/numeric.h	Sat Jun 17 01:29:14 2006
+++ include/numeric.h	Fri Dec  1 22:10:49 2006
@@ -358,6 +358,14 @@
 
 #define RPL_WHOISSECURE      671
 
+#ifdef WITH_ICONV
+#define RPL_CODEPAGE         700
+#define RPL_CODEPAGES        701
+#define RPL_ENDOFCODEPAGES   702
+#define RPL_WHOISSCHEME      703
+#define RPL_STATSCODEPAGE    704
+#endif
+
 #define ERR_CANNOTDOCOMMAND 972
 #define ERR_CANNOTCHANGECHANMODE 974
 #define ERR_NUMERICERR       999
--- include/struct.h	Sat Jun 17 01:29:14 2006
+++ include/struct.h	Fri Dec  1 23:13:43 2006
@@ -124,6 +124,9 @@
 typedef struct _configitem_include ConfigItem_include;
 typedef struct _configitem_help ConfigItem_help;
 typedef struct _configitem_offchans ConfigItem_offchans;
+#ifdef WITH_ICONV
+typedef struct _configitem_codepage ConfigItem_codepage;
+#endif
 typedef struct liststruct ListStruct;
 
 #define CFG_TIME 0x0001
@@ -671,7 +674,7 @@
 #define	DEBUG_LIST  10		/* debug list use */
 
 /* blah */
-#define IsSkoAdmin(sptr) (IsAdmin(sptr) || IsNetAdmin(sptr) || IsSAdmin(sptr))
+#define IsSkoAdmin(sptr) (IsAdmin(sptr) || IsNetAdmin(sptr) || IsSAdmin(sptr) || IsCoAdmin(sptr))
 
 /*
  * defines for curses in client
@@ -933,6 +936,9 @@
 	char info[REALLEN + 1];	/* Free form additional client information */
 	aClient *srvptr;	/* Server introducing this.  May be &me */
 	short status;		/* client type */
+#ifdef WITH_ICONV
+	char *codepage;		/* Codepage */
+#endif
 	/*
 	   ** The following fields are allocated only for local clients
 	   ** (directly connected to *this* server with a socket.
@@ -1179,6 +1185,9 @@
 	ConfigItem 	*prev, *next;
 	ConfigFlag 	flag;
 	char		*ip;
+#ifdef WITH_ICONV
+	char		*codepage;
+#endif
 	int		port;
 	int		options, clients;
 	aClient		*listener;
@@ -1353,6 +1362,14 @@
 	char *format, *parameters;
 	regex_t expr;
 };
+
+#ifdef WITH_ICONV
+struct _configitem_codepage {
+	ConfigItem *prev, *next;
+	ConfigFlag flag;
+	char *name;
+};
+#endif
 
 #define INCLUDE_NOTLOADED  0x1
 #define INCLUDE_REMOTE     0x2
--- include/version.h	Sat Jun 17 01:29:14 2006
+++ include/version.h	Wed Nov 29 11:18:34 2006
@@ -52,7 +52,7 @@
 #define PATCH1  		"3"
 #define PATCH2  		".2"
 #define PATCH3  		".5"
-#define PATCH4  		""
+#define PATCH4  		"-rus"
 #define PATCH5  		""
 #define PATCH6  		""
 #define PATCH7  		""
--- locales/belarussian-w1251	Thu Jan  1 06:00:00 1970
+++ locales/belarussian-w1251	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,5 @@
+xC0 xC1 xC2 xC3 xC4 xC5 xC6 xC7 xC8 xC9 xCA xCB xCC xCD xCE xCF xD0 xD1 xD2 xD3 xD4 xD5 xD6 xD7 xD8 xD9 xDA xDB xDC xDD xDE xDF xE0 xE1 xE2 xE3 xE4 xE5 xE6 xE7 xE8 xE9 xEA xEB xEC xED xEE xEF xF0 xF1 xF2 xF3 xF4 xF5 xF6 xF7 xF8 xF9 xFA xFB xFC xFD xFE xFF xA8 xB8 xA1 xA2 xB2 xB3
+
+.ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮЁЎІ
+0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa,0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14,0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,0x1e, 0x1f,' ', '!', '"', '#', '$', '%', '&', 0x27, '(', ')','*', '+', ',', '-', '.', '/','0', '1', '2', '3', '4', '5', '6', '7', '8', '9',':', ';', '<', '=', '>', '?','@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i','j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's','t', 'u', 'v', 'w', 'x', 'y', 'z', '[', '\\', ']', '^','_','`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i','j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's','t', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~',0x7f,0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,0xa0, 'y', 'y', 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xb8, 0xa9,0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,0xb0, 0xb1, 'i', 'i', 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9,0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 'a', 0xe1,  'b', 0xe3, 0xe4,  'e', 0xe6,  '3', 0xe8, 0xe9, 'k', 0xeb,  'm',  'h',  'o', 0xef, 'p',  'c',  't',  'y', 0xf4,  'x', 0xf6, 0xf7, 0xf8, 0xf9,0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 'a', 0xe1,  'b', 0xe3, 0xe4,  'e', 0xe6,  '3', 0xe8, 0xe9, 'k', 0xeb,  'm',  'h',  'o', 0xef, 'p',  'c',  't',  'y', 0xf4,  'x', 0xf6, 0xf7, 0xf8, 0xf9,0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
+0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa,0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14,0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,0x1e, 0x1f,' ', '!', '"', '#', '$', '%', '&', 0x27, '(', ')','*', '+', ',', '-', '.', '/','0', '1', '2', '3', '4', '5', '6', '7', '8', '9',':', ';', '<', '=', '>', '?','@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I','J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S','T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^',0x5f,'`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I','J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S','T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~',0x7f,0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,0xa0, 'Y', 'Y', 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xb8, 0xa9,0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,0xb0, 0xb1, 'I', 'I', 0xb4, 0xb5, 0xb6, 0xb7, 0xa8, 0xb9,0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 'A', 0xc1,  'B', 0xc3, 0xc4,  'E', 0xc6, '3', 0xc8, 0xc9, 'K', 0xcb,  'M',  'H',  'O', 0xcf, 'P',  'C',  'T',  'Y', 0xd4,  'X', 0xd6, 0xd7, 0xd8, 0xd9,0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 'A', 0xc1,  'B', 0xc3, 0xc4,  'E', 0xc6,  '3', 0xc8, 0xc9, 'K', 0xcb,  'M',  'H',  'O', 0xcf, 'P',  'C',  'T',  'Y', 0xd4,  'X', 0xd6, 0xd7, 0xd8, 0xd9,0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf
\ No newline at end of file
--- locales/catalan	Thu Jan  1 06:00:00 1970
+++ locales/catalan	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xE0 xC0 xE8 xC8 xE9 xC9 xED xCD xF2 xD2 xF3 xD3 xFA xDA xEF xCF xFC xDC
+
+
+
--- locales/chinese	Thu Jan  1 06:00:00 1970
+++ locales/chinese	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+
+xA4 xA4 xA1 xF3 xA5 xA5 xA1 xF6 xB0 xD6 xA1 xFE xD7 xD7 xA1 xF9 xD8 xF7 xA1 xFE x81 xA0 x40 x7E x81 xA0 x80 xFE xAA xFE x40 x7E xAA xFE x80 xA0
+
+
--- locales/chinese-ja	Thu Jan  1 06:00:00 1970
+++ locales/chinese-ja	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+
+xA4 xA4 xA1 xF3 xA5 xA5 xA1 xF6
+
+
--- locales/chinese-simp	Thu Jan  1 06:00:00 1970
+++ locales/chinese-simp	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+
+xB0 xD6 xA1 xFE xD7 xD7 xA1 xF9 xD8 xF7 xA1 xFE
+
+
--- locales/chinese-trad	Thu Jan  1 06:00:00 1970
+++ locales/chinese-trad	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+
+x81 xA0 x40 x7E x81 xA0 x80 xFE xAA xFE x40 x7E xAA xFE x80 xA0
+
+
--- locales/czech-w1250	Thu Jan  1 06:00:00 1970
+++ locales/czech-w1250	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+x8A x8D x8E x9A x9D x9E xC1 xC8 xC9 xCC xF8 xF9 xFA xFD x22 x29 x3B x0A x09 x7D x0A x09 x69 x66 x20 x28 xF8 xF9 xFA xFD
+
+
+
--- locales/danish	Thu Jan  1 06:00:00 1970
+++ locales/danish	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xE6 xC6 xE5 xC5 xF8 xD8
+
+
+
--- locales/dutch	Thu Jan  1 06:00:00 1970
+++ locales/dutch	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xE9 xEB xF6 xEF xFC xE8
+
+
+
--- locales/french	Thu Jan  1 06:00:00 1970
+++ locales/french	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xC0 xC2 xE0 xE2 xC7 xE7 xC8 xC9 xCA xCB xE8 xE9 xEA xEB xCE xCF xEE xEF xD4 xF4 xD9 xDB xDC xF9 xFB xFC xFF
+
+
+
--- locales/gbk	Thu Jan  1 06:00:00 1970
+++ locales/gbk	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+
+xA4 xA4 xA1 xF3 xA5 xA5 xA1 xF6 xB0 xD6 xA1 xFE xD7 xD7 xA1 xF9 xD8 xF7 xA1 xFE x81 xA0 x40 x7E x81 xA0 x80 xFE xAA xFE x40 x7E xAA xFE x80 xA0
+
+
--- locales/german	Thu Jan  1 06:00:00 1970
+++ locales/german	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xE4 xC4 xF6 xD6 xFC xDC xDF
+
+
+
--- locales/greek	Thu Jan  1 06:00:00 1970
+++ locales/greek	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+x22 xB6 xB8 xB9 xBA xBC xBE xBF xC0 xC1 xC2 xC3 xC4 xC5 xC6 xC7 xC8 xC9 xCA xCB xCC xCD xCE xCF xD0 xD1 xD3 xD4 xD5 xD6 xD7 xD8 xD9 xDA xDB xDC xDD xDE xDF xE0 xE1 xE2 xE3 xE4 xE5 xE6 xE7 xE8 xE9 xEA xEB xEC xED xEE xEF xF0 xF1 xF2 xF3 xF4
+
+
+
--- locales/hebrew	Thu Jan  1 06:00:00 1970
+++ locales/hebrew	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xE0 xE1 xE2 xE3 xE4 xE5 xE6 xE7 xE8 xE9 xEA xEB xEC xED xEE xEF xF0 xF1 xF2 xF3 xF4 xF5 xF6 xF7 xF8 xF9 xFA xFB xFC xFD xFE
+
+
+
--- locales/hungarian	Thu Jan  1 06:00:00 1970
+++ locales/hungarian	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xE1 xE9 xED xF3 xF6 xF5 xFA xFC xFB xC1 xC9 xCD xD3 xD6 xD5 xDA xDC xDB
+
+
+
--- locales/icelandic	Thu Jan  1 06:00:00 1970
+++ locales/icelandic	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xC6 xE6 xD6 xF6 xC1 xE1 xCD xED xD0 xF0 xDA xFA xD3 xF3 xDD xFD xDE xFE
+
+
+
--- locales/italian	Thu Jan  1 06:00:00 1970
+++ locales/italian	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xC0 xC8 xC9 xCC xCD xD2 xD3 xD9 xDA xE0 xE8 xE9 xEC xED xF2 xF3 xF9 xFA
+
+
+
--- locales/latin1	Thu Jan  1 06:00:00 1970
+++ locales/latin1	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xE4 xC4 xF6 xD6 xFC xDC xDF xE4 xC4 xF6 xD6 xFC xDC xE9 xEB xF6 xEF xFC xE8 xE6 xC6 xE5 xC5 xF8 xD8 xC0 xC2 xE0 xE2 xC7 xE7 xC8 xC9 xCA xCB xE8 xE9 xEA xEB xCE xCF xEE xEF xD4 xF4 xD9 xDB xDC xF9 xFB xFC xFF xE1 xC1 xE9 xC9 xED xCD xF3 xD3 xFA xDA xFC xDC xF1 xD1 xC0 xC8 xC9 xCC xCD xD2 xD3 xD9 xDA xE0 xE8 xE9 xEC xED xF2 xF3 xF9 xFA xC0 xC8 xC9 xCC xCD xD2 xD3 xD9 xDA xE0 xE8 xE9 xEC xED xF2 xF3 xF9 xFA xE0 xC0 xE8 xC8 xE9 xC9 xED xCD xF2 xD2 xF3 xD3 xFA xDA xEF xCF xFC xDC xE5 xC5 xE4 xC4 xF6 xD6 xC6 xE6 xD6 xF6 xC1 xE1 xCD xED xD0 xF0 xDA xFA xD3 xF3 xDD xFD xDE xFE
+
+
+
--- locales/latin2	Thu Jan  1 06:00:00 1970
+++ locales/latin2	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xE1 xE9 xED xF3 xF6 xF5 xFA xFC xFB xC1 xC9 xCD xD3 xD6 xD5 xDA xDC xDB xAA xBA xC2 xC3 xCE xDE xE2 xE3 xEE xFE xB1 xE6 xEA xB3 xF1 xF3 xB6 xBF xBC xA1 xC6 x77 x65 x64 x28
+
+
+
--- locales/polish	Thu Jan  1 06:00:00 1970
+++ locales/polish	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xB1 xE6 xEA xB3 xF1 xF3 xB6 xBF xBC xA1 xC6 x77 x65 x64 x28
+
+
+
--- locales/polish-w1250	Thu Jan  1 06:00:00 1970
+++ locales/polish-w1250	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xB9 xE6 xEA xB3 xF1 xF3 x9C xBF x9F xA5 xC6 xCA xA3 xD1 xD3 x8C xAF x8F
+
+
+
--- locales/readme.txt	Thu Jan  1 06:00:00 1970
+++ locales/readme.txt	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,27 @@
+Here you can find locales configuration files.
+
+Each file consists of five lines:
+1: List of additional allowed charachters
+
+2: List of additional allowed multibyte charachters ranges. In form: Sa_1 Ea_1 Sa_2 Ea_2 Sb_1 Eb_1 Sb_2 Eb_2... Total numbers count should be dividend of 4
+   Sx_1 Start of highest byte
+   Ex_1 End of highest byte
+   Sx_2 Start of lowest byte
+   Ex_2 End of lowest byte
+
+3: List of additional charachters that should be treated as upper-case
+
+4: 255 charachters table - to-lower case conversion table. Can be usefull for example for comparing nicknames that contains similar-looking charachters with +
+5: 255 charachters table - to-upper case conversion table. Can be usefull for example for comparing nicknames that contains similar-looking charachters with +
+Each line can be list of charachters or decimal/hexadecimal codes divided by spaces or commas in form like:
+x01 x02 x03...
+or
+'a', 'b', 'c'
+or combined:
+x01, \x02 'a', 'b', \10, 'c',
+
+It is also possible to write plain-text line of charachters. In this case it should begin by . (dot) charachter. For example:
+.abcdefABCDEF23432*&^*
+In this case every charachter of line except first dot specifies one charachter-code for table
--- locales/romanian	Thu Jan  1 06:00:00 1970
+++ locales/romanian	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xAA xBA xC2 xC3 xCE xDE xE2 xE3 xEE xFE
+
+
+
--- locales/russian-w1251	Thu Jan  1 06:00:00 1970
+++ locales/russian-w1251	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,5 @@
+xA0 xC0 xC1 xC2 xC3 xC4 xC5 xC6 xC7 xC8 xC9 xCA xCB xCC xCD xCE xCF xD0 xD1 xD2 xD3 xD4 xD5 xD6 xD7 xD8 xD9 xDA xDB xDC xDD xDE xDF xE0 xE1 xE2 xE3 xE4 xE5 xE6 xE7 xE8 xE9 xEA xEB xEC xED xEE xEF xF0 xF1 xF2 xF3 xF4 xF5 xF6 xF7 xF8 xF9 xFA xFB xFC xFD xFE xFF xA8 xB8
+
+.ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮЁ
+0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, ' ', '!', '"', '#', '$', '%', '&', 0x27, '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xb8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 'a', 0xe1,  'b', 0xe3, 0xe4,  'e', 0xe6,  '3', 0xe8, 0xe9, 'k', 0xeb,  'm',  'h',  'o', 0xef, 'p',  'c',  't',  'y', 0xf4,  'x', 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 'a', 0xe1,  'b', 0xe3, 0xe4,  'e', 0xe6,  '3', 0xe8, 0xe9, 'k', 0xeb,  'm',  'h',  'o', 0xef, 'p',  'c',  't',  'y', 0xf4,  'x', 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
+0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, ' ', '!', '"', '#', '$', '%', '&', 0x27, '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^',0x5f, '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~',0x7f,0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9,0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xa8, 0xb9,0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 'A', 0xc1,  'B', 0xc3, 0xc4,  'E', 0xc6, '3', 0xc8, 0xc9, 'K', 0xcb,  'M',  'H',  'O', 0xcf, 'P',  'C',  'T',  'Y', 0xd4,  'X', 0xd6, 0xd7, 0xd8, 0xd9,0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 'A', 0xc1,  'B', 0xc3, 0xc4,  'E', 0xc6,  '3', 0xc8, 0xc9, 'K', 0xcb, 'M', 'H', 'O', 0xcf, 'P', 'C',  'T',  'Y', 0xd4,  'X', 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf
--- locales/slovak-w1250	Thu Jan  1 06:00:00 1970
+++ locales/slovak-w1250	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+x8A x8D x8E x9A x9D x9E xBC xBE xC0 xC1 xC4 xC5 xC8 xC9 xCD xCF xE0 xE1 xE4 xE5 xE8 xE9 xED xEF xF2 xF3 xF4 xFA xFD
+
+
+
--- locales/spanish	Thu Jan  1 06:00:00 1970
+++ locales/spanish	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xE1 xC1 xE9 xC9 xED xCD xF3 xD3 xFA xDA xFC xDC xF1 xD1
+
+
+
--- locales/swedish	Thu Jan  1 06:00:00 1970
+++ locales/swedish	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xE5 xC5 xE4 xC4 xF6 xD6
+
+
+
--- locales/swiss-german	Thu Jan  1 06:00:00 1970
+++ locales/swiss-german	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xE4 xC4 xF6 xD6 xFC xDC
+
+
+
--- locales/turkish	Thu Jan  1 06:00:00 1970
+++ locales/turkish	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xF6 xD6 xE7 xC7 xFE xDE xFC xDC xF0 xD0 x42
+
+
+
--- locales/ukrainian-w1251	Thu Jan  1 06:00:00 1970
+++ locales/ukrainian-w1251	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xC0 xC1 xC2 xC3 xC4 xC5 xC6 xC7 xC8 xC9 xCA xCB xCC xCD xCE xCF xD0 xD1 xD2 xD3 xD4 xD5 xD6 xD7 xD8 xD9 xDA xDB xDC xDD xDE xDF xE0 xE1 xE2 xE3 xE4 xE5 xE6 xE7 xE8 xE9 xEA xEB xEC xED xEE xEF xF0 xF1 xF2 xF3 xF4 xF5 xF6 xF7 xF8 xF9 xFA xFB xFC xFD xFE xFF xA8 xB8 xB2 xB3 xAA xBA xAF xBF
+
+
+
--- locales/windows-1250	Thu Jan  1 06:00:00 1970
+++ locales/windows-1250	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xE1 xE9 xED xF3 xF6 xF5 xFA xFC xFB xC1 xC9 xCD xD3 xD6 xD5 xDA xDC xDB xAA xBA xC2 xC3 xCE xDE xE2 xE3 xEE xFE xB9 xE6 xEA xB3 xF1 xF3 x9C xBF x9F xA5 xC6 xCA xA3 xD1 xD3 x8C xAF x8F x8A x8D x8E x9A x9D x9E xC1 xC8 xC9 xCC xF8 xF9 xFA xFD x22 x29 x3B x0A x09 x7D x0A x09 x69 x66 x20 x28 xF8 xF9 xFA xFD x8A x8D x8E x9A x9D x9E xBC xBE xC0 xC1 xC4 xC5 xC8 xC9 xCD xCF xE0 xE1 xE4 xE5 xE8 xE9 xED xEF xF2 xF3 xF4 xFA xFD
+
+
+
--- locales/windows-1251	Thu Jan  1 06:00:00 1970
+++ locales/windows-1251	Wed Nov 29 11:16:45 2006
@@ -0,0 +1,4 @@
+xC0 xC1 xC2 xC3 xC4 xC5 xC6 xC7 xC8 xC9 xCA xCB xCC xCD xCE xCF xD0 xD1 xD2 xD3 xD4 xD5 xD6 xD7 xD8 xD9 xDA xDB xDC xDD xDE xDF xE0 xE1 xE2 xE3 xE4 xE5 xE6 xE7 xE8 xE9 xEA xEB xEC xED xEE xEF xF0 xF1 xF2 xF3 xF4 xF5 xF6 xF7 xF8 xF9 xFA xFB xFC xFD xFE xFF xA8 xB8
+
+
+
--- makefile.win32	Sat Jun 17 01:29:14 2006
+++ makefile.win32	Fri Dec  1 23:08:23 2006
@@ -29,12 +29,12 @@
 #
 #
 #To enable ziplinks uncomment the next line:
-#USE_ZIPLINKS=1
+USE_ZIPLINKS=1
 #
 #If your zlib library and include files are not in your compiler's
 #default locations, specify the locations here:
-#ZLIB_INC_DIR="c:\dev\zlib"
-#ZLIB_LIB_DIR="c:\dev\zlib\dll32"
+ZLIB_INC_DIR=..\..\zlib-1.2.3
+ZLIB_LIB_DIR=..\..\zlib-1.2.3\contrib\vstudio\vc8\x86\ZlibDllRelease\
 #
 #
 ###### END ZIPLINKS ######
@@ -44,16 +44,31 @@
 #
 #
 #To enable SSL uncomment the next line:
-#USE_SSL=1
+USE_SSL=1
 #
 #If your OpenSSL library and include files are not in your compiler's
 #default locations, specify the locations here:
-#OPENSSL_INC_DIR="c:\openssl\include"
-#OPENSSL_LIB_DIR="c:\openssl\lib"
+OPENSSL_INC_DIR=..\..\openssl-0.9.8d\inc32
+OPENSSL_LIB_DIR=..\..\openssl-0.9.8d\out32dll
 #
 #
 ######### END SSL ########
 
+##### ICONV SUPPORT ######
+#To enable ICONV support you must have libiconv installed on your system
+#
+#
+#To enable ICONV uncomment the next line:
+USE_ICONV=1
+#
+#If your ICONV library and include files are not in your compiler's
+#default locations, specify the locations here:
+ICONV_INC_DIR=..\..\libiconv-1.9.1\include
+ICONV_LIB_DIR=..\..\libiconv-1.9.1\lib
+#
+#
+####### END ICONV ########
+
 ###### _EXTRA_ DEBUGGING #####
 # We always build releases with debugging information, since otherwise
 # we cannot trace the source of a crash. Plus we do not mind the extra
@@ -108,6 +123,17 @@
 !ENDIF
 !ENDIF
 
+!IFDEF USE_ICONV
+ICONVCFLAGS=/D WITH_ICONV
+ICONVLIB=iconv.lib
+!IFDEF ICONV_INC_DIR
+ICONV_INC=/I "$(ICONV_INC_DIR)"
+!ENDIF
+!IFDEF ICONV_LIB_DIR
+ICONV_LIB=/LIBPATH:"$(ICONV_LIB_DIR)"
+!ENDIF
+!ENDIF
+
 !IFDEF DEBUGEXTRA
 DBGCFLAG=/MDd /Zi /Od
 DBGLFLAG=/debug
@@ -119,17 +145,17 @@
 !ENDIF 
 
 FD_SETSIZE=/D FD_SETSIZE=16384
-CFLAGS=$(DBGCFLAG) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /J /I ./INCLUDE /I ./INCLUDE/WIN32/ARES /Fosrc/ /nologo \
- $(ZIPCFLAGS) $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) $(NS_ADDRESS) /D NOSPOOF=1 /c /D _CRT_SECURE_NO_DEPRECATE /D _USE_32BIT_TIME_T
+CFLAGS=$(DBGCFLAG) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) $(ICONV_INC) /J /I ./INCLUDE /I ./INCLUDE/WIN32/ARES /Fosrc/ /nologo \
+ $(ZIPCFLAGS) $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) $(ICONVCFLAGS) $(NS_ADDRESS) /D NOSPOOF=1 /c /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _USE_32BIT_TIME_T
 LFLAGS=kernel32.lib user32.lib gdi32.lib shell32.lib ws2_32.lib advapi32.lib \
  dbghelp.lib oldnames.lib comctl32.lib comdlg32.lib $(ZLIB_LIB) $(ZIPLIB) \
- $(OPENSSL_LIB) $(SSLLIBS) $(LIBCURL_LIB) $(CURLLIB) /def:wircd.def /implib:wircd.lib \
+ $(OPENSSL_LIB) $(SSLLIBS) $(LIBCURL_LIB) $(CURLLIB) $(ICONV_LIB) $(ICONVLIB) /def:wircd.def /implib:wircd.lib \
  /nologo $(DBGLFLAG) /out:WIRCD.EXE
-MODCFLAGS=$(MODDBGCFLAG) $(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) /J /Fesrc/modules/ \
- /Fosrc/modules/ /nologo $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /I ./INCLUDE /D \
- DYNAMIC_LINKING /D NOSPOOF /D MODULE_COMPILE /D _CRT_SECURE_NO_DEPRECATE /D _USE_32BIT_TIME_T
+MODCFLAGS=$(MODDBGCFLAG) $(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) $(ICONVCFLAGS) /J /Fesrc/modules/ \
+ /Fosrc/modules/ /nologo $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) $(ICONV_INC) /I ./INCLUDE /D \
+ DYNAMIC_LINKING /D NOSPOOF /D MODULE_COMPILE /D _CRT_SECURE_NO_DEPRECATE /D _USE_32BIT_TIME_T /D _CRT_NONSTDC_NO_DEPRECATE
 MODLFLAGS=/link /def:src/modules/module.def wircd.lib $(OPENSSL_LIB) $(SSLLIBS) \
- $(ZLIB_LIB) $(ZIPLIB) $(LIBCURL_LIB) $(CURLLIB)
+ $(ZLIB_LIB) $(ZIPLIB) $(LIBCURL_LIB) $(CURLLIB) $(ICONV_LIB) $(ICONVLIB)
 
 INCLUDES=./include/struct.h ./include/config.h ./include/sys.h \
  ./include/common.h ./include/version.h ./include/h.h ./include/numeric.h \
@@ -183,7 +209,7 @@
  SRC/MODULES/M_NICK.C SRC/MODULES/M_USER.C SRC/MODULES/M_MODE.C \
  SRC/MODULES/M_WATCH.C SRC/MODULES/M_PART.C SRC/MODULES/M_JOIN.C \
  SRC/MODULES/M_MOTD.C SRC/MODULES/M_OPERMOTD.C SRC/MODULES/M_BOTMOTD.C \
- SRC/MODULES/M_LUSERS.C SRC/MODULES/M_NAMES.C
+ SRC/MODULES/M_LUSERS.C SRC/MODULES/M_NAMES.C SRC/MODULES/M_CODEPAGE.C
 
 DLL_FILES=SRC/MODULES/M_CHGHOST.DLL SRC/MODULES/M_SDESC.DLL SRC/MODULES/M_SETIDENT.DLL \
  SRC/MODULES/M_SETNAME.DLL SRC/MODULES/M_SETHOST.DLL SRC/MODULES/M_CHGIDENT.DLL \
@@ -219,7 +245,11 @@
  SRC/MODULES/M_WATCH.DLL SRC/MODULES/M_PART.DLL SRC/MODULES/M_JOIN.DLL \
  SRC/MODULES/M_MOTD.DLL SRC/MODULES/M_OPERMOTD.DLL SRC/MODULES/M_BOTMOTD.DLL \
  SRC/MODULES/M_LUSERS.DLL SRC/MODULES/M_NAMES.DLL \
- SRC/MODULES/CLOAK.DLL
+ SRC/MODULES/CLOAK.DLL \
+ SRC/MODULES/M_OPERSSL.DLL SRC/MODULES/IDENTONLY.DLL SRC/MODULES/M_ANTIDCCBUG.DLL \
+ SRC/MODULES/M_CODEPAGE.DLL SRC/MODULES/M_IRCOPS.DLL SRC/MODULES/NOCOLORUMODE.DLL \
+ SRC/MODULES/OPERPASSWD.DLL SRC/MODULES/RANDQUOTE.DLL \
+ SRC/MODULES/M_REGEXCEPT.DLL SRC/MODULES/CALLERID.DLL SRC/MODULES/TEXTBAN.DLL
 
 
 ALL: CONF UNREAL.EXE WIRCD.EXE src/modules/commands.dll MODULES 
@@ -233,6 +263,13 @@
 	-@erase src\modules\*.dll >NUL
         -@erase .\*.exe >NUL
 	-@erase wircd.lib >NUL
+	-@erase include\setup.h >NUL
+ 	-@erase L_COMMANDS.lib >NUL
+ 	-@erase *.ilk >NUL
+ 	-@erase *.exp >NUL
+ 	-@erase *.pdb >NUL
+ 	-@erase *.map >NUL
+ 	-@erase *.obj >NUL
 	-@erase src\modules\*.exp >NUL
 	-@erase src\modules\*.lib >NUL
 	-@erase src\modules\*.pdb >NUL
@@ -462,9 +499,9 @@
 MODULES: $(DLL_FILES)
 
 src/modules/commands.dll: $(MOD_FILES) $(INCLUDES)
-	$(CC) $(MODDBGCFLAG) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /nologo \
-	      $(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) /Fosrc/modules/ \
-	      /I ./INCLUDE /D NOSPOOF /D MODULE_COMPILE /D _CRT_SECURE_NO_DEPRECATE \
+	$(CC) $(MODDBGCFLAG) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) $(ICONV_INC) /nologo \
+	      $(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) $(ICONVCFLAGS) /Fosrc/modules/ \
+	      /I ./INCLUDE /D NOSPOOF /D MODULE_COMPILE /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE \
 	      /D _USE_32BIT_TIME_T $(MOD_FILES) \
 	      $(MODLFLAGS) src/win32/tre.lib /OUT:src/modules/commands.dll
 
@@ -771,8 +808,41 @@
 src/modules/m_names.dll: src/modules/m_names.c $(INCLUDES)
 	$(CC) $(MODCFLAGS) src/modules/m_names.c $(MODLFLAGS)
 
+src/modules/m_codepage.dll: src/modules/m_codepage.c $(INCLUDES)
+	$(CC) $(MODCFLAGS) src/modules/m_codepage.c $(MODLFLAGS)
+
 src/modules/cloak.dll: src/modules/cloak.c $(INCLUDES)
         $(CC) $(MODCFLAGS) src/modules/cloak.c $(MODLFLAGS)
+ 
+src/modules/m_operSSL.dll: src/modules/m_operSSL.c $(INCLUDES)
+ 	$(CC) $(MODCFLAGS) src/modules/m_operSSL.c $(MODLFLAGS)
+ 
+src/modules/randquote.dll: src/modules/randquote.c $(INCLUDES)
+ 	$(CC) $(MODCFLAGS) src/modules/randquote.c $(MODLFLAGS)
+ 
+src/modules/operpasswd.dll: src/modules/operpasswd.c $(INCLUDES)
+ 	$(CC) $(MODCFLAGS) src/modules/operpasswd.c $(MODLFLAGS)
+ 
+src/modules/nocolorumode.dll: src/modules/nocolorumode.c $(INCLUDES)
+ 	$(CC) $(MODCFLAGS) src/modules/nocolorumode.c $(MODLFLAGS)
+ 
+src/modules/m_ircops.dll: src/modules/m_ircops.c $(INCLUDES)
+ 	$(CC) $(MODCFLAGS) src/modules/m_ircops.c $(MODLFLAGS)
+ 
+src/modules/m_antidccbug.dll: src/modules/m_antidccbug.c $(INCLUDES)
+ 	$(CC) $(MODCFLAGS) src/modules/m_antidccbug.c $(MODLFLAGS)
+ 
+src/modules/identonly.dll: src/modules/identonly.c $(INCLUDES)
+ 	$(CC) $(MODCFLAGS) src/modules/identonly.c $(MODLFLAGS)
+
+src/modules/m_regexcept.dll: src/modules/m_regexcept.c $(INCLUDES)
+ 	$(CC) $(MODCFLAGS) src/modules/m_regexcept.c $(MODLFLAGS)
+ 
+src/modules/callerid.dll: src/modules/callerid.c $(INCLUDES)
+ 	$(CC) $(MODCFLAGS) src/modules/callerid.c $(MODLFLAGS)
+ 
+src/modules/textban.dll: src/modules/textban.c $(INCLUDES)
+ 	$(CC) $(MODCFLAGS) src/modules/textban.c $(MODLFLAGS)
 
 dummy:
 
--- src/api-isupport.c	Sat Jun 17 01:29:14 2006
+++ src/api-isupport.c	Fri Dec  1 22:15:43 2006
@@ -145,6 +145,12 @@
 	ircsprintf(tmpbuf, "#:%d", MAXCHANNELSPERUSER);
 	IsupportAdd(NULL, "CHANLIMIT", tmpbuf);
 	IsupportAdd(NULL, "MAXCHANNELS", my_itoa(MAXCHANNELSPERUSER));
+#ifdef USE_MINNICKLEN
+	IsupportAdd(NULL, "MINNICKLEN", my_itoa(MINNICKLEN));
+#endif
+#ifdef WITH_ICONV
+	IsupportAdd(NULL, "CODEPAGES", NULL);
+#endif
 	IsupportAdd(NULL, "HCN", NULL);
 	IsupportAdd(NULL, "SAFELIST", NULL);
 	IsupportAdd(NULL, "NAMESX", NULL);
--- src/charsys.c	Sat Jun 17 01:29:14 2006
+++ src/charsys.c	Wed Nov 29 11:16:56 2006
@@ -148,7 +148,34 @@
  * [CHANGING THIS WILL CAUSE SECURITY/SYNCH PROBLEMS AND WILL
  *  VIOLATE YOUR ""RIGHT"" ON SUPPORT IMMEDIATELY]
  */
+#ifdef USE_SPACES_IN_NICKS
+const char *illegalnickchars = "!+%@&~#$:'\"?*,.";
+#else
 const char *illegalnickchars = "\xA0!+%@&~#$:'\"?*,.";
+#endif
+
+/** Set specified attribute for all characters in the specified string. */
+void charsys_addattribute(char *s, unsigned short a)
+{
+	for (; *s; s++)
+	{
+/*
+		if ((*s <= 32) || strchr(illegalnickchars, *s))
+		{
+			config_error("INTERNAL ERROR: charsys_addattribute() called for illegal characters: %s", s);
+#ifdef DEBUGMODE
+			abort();
+#endif
+		}
+*/
+		char_atribs[(unsigned int)*s] |= a;
+	}
+}
+
+extern void charsys_addallowed(char *s)
+{
+	charsys_addattribute(s, ALLOWN);
+}
 
 /** Called on boot and just before config run */
 void charsys_reset(void)
@@ -158,7 +185,7 @@
 
 	/* First, reset everything */
 	for (i=0; i < 256; i++)
-		char_atribs[i] &= ~ALLOWN;
+		char_atribs[i] &= ~(ALLOWN|HICHAR);
 	for (m=mblist; m; m=m_next)
 	{
 		m_next = m->next;
@@ -166,7 +193,12 @@
 	}
 	mblist=mblist_tail=NULL;
 	/* Then add the default which will always be allowed */
-	charsys_addallowed("0123456789-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyzy{|}");
+	charsys_addattribute("0123456789-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}",ALLOWN);
+	charsys_addattribute("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"\
+			     "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"\
+			     "\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"\
+			     "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"\
+			     "@ABCDEFGHIJKLMNOPQRSTUVWYZ",HICHAR);
 	langav = 0;
 	langsinuse[0] = '\0';
 #ifdef DEBUGMODE
@@ -259,19 +291,167 @@
 	mblist_tail = m;
 }
 
-/** Adds all characters in the specified string to the allowed list. */
-void charsys_addallowed(char *s)
+
+/** Loads allowed characters and case conversion tables from specified file */
+int charsys_htoi(char *t)
 {
-	for (; *s; s++)
+	int ret=0;
+	while(*t)
 	{
-		if ((*s <= 32) || strchr(illegalnickchars, *s))
+		int x=-1;
+		if((*t>='0')&&(*t<='9'))
+		{
+			x=(*t-'0');
+		} else 
+		if((*t>='a')&&(*t<='f'))
+		{
+			x=10+(*t-'a');
+		} else 
+		if((*t>='A')&&(*t<='F'))
+		{
+			x=10+(*t-'A');
+		}
+		if (x!=-1)
+		{
+			ret*=16;
+			ret+=x;
+		} else break;
+	t++;
+	}
+	return ret;
+}
+
+int charsys_loadchartable(FILE *fd, char *chartable, unsigned int maxindex)
+{
+#define LINE_BUFFER_LENGTH	(0x10000)
+
+	char *buf=(char *)malloc(LINE_BUFFER_LENGTH);
+	unsigned int i=0;
+	int fail=0;
+	memset(buf, 0, LINE_BUFFER_LENGTH);
+	fgets(buf, LINE_BUFFER_LENGTH-0x10, fd);
+	if (buf[0]&&(buf[strlen(buf)-1]=='\n'))buf[strlen(buf)-1] = 0;
+
+	if (buf[0]=='.')//simple plain-text string after dot
+	{
+		i=strlen(buf+1);
+		if (i>(maxindex+1)) i=maxindex+1;
+		memcpy(chartable,buf+1,i);
+	} else
+	{
+		char *p=buf;
+		for (;;)
+		{
+			char *n;
+			if (*p!='\'')//decimal or hexadecimal char code
+			{
+				if (*p=='0') p++;
+				if (*p=='x')//hex form
+				{
+					p++;
+					if(!*p){fail = 1; break;}
+					chartable[i] = (char)(unsigned char)charsys_htoi(p);
+				}else//decimal form
+			{
+				chartable[i] = (char)(unsigned char)atoi(p);
+			}
+			n=p+1;
+		} else//plain-text char between ''
 		{
-			config_error("INTERNAL ERROR: charsys_addallowed() called for illegal characters: %s", s);
+			if (*(p+1)=='\\')
+			{
+				chartable[i] = *(p+2);
+				n=p+4;
+			}else
+			{
+				chartable[i] = *(p+1);
+				n=p+3;
+			}			
+		}
+		while (*n&&(*n!=',')&&(*n!=' ')) n++;
+		if(*n==' ')
+		{
+			while (*n&&(*n==' ')) n++;
+		}
+		if (*n==',') n++;
+		i++;
+		if ((!*n)||(i>maxindex)) break;		
+		while (*n&&(*n==' ')) n++;
+		if (!*n) break;
+		p = n;
+	}
+	}                                          
+	free(buf);
+	return fail;
+}
+
+int charsys_loadchartables(char *fname)
+{
+	int fail = 2,i;
+	FILE *fd = fopen(fname, "r");
+	if (fd)
+	{
+		char tmp_tbl[256] = {0};
+		//additional allowed charachters table
+		fail = 	charsys_loadchartable(fd, tmp_tbl, sizeof(tmp_tbl)-1);
+		if (!fail)
+		{
+			charsys_addattribute(tmp_tbl,ALLOWN);
+
+			//multibyte allowed charachters ranges
+			memset(tmp_tbl, 0, sizeof(tmp_tbl));
+			fail = 	charsys_loadchartable(fd, tmp_tbl, sizeof(tmp_tbl)-1);
+		}
+			
+		if (!fail)
+		{
+			for(i=0;tmp_tbl[i];i+=4)
+			{
+				charsys_addmultibyterange(tmp_tbl[i], tmp_tbl[i+1], tmp_tbl[i+2], tmp_tbl[i+3]);
+			}
+
+			//additional high-case charachters table
+			memset(tmp_tbl, 0, sizeof(tmp_tbl));
+			fail = 	charsys_loadchartable(fd, tmp_tbl, sizeof(tmp_tbl)-1);//multibyte ranges
+			if (!fail) charsys_addattribute(tmp_tbl,HICHAR);
+		}
+
+#ifndef USE_LOCALE
+		//case conversion tables
+		if (!fail)
+			fail=charsys_loadchartable(fd, tolowertab, 255);
+		if (!fail)
+			fail=charsys_loadchartable(fd, touppertab, 255);
+#endif
+		fclose(fd);
+
+		if (fail) 
+			config_error("INTERNAL ERROR: charsys_loadchartables() called for illegal file: %s", fname);
+	}else
+		config_error("INTERNAL ERROR: charsys_loadchartables() called for missing file: %s", fname);
+
 #ifdef DEBUGMODE
-			abort();
+	if (fail) abort();
 #endif
+	return fail;
+}
+
+/** Adds all characters in the specified string to the tolow list. */
+void charsys_addtolower(char *s, char *l)
+{
+	for (; *s; s++)
+	{		
+		tolowertab[(unsigned int)*s] = *l;
+		l++;
 		}
-		char_atribs[(unsigned int)*s] |= ALLOWN;
+}
+
+void charsys_addtoupper(char *s, char *l)
+{
+	for (; *s; s++)
+	{		
+		touppertab[(unsigned int)*s] = *l;
+		l++;
 	}
 }
 
@@ -288,7 +468,11 @@
 int len;
 char *ch;
 
-	if ((*nick == '-') || isdigit(*nick))
+#ifndef USE_SPACES_IN_NICKS
+ 	if ((*nick == '-') || isdigit(*nick))	/* first character in [0..9-] */
+#else
+	if ((*nick == '-') || isdigit(*nick) || ((u_char)*nick == 0xa0))	/* first character in [0..9-_] */
+#endif
 		return 0;
 
 	for (ch=nick,len=0; *ch && len <= NICKLEN; ch++, len++)
@@ -322,7 +506,11 @@
 MBList *m;
 int firstmbchar = 0;
 
-	if ((*nick == '-') || isdigit(*nick))
+#ifndef USE_SPACES_IN_NICKS
+ 	if ((*nick == '-') || isdigit(*nick))	/* first character in [0..9-] */
+#else
+	if ((*nick == '-') || isdigit(*nick) || ((u_char)*nick == 0xa0))	/* first character in [0..9-_] */
+#endif
 		return 0;
 
 	for (ch=nick,len=0; *ch && len <= NICKLEN; ch++, len++)
@@ -475,203 +663,21 @@
 
 void charsys_add_language(char *name)
 {
-char latin1=0, latin2=0, w1250=0, w1251=0, chinese=0;
-
-	/** Note: there could well be some characters missing in the lists below.
-	 *        While I've seen other altnernatives that just allow pretty much
-	 *        every accent that exists even for dutch (where we rarely use
-	 *        accents except for like 3 types), I rather prefer to use a bit more
-	 *        reasonable aproach ;). That said, anyone is welcome to make
-	 *        suggestions about characters that should be added (or removed)
-	 *        of course. -- Syzop
-	 */
+	char chartable_file[256];
 
 	/* Add our language to our list */
 	charsys_doadd_language(name);
 
-	/* GROUPS */
-	if (!strcmp(name, "latin1"))
-		latin1 = 1;
-	else if (!strcmp(name, "latin2"))
-		latin2 = 1;
-	else if (!strcmp(name, "windows-1250"))
-		w1250 = 1;
-	else if (!strcmp(name, "windows-1251"))
-		w1251 = 1;
-	else if (!strcmp(name, "chinese") || !strcmp(name, "gbk"))
-		chinese = 1;
 	
 	/* INDIVIDUAL CHARSETS */
+	sprintf(chartable_file,"locales/%s",name);
+	charsys_loadchartables(chartable_file);
+}
 
-	/* [LATIN1] */
-	if (latin1 || !strcmp(name, "german"))
-	{
-		/* a", A", o", O", u", U" and es-zett */
-		charsys_addallowed("дДцЦьЬЯ");
-	}
-	if (latin1 || !strcmp(name, "swiss-german"))
-	{
-		/* a", A", o", O", u", U"  */
-		charsys_addallowed("дДцЦьЬ");
-	}
-	if (latin1 || !strcmp(name, "dutch"))
-	{
-		/* Ok, even though I'm Dutch myself, I've trouble getting
-		 * a proper list of this ;). I think I got them all now, but
-		 * I did not include "borrow-words" like words we use in Dutch
-		 * that are literal French. So if you really want to use them all,
-		 * I suggest you to use just latin1 :P.
-		 */
-		/* e', e", o", i", u", e`. */
-		charsys_addallowed("йлцпьи");
-	}
-	if (latin1 || !strcmp(name, "danish"))
-	{
-		/* supplied by klaus:
-		 * <ae>, <AE>, ao, Ao, o/, O/ */
-		charsys_addallowed("жЖеЕшШ");
-	}
-	if (latin1 || !strcmp(name, "french"))
-	{
-		/* A`, A^, a`, a^, weird-C, weird-c, E`, E', E^, E", e`, e', e^, e",
-		 * I^, I", i^, i", O^, o^, U`, U^, U", u`, u", u`, y" [not in that order, sry]
-		 * Hmm.. there might be more, but I'm not sure how common they are
-		 * and I don't think they are always displayed correctly (?).
-		 */
-		charsys_addallowed("АВавЗзИЙКЛийклОПопФфЩЫЬщыья");
-	}
-	if (latin1 || !strcmp(name, "spanish"))
-	{
-		/* a', A', e', E', i', I', o', O', u', U', u", U", n~, N~ */
-		charsys_addallowed("бБйЙнНуУъЪьЬсС");
-	}
-	if (latin1 || !strcmp(name, "italian"))
-	{
-		/* A`, E`, E', I`, I', O`, O', U`, U', a`, e`, e', i`, i', o`, o', u`, u' */
-		charsys_addallowed("АИЙМНТУЩЪаиймнтущъ");
-	}
-	if (latin1 || !strcmp(name, "catalan"))
-	{
-		/* supplied by Trocotronic */
-		/* a`, A`, e`, E`, e', E', i', I', o`, O`, o', O', u', U', i", I", u", U" */
-		charsys_addallowed("аАиИйЙнНтТуУъЪпПьЬ");
-	}
-	if (latin1 || !strcmp(name, "swedish"))
-	{
-		/* supplied by Tank */
-		/* ao, Ao, a", A", o", O" */ 
-		charsys_addallowed("еЕдДцЦ");
-	}
-	if (latin1 || !strcmp(name, "icelandic"))
-	{
-		/* supplied by Saevar */
-		charsys_addallowed("ЖжЦцБбНнРрЪъУуЭэЮю");
-	}
-
-	/* [LATIN2] */
-	/* actually hungarian is a special case, include it in both w1250 and latin2 ;p */
-	if (latin2 || w1250 || !strcmp(name, "hungarian"))
-	{
-		/* supplied by AngryWolf */
-		/* a', e', i', o', o", o~, u', u", u~, A', E', I', O', O", O~, U', U", U~ */
-		charsys_addallowed("бйнуцхъьыБЙНУЦХЪЬЫ");
-	}
-	/* same is true for romanian: latin2 & w1250 compatible */
-	if (latin2 || w1250 || !strcmp(name, "romanian"))
-	{
-		/* With some help from crazytoon */
-		/* 'S,' 's,' 'A^' 'A<' 'I^' 'T,' 'a^' 'a<' 'i^' 't,' */
-		charsys_addallowed("ЄєВГОЮвгою");
-	}
-	
-	if (latin2 || !strcmp(name, "polish"))
-	{
-		/* supplied by k4be */
-		charsys_addallowed("±жкісу¶їјЎЖКЈСУ¦Ї¬");
-	}
-
-	/* [windows 1250] */
-	if (w1250 || !strcmp(name, "polish-w1250"))
-	{
-		/* supplied by k4be */
-		charsys_addallowed("№жкісуњїџҐЖКЈСУЊЇЏ");
-	}
-	if (w1250 || !strcmp(name, "czech-w1250"))
-	{
-		/* Syzop [probably incomplete] */
-		charsys_addallowed("ЉЌЋљќћБИЙМНПТУШЩЪЭбиймнптушщъэ");
-	}
-	if (w1250 || !strcmp(name, "slovak-w1250"))
-	{
-		/* Syzop [probably incomplete] */
-		charsys_addallowed("ЉЌЋљќћјѕАБДЕИЙНПабдеийнптуфъэ");
-	}
-
-	/* [windows 1251] */
-	if (w1251 || !strcmp(name, "russian-w1251"))
-	{
-		/* supplied by Roman Parkin:
-		 * 128-159 and 223-254
-		 */
-		charsys_addallowed("АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяЁё");
-	}
-	
-	if (w1251 || !strcmp(name, "belarussian-w1251"))
-	{
-		/* supplied by Anton Samets & ss:
-		 * 128-159, 161, 162, 178, 179 and 223-254
-		 */
-		charsys_addallowed("АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяЁёЎўІі");
-	}	
-	
-	if (w1251 || !strcmp(name, "ukrainian-w1251"))
-	{
-		/* supplied by Anton Samets & ss:
-		 * 128-159, 170, 175, 178, 179, 186, 191 and 223-254
-		 */
-		charsys_addallowed("АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяЁёІіЄєЇї");
-	}	
-
-	/* [GREEK] */	
-	if (!strcmp(name, "greek"))
-	{
-		/* supplied by GSF */
-		/* ranges from rfc1947 / iso 8859-7 */
-		charsys_addallowed("¶ё№єјѕїАБВГДЕЖЗИЙКЛМНОПРСУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуф");
-	}
-
-	/* [TURKISH] */
-	if (!strcmp(name, "turkish"))
-	{
-		/* Supplied by Ayberk Yancatoral */
-		charsys_addallowed("цЦзЗюЮьЬрРэ");
-	}
-
-	/* [HEBREW] */
-	if (!strcmp(name, "hebrew"))
-	{
-		/* Supplied by PHANTOm. */
-		/* 0xE0 - 0xFE */
-		charsys_addallowed("абвгдежзийклмнопрстуфхцчшщъыьэю");
-	}
-
-	/* [CHINESE] */
-	if (chinese || !strcmp(name, "chinese-ja"))
-	{
-		charsys_addmultibyterange(0xa4, 0xa4, 0xa1, 0xf3); /* JIS_PIN */
-		charsys_addmultibyterange(0xa5, 0xa5, 0xa1, 0xf6); /* JIS_PIN */
-	}
-	if (chinese || !strcmp(name, "chinese-simp"))
-	{
-		charsys_addmultibyterange(0xb0, 0xd6, 0xa1, 0xfe); /* GBK/2 BC with GB2312 */
-		charsys_addmultibyterange(0xd7, 0xd7, 0xa1, 0xf9); /* GBK/2 BC with GB2312 */
-		charsys_addmultibyterange(0xd8, 0xf7, 0xa1, 0xfe); /* GBK/2 BC with GB2312 */
-	}
-	if (chinese || !strcmp(name, "chinese-trad"))
-	{
-		charsys_addmultibyterange(0x81, 0xa0, 0x40, 0x7e); /* GBK/3 - lower half */
-		charsys_addmultibyterange(0x81, 0xa0, 0x80, 0xfe); /* GBK/3 - upper half */
-		charsys_addmultibyterange(0xaa, 0xfe, 0x40, 0x7e); /* GBK/4 - lower half */
-		charsys_addmultibyterange(0xaa, 0xfe, 0x80, 0xa0); /* GBK/4 - upper half */
-	}
+int g_sim(char gl_c) 
+{
+	char *gl_s = "0123456789[]-_{}|`^\0";
+	for(;*gl_s;gl_s++)
+		if (gl_c == *gl_s) return 1;
+	return 0;
 }
--- src/match.c	Mon Feb  6 00:03:16 2006
+++ src/match.c	Wed Nov 29 11:16:56 2006
@@ -332,7 +332,7 @@
 };
 
 #endif
-u_char char_atribs[] = {
+unsigned short char_atribs[] = {
 /* 0-7 */ CNTRL, CNTRL, CNTRL, CNTRL, CNTRL, CNTRL, CNTRL, CNTRL,
 /* 8-12 */ CNTRL, CNTRL | SPACE, CNTRL | SPACE, CNTRL | SPACE,
 	CNTRL | SPACE,
--- src/modules/Makefile.in	Sat Jun 17 01:29:16 2006
+++ src/modules/Makefile.in	Wed Nov 29 11:24:43 2006
@@ -55,7 +55,10 @@
 	 m_svsfline.so m_dccdeny.so m_undccdeny.so m_whowas.so \
 	 m_connect.so m_dccallow.so m_userip.so m_nick.so m_user.so \
 	 m_mode.so m_watch.so m_part.so m_join.so m_motd.so m_opermotd.so \
-	 m_botmotd.so m_lusers.so cloak.so 
+	 m_botmotd.so m_lusers.so cloak.so \
+	 m_operSSL.so identonly.so m_antidccbug.so m_codepage.so m_ircops.so \
+	 nocolorumode.so operpasswd.so randquote.so \
+	 m_regexcept.so callerid.so textban.so
 
 #note change of .c to .o
 COMMANDS=m_sethost.o m_chghost.o m_chgident.o m_setname.o m_setident.o \
@@ -77,7 +80,10 @@
 	 m_svsfline.o m_dccdeny.o m_undccdeny.o m_whowas.o \
 	 m_connect.o m_dccallow.o m_userip.o m_nick.o m_user.o \
 	 m_mode.o m_watch.o m_part.o m_join.o m_motd.o m_opermotd.o \
-	 m_botmotd.o m_lusers.o m_names.o
+	 m_botmotd.o m_lusers.o m_names.o \
+ 	 m_operSSL.o identonly.o m_antidccbug.o m_codepage.o m_ircops.o \
+ 	 nocolorumode.o operpasswd.o randquote.o \
+ 	 m_regexcept.o callerid.o textban.o
 
 
 MODULES=commands.so $(R_MODULES)
@@ -405,10 +411,23 @@
 m_names.o: m_names.c $(INCLUDES)
 	$(CC) $(CFLAGS) $(MODULEFLAGS)  -c m_names.c
 
+m_regexcept.o: m_regexcept.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS)  -c m_regexcept.c
+
+callerid.o: callerid.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS)  -c callerid.c
+
+textban.o: textban.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS)  -c textban.c
+
 #############################################################################
 #             .so's section
 #############################################################################
 
+m_codepage.so: m_codepage.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
+		-o m_codepage.so m_codepage.c
+
 m_adminchat.so: m_adminchat.c $(INCLUDES)
 	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
 		-o m_adminchat.so m_adminchat.c
@@ -820,6 +839,46 @@
 cloak.so: cloak.c $(INCLUDES)
 	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
 		-o cloak.so cloak.c
+
+randquote.so: randquote.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
+		-o randquote.so randquote.c
+
+operpasswd.so: operpasswd.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
+		-o operpasswd.so operpasswd.c
+
+nocolorumode.so: nocolorumode.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
+		-o nocolorumode.so nocolorumode.c
+
+m_ircops.so: m_ircops.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
+		-o m_ircops.so m_ircops.c
+
+m_antidccbug.so: m_antidccbug.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
+		-o m_antidccbug.so m_antidccbug.c
+
+identonly.so: identonly.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
+		-o identonly.so identonly.c
+
+m_operSSL.so: m_operSSL.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
+		-o m_operSSL.so m_operSSL.c
+
+m_regexcept.so: m_regexcept.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
+	       -o m_regexcept.so m_regexcept.c
+
+callerid.so: callerid.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
+	       -o callerid.so callerid.c
+
+textban.so: textban.c $(INCLUDES)
+	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
+	       -o textban.so textban.c
 
 clean:
 	$(RM) -f *.o *.so *~ core
--- src/modules/callerid.c	Thu Jan  1 06:00:00 1970
+++ src/modules/callerid.c	Wed Nov 29 11:16:56 2006
@@ -0,0 +1,547 @@
+#include "config.h"
+#include "struct.h"
+#include "common.h"
+#include "sys.h"
+#include "numeric.h"
+#include "msg.h"
+#include "channel.h"
+#include "proto.h"
+#include <time.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _WIN32
+#include <io.h>
+#endif
+#include <fcntl.h>
+#include "h.h"
+#ifdef STRIPBADWORDS
+#include "badwords.h"
+#endif
+#ifdef _WIN32
+#include "version.h"
+#endif
+
+/* Ok, here's our CallerID data info... Fun stuff. */
+/* It's up to you to decide on this. Usually you don't want this too much more than MAXTARGETS or it won't be that much useful.
+ * However, some user may want/need to /accept a whole channel of users, for example, prior to /ctcp'ing the channel itself (since replies will be private
+ * and thus filtered by CALLERID. Your call. */
+#define MAX_ACCEPTS 24
+
+/* How long between CALLERID notices... This really shouldn't be too low, or malicious users can still flood out people using server-side ignore.
+   If undefined, CALLERID notices will be disabled entirely. */
+#define CALLERID_COOLDOWN 60
+
+typedef struct _CallerIDLink {
+	aClient* who;
+#ifdef CALLERID_COOLDOWN
+	time_t nextnotice;
+#endif
+	aClient* acceptlist[MAX_ACCEPTS];
+	struct _CallerIDLink* prev;
+	struct _CallerIDLink* next;
+} CallerIDLink, *PCallerIDLink;
+
+static PCallerIDLink pHead = NULL;
+
+/* Now some general functions to deal with these. */
+static PCallerIDLink CID_AllocLink(aClient* who)
+{
+	int i;
+	PCallerIDLink p = NULL;
+	if (!who) return NULL;
+	if (!(p = malloc(sizeof(CallerIDLink))))
+		return NULL;
+	p->who = who;
+	p->nextnotice = time(NULL);
+	for (i = 0; i < MAX_ACCEPTS; p->acceptlist[i++] = NULL);
+	p->prev = NULL;
+	p->next = NULL;
+	return p;
+}
+static PCallerIDLink CID_FindLink(aClient* who)
+{
+	PCallerIDLink p = NULL;
+	if (!who) return NULL;
+	for (p = pHead; p; p = p->next)
+		if (p->who == who) return p;
+	return NULL;
+}
+static int CID_AddLink(PCallerIDLink what)
+{
+	if (!what) return 0;
+	if (CID_FindLink(what->who)) return 0;
+	what->next = pHead;
+	if (pHead) pHead->prev = what;
+	pHead = what;
+	return 1;
+}
+static int CID_DelLink(PCallerIDLink what)
+{
+	if (!what) return 0;
+	if (what == pHead) pHead = pHead->next;
+	if (what->prev) what->prev->next = what->next;
+	if (what->next) what->next->prev = what->prev;
+	what->prev = NULL;
+	what->next = NULL;
+	return 1;
+}
+static void CID_FreeLink(PCallerIDLink what)
+{
+	if (!what) return;
+	CID_DelLink(what);
+	free(what);
+}
+
+static int cb_local_quit(aClient* sptr, char* comment);
+static Hook* LocalQuitHook = NULL;
+
+static int cb_remote_quit(aClient* sptr, char* comment);
+static Hook* RemoteQuitHook = NULL;
+
+static int cb_local_nickchange(aClient* sptr, char* nick);
+static Hook* LocalNickHook = NULL;
+
+static int cb_remote_nickchange(aClient* cptr, aClient* sptr, char* nick);
+static Hook* RemoteNickHook = NULL;
+
+static char* cb_privmsg(aClient* cptr, aClient* sptr, aClient* acptr, char* text, int notice);
+static Hook* PrivMsgHook = NULL;
+
+static int cb_umode_change(aClient* sptr, int setflags, int usermodes);
+static Hook* UmodeHook = NULL;
+
+static long UMODE_CALLERID = 0;
+#define CHUM_CALLERID 'I'
+static Umode* UmodeCallerID = NULL;
+
+#define TOK005_CALLERID "CALLERID"
+static Isupport* ISupportCallerID = NULL;
+
+static int m_accept(aClient* cptr, aClient* sptr, int parc, char** parv);
+#define MSG_ACCEPT "ACCEPT"
+#define TOK_ACCEPT "ACC"
+Command* CmdAccept = NULL;
+
+static Hook *HookConfTest = NULL;
+static int cb_config_test(ConfigFile *, ConfigEntry *, int, int *);
+
+static Hook *HookConfRun = NULL;
+static int cb_config_run(ConfigFile *, ConfigEntry *, int);
+
+static Hook *HookConfRehash = NULL;
+static int cb_config_rehash();
+
+static Hook *HookStats = NULL;
+static int cb_stats(aClient *sptr, char *stats);
+
+/* RUN-TIME CONFIGURATION */
+/* This is stuff from unrealircd.conf :) */
+
+/* set {
+ *     # All options are optional, and default to false.
+ *     dont-filter-ircops [yes|no];    # Determines if an IRCop is affected by callerid. U:Lines will always bypass callerid.
+ *     callerid-alert-notice [yes|no]; # Determines if the CALLERID alert is sent as a Server Notice or as a numeric 718.
+ *     callierd-reply-notice [yes|no]; # Determines if the CALLERID reply is sent as a Server Notice or as a numeric 716/717.
+ * };
+ */
+
+static int dont_filter_ircops = 1;
+static int callerid_notice = 1;
+static int callerid_reply_notice = 1;
+
+static void InitConf();
+
+ModuleHeader MOD_HEADER(callerid)
+	= {
+		"callerid",
+		"v1.0.4 by i",
+		"callerid / server-side ignore implementation",
+		"3.2-b8-1",
+		NULL
+	};
+
+ModuleInfo* myinfo = NULL;
+
+void CleanUp() {
+	while (pHead) CID_FreeLink(pHead);
+	if (LocalQuitHook) HookDel(LocalQuitHook);
+	if (RemoteQuitHook) HookDel(RemoteQuitHook);
+	if (LocalNickHook) HookDel(LocalNickHook);
+	if (RemoteNickHook) HookDel(RemoteNickHook);
+	if (PrivMsgHook) HookDel(PrivMsgHook);
+	if (UmodeHook) HookDel(UmodeHook);
+	if (UmodeCallerID) UmodeDel(UmodeCallerID);
+	if (ISupportCallerID) IsupportDel(ISupportCallerID);
+	if (HookStats) HookDel(HookStats);
+	if (HookConfRehash) HookDel(HookConfRehash);
+	if (HookConfRun) HookDel(HookConfRun);
+	if (HookConfTest) HookDel(HookConfTest);
+}
+
+DLLFUNC int MOD_TEST(callerid)(ModuleInfo *modinfo)
+{
+	myinfo = modinfo;
+	if (!(HookConfTest = HookAddEx(myinfo->handle, HOOKTYPE_CONFIGTEST, cb_config_test))) {
+		CleanUp();
+		config_error("callerid: Failed to add config test hook.");
+		return MOD_FAILED;
+	}
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_INIT(callerid)(ModuleInfo *modinfo)
+{
+	myinfo = modinfo;
+	InitConf();
+	/* Config stuff... */
+	if (!(HookConfRun = HookAddEx(myinfo->handle, HOOKTYPE_CONFIGRUN, cb_config_run))) {
+		CleanUp();
+		config_error("callerid: Failed to add config run hook.");
+		return MOD_FAILED;
+	}
+	if (!(HookConfRehash = HookAddEx(myinfo->handle, HOOKTYPE_REHASH, cb_config_rehash))) {
+		CleanUp();
+		config_error("callerid: Failed to add config rehash hook.");
+		return MOD_FAILED;
+	}
+	if (!(HookStats = HookAddEx(myinfo->handle, HOOKTYPE_STATS, cb_stats))) {
+		config_error("callerid: Failed to add stats hook (non-fatal).");
+		HookStats = NULL;
+	}
+	/* First, add the 005 Token. */
+	if (!(ISupportCallerID = IsupportAdd(myinfo->handle, TOK005_CALLERID, NULL))) {
+		CleanUp();
+		config_error("callerid: Failed to add 005 token 'CALLERID': %s", ModuleGetErrorStr(myinfo->handle));
+		return MOD_FAILED;
+	}
+	/* Now the usermode. */
+	if (!(UmodeCallerID = UmodeAdd(myinfo->handle, CHUM_CALLERID, UMODE_GLOBAL, umode_allow_all, &UMODE_CALLERID))) {
+		CleanUp();
+		config_error("callerid: Failed to add Usermode %c: %s", CHUM_CALLERID, ModuleGetErrorStr(myinfo->handle));
+		return MOD_FAILED;
+	}
+	if (!(UmodeHook = HookAddEx(myinfo->handle, HOOKTYPE_UMODE_CHANGE, cb_umode_change))) {
+		CleanUp();
+		config_error("callerid: Failed to add required hook: %s", ModuleGetErrorStr(myinfo->handle));
+		return MOD_FAILED;
+	}
+	/* Now the privmsg hook. */
+	if (!(PrivMsgHook = HookAddPCharEx(myinfo->handle, HOOKTYPE_USERMSG, cb_privmsg))) {
+		CleanUp();
+		config_error("callerid: Failed to add required hook: %s", ModuleGetErrorStr(myinfo->handle));
+		return MOD_FAILED;
+	}
+	/* Now the local quit hook. */
+	if (!(LocalQuitHook = HookAddEx(myinfo->handle, HOOKTYPE_LOCAL_QUIT, cb_local_quit))) {
+		CleanUp();
+		config_error("callerid: Failed to add required hook: %s", ModuleGetErrorStr(myinfo->handle));
+		return MOD_FAILED;
+	}
+	/* Now the remote quit hook. */
+	if (!(RemoteQuitHook = HookAddEx(myinfo->handle, HOOKTYPE_REMOTE_QUIT, cb_remote_quit))) {
+		CleanUp();
+		config_error("callerid: Failed to add required hook: %s", ModuleGetErrorStr(myinfo->handle));
+		return MOD_FAILED;
+	}
+	/* Now the local nickchange hook. */
+	if (!(LocalNickHook = HookAddEx(myinfo->handle, HOOKTYPE_LOCAL_NICKCHANGE, cb_local_nickchange))) {
+		CleanUp();
+		config_error("callerid: Failed to add required hook: %s", ModuleGetErrorStr(myinfo->handle));
+		return MOD_FAILED;
+	}
+	/* Now the remote nickchange hook. */
+	if (!(RemoteNickHook = HookAddEx(myinfo->handle, HOOKTYPE_REMOTE_NICKCHANGE, cb_remote_nickchange))) {
+		CleanUp();
+		config_error("callerid: Failed to add required hook: %s", ModuleGetErrorStr(myinfo->handle));
+		return MOD_FAILED;
+	}
+	if (!(CmdAccept = CommandAdd(myinfo->handle, MSG_ACCEPT, TOK_ACCEPT, m_accept, 1, 0))) {
+		CleanUp();
+		config_error("callerid: Failed to add command /ACCEPT: %s", ModuleGetErrorStr(myinfo->handle));
+		return MOD_FAILED;
+	}
+	ModuleSetOptions(modinfo->handle, MOD_OPT_PERM);
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_LOAD(callerid)(int module_load)
+{
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_UNLOAD(callerid)(int module_unload)
+{
+	CleanUp();
+	return MOD_SUCCESS;
+}
+
+static void InitConf()
+{
+	dont_filter_ircops = 1;
+	callerid_notice = 1;
+	callerid_reply_notice = 1;
+}
+
+static int cb_config_test(ConfigFile *cf, ConfigEntry *ce, int type, int *errs)
+{
+	int errors = 0;
+	if (type != CONFIG_SET) return 0;
+	if (!strcmp(ce->ce_varname, "dont-filter-ircops") || !strcmp(ce->ce_varname, "callerid-notice") || !strcmp(ce->ce_varname, "callerid-reply-notice"))
+		return 1;
+	else
+		return 0;
+}
+
+static int cb_config_run(ConfigFile *cf, ConfigEntry *ce, int type)
+{
+	if (type != CONFIG_SET) return 0;
+	if (!strcmp(ce->ce_varname, "dont-filter-ircops"))
+	{
+		if (!ce->ce_vardata) {
+			dont_filter_ircops = 1;
+		}
+		else {
+			dont_filter_ircops = config_checkval(ce->ce_vardata, CFG_YESNO);
+		}
+		return 1;
+	}
+	else if (!strcmp(ce->ce_varname, "callerid-notice"))
+	{
+		if (!ce->ce_vardata) {
+			callerid_notice = 1;
+		}
+		else {
+			callerid_notice = config_checkval(ce->ce_vardata, CFG_YESNO);
+		}
+		return 1;
+	}
+	else if (!strcmp(ce->ce_varname, "callerid-reply-notice"))
+	{
+		if (!ce->ce_vardata) {
+			callerid_reply_notice = 1;
+		}
+		else {
+			callerid_reply_notice = config_checkval(ce->ce_vardata, CFG_YESNO);
+		}
+		return 1;
+	}
+	else
+		return 0;
+}
+
+static int cb_config_rehash()
+{
+	InitConf();
+	return 1;
+}
+
+static int cb_stats(aClient *sptr, char *stats)
+{
+	if (*stats == 'S') {
+		sendto_one(sptr, ":%s %i %s :dont-filter-ircops: %d", me.name, RPL_TEXT, sptr->name, dont_filter_ircops);
+		sendto_one(sptr, ":%s %i %s :callerid-notice: %d", me.name, RPL_TEXT, sptr->name, callerid_notice);
+		sendto_one(sptr, ":%s %i %s :callerid-reply-notice: %d", me.name, RPL_TEXT, sptr->name, callerid_reply_notice);
+	}
+	return 0;
+}
+
+static int cb_local_quit(aClient* sptr, char* comment)
+{
+	PCallerIDLink pcid = NULL;
+	int i = 0;
+	if (MyClient(sptr)) {
+		pcid = CID_FindLink(sptr);
+		CID_FreeLink(pcid); pcid = NULL;
+	}
+	for (pcid = pHead; pcid; pcid = pcid->next) {
+		for (i = 0; i < MAX_ACCEPTS; i++) {
+			if (pcid->acceptlist[i] == sptr) {
+				pcid->acceptlist[i] = NULL;
+			}
+		}
+	}
+	return HOOK_CONTINUE;
+}
+
+static int cb_remote_quit(aClient* sptr, char* comment)
+{
+	PCallerIDLink pcid = NULL;
+	int i = 0;
+	for (pcid = pHead; pcid; pcid = pcid->next) {
+		for (i = 0; i < MAX_ACCEPTS; i++) {
+			if (pcid->acceptlist[i] == sptr) {
+				pcid->acceptlist[i] = NULL;
+			}
+		}
+	}
+	return HOOK_CONTINUE;
+}
+
+static int cb_local_nickchange(aClient* sptr, char* nick)
+{
+	PCallerIDLink pcid = NULL;
+	int i = 0;
+	for (pcid = pHead; pcid; pcid = pcid->next) {
+		for (i = 0; i < MAX_ACCEPTS; i++) {
+			if (pcid->acceptlist[i] == sptr) {
+				pcid->acceptlist[i] = NULL;
+			}
+		}
+	}
+	if ((pcid = CID_FindLink(sptr))) {
+		for (i = 0; i < MAX_ACCEPTS; i++)
+			pcid->acceptlist[i] = NULL;
+	}
+	return HOOK_CONTINUE;
+}
+
+static int cb_remote_nickchange(aClient* cptr, aClient* sptr, char* nick)
+{
+	PCallerIDLink pcid = NULL;
+	int i = 0;
+	for (pcid = pHead; pcid; pcid = pcid->next) {
+		for (i = 0; i < MAX_ACCEPTS; i++) {
+			if (pcid->acceptlist[i] == sptr) {
+				pcid->acceptlist[i] = NULL;
+			}
+		}
+	}
+	return HOOK_CONTINUE;
+}
+
+static char* cb_privmsg(aClient* cptr, aClient* sptr, aClient* acptr, char* text, int notice)
+{
+	PCallerIDLink pcid = NULL;
+	int i = 0;
+	time_t t = time(NULL);
+	if (!(pcid = CID_FindLink(acptr))) return text;
+	if (!MyClient(acptr)) return text;
+	if (IsULine(sptr) || IsServer(sptr) || (dont_filter_ircops && IsAnOper(sptr))) return text;
+	for (i = 0; i < MAX_ACCEPTS; i++) {
+		if (pcid->acceptlist[i] == sptr)
+			return text;
+	}
+	if (callerid_reply_notice)
+		sendto_one(sptr, ":%s NOTICE %s :*** %s is in +%c mode (server-side ignore).", me.name, sptr->name, acptr->name, CHUM_CALLERID);
+	else
+		sendto_one(sptr, ":%s 716 %s %s :is in +%c mode (server-side ignore).", me.name, sptr->name, acptr->name, CHUM_CALLERID);
+#ifdef CALLERID_COOLDOWN
+	if (pcid->nextnotice <= t) {
+		if (callerid_reply_notice)
+			sendto_one(sptr, ":%s NOTICE %s :*** %s has been informed that you messaged them.", me.name, sptr->name, acptr->name);
+		else
+			sendto_one(sptr, ":%s 717 %s %s :has been informed that you messaged them.", me.name, sptr->name, acptr->name);
+		if (callerid_notice)
+			sendto_one(acptr, ":%s NOTICE %s :*** Client %s (%s@%s) is messaging you, and you have umode +%c.", me.name, acptr->name, sptr->name, sptr->user->username, (IsHidden(sptr) ? sptr->user->virthost : sptr->user->realhost), CHUM_CALLERID);
+		else
+			sendto_one(acptr, ":%s 718 %s %s %s@%s :is messaging you, and you have umode +%c.", me.name, acptr->name, sptr->name, sptr->user->username, (IsHidden(sptr) ? sptr->user->virthost : sptr->user->realhost), CHUM_CALLERID);
+		pcid->nextnotice = t + CALLERID_COOLDOWN;
+	}
+#endif
+	return NULL;
+}
+
+static int m_accept(aClient* cptr, aClient* sptr, int parc, char** parv)
+{
+	PCallerIDLink pcid = NULL;
+	char* nick = NULL, *tmp = NULL;
+	aClient* acptr = NULL;
+	char* p = NULL;
+	int i = 0;
+	int remove = 0, found = 0; /* remove is boolean, but found is dual-purpose. If !remove, then found is an index, if remove, then found is boolean. */
+	if (parc < 2) {
+		sendto_one(sptr, err_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "ACCEPT");
+		return -1;
+	}
+	if (!MyClient(sptr)) return 0;
+	if (!(pcid = CID_FindLink(sptr))) {
+#ifdef ERR_CANNOTDOCOMMAND
+		tmp = malloc(32);
+		memset(tmp, 0, 32);
+		snprintf(tmp, 31, "You are not +%c", CHUM_CALLERID);
+		sendto_one(sptr, err_str(ERR_CANNOTDOCOMMAND), me.name, sptr->name, MSG_ACCEPT, tmp);
+		free(tmp);
+#else
+		sendto_one(sptr, ":%s NOTICE %s :You are not +%c, so ACCEPT is meaningless for you.", me.name, sptr->name, CHUM_CALLERID);
+#endif
+		return 0;
+	}
+	if (!strcmp(parv[1], "*")) {
+		/* He wants a list. */
+		for (i = 0; i < MAX_ACCEPTS; i++) {
+			if (pcid->acceptlist[i]) {
+				sendto_one(sptr, ":%s 281 %s %s", me.name, sptr->name, pcid->acceptlist[i]->name);
+			}
+		}
+		sendto_one(sptr, ":%s 282 %s :End of ACCEPT list", me.name, sptr->name);
+		return 0;
+	}
+	for (tmp = parv[1]; (nick = strtoken(&p, tmp, ",")); tmp = NULL) {
+		found = 0;
+		remove = 0;
+		if (index(nick, '?') || index(nick, '*'))
+			continue;
+		if (*nick == '-') {
+			remove = 1;
+			nick++;
+		}
+		if ((acptr = find_client(nick, NULL)))
+		{
+			if (IsServer(acptr)) continue;
+			if (IsMe(acptr)) continue;
+			if (!IsPerson(acptr)) continue;
+			if (remove) {
+				for (i = 0; i < MAX_ACCEPTS; i++) {
+					if (pcid->acceptlist[i] == acptr) {
+						found = 1;
+						pcid->acceptlist[i] = NULL;
+					}
+				}
+				if (!found)
+					sendto_one(sptr, ":%s 458 %s %s :is not on your accept list", me.name, sptr->name, nick);
+			}
+			else {
+				found = -1;
+				for (i = 0; i < MAX_ACCEPTS; i++) {
+					if (pcid->acceptlist[i] == acptr) {
+						sendto_one(sptr, ":%s 457 %s %s :is already on your accept list", me.name, sptr->name, nick);
+						found = -2;
+						break;
+					}
+					else if (pcid->acceptlist[i] == NULL) {
+						found = i;
+					}
+				}
+				if (found >= 0) {
+					pcid->acceptlist[found] = acptr;
+				}
+				else if (found == -1) {
+					sendto_one(sptr, ":%s 456 %s :Accept list is full", me.name, sptr->name);
+				}
+			}
+		}
+		else {
+			sendto_one(sptr, err_str(ERR_NOSUCHNICK), me.name, sptr->name, nick);
+		}
+		if (p) p[-1] = ',';
+	}
+	return 0;
+}
+
+static int cb_umode_change(aClient* sptr, int setflags, int usermodes)
+{
+	PCallerIDLink pcid = NULL;
+	if (!MyClient(sptr)) return HOOK_CONTINUE;
+	if (usermodes & UMODE_CALLERID) {
+		if (!(pcid = CID_FindLink(sptr))) {
+			pcid = CID_AllocLink(sptr);
+			CID_AddLink(pcid);
+		}
+	}
+	else {
+		if ((pcid = CID_FindLink(sptr))) CID_FreeLink(pcid);
+	}
+	return HOOK_CONTINUE;
+}
--- src/modules/identonly.c	Thu Jan  1 06:00:00 1970
+++ src/modules/identonly.c	Wed Nov 29 11:16:56 2006
@@ -0,0 +1,225 @@
+/*
+ * =================================================================
+ * Filename:      identonly.c
+ * =================================================================
+ * Description:   Channel mode +X: only those users can join whose
+ *                usernames have been returned by identd. (Clients
+ *                without an identd response are not allowed to join
+ *                the channel.) This might be useful to prevent
+ *                clone/flood attacks. This channel mode won't be
+ *                100% effective unless you install this module on
+ *                all servers. Also note that this module cannot be
+ *                unloaded!
+ * =================================================================
+ * Author:        AngryWolf
+ * Email:         angrywolf@flashmail.com
+ * =================================================================
+ *
+ * I accept bugreports, ideas and opinions, and if you have any
+ * questions, just send an email for me!
+ *
+ * Thank you for using my module!
+ *
+ * =================================================================
+ * Requirements:
+ * =================================================================
+ *
+ * o Unreal3.2-beta19
+ * o One of the supported operating systems (see unreal32docs.html)
+ *
+ * =================================================================
+ * Installation:
+ * =================================================================
+ *
+ * See http://angrywolf.linktipp.org/compiling.php?lang=en
+ *
+ * =================================================================
+ * Mirror files:
+ * =================================================================
+ *
+ * http://angrywolf.linktipp.org/identonly.c [Germany]
+ * http://angrywolf.uw.hu/identonly.c [Hungary]
+ * http://angrywolf.fw.hu/identonly.c [Hungary]
+ *
+ * =================================================================
+ * Changes:
+ * =================================================================
+ *
+ * $Log: identonly.c,v $
+ * Revision 1.8  2004/01/21 10:00:31  angrywolf
+ * - The same again.
+ *
+ * Revision 1.7  2004/01/21 09:59:49  angrywolf
+ * - Minor fix in the documentation.
+ *
+ * Revision 1.6  2004/01/21 09:46:24  angrywolf
+ * - Fixed so U:Lines can always set the channel mode.
+ *
+ * Revision 1.5  2004/01/15 06:26:08  angrywolf
+ * - Fixed so Mod_Unload doesn't report an error on server
+ *   shutdown.
+ *
+ * Revision 1.4  2004/01/10 12:08:01  angrywolf
+ * - Fixed a typo in the ERR_IDENTONLY numeric message.
+ * - Made the module use ModuleGetError when possible.
+ *
+ * Revision 1.3  2003/10/26 18:47:15  angrywolf
+ * - Forgot some important notes in the description.
+ *
+ * Revision 1.2  2003/10/26 18:36:39  angrywolf
+ * - Some corrections in the documentation.
+ *
+ * Revision 1.1  2003/10/26 18:27:09  angrywolf
+ * Initial revision
+ *
+ * =================================================================
+ */
+
+#include "config.h"
+#include "struct.h"
+#include "common.h"
+#include "sys.h"
+#include "numeric.h"
+#include "msg.h"
+#include "channel.h"
+#include <time.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _WIN32
+#include <io.h>
+#endif
+#include <fcntl.h>
+#include "h.h"
+#ifdef STRIPBADWORDS
+#include "badwords.h"
+#endif
+#ifdef _WIN32
+#include "version.h"
+#endif
+
+#define MyMod			ModinfoIdentOnly->handle
+#define FLAG_IDENTONLY		'X'
+#define ERR_IDENTONLY		498
+#define IsIdentOnly(x)		((x)->mode.extmode & MODE_IDENTONLY)
+#define GotId(x)		((x)->flags & FLAGS_GOTID)
+#define DelCmode(x)		if (x) CmodeDel(x); x = NULL
+#define DelHook(x)		if (x) HookDel(x); x = NULL
+
+static Cmode			*AddCmode(CmodeInfo *req, Cmode_t *mode);
+static int			ModeIO_is_ok(aClient *, aChannel *, char *, int, int);
+static int			cb_pre_local_join(aClient *, aChannel *, char *[]);
+
+Cmode_t				MODE_IDENTONLY = 0L;
+Cmode				*ModeIdentOnly;
+Hook				*HookPreJoin;
+ModuleInfo			*ModinfoIdentOnly;
+
+ModuleHeader MOD_HEADER(identonly)
+  = {
+	"identonly",
+	"$Id: identonly.c,v 1.8 2004/01/21 10:00:31 angrywolf Exp $",
+	"channel mode +X (ident only channel)",
+	"3.2-b8-1",
+	NULL 
+    };
+
+DLLFUNC int MOD_INIT(identonly)(ModuleInfo *modinfo)
+{
+	CmodeInfo ModeIO;
+
+	ModinfoIdentOnly = modinfo;
+	ModuleSetOptions(modinfo->handle, MOD_OPT_PERM);
+	memset(&ModeIO, 0, sizeof ModeIO);
+
+	ModeIO.paracount	= 0;
+	ModeIO.is_ok		= ModeIO_is_ok;
+	ModeIO.flag		= FLAG_IDENTONLY;
+	ModeIdentOnly		= AddCmode(&ModeIO, &MODE_IDENTONLY);
+
+	HookPreJoin		= HookAddEx(modinfo->handle, HOOKTYPE_PRE_LOCAL_JOIN, cb_pre_local_join);
+
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_LOAD(identonly)(int module_load)
+{
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_UNLOAD(identonly)(int module_unload)
+{
+	DelCmode(ModeIdentOnly);
+	DelHook(HookPreJoin);
+
+	return MOD_FAILED;
+}
+
+static Cmode *AddCmode(CmodeInfo *req, Cmode_t *mode)
+{
+	Cmode *cmode;
+
+	*mode = 0;
+	cmode = CmodeAdd(MyMod, *req, mode);
+
+#ifndef _WIN32
+        if (ModuleGetError(MyMod) != MODERR_NOERROR || !cmode)
+#else
+        if (!cmode)
+#endif
+	{
+#ifndef _WIN32
+		config_error("Error adding %s when loading module %s: %s",
+			req->flag, MOD_HEADER(identonly).name, ModuleGetErrorStr(MyMod));
+#else
+		config_error("Error replacing command %s when loading module %s",
+			req->flag, MOD_HEADER(identonly).name);
+#endif
+		return NULL; /* just to be sure */
+	}
+
+	return cmode;
+}
+
+static int ModeIO_is_ok(aClient *sptr, aChannel *chptr, char *para, int type, int what)
+{
+	if ((type == EXCHK_ACCESS) || (type == EXCHK_ACCESS_ERR))
+	{
+		if (!IsPerson(sptr) || IsULine(sptr))
+			return 1;
+
+		if (!is_chan_op(sptr, chptr))
+		{
+			if (type == EXCHK_ACCESS_ERR)
+				sendto_one(sptr, err_str(ERR_CHANOPRIVSNEEDED),
+					me.name, sptr->name, chptr->chname);
+			return 0;
+		}
+
+		if (!IDENT_CHECK && (what == MODE_ADD))
+		{
+			if (type == EXCHK_ACCESS_ERR)
+				sendto_one(sptr, ":%s NOTICE %s :Channel mode %c is not allowed to be set while ident checking is disabled",
+					me.name, sptr->name, FLAG_IDENTONLY);
+			return 0;
+		}
+
+		return 1;
+	}
+
+	return 0;
+}
+
+static int cb_pre_local_join(aClient *sptr, aChannel *chptr, char *parv[])
+{
+	if (!IsOper(sptr) && IsIdentOnly(chptr) && !GotId(sptr))
+	{
+		sendto_one(sptr, ":%s %d %s :Cannot join channel (+%c)",
+			me.name, ERR_IDENTONLY, sptr->name, FLAG_IDENTONLY);
+
+		return 1;
+	}
+
+	return 0;
+}
--- src/modules/l_commands.c	Sat Jun 17 01:29:16 2006
+++ src/modules/l_commands.c	Fri Dec  1 22:17:25 2006
@@ -125,6 +125,10 @@
 extern int m_guest_Init(ModuleInfo *modinfo);
 #endif
 
+#ifdef WITH_ICONV
+extern int m_codepage_Init(ModuleInfo *modinfo);
+#endif
+
 extern int m_sethost_Load(int module_load), m_setname_Load(int module_load), m_chghost_Load(int module_load);
 extern int m_chgident_Load(int module_load), m_setident_Load(int module_load), m_sdesc_Load(int module_load);
 extern int m_svsmode_Load(int module_load), m_swhois_Load(int module_load), m_svsmotd_Load(int module_load);
@@ -173,6 +177,10 @@
 extern int m_guest_Load(int module_load);
 #endif
 
+#ifdef WITH_ICONV
+extern int m_codepage_Load(int module_load);
+#endif
+
 extern int m_sethost_Unload(), m_setname_Unload(), m_chghost_Unload(), m_chgident_Unload();
 extern int m_setident_Unload(), m_sdesc_Unload(), m_svsmode_Unload(), m_swhois_Unload();
 extern int m_svsmotd_Unload(), m_svsnline_Unload(), m_who_Unload(), m_mkpasswd_Unload();
@@ -208,6 +216,10 @@
 extern int m_guest_Unload();
 #endif
 
+#ifdef WITH_ICONV 
+extern int m_codepage_Unload();
+#endif
+
 #ifdef DYNAMIC_LINKING
 DLLFUNC int Mod_Test(ModuleInfo *modinfo)
 #else
@@ -347,6 +359,9 @@
 #ifdef GUEST
 	m_guest_Init(ModCmdsInfo);
 #endif
+#ifdef WITH_ICONV
+	m_codepage_Init(ModCmdsInfo);
+#endif
 	MARK_AS_OFFICIAL_MODULE(modinfo);
 	return MOD_SUCCESS;
 }
@@ -459,6 +474,9 @@
 #ifdef GUEST
 	m_guest_Load(module_load);
 #endif
+#ifdef WITH_ICONV
+	m_codepage_Load(module_load);
+#endif
 	return MOD_SUCCESS;
 }
 
@@ -570,6 +588,9 @@
 	m_names_Unload();
 #ifdef GUEST
 	m_guest_Unload();
+#endif
+#ifdef WITH_ICONV
+	m_codepage_Unload();
 #endif
 	return MOD_SUCCESS;
 }
--- src/modules/m_antidccbug.c	Thu Jan  1 06:00:00 1970
+++ src/modules/m_antidccbug.c	Wed Nov 29 11:16:56 2006
@@ -0,0 +1,129 @@
+#include "config.h"
+#include "struct.h"
+#include "common.h"
+#include "sys.h"
+#include "numeric.h"
+#include "msg.h"
+#include "proto.h"
+#include "channel.h"
+#include <time.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _WIN32
+#include <io.h>
+#endif
+#include <fcntl.h>
+#include "h.h"
+#ifdef STRIPBADWORDS
+#include "badwords.h"
+#endif
+#ifdef _WIN32
+#include "version.h"
+#endif
+
+ModuleHeader MOD_HEADER(m_antidccbug)
+  = {
+	"m_antidccbug",	/* Name of module */
+	"v0.0.2", /* Version */
+	"Anti mIRC dcc exploit", /* Short description of module */
+	"3.2-b8-1",
+	NULL 
+    };
+
+#ifndef STATIC_LINKING
+static ModuleInfo 	*ADCMod;
+ #define MyMod		ADCMod->handle
+ #define SAVE_MODINFO	ADCMod = modinfo;
+#else
+ #define MyMod		NULL
+ #define SAVE_MODINFO
+#endif
+
+static Hook *UserMsg = NULL, *ChanMsg = NULL;
+
+static char *adc_usermsg(aClient *, aClient *, aClient *, char *, int);
+static char *adc_chanmsg(aClient *, aClient *, aChannel *, char *, int);
+
+/* This is called on module init, before Server Ready */
+DLLFUNC int	MOD_INIT(m_antidccbug)(ModuleInfo *modinfo)
+{
+	SAVE_MODINFO
+
+	UserMsg = HookAddPCharEx(modinfo->handle, HOOKTYPE_USERMSG, adc_usermsg);
+	ChanMsg = HookAddPCharEx(modinfo->handle, HOOKTYPE_CHANMSG, adc_chanmsg);
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int	MOD_LOAD(m_antidccbug)(int module_load)
+{
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int	MOD_UNLOAD(m_antidccbug)(int module_unload)
+{
+	HookDel(UserMsg);
+	HookDel(ChanMsg);
+	return MOD_SUCCESS;
+}
+
+static char *adc_usermsg(aClient *cptr, aClient *sptr, aClient *acptr, char *text, int notice)
+{
+	if (text && (text[0] == '\001') && !strncasecmp(text+1, "DCC ", 4))
+	{
+		int spaces=0;
+		char *p;
+		int len = strlen(text);
+
+		for (p = text; *p; p++)
+			if (*p == ' ')
+				spaces++;
+		if ((spaces > 20) || (len > 200))
+		{
+			if (MyClient(sptr))
+			{
+				sendto_one(sptr, ":%s NOTICE %s :Suspicious DCC command detected (possible mIRC exploit). "
+			    	             "DCC blocked and opers have been notified.", me.name, sptr->name);
+				sptr->since += 7;
+				sptr->flags |= FLAGS_DCCBLOCK;
+			} else {
+				/* Only happens if other servers don't have the module loaded */
+				sendto_one(sptr, ":%s NOTICE %s :Suspicious DCC command detected (possible mIRC exploit). "
+			    	             "Opers have been notified.", me.name, sptr->name);
+			}
+			sendto_realops("%s (%s@%s) used suspicious DCC command (possible mIRC exploit) [victim was %s]",
+				sptr->name, sptr->user->username, sptr->user->realhost, acptr->name);
+			return NULL;
+		}
+	}
+	return text;
+}
+
+static char *adc_chanmsg(aClient *cptr, aClient *sptr, aChannel *chptr, char *text, int notice)
+{
+	if (text && (text[0] == '\001') && !strncasecmp(text+1, "DCC ", 4))
+	{
+		int spaces=0;
+		char *p;
+		int len = strlen(text);
+
+		for (p = text; *p; p++)
+			if (*p == ' ')
+				spaces++;
+		if ((spaces > 20) || (len > 200))
+		{
+			sendto_one(sptr, ":%s NOTICE %s :Suspicious DCC command detected (possible mIRC exploit). "
+		    	             "Opers have been notified.", me.name, sptr->name);
+			if (MyClient(sptr))
+			{
+				sptr->since += 7;
+				sptr->flags |= FLAGS_DCCBLOCK;
+			}
+			sendto_realops("%s (%s@%s) used suspicious DCC command (possible mIRC exploit) [target was %s]",
+				sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
+			return NULL;
+		}
+	}
+	return text;
+}
--- src/modules/m_codepage.c	Thu Jan  1 06:00:00 1970
+++ src/modules/m_codepage.c	Fri Dec  1 23:33:29 2006
@@ -0,0 +1,196 @@
+/*
+ *   IRC - Internet Relay Chat, src/modules/m_codepage.c
+ *   (C) 1999-2001 Carsten Munk (Techie/Stskeeps) <stskeeps@tspre.org>
+ *
+ *   See file AUTHORS in IRC package for additional names of
+ *   the programmers. 
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 1, or (at your option)
+ *   any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include "config.h"
+#include "struct.h"
+#include "common.h"
+#include "sys.h"
+#include "numeric.h"
+#include "msg.h"
+#include "channel.h"
+#include <time.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _WIN32
+#include <io.h>
+#endif
+#include <fcntl.h>
+#include "h.h"
+#include "proto.h"
+#ifdef STRIPBADWORDS
+#include "badwords.h"
+#endif
+#ifdef _WIN32
+#include "version.h"
+#endif
+
+DLLFUNC int m_codepage(aClient *cptr, aClient *sptr, int parc, char *parv[]);
+DLLFUNC int m_codepages(aClient *cptr, aClient *sptr, int parc, char *parv[]);
+
+ModuleHeader MOD_HEADER(m_codepage)
+	= {
+	"codepage",    /* Name of module */
+	"$Id: m_codepage.c,v 1.1.0.0 2002/12/29 14:20:45 i (admin@i386.net.ru) & Spider Exp $", /* Version */
+	"/codepage", /* Short description of module */
+	"3.2-b8-1",
+	};
+
+/*
+ * The purpose of these ifdefs, are that we can "static" link the ircd if we
+ * want to
+*/
+
+
+DLLFUNC int    MOD_INIT(m_codepage)(ModuleInfo *modinfo)
+{
+	add_Command(MSG_CODEPAGE, TOK_CODEPAGE, m_codepage, MAXPARA);
+	add_Command(MSG_CODEPAGES, TOK_CODEPAGES, m_codepages, MAXPARA);
+	return MOD_SUCCESS;
+    
+}
+
+DLLFUNC int    MOD_LOAD(m_codepage)(int module_load)
+{
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int    MOD_UNLOAD(m_codepage)(int module_unload)
+{
+	if (del_Command(MSG_CODEPAGE, TOK_CODEPAGE, m_codepage) < 0)
+	{
+		sendto_realops("Failed to delete commands when unloading %s",
+			MOD_HEADER(m_codepage).name);
+	}
+	return MOD_SUCCESS;
+}
+
+/* 
+ * m_codepage - 12/29/2002 - ECTb
+ * :prefix CODEPAGE <new codepage>
+ * parv[0] - sender
+ * parv[1] - codepage
+ *
+*/
+
+DLLFUNC int m_codepage(aClient *cptr, aClient *sptr, int parc, char *parv[])
+{
+	if (!MyClient(sptr)) 
+	{
+		aClient *acptr;
+#ifndef WITH_ICONV
+	if (MyClient(sptr))
+	{
+		sendto_one(sptr, ":%s NOTICE %s :*** The /codepage command is disabled on this server", 
+				me.name, sptr->name);
+		return 0;
+	}
+#else
+	if (parc < 3)
+		return 0;    
+	acptr = find_person(parv[1], (aClient *)NULL);
+		if (!acptr)
+			return 0;
+	if (Find_codepage(parv[2])) 
+	{
+		if (!acptr->codepage)
+			acptr->codepage=strdup(parv[2]);
+		else
+			strcpy(acptr->codepage, parv[2]);
+	}
+#endif
+	return 0;
+	}
+
+#ifdef WITH_ICONV
+	
+	if (parc < 2)
+	{
+	sendto_one(sptr,
+		":%s NOTICE %s :*** /codepage syntax is /codepage <new_codepage>",
+			me.name, sptr->name);
+	sendto_one(sptr,
+		":%s NOTICE %s :*** Your current codepage is: %s Port: %d",
+			me.name, sptr->name, sptr->codepage, cptr->listener->port);
+		return 0;
+	}
+
+	if (strlen(parv[1]) < 1)
+	{
+	sendto_one(sptr,
+		":%s NOTICE %s :*** Write atleast something to change the codepage to!",
+			me.name, sptr->name);
+		return 0;
+	}
+
+	if (strlen(parv[1]) > 16)
+	{
+		sendto_one(sptr,
+			":%s NOTICE %s :*** Codepage Error: Too long codepage!!",
+				me.name, sptr->name);
+		return 0;
+	}
+
+	if (Find_codepage(parv[1]))
+	{
+		sptr->codepage = strdup(parv[1]);
+		sendto_one(sptr, rpl_str(RPL_CODEPAGE), me.name, parv[0], sptr->codepage);
+		sendto_serv_butone_token(cptr, sptr->name,
+			MSG_CODEPAGE, TOK_CODEPAGE, "%s :%s", sptr->name, sptr->codepage);
+	return 0;
+	}
+	else
+	{
+		sendto_one(sptr,
+			":%s NOTICE %s :*** /Codepage Error: Unknown codepage %s",
+				me.name, parv[0], parv[1]);
+		return 0;
+	}
+#endif
+	return 0;
+
+}
+
+
+/* 
+ * m_codepages - 2/09/2003 - ECTb
+ * :prefix CODEPAGES
+ * parv[0] - sender
+ *
+*/
+
+DLLFUNC int m_codepages(aClient *cptr, aClient *sptr, int parc, char *parv[])
+{
+#ifdef WITH_ICONV
+	ConfigItem_codepage *cpage = NULL;
+	for (cpage = iConf.cp; cpage; cpage = (ConfigItem_codepage *)cpage->next) 
+	{
+		sendto_one(sptr, rpl_str(RPL_CODEPAGES), me.name, 
+			parv[0], cpage->name, stricmp(DEFAULT_CODEPAGE,cpage->name)?"":" default");
+	}
+	sendto_one(sptr, rpl_str(RPL_ENDOFCODEPAGES), me.name, parv[0]);
+#else
+	sendto_one(sptr, ":%s NOTICE %s :*** The /codepages command is disabled on this server", 
+				me.name, sptr->name);
+#endif
+	return 0;
+}
--- src/modules/m_ircops.c	Thu Jan  1 06:00:00 1970
+++ src/modules/m_ircops.c	Wed Nov 29 11:16:56 2006
@@ -0,0 +1,117 @@
+#include "config.h"
+#include "struct.h"
+#include "common.h"
+#include "sys.h"
+#include "numeric.h"
+#include "msg.h"
+#include "channel.h"
+#include <time.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _WIN32
+#include <io.h>
+#endif
+#include <fcntl.h>
+#include "h.h"
+#include "proto.h"
+#ifdef STRIPBADWORDS
+#include "badwords.h"
+#endif
+#ifdef _WIN32
+#include "version.h"
+#endif
+
+DLLFUNC int m_ircops(aClient * cptr, aClient * sptr, int parc, char *parv[]);
+/* Place includes here */
+#define MSG_IRCOPS       "IRCOPS" /* dummy */
+#define TOK_IRCOPS       "IR"    /* 127 4ever !;) */
+
+#ifndef DYNAMIC_LINKING
+ModuleHeader m_ircops_Header
+#else
+#define m_ircops_Header Mod_Header
+ModuleHeader Mod_Header
+#endif
+  = {
+        "ircops",        /* Name of module */
+	"$Id: m_ircops.c,v 1.1.4.14 2002/05/20 19:43:13 stskeeps Exp $", /* Version */
+        "command /ircops", /* Short description of module */
+        "3.2-b8-1",
+        NULL
+    };
+#ifdef DYNAMIC_LINKING
+DLLFUNC int     Mod_Init(ModuleInfo *modinfo)
+#else
+int    m_ircops_Init(ModuleInfo *modinfo)
+#endif
+{
+        /*
+         * We call our add_Command crap here
+        */
+        add_Command(MSG_IRCOPS, TOK_IRCOPS, m_ircops, MAXPARA);
+	return MOD_SUCCESS;
+}
+
+/* Is first run when server is 100% ready */
+#ifdef DYNAMIC_LINKING
+DLLFUNC int     Mod_Load(int module_load)
+#else
+int    m_ircops_Load(int module_load)
+#endif
+{
+	return MOD_SUCCESS;
+}
+
+
+/* Called when module is unloaded */
+#ifdef DYNAMIC_LINKING
+DLLFUNC int     Mod_Unload(int module_unload)
+#else
+int     m_ircops_Unload(int module_unload)
+#endif
+{
+        if (del_Command(MSG_IRCOPS, TOK_IRCOPS, m_ircops) < 0)
+        {
+                sendto_realops("Failed to delete commands when unloading %s",
+                                m_ircops_Header.name);
+        }
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int m_ircops(aClient * cptr, aClient * sptr, int parc, char *parv[])
+{
+    aClient *acptr;
+    int totalops = 0;
+    char *stat, buf[200];
+
+    /* if (!IsOper(cptr)) { */
+    sendto_one(cptr, ":%s 009 %s :\2Nick\2                           Status                      \02Servidor\02", me.name, cptr->name);
+    sendto_one(cptr, ":%s 009 %s :-----------------------------------------------------------------------",
+        me.name, cptr->name);
+
+    for (acptr = client; acptr; acptr = acptr->next)
+    {
+        if (IsPerson(acptr) && IsAnOper(acptr) && !IsULine(acptr) && !IsHideOper(acptr))
+        {
+            buf[0] = '\0';
+            sendto_one(cptr, ":%s 009 %s :%-30s  %-9s %-9s  %s",me.name, cptr->name,
+                    acptr->name ? acptr->name : "<Desconhecido>",
+                    IsNetAdmin(acptr) ? "NetAdmin" : IsAdmin(acptr) ? "SrvAdmin" : IsOper(acptr) ? "Global" : "Local",
+                    acptr->user->away ? "(AWAY)" : IsHelpOp(acptr) ? "Helper" : "",
+                    acptr->user->server);
+
+           totalops++;
+        }
+    }
+    if (totalops == 0)
+        sendto_one(cptr, ":%s 009 %s :Nenhum Ircop conectado. ",me.name, cptr->name);
+    sendto_one(cptr, ":%s 009 %s :-----------------------------------------------------------------------",
+        me.name, cptr->name);
+    sendto_one(cptr, ":%s 009 %s :Total:  %d  IRCop(s) conectado(s).", me.name, cptr->name, totalops);
+    sendto_one(cptr, ":%s 009 %s :-----------------------------------------------------------------------",
+        me.name, cptr->name);
+    return 0;
+}
+
--- src/modules/m_nick.c	Sat Jun 17 01:29:16 2006
+++ src/modules/m_nick.c	Fri Dec  1 22:24:01 2006
@@ -121,6 +121,9 @@
 	time_t lastnick = (time_t) 0;
 	int   	unsigned char newusr = 0, removemoder = 1;
+#ifdef USE_MINNICKLEN
+	int nicklen = 0;
+#endif
 	/*
 	 * If the user didn't specify a nickname, complain
 	 */
@@ -150,8 +153,26 @@
 	 * For remote clients, do a quick check by using do_remote_nick_name(),
 	 * if this returned false then reject and kill it. -- Syzop
 	 */
+#ifdef USE_MINNICKLEN
+	if (!IsServer(cptr)) {
+		nicklen = do_nick_name(nick);
+		if (MyConnect(sptr) && sptr->user && !IsAnOper(sptr) && (MINNICKLEN>1) && (nicklen<MINNICKLEN)) 
+		{
+			char tmpbuf[45];
+			sprintf(tmpbuf,"Nick length must be not less %d chars",MINNICKLEN);
+			sendto_one(sptr, err_str(ERR_ERRONEUSNICKNAME),
+			    me.name, parv[0], nick, tmpbuf);
+			return 0;
+		}
+	} else {
+		nicklen = do_remote_nick_name(nick);
+	}
+
+	if ((IsServer(cptr) && !nicklen) || (!IsServer(cptr) && !nicklen))
+#else
 	if ((IsServer(cptr) && !do_remote_nick_name(nick)) ||
 	    (!IsServer(cptr) && !do_nick_name(nick)))
+#endif
 	{
 		sendto_one(sptr, err_str(ERR_ERRONEUSNICKNAME),
 		    me.name, parv[0], parv[1], "Illegal characters");
@@ -811,6 +832,9 @@
 int _register_user(aClient *cptr, aClient *sptr, char *nick, char *username, char *umode, char *virthost, char *ip)
 {
 	ConfigItem_ban *bconf;
+#ifdef WITH_ICONV
+	ConfigItem_listen *plisten;
+#endif
 	char *parv[3], *tmpstr;
 #ifdef HOSTILENAME
 	char stripuser[USERLEN + 1], *u1 = stripuser, *u2, olduser[USERLEN + 1],
@@ -842,6 +866,19 @@
 	
 	if (MyConnect(sptr))
 	{
+#ifdef WITH_ICONV
+		plisten = Find_listen("*",cptr->listener->port);
+		if (plisten)
+		{
+			cptr->codepage = strdup(plisten->codepage);
+			sendto_one(cptr, ":%s NOTICE AUTH :*** You connected on %d port. Using %s translation scheme as default.", me.name, cptr->listener->port, cptr->codepage);
+		}
+		else
+		{
+			cptr->codepage = strdup(DEFAULT_CODEPAGE);
+			sendto_one(cptr, ":%s NOTICE AUTH :*** You connected on %d port. Translation scheme not specified for this port.", me.name, cptr->listener->port);
+		}
+#endif	
 		if ((i = check_client(sptr, username))) {
 			/* This had return i; before -McSkaf */
 			if (i == -5)
@@ -1151,6 +1188,18 @@
 	    user->server, user->servicestamp, sptr->info,
 	    (!buf || *buf == '\0' ? "+" : buf),
 	    sptr->umodes & UMODE_SETHOST ? sptr->user->virthost : NULL);
+
+#ifdef WITH_ICONV
+	if (MyConnect(sptr))
+	{
+		if (sptr->codepage)
+		{
+			sendto_one(sptr, rpl_str(RPL_CODEPAGE), sptr->name, parv[0], sptr->codepage);
+			sendto_serv_butone_token(sptr, sptr->name,
+				MSG_CODEPAGE, TOK_CODEPAGE, "%s :%s", sptr->name, sptr->codepage);
+		}
+	}
+#endif
 
 	/* Send password from sptr->passwd to NickServ for identification,
 	 * if passwd given and if NickServ is online.
--- src/modules/m_operSSL.c	Thu Jan  1 06:00:00 1970
+++ src/modules/m_operSSL.c	Wed Nov 29 11:16:56 2006
@@ -0,0 +1,449 @@
+/*
+ * =================================================================
+ * Filename:            m_operssl.c
+ * Description:         Failed OPER attempts notifier
+ * Documentation:	m_operssl.txt (comes with the package)
+ * Author:              AngryWolf <angrywolf@flashmail.com>
+ * =================================================================
+ */
+
+#include "config.h"
+#ifdef USE_SSL
+#include "struct.h"
+#include "common.h"
+#include "sys.h"
+#include "numeric.h"
+#include "msg.h"
+#include "channel.h"
+#include <time.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _WIN32
+#include <io.h>
+#endif
+#include <fcntl.h>
+#include "h.h"
+#ifdef STRIPBADWORDS
+#include "badwords.h"
+#endif
+#ifdef _WIN32
+#include "version.h"
+#endif
+
+extern int			SVSNOOP;
+extern void			sendto_realops(char *pattern, ...);
+extern void			sendto_serv_butone_token(aClient *one, char *prefix, char *command, char *token, char *pattern, ...);
+
+#define FlagOperSSL		'o'
+#define ircstrdup(x,y)		if (x) MyFree(x); if (!y) x = NULL; else x = strdup(y)
+#define ircfree(x)		if (x) MyFree(x); x = NULL
+#define DelHook(x)		if (x) HookDel(x); x = NULL
+#define DelOverride(cmd, ovr)	if (ovr && CommandExists(cmd)) CmdoverrideDel(ovr); ovr = NULL
+#define DelSnomask(x)		if (x) SnomaskDel(x); x = NULL
+
+static Cmdoverride		*AddOverride(char *msg, iFP cb);
+static Snomask			*AddSnomask(char flag, iFP allowed, long *mode);
+static int			ovr_oper(Cmdoverride *, aClient *, aClient *, int, char *[]);
+static int			cb_test(ConfigFile *, ConfigEntry *, int, int *);
+static int			cb_conf(ConfigFile *, ConfigEntry *, int);
+static int			cb_quit(aClient *, char *);
+static int			cb_rehash();
+#ifdef HOOKTYPE_REHASH_COMPLETE
+static int			cb_rehash_complete();
+#endif
+static void			LoadSnomask();
+static int			umode_allow_admins(aClient *sptr, int what);
+
+typedef struct _fcount FCount;
+
+struct _fcount
+{
+	FCount		*prev, *next;
+	aClient		*cptr;
+	u_int		count;
+};
+
+static Cmdoverride			*OvrOper = NULL;
+static Hook				*HookConfTest, *HookConfRun, *HookConfRehash;
+static Hook				*HookQuit;
+#ifdef HOOKTYPE_REHASH_COMPLETE
+static Hook				*HookRehashDone;
+#else
+static u_int			event_added;
+#endif
+static Snomask		*SnomaskOperSSL = NULL;
+static long			SNO_OPERSSL = 0;
+static FCount		*FailedOperups = NULL;
+
+static struct {
+	unsigned	enable: 1;
+	unsigned	enable_snomask: 1;
+	unsigned	enable_global_notices: 1;
+	unsigned	enable_logging: 1;
+	u_int		max_failed_operups;
+	char		*failop_kill_reason;
+} Settings;
+
+#ifndef STATIC_LINKING
+static ModuleInfo	*MyModInfo;
+ #define MyMod		MyModInfo->handle
+ #define SAVE_MODINFO	MyModInfo = modinfo;
+#else
+ #define MyMod		NULL
+ #define SAVE_MODINFO
+#endif
+
+ModuleHeader MOD_HEADER(m_operssl)
+  = {
+	"m_operssl",
+	"$Id: m_operssl.c,v 2.8 2004/03/18 22:20:25 Spider Exp $",
+	"Denny non SSL oper",
+	"3.2-b8-1",
+	NULL
+    };
+
+static void InitConf()
+{
+#ifndef HOOKTYPE_REHASH_COMPLETE
+	event_added = 0;
+#endif
+	memset(&Settings, 0, sizeof Settings);
+}
+
+static void FreeConf()
+{
+	ircfree(Settings.failop_kill_reason);
+}
+
+static int cb_rehash()
+{
+#ifndef STATIC_LINKING
+	DelOverride("oper", OvrOper);
+#endif
+	FreeConf();
+	InitConf();
+
+	return 1;
+}
+
+#ifdef HOOKTYPE_REHASH_COMPLETE
+static int cb_rehash_complete()
+#else
+static EVENT(LoadObjects)
+#endif
+{
+	LoadSnomask();
+#ifndef STATIC_LINKING
+	OvrOper = AddOverride("oper", ovr_oper);
+#endif
+
+#ifdef HOOKTYPE_REHASH_COMPLETE
+	return 0;
+#endif
+}
+
+static void LoadSnomask()
+{
+	if (Settings.enable_snomask)
+	{
+		if (!SnomaskOperSSL)
+			SnomaskOperSSL = AddSnomask(FlagOperSSL,
+				 umode_allow_admins, &SNO_OPERSSL);
+	}
+	else
+	{
+		DelSnomask(SnomaskOperSSL);
+	}
+}
+
+DLLFUNC int MOD_TEST(m_operssl)(ModuleInfo *modinfo)
+{
+	SAVE_MODINFO
+	HookConfTest = HookAddEx(modinfo->handle, HOOKTYPE_CONFIGTEST, cb_test);
+
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_INIT(m_operssl)(ModuleInfo *modinfo)
+{
+	SAVE_MODINFO
+	SnomaskOperSSL	= NULL;
+	FailedOperups	= NULL;
+#ifndef STATIC_LINKING
+	ModuleSetOptions(modinfo->handle, MOD_OPT_PERM);
+#endif
+	InitConf();
+
+	HookConfRun	= HookAddEx(modinfo->handle, HOOKTYPE_CONFIGRUN, cb_conf);
+	HookConfRehash	= HookAddEx(modinfo->handle, HOOKTYPE_REHASH, cb_rehash);
+        HookQuit	= HookAddEx(modinfo->handle, HOOKTYPE_LOCAL_QUIT, cb_quit);
+#ifdef HOOKTYPE_REHASH_COMPLETE
+	HookRehashDone	= HookAddEx(modinfo->handle, HOOKTYPE_REHASH_COMPLETE, cb_rehash_complete);
+#endif
+
+        return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_LOAD(m_operssl)(int module_load)
+{
+	LoadSnomask();
+	OvrOper = AddOverride("oper", ovr_oper);
+
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_UNLOAD(m_operssl)(int module_unload)
+{
+	FCount		*f;
+	ListStruct	*next;
+
+	FreeConf();
+
+	DelOverride("oper", OvrOper);
+	DelSnomask(SnomaskOperSSL);
+#ifdef HOOKTYPE_REHASH_COMPLETE
+	DelHook(HookRehashDone);
+#endif
+	DelHook(HookQuit);
+	DelHook(HookConfRehash);
+	DelHook(HookConfRun);
+	DelHook(HookConfTest);
+
+	for (f = FailedOperups; f; f = (FCount *) next)
+	{
+		next = (ListStruct *) f->next;
+		DelListItem(f, FailedOperups);
+		MyFree(f);
+	}
+
+	return MOD_SUCCESS;
+}
+
+static int umode_allow_admins(aClient *sptr, int what)
+{
+	if (MyClient(sptr))
+		return IsSkoAdmin(sptr) ? 1 : 0;
+	else
+		return 1;
+}
+
+static Cmdoverride *AddOverride(char *msg, iFP cb)
+{
+	Cmdoverride *ovr = CmdoverrideAdd(MyMod, msg, cb);
+
+#ifndef STATIC_LINKING
+        if (ModuleGetError(MyMod) != MODERR_NOERROR || !ovr)
+#else
+        if (!ovr)
+#endif
+	{
+#ifndef STATIC_LINKING
+		config_error("Error replacing command %s when loading module %s: %s",
+			msg, MOD_HEADER(m_operssl).name, ModuleGetErrorStr(MyMod));
+#else
+		config_error("Error replacing command %s when loading module %s",
+			msg, MOD_HEADER(m_operssl).name);
+#endif
+		return NULL;
+	}
+
+	return ovr;
+}
+
+static Snomask *AddSnomask(char flag, iFP allowed, long *mode)
+{
+	Snomask *s;
+
+	*mode = 0;
+	s = SnomaskAdd(MyMod, flag, allowed, mode);
+
+#ifndef STATIC_LINKING
+	if ((ModuleGetError(MyMod) != MODERR_NOERROR) || !s)
+#else
+	if (!s)
+#endif
+	{
+#ifndef STATIC_LINKING
+		sendto_realops("Error adding snomask %c: %s",
+			flag, ModuleGetErrorStr(MyMod));
+#else
+		sendto_realops("Error adding snomask %c",
+			flag);
+#endif
+                return NULL;
+	}
+
+	return s;
+}
+
+#define CHECK_EMPTY(ce, parent) \
+		if (!(ce)->ce_varname) \
+		{ \
+			config_error("%s:%i: blank %s item", \
+				(ce)->ce_fileptr->cf_filename, \
+				(ce)->ce_varlinenum, (parent)->ce_varname); \
+			errors++; \
+			continue; \
+		} \
+		if (!(ce)->ce_vardata) \
+		{ \
+			config_error("%s:%i: %s::%s without value", \
+				(ce)->ce_fileptr->cf_filename, \
+				(ce)->ce_varlinenum, \
+				(parent)->ce_varname, (ce)->ce_varname); \
+			errors++; \
+			continue; \
+		}
+
+static int cb_test(ConfigFile *cf, ConfigEntry *ce, int type, int *errs)
+{
+	ConfigEntry	*cep;
+	int		errors = 0;
+
+	if (type != CONFIG_MAIN)
+		return 0;
+
+	if (!strcmp(ce->ce_varname, "operssl"))
+	{
+		for (cep = ce->ce_entries; cep; cep = cep->ce_next)
+		{
+			CHECK_EMPTY(cep, ce)
+
+			if (!strcmp(cep->ce_varname, "enable"))
+				;
+			else if (!strcmp(cep->ce_varname, "enable-snomask"))
+				;
+			else if (!strcmp(cep->ce_varname, "enable-global-notices"))
+				;
+			else if (!strcmp(cep->ce_varname, "enable-logging"))
+				;
+			else if (!strcmp(cep->ce_varname, "max-failed-operups"))
+				;
+			else if (!strcmp(cep->ce_varname, "failop-kill-reason"))
+				;
+			else
+			{
+				config_error("%s:%i: unknown directive m_operssl::%s",
+					cep->ce_fileptr->cf_filename, cep->ce_varlinenum, cep->ce_varname);
+				errors++;
+			}
+
+		}
+		*errs = errors;
+		return errors ? -1 : 1;
+	}
+	else
+		return 0;
+}
+
+static int cb_conf(ConfigFile *cf, ConfigEntry *ce, int type)
+{
+	ConfigEntry	*cep;
+
+	if (type != CONFIG_MAIN)
+		return 0;
+
+	if (!strcmp(ce->ce_varname, "operssl"))
+	{
+		for (cep = ce->ce_entries; cep; cep = cep->ce_next)
+		{
+			if (!strcmp(cep->ce_varname, "enable"))
+				Settings.enable = config_checkval(cep->ce_vardata, CFG_YESNO);
+			else if (!strcmp(cep->ce_varname, "enable-snomask"))
+				Settings.enable_snomask = config_checkval(cep->ce_vardata, CFG_YESNO);
+			else if (!strcmp(cep->ce_varname, "enable-global-notices"))
+				Settings.enable_global_notices = config_checkval(cep->ce_vardata, CFG_YESNO);
+			else if (!strcmp(cep->ce_varname, "enable-logging"))
+				Settings.enable_logging = config_checkval(cep->ce_vardata, CFG_YESNO);
+			else if (!strcmp(cep->ce_varname, "max-failed-operups"))
+				Settings.max_failed_operups = atoi(cep->ce_vardata);
+			else if (!strcmp(cep->ce_varname, "failop-kill-reason"))
+			{
+				ircstrdup(Settings.failop_kill_reason, cep->ce_vardata);
+			}
+		}
+
+#ifndef HOOKTYPE_REHASH_COMPLETE
+		if (!event_added)
+		{
+			/* Not the best solution, but it works. */
+			EventAdd("m_operssl_loadobjects", 0, 1,
+				LoadObjects, NULL);
+			event_added = 1;
+		}
+#endif
+
+		return 1;
+	}
+
+	return 0;
+}
+
+static int cb_quit(aClient *sptr, char *comment)
+{
+	FCount *f;
+
+	for (f = FailedOperups; f; f = f->next)
+		if (f->cptr == sptr)
+			break;
+
+	if (f)
+	{
+		DelListItem(f, FailedOperups);
+		MyFree(f);
+	}
+
+	return 0;
+}
+
+static int ovr_oper(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, char *parv[])
+{
+	static char	buf[1024];
+	FCount		*f;
+	int		ret;
+
+	/* No need for a '!MyConnect(sptr)' check. */
+	if (!IsPerson(sptr) || IsAnOper(sptr) || SVSNOOP || parc < 3)
+		return CallCmdoverride(ovr, cptr, sptr, parc, parv);
+
+
+	if (Settings.enable && !IsSSL(sptr))
+	{
+		if (Settings.enable_snomask)
+			sendto_snomask(SNO_OPERSSL,"*** Notice -- [FAILOP] %s use not SSL connection",	sptr->name);
+		if (Settings.enable_logging)
+			ircd_log(LOG_OPER, "[FAILOP] %s use not SSL connection", sptr->name);
+
+		for (f = FailedOperups; f; f = f->next)
+			if (f->cptr == sptr)
+				break;
+
+	    if (!f)
+		{
+			f = (FCount *) MyMallocEx(sizeof(FCount));
+			f->cptr = sptr;
+			f->count = 1;
+			AddListItem(f, FailedOperups);			
+		}
+		else
+		{
+			f->count++;
+
+			if (Settings.max_failed_operups && f->count > Settings.max_failed_operups)
+				return exit_client(cptr, sptr, &me,
+					Settings.failop_kill_reason ? Settings.failop_kill_reason :
+					"Too many failed oper-ups");
+		}		
+
+		sendto_one(sptr,
+			    ":%s %s %s :*** You need SSL connection to take oper",
+			    me.name, IsWebTV(sptr) ? "PRIVMSG" : "NOTICE", sptr->name);
+
+		return 0;
+	} else {
+		return CallCmdoverride(ovr, cptr, sptr, parc, parv);
+	}
+}
+#endif
--- src/modules/m_regexcept.c	Thu Jan  1 06:00:00 1970
+++ src/modules/m_regexcept.c	Wed Nov 29 11:16:56 2006
@@ -0,0 +1,109 @@
+/*
+ * Reg except: extban ~E. (C) Copyright 2004 Bram Matthys.
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * See README for instructions
+ *
+ * $Id: m_regexcept.c,v 1.2 2004/04/22 19:45:34 syzop Exp $
+ */
+
+#include "config.h"
+#include "struct.h"
+#include "common.h"
+#include "sys.h"
+#include "numeric.h"
+#include "msg.h"
+#include "proto.h"
+#include "channel.h"
+#include <time.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _WIN32
+#include <io.h>
+#endif
+#include <fcntl.h>
+#include "h.h"
+#ifdef STRIPBADWORDS
+#include "badwords.h"
+#endif
+#ifdef _WIN32
+#include "version.h"
+#endif
+
+ModuleHeader MOD_HEADER(m_regexcept)
+  = {
+	"m_regexcept",
+	"v0.1",
+	"ExtBan ~E",
+	"3.2-b8-1",
+	NULL 
+    };
+
+Extban *extbanE;
+
+char *extban_modeE_conv_param(char *para)
+{
+static char retbuf[64];
+
+	strlcpy(retbuf, para, sizeof(retbuf));
+	if (do_nick_name(retbuf+3) == 0)
+		return NULL;
+	return retbuf;
+};
+
+int extban_modeE_is_banned(aClient *sptr, aChannel *chptr, char *xban, int type)
+{
+char *ban = xban + 3;
+
+	if (IsRegNick(sptr) && !strcasecmp(ban, sptr->name))
+		return 1;
+	return 0;
+}
+
+DLLFUNC int MOD_INIT(m_regexcept)(ModuleInfo *modinfo)
+{
+ExtbanInfo req;
+
+	memset(&req, 0, sizeof(ExtbanInfo));
+	req.flag = 'E';
+	req.conv_param = extban_modeE_conv_param;
+	req.is_banned = extban_modeE_is_banned;
+	extbanE = ExtbanAdd(modinfo->handle, req);
+	if (!extbanE)
+	{
+		config_error("m_regexcept module: adding extban ~E failed! module NOT loaded");
+		return MOD_FAILED;
+	}
+
+	ModuleSetOptions(modinfo->handle, MOD_OPT_PERM);
+
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_LOAD(m_regexcept)(int module_load)
+{
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_UNLOAD(m_regexcept)(int module_unload)
+{
+	/* This is unexpected as of RC2, but might work in the future... */
+	ExtbanDel(extbanE);
+	return MOD_SUCCESS;
+}
+
--- src/modules/m_server.c	Sat Jun 17 01:29:18 2006
+++ src/modules/m_server.c	Fri Dec  1 22:24:21 2006
@@ -892,7 +892,14 @@
 					    (IsToken(cptr) ? TOK_SWHOIS :
 					    MSG_SWHOIS), acptr->name,
 					    acptr->user->swhois);
-
+#ifdef WITH_ICONV
+ 			if (acptr->codepage)
+ 				if (*acptr->codepage != '\0')
+ 					sendto_one(cptr, "%s %s :%s",
+ 					    (IsToken(cptr) ? TOK_CODEPAGE :
+ 					    MSG_CODEPAGE), acptr->name,
+ 					    acptr->codepage);
+#endif
 			if (!SupportSJOIN(cptr))
 				send_user_joins(cptr, acptr);
 		}
--- src/modules/m_stats.c	Sat Jun 17 01:29:18 2006
+++ src/modules/m_stats.c	Fri Dec  1 22:27:06 2006
@@ -119,6 +119,9 @@
 int stats_zip(aClient *, char *);
 int stats_officialchannels(aClient *, char *);
 int stats_spamfilter(aClient *, char *);
+#ifdef WITH_ICONV
+int stats_codepages(aClient *, char *);
+#endif
 
 #define SERVER_AS_PARA 0x1
 #define FLAGS_AS_PARA 0x2
@@ -168,6 +171,9 @@
 	{ 'm', "command",	stats_command,		0 		},
 	{ 'n', "banrealname",	stats_banrealname,	0 		},
 	{ 'o', "oper",		stats_oper,		0 		},
+#ifdef WITH_ICONV
+	{ 'p', "codepages",	stats_codepages,	0 		},
+#endif
 	{ 'q', "bannick",	stats_bannick,		FLAGS_AS_PARA	},
 	{ 'r', "chanrestrict",	stats_chanrestrict,	0 		},
 	{ 's', "shun",		stats_shun,		FLAGS_AS_PARA	},
@@ -275,6 +281,10 @@
 		"O - oper - Send the oper block list");
 	sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, sptr->name,
 		"P - port - Send information about ports");
+#ifdef WITH_ICONV
+	sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, sptr->name,
+		"p - codepages - Send information about codepages");
+#endif
 	sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, sptr->name,
 		"q - bannick - Send the ban nick block list");
 	sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, sptr->name,
@@ -684,12 +694,19 @@
 			continue;
 	  	if (!IsListening(acptr))
 	  		continue;
+#ifdef WITH_ICONV
 	  	sendto_one(sptr, ":%s %s %s :*** Listener on %s:%i, clients %i. is %s %s",
+#else
+		sendto_one(sptr, ":%s %s %s :*** Listener on %s:%i, clients %i. is %s %s %s",
+#endif
 	  		me.name, IsWebTV(sptr) ? "PRIVMSG" : "NOTICE", sptr->name,
 	  		((ConfigItem_listen *)acptr->class)->ip,
 			((ConfigItem_listen *)acptr->class)->port,
 			((ConfigItem_listen *)acptr->class)->clients,
 			((ConfigItem_listen *)acptr->class)->flag.temporary ? "TEMPORARY" : "PERM",
+#ifdef WITH_ICONV
+			((ConfigItem_listen *)acptr->class)->codepage ? ((ConfigItem_listen *)acptr->class)->codepage : (DEFAULT_CODEPAGE),
+#endif
 			stats_port_helper(acptr));
 	}
 	return 0;
@@ -1333,6 +1350,10 @@
 	    sptr->name, ALLOW_PART_IF_SHUNNED);
 	sendto_one(sptr, ":%s %i %s :maxchannelsperuser: %i", me.name, RPL_TEXT,
 	    sptr->name, MAXCHANNELSPERUSER);
+#ifdef USE_MINNICKLEN
+	sendto_one(sptr, ":%s %i %s :minnicklen: %i", me.name, RPL_TEXT,
+	    sptr->name, MINNICKLEN);
+#endif
 	sendto_one(sptr, ":%s %i %s :auto-join: %s", me.name, RPL_TEXT,
 	    sptr->name, AUTO_JOIN_CHANS ? AUTO_JOIN_CHANS : "0");
 	sendto_one(sptr, ":%s %i %s :oper-auto-join: %s", me.name,
@@ -1637,3 +1658,14 @@
 #endif
 	return 0;
 }
+
+#ifdef WITH_ICONV
+int stats_codepages(aClient *sptr, char *para)
+{
+	ConfigItem_codepage *x;
+	for (x = iConf.cp; x; x = (ConfigItem_codepage *)x->next)
+		sendto_one(sptr, ":%s %i %s :%s %s",
+			me.name, RPL_TEXT, sptr->name, x->name, stricmp(DEFAULT_CODEPAGE,x->name)?"":" default");
+	return 0;
+}
+#endif
\ No newline at end of file
--- src/modules/m_whois.c	Sat Jun 17 01:29:18 2006
+++ src/modules/m_whois.c	Fri Dec  1 22:27:25 2006
@@ -330,10 +330,16 @@
 			 * global oper or services.
 			 * -CodeM/Barubary
 			 */
-			if (MyConnect(acptr))
+			if (!(acptr->umodes & UMODE_HIDEWHOIS) && MyConnect(acptr))
 				sendto_one(sptr, rpl_str(RPL_WHOISIDLE),
 				    me.name, parv[0], name,
 				    TStime() - acptr->last, acptr->firsttime);
+#ifdef WITH_ICONV
+			if (MyConnect(acptr))
+		    	sendto_one(sptr, rpl_str(RPL_WHOISSCHEME), 
+				    me.name, parv[0], name,
+				    acptr->codepage ? acptr->codepage : DEFAULT_CODEPAGE);
+#endif
 		}
 		if (!found)
 			sendto_one(sptr, err_str(ERR_NOSUCHNICK),
--- src/modules/nocolorumode.c	Thu Jan  1 06:00:00 1970
+++ src/modules/nocolorumode.c	Wed Nov 29 11:16:56 2006
@@ -0,0 +1,92 @@
+/*
+ *   IRC - Internet Relay Chat, nocolorumode.c
+ *   (C) 2003 Dominick Meglio
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 1, or (at your option)
+ *   any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include "config.h"
+#include "struct.h"
+#include "common.h"
+#include "sys.h"
+#include "numeric.h"
+#include "msg.h"
+#include "channel.h"
+#include <time.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _WIN32
+#include <io.h>
+#endif
+#include <fcntl.h>
+#include "h.h"
+#include "proto.h"
+#ifdef STRIPBADWORDS
+#include "badwords.h"
+#endif
+#ifdef _WIN32
+#include "version.h"
+#endif
+
+ModuleHeader MOD_HEADER(nocolorumode)
+  = {
+	"nocolorumode",
+	"1.0",
+	"color stripping usermode", 
+	"3.2-b8-1",
+	NULL 
+    };
+
+long UMODE_STRIPCOLOR = 0L;
+static Umode *ncUmode = NULL;
+
+char *h_nocolor_usermsg(aClient *cptr, aClient *sptr, aClient *acptr, char *text, int notice);
+
+DLLFUNC int MOD_INIT(nocolorumode)(ModuleInfo *modinfo)
+{
+	ncUmode = UmodeAdd(modinfo->handle, 'c', UMODE_GLOBAL, umode_allow_all, &UMODE_STRIPCOLOR);
+	if (!ncUmode)	{
+		/* I use config_error() here because it's printed to stderr in case of a load
+		* on cmd line, and to all opers in case of a /rehash.
+		 */		
+		config_error("nocolorumode: Could not add usermode 'c': %s", ModuleGetErrorStr(modinfo->handle));		
+		return MOD_FAILED;
+	}
+	HookAddPCharEx(modinfo->handle, HOOKTYPE_USERMSG, h_nocolor_usermsg);
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_LOAD(nocolorumode)(int module_load)
+{
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_UNLOAD(nocolorumode)(int module_unload)
+{
+	if (ncUmode) UmodeDel(ncUmode);
+	return MOD_SUCCESS;
+}
+
+char *h_nocolor_usermsg(aClient *cptr, aClient *sptr, aClient *acptr, char *text, int notice)
+{
+	if (!IsPerson(sptr))
+		return text;
+
+	if (acptr->umodes & UMODE_STRIPCOLOR)
+		return StripColors(text);
+
+	return text;
+}
--- src/modules/operpasswd.c	Thu Jan  1 06:00:00 1970
+++ src/modules/operpasswd.c	Wed Nov 29 11:16:56 2006
@@ -0,0 +1,446 @@
+/*
+ * =================================================================
+ * Filename:            operpasswd.c
+ * Description:         Failed OPER attempts notifier
+ * Documentation:	operpasswd.txt (comes with the package)
+ * Author:              AngryWolf <angrywolf@flashmail.com>
+ * =================================================================
+ */
+
+#include "config.h"
+#include "struct.h"
+#include "common.h"
+#include "sys.h"
+#include "numeric.h"
+#include "msg.h"
+#include "channel.h"
+#include <time.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _WIN32
+#include <io.h>
+#endif
+#include <fcntl.h>
+#include "h.h"
+#ifdef STRIPBADWORDS
+#include "badwords.h"
+#endif
+#ifdef _WIN32
+#include "version.h"
+#endif
+
+extern int			SVSNOOP;
+extern void			sendto_realops(char *pattern, ...);
+extern void			sendto_serv_butone_token(aClient *one, char *prefix, char *command, char *token, char *pattern, ...);
+
+#define FlagOperPass		'O'
+#define ircstrdup(x,y)		if (x) MyFree(x); if (!y) x = NULL; else x = strdup(y)
+#define ircfree(x)		if (x) MyFree(x); x = NULL
+#define DelHook(x)		if (x) HookDel(x); x = NULL
+#define DelOverride(cmd, ovr)	if (ovr && CommandExists(cmd)) CmdoverrideDel(ovr); ovr = NULL
+#define DelSnomask(x)		if (x) SnomaskDel(x); x = NULL
+
+static Cmdoverride		*AddOverride(char *msg, iFP cb);
+static Snomask			*AddSnomask(char flag, iFP allowed, long *mode);
+static int			ovr_oper(Cmdoverride *, aClient *, aClient *, int, char *[]);
+static int			cb_test(ConfigFile *, ConfigEntry *, int, int *);
+static int			cb_conf(ConfigFile *, ConfigEntry *, int);
+static int			cb_quit(aClient *, char *);
+static int			cb_rehash();
+#ifdef HOOKTYPE_REHASH_COMPLETE
+static int			cb_rehash_complete();
+#endif
+static void			LoadSnomask();
+static int			umode_allow_admins(aClient *sptr, int what);
+
+typedef struct _fcount FCount;
+
+struct _fcount
+{
+	FCount		*prev, *next;
+	aClient		*cptr;
+	u_int		count;
+};
+
+Cmdoverride			*OvrOper = NULL;
+Hook				*HookConfTest, *HookConfRun, *HookConfRehash;
+Hook				*HookQuit;
+#ifdef HOOKTYPE_REHASH_COMPLETE
+Hook				*HookRehashDone;
+#else
+u_int				event_added;
+#endif
+Snomask				*SnomaskOperPass = NULL;
+long				SNO_OPERPASS = 0;
+FCount				*FailedOperups = NULL;
+
+struct {
+	unsigned	enable_snomask: 1;
+	unsigned	enable_global_notices: 1;
+	unsigned	enable_logging: 1;
+	u_int		max_failed_operups;
+	char		*failop_kill_reason;
+} Settings;
+
+#ifndef STATIC_LINKING
+static ModuleInfo	*MyModInfo;
+ #define MyMod		MyModInfo->handle
+ #define SAVE_MODINFO	MyModInfo = modinfo;
+#else
+ #define MyMod		NULL
+ #define SAVE_MODINFO
+#endif
+
+ModuleHeader MOD_HEADER(operpasswd)
+  = {
+	"operpasswd",
+	"$Id: operpasswd.c,v 2.8 2004/03/18 22:20:25 angrywolf Exp $",
+	"Failed OPER attempts notifier",
+	"3.2-b8-1",
+	NULL
+    };
+
+static void InitConf()
+{
+#ifndef HOOKTYPE_REHASH_COMPLETE
+	event_added = 0;
+#endif
+	memset(&Settings, 0, sizeof Settings);
+}
+
+static void FreeConf()
+{
+	ircfree(Settings.failop_kill_reason);
+}
+
+static int cb_rehash()
+{
+#ifndef STATIC_LINKING
+	DelOverride("oper", OvrOper);
+#endif
+	FreeConf();
+	InitConf();
+
+	return 1;
+}
+
+#ifdef HOOKTYPE_REHASH_COMPLETE
+static int cb_rehash_complete()
+#else
+static EVENT(LoadObjects)
+#endif
+{
+	LoadSnomask();
+#ifndef STATIC_LINKING
+	OvrOper = AddOverride("oper", ovr_oper);
+#endif
+
+#ifdef HOOKTYPE_REHASH_COMPLETE
+	return 0;
+#endif
+}
+
+static void LoadSnomask()
+{
+	if (Settings.enable_snomask)
+	{
+		if (!SnomaskOperPass)
+			SnomaskOperPass = AddSnomask(FlagOperPass,
+				 umode_allow_admins, &SNO_OPERPASS);
+	}
+	else
+	{
+		DelSnomask(SnomaskOperPass);
+	}
+}
+
+DLLFUNC int MOD_TEST(operpasswd)(ModuleInfo *modinfo)
+{
+	SAVE_MODINFO
+	HookConfTest = HookAddEx(modinfo->handle, HOOKTYPE_CONFIGTEST, cb_test);
+
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_INIT(operpasswd)(ModuleInfo *modinfo)
+{
+	SAVE_MODINFO
+	SnomaskOperPass	= NULL;
+	FailedOperups	= NULL;
+#ifndef STATIC_LINKING
+	ModuleSetOptions(modinfo->handle, MOD_OPT_PERM);
+#endif
+	InitConf();
+
+	HookConfRun	= HookAddEx(modinfo->handle, HOOKTYPE_CONFIGRUN, cb_conf);
+	HookConfRehash	= HookAddEx(modinfo->handle, HOOKTYPE_REHASH, cb_rehash);
+        HookQuit	= HookAddEx(modinfo->handle, HOOKTYPE_LOCAL_QUIT, cb_quit);
+#ifdef HOOKTYPE_REHASH_COMPLETE
+	HookRehashDone	= HookAddEx(modinfo->handle, HOOKTYPE_REHASH_COMPLETE, cb_rehash_complete);
+#endif
+
+        return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_LOAD(operpasswd)(int module_load)
+{
+	LoadSnomask();
+	OvrOper = AddOverride("oper", ovr_oper);
+
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_UNLOAD(operpasswd)(int module_unload)
+{
+	FCount		*f;
+	ListStruct	*next;
+
+	FreeConf();
+
+	DelOverride("oper", OvrOper);
+	DelSnomask(SnomaskOperPass);
+#ifdef HOOKTYPE_REHASH_COMPLETE
+	DelHook(HookRehashDone);
+#endif
+	DelHook(HookQuit);
+	DelHook(HookConfRehash);
+	DelHook(HookConfRun);
+	DelHook(HookConfTest);
+
+	for (f = FailedOperups; f; f = (FCount *) next)
+	{
+		next = (ListStruct *) f->next;
+		DelListItem(f, FailedOperups);
+		MyFree(f);
+	}
+
+	return MOD_SUCCESS;
+}
+
+static int umode_allow_admins(aClient *sptr, int what)
+{
+	if (MyClient(sptr))
+		return IsSkoAdmin(sptr) ? 1 : 0;
+	else
+		return 1;
+}
+
+static Cmdoverride *AddOverride(char *msg, iFP cb)
+{
+	Cmdoverride *ovr = CmdoverrideAdd(MyMod, msg, cb);
+
+#ifndef STATIC_LINKING
+        if (ModuleGetError(MyMod) != MODERR_NOERROR || !ovr)
+#else
+        if (!ovr)
+#endif
+	{
+#ifndef STATIC_LINKING
+		config_error("Error replacing command %s when loading module %s: %s",
+			msg, MOD_HEADER(operpasswd).name, ModuleGetErrorStr(MyMod));
+#else
+		config_error("Error replacing command %s when loading module %s",
+			msg, MOD_HEADER(operpasswd).name);
+#endif
+		return NULL;
+	}
+
+	return ovr;
+}
+
+static Snomask *AddSnomask(char flag, iFP allowed, long *mode)
+{
+	Snomask *s;
+
+	*mode = 0;
+	s = SnomaskAdd(MyMod, flag, allowed, mode);
+
+#ifndef STATIC_LINKING
+	if ((ModuleGetError(MyMod) != MODERR_NOERROR) || !s)
+#else
+	if (!s)
+#endif
+	{
+#ifndef STATIC_LINKING
+		sendto_realops("Error adding snomask %c: %s",
+			flag, ModuleGetErrorStr(MyMod));
+#else
+		sendto_realops("Error adding snomask %c",
+			flag);
+#endif
+                return NULL;
+	}
+
+	return s;
+}
+
+#define CHECK_EMPTY(ce, parent) \
+		if (!(ce)->ce_varname) \
+		{ \
+			config_error("%s:%i: blank %s item", \
+				(ce)->ce_fileptr->cf_filename, \
+				(ce)->ce_varlinenum, (parent)->ce_varname); \
+			errors++; \
+			continue; \
+		} \
+		if (!(ce)->ce_vardata) \
+		{ \
+			config_error("%s:%i: %s::%s without value", \
+				(ce)->ce_fileptr->cf_filename, \
+				(ce)->ce_varlinenum, \
+				(parent)->ce_varname, (ce)->ce_varname); \
+			errors++; \
+			continue; \
+		}
+
+static int cb_test(ConfigFile *cf, ConfigEntry *ce, int type, int *errs)
+{
+	ConfigEntry	*cep;
+	int		errors = 0;
+
+	if (type != CONFIG_MAIN)
+		return 0;
+
+	if (!strcmp(ce->ce_varname, "operpasswd"))
+	{
+		for (cep = ce->ce_entries; cep; cep = cep->ce_next)
+		{
+			CHECK_EMPTY(cep, ce)
+
+			if (!strcmp(cep->ce_varname, "enable-snomask"))
+				;
+			else if (!strcmp(cep->ce_varname, "enable-global-notices"))
+				;
+			else if (!strcmp(cep->ce_varname, "enable-logging"))
+				;
+			else if (!strcmp(cep->ce_varname, "max-failed-operups"))
+				;
+			else if (!strcmp(cep->ce_varname, "failop-kill-reason"))
+				;
+			else
+			{
+				config_error("%s:%i: unknown directive operpasswd::%s",
+					cep->ce_fileptr->cf_filename, cep->ce_varlinenum, cep->ce_varname);
+				errors++;
+			}
+
+		}
+		*errs = errors;
+		return errors ? -1 : 1;
+	}
+	else
+		return 0;
+}
+
+static int cb_conf(ConfigFile *cf, ConfigEntry *ce, int type)
+{
+	ConfigEntry	*cep;
+
+	if (type != CONFIG_MAIN)
+		return 0;
+
+	if (!strcmp(ce->ce_varname, "operpasswd"))
+	{
+		for (cep = ce->ce_entries; cep; cep = cep->ce_next)
+		{
+			if (!strcmp(cep->ce_varname, "enable-snomask"))
+				Settings.enable_snomask = config_checkval(cep->ce_vardata, CFG_YESNO);
+			else if (!strcmp(cep->ce_varname, "enable-global-notices"))
+				Settings.enable_global_notices = config_checkval(cep->ce_vardata, CFG_YESNO);
+			else if (!strcmp(cep->ce_varname, "enable-logging"))
+				Settings.enable_logging = config_checkval(cep->ce_vardata, CFG_YESNO);
+			else if (!strcmp(cep->ce_varname, "max-failed-operups"))
+				Settings.max_failed_operups = atoi(cep->ce_vardata);
+			else if (!strcmp(cep->ce_varname, "failop-kill-reason"))
+			{
+				ircstrdup(Settings.failop_kill_reason, cep->ce_vardata);
+			}
+		}
+
+#ifndef HOOKTYPE_REHASH_COMPLETE
+		if (!event_added)
+		{
+			/* Not the best solution, but it works. */
+			EventAdd("operpasswd_loadobjects", 0, 1,
+				LoadObjects, NULL);
+			event_added = 1;
+		}
+#endif
+
+		return 1;
+	}
+
+	return 0;
+}
+
+static int cb_quit(aClient *sptr, char *comment)
+{
+	FCount *f;
+
+	for (f = FailedOperups; f; f = f->next)
+		if (f->cptr == sptr)
+			break;
+
+	if (f)
+	{
+		DelListItem(f, FailedOperups);
+		MyFree(f);
+	}
+
+	return 0;
+}
+
+static int ovr_oper(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, char *parv[])
+{
+	static char	buf[1024];
+	FCount		*f;
+	int		ret;
+
+	/* No need for a '!MyConnect(sptr)' check. */
+	if (!IsPerson(sptr) || IsAnOper(sptr) || SVSNOOP || parc < 3)
+		return CallCmdoverride(ovr, cptr, sptr, parc, parv);
+
+	ret = CallCmdoverride(ovr, cptr, sptr, parc, parv);
+
+	if (!IsAnOper(sptr)) /* Oper-up failed */
+	{
+		if (Settings.enable_snomask)
+		{
+			ircsprintf(buf, "*** Notice -- [FAILOP] From: %s, login: %s, password: %s",
+				sptr->name, parv[1], parv[2]);
+			sendto_snomask(SNO_OPERPASS, "%s", buf);
+			if (Settings.enable_global_notices)
+				sendto_serv_butone_token(NULL, me.name, MSG_SENDSNO, TOK_SENDSNO,
+					"O :%s", buf);
+		}
+		if (Settings.enable_logging)
+			ircd_log(LOG_OPER,
+				"[FAILOP] From: %s, login: %s, password: %s",
+				sptr->name, parv[1], parv[2]);
+
+		for (f = FailedOperups; f; f = f->next)
+			if (f->cptr == sptr)
+				break;
+
+	        if (!f)
+		{
+			f = (FCount *) MyMallocEx(sizeof(FCount));
+			f->cptr = sptr;
+			f->count = 1;
+			AddListItem(f, FailedOperups);
+		}
+		else
+		{
+			f->count++;
+
+			if (Settings.max_failed_operups && f->count > Settings.max_failed_operups)
+				return exit_client(cptr, sptr, &me,
+					Settings.failop_kill_reason ? Settings.failop_kill_reason :
+					"Too many failed oper-ups");
+		}
+	}
+
+	return ret;
+}
--- src/modules/randquote.c	Thu Jan  1 06:00:00 1970
+++ src/modules/randquote.c	Wed Nov 29 11:16:56 2006
@@ -0,0 +1,436 @@
+/*
+ * =================================================================
+ * Filename:       randquote.c
+ * Description:    Random quotes (based on the code of UltimateIRCd)
+ * Requested by:   Sergios Karalis
+ * Written by:     AngryWolf <angrywolf@flashmail.com>
+ * Documentation:  randquote.txt (comes with the package)
+ * =================================================================
+ */
+
+#include "config.h"
+#include "struct.h"
+#include "common.h"
+#include "sys.h"
+#include "numeric.h"
+#include "msg.h"
+#include "channel.h"
+#include <time.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _WIN32
+#include <io.h>
+#endif
+#include <fcntl.h>
+#include "h.h"
+#ifdef STRIPBADWORDS
+#include "badwords.h"
+#endif
+#ifdef _WIN32
+#include "version.h"
+#endif
+
+extern void			sendto_one(aClient *to, char *pattern, ...);
+extern void			sendto_realops(char *pattern, ...);
+
+#define IsParam(x)		(parc > (x) && !BadPtr(parv[(x)]))
+#define IsNotParam(x)		(parc <= (x) || BadPtr(parv[(x)]))
+#define DelHook(x)		if (x) HookDel(x); x = NULL
+#define DelCommand(x)		if (x) CommandDel(x); x = NULL
+#define ircfree(x)      if (x) MyFree(x); x = NULL
+#define ircstrdup(x,y)  if (x) MyFree(x); if (!y) x = NULL; else x = strdup(y)
+
+#define MSG_RANDQUOTE		"RANDQUOTE"	/* Random Quote */
+#define TOK_RANDQUOTE		"Q1"
+#define MSG_ADDQUOTE		"ADDQUOTE"	/* Add Quote */
+#define TOK_ADDQUOTE		"Q2"
+#define MSG_ADDGQUOTE		"ADDGQUOTE"	/* Add Global Quote */
+#define TOK_ADDGQUOTE		"Q3"
+
+static Command			*AddCommand(Module *module, char *msg, char *token, iFP func, unsigned char params);
+static int			m_randquote(aClient *cptr, aClient *sptr, int parc, char *parv[]);
+static int			m_addquote(aClient *cptr, aClient *sptr, int parc, char *parv[]);
+static int			m_addgquote(aClient *cptr, aClient *sptr, int parc, char *parv[]);
+static int			rq_local_connect(aClient *sptr);
+static int			rq_config_test(ConfigFile *, ConfigEntry *, int, int *);
+static int			rq_config_run(ConfigFile *, ConfigEntry *, int);
+static int			rq_config_rehash();
+
+Command				*CmdRandquote, *CmdAddquote, *CmdAddgquote;
+Hook				*HookConnect = NULL, *HookConfTest = NULL, *HookConfRun = NULL, *HookConfRehash = NULL;
+
+ModuleHeader MOD_HEADER(randquote)
+  = {
+	"randquote",
+	"$Id: randquote.c,v 2.5 2004/03/11 20:23:12 angrywolf Exp $",
+	"Random quotes (and commands /randquote, /addquote & addgquote)",
+	"3.2-b8-1",
+	NULL 
+    };
+
+struct
+{
+	char	*quote_file;
+	unsigned	on_connect: 1;
+} rq_settings;
+
+static void InitConf(void)
+{
+	ircfree(rq_settings.quote_file);
+	memset(&rq_settings, 0, sizeof rq_settings);
+	ircstrdup(rq_settings.quote_file,"ircd.quotes");
+}
+
+static void FreeConf(void)
+{
+	ircfree(rq_settings.quote_file);
+}
+
+DLLFUNC int MOD_INIT(randquote)(ModuleInfo *modinfo)
+{
+	InitConf();
+
+	CmdRandquote	= AddCommand(modinfo->handle, MSG_RANDQUOTE, TOK_RANDQUOTE, m_randquote, MAXPARA);
+	CmdAddquote	= AddCommand(modinfo->handle, MSG_ADDQUOTE, TOK_ADDQUOTE, m_addquote, 1);
+	CmdAddgquote	= AddCommand(modinfo->handle, MSG_ADDGQUOTE, TOK_ADDGQUOTE, m_addgquote, 1);
+	HookConfRun	= HookAddEx(modinfo->handle, HOOKTYPE_CONFIGRUN, rq_config_run);
+	HookConfRehash	= HookAddEx(modinfo->handle, HOOKTYPE_REHASH, rq_config_rehash);
+	HookConnect	= HookAddEx(modinfo->handle, HOOKTYPE_LOCAL_CONNECT, rq_local_connect);	
+
+	if (!CmdRandquote || !CmdAddquote || !CmdAddgquote)
+		return MOD_FAILED;
+
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_LOAD(randquote)(int module_load)
+{
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_UNLOAD(randquote)(int module_unload)
+{
+	FreeConf();
+
+	DelHook(HookConnect);
+	DelHook(HookConfRehash);
+	DelHook(HookConfRun);
+	DelHook(HookConfTest);
+	DelCommand(CmdRandquote);
+	DelCommand(CmdAddquote);
+	DelCommand(CmdAddgquote);
+
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_TEST(randquote)(ModuleInfo *modinfo)
+{
+	HookConfTest = HookAddEx(modinfo->handle, HOOKTYPE_CONFIGTEST, rq_config_test);
+
+	return MOD_SUCCESS;
+}
+
+static Command *AddCommand(Module *module, char *msg, char *token, iFP func, unsigned char params)
+{
+	Command *cmd;
+
+	if (CommandExists(msg))
+    	{
+		config_error("Command %s already exists", msg);
+		return NULL;
+    	}
+    	if (CommandExists(token))
+	{
+		config_error("Token %s already exists", token);
+		return NULL;
+    	}
+
+	cmd = CommandAdd(module, msg, token, func, params, 0);
+
+#ifndef STATIC_LINKING
+	if (ModuleGetError(module) != MODERR_NOERROR || !cmd)
+#else
+	if (!cmd)
+#endif
+	{
+#ifndef STATIC_LINKING
+		config_error("Error adding command %s: %s", msg,
+			ModuleGetErrorStr(module));
+#else
+		config_error("Error adding command %s", msg);
+#endif
+		return NULL;
+	}
+
+	return cmd;
+}
+
+static int rq_local_connect(aClient *sptr)
+{
+	static char *parv[1];
+
+	if (!rq_settings.on_connect) return 0;
+
+	parv[0] = sptr->name;
+	m_randquote(sptr, sptr, 1, parv);
+	return 0;
+}
+
+/*
+ *  UltimateIRCd - an Internet Relay Chat Daemon, src/s_serv.c
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *  Refer to the documentation within doc/authors/ for full credits and copyrights.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
+ *  USA
+ */
+
+/*
+**
+** m_randquote - 10th November 1999
+** Added from IRIS and adapted to Ultimate by HAMLET
+** Added from Ultimate and adapted to Unreal by AngryWolf (with heavy modifications)
+**
+** parv[0]: sender prefix
+**
+*/
+
+static int m_randquote(aClient *cptr, aClient *sptr, int parc, char *parv[])
+{
+	int	fd, linenum = 0, randnum;
+	char	line[TOPICLEN];
+	char	*p;
+
+	srand(time (NULL) + getpid () + rand () % 9999);
+
+	if ((fd = open(rq_settings.quote_file, O_RDONLY)) == -1)
+		return -1;
+
+	dgets(-1, NULL, 0);
+	while (dgets(fd, line, sizeof(line) - 1) > 0)
+		linenum++;
+	close(fd);
+
+	if (linenum == 0)
+		return 0;
+
+	randnum = (rand() % linenum) - 1;
+	linenum = 0;
+
+	if ((fd = open(rq_settings.quote_file, O_RDONLY)) == -1)
+		return -1;
+
+	while (dgets(fd, line, sizeof(line) - 1) > 0)
+	{
+		if ((p = (char *) index(line, '\n')))
+			*p = '\0';
+		if ((p = (char *) index(line, '\r')))
+			*p = '\0';
+		linenum++;
+		if (linenum == randnum)
+			break;
+	}
+
+	if (line[0])
+		sendto_one (sptr, ":%s NOTICE %s :\2Quote:\2 %s",
+			me.name, sptr->name, line);
+
+	return close(fd);
+}
+
+/*
+**
+** m_addquote - 10th November 1999
+** Written by HAMLET
+** Added from Ultimate and adapted to Unreal by AngryWolf (with heavy modifications)
+**
+** Adds a line to the servers ircd.quotes file.
+**
+** parv[0]: sender prefix
+** parv[1]: quote
+**
+*/
+
+static int m_addquote(aClient *cptr, aClient *sptr, int parc, char *parv[])
+{
+	FILE *fp;
+
+	if (!MyClient(sptr))
+		return 0;
+
+	if (!IsAnOper(sptr) || !IsSkoAdmin(sptr))
+	{
+		sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
+		return 0;
+	}
+
+        if (!IsParam(1))
+        {
+                sendto_one(sptr, err_str(ERR_NEEDMOREPARAMS),
+            		me.name, sptr->name, MSG_ADDQUOTE);
+                return 0;
+        }
+
+	if (!(fp = fopen(rq_settings.quote_file, "a")))
+	{
+		sendto_one(sptr, ":%s NOTICE %s :Error opening %s: %s",
+			me.name, sptr->name, rq_settings.quote_file, strerror(errno));
+    		return -1;
+	}
+
+	fprintf(fp, "%s\n", parv[1]);
+	sendto_one(sptr, ":%s NOTICE %s :Quote added.",
+		me.name, sptr->name);
+	fclose(fp);
+
+	return 0;
+}
+
+/*
+**
+** m_addgquote - 10th November 1999
+** Written by HAMLET
+** Added from Ultimate and adapted to Unreal by AngryWolf (with heavy modifications)
+**
+** Adds a line to the ircd.quotes file of all the servers on the network.
+**
+** parv[0]: sender prefix
+** parv[1]: quote
+**
+*/
+
+static int m_addgquote(aClient *cptr, aClient *sptr, int parc, char *parv[])
+{
+	FILE *fp;
+
+	if (!IsClient(sptr))
+		return 0;
+
+	if (!IsAnOper(sptr) || !IsSkoAdmin(sptr))
+	{
+		sendto_one(sptr, err_str(ERR_NOPRIVILEGES),	
+			me.name, sptr->name);
+		return 0;
+	}
+
+        if (!IsParam(1))
+        {
+                sendto_one(sptr, err_str(ERR_NEEDMOREPARAMS),
+            		me.name, sptr->name, MSG_ADDGQUOTE);
+                return 0;
+        }
+
+	if (!(fp = fopen(rq_settings.quote_file, "a")))
+	{
+		if (!IsServer(sptr))
+			sendto_one(sptr, ":%s NOTICE %s :Error opening %s: %s",
+				me.name, sptr->name, rq_settings.quote_file, strerror(errno));
+		return -1;
+	}
+
+	fprintf(fp, "%s\n", parv[1]);
+	fclose(fp);
+
+	sendto_realops("%s is adding a global QUOTE. (\2%s\2)",
+		sptr->name, parv[1]);
+	sendto_serv_butone(cptr, ":%s ADDGQUOTE :%s",
+		sptr->name, parv[1]);
+
+	return 0;
+}
+
+static int rq_config_rehash()
+{
+	FreeConf();
+	InitConf();
+
+	return 1;
+}
+
+#define CHECK_EMPTY(ce, parent) \
+		if (!(ce)->ce_varname) \
+		{ \
+			config_error("%s:%i: blank %s item", \
+				(ce)->ce_fileptr->cf_filename, \
+				(ce)->ce_varlinenum, (parent)->ce_varname); \
+			errors++; \
+			continue; \
+		} \
+		if (!(ce)->ce_vardata) \
+		{ \
+			config_error("%s:%i: %s::%s without value", \
+				(ce)->ce_fileptr->cf_filename, \
+				(ce)->ce_varlinenum, \
+				(parent)->ce_varname, (ce)->ce_varname); \
+			errors++; \
+			continue; \
+		}
+
+static int rq_config_test(ConfigFile *cf, ConfigEntry *ce, int type, int *errs)
+{
+	ConfigEntry	*cep;
+	int		errors = 0;
+
+	if (type != CONFIG_MAIN)
+		return 0;
+
+	if (!strcmp(ce->ce_varname, "randquote"))
+	{
+		for (cep = ce->ce_entries; cep; cep = cep->ce_next)
+		{
+			CHECK_EMPTY(cep, ce)
+
+			if (!strcmp(cep->ce_varname, "on_connect"))
+				;
+			else
+			{
+				config_error("%s:%i: unknown directive randquote::%s",
+					cep->ce_fileptr->cf_filename, cep->ce_varlinenum, cep->ce_varname);
+				errors++;
+			}
+
+		}
+		*errs = errors;
+		return errors ? -1 : 1;
+	}
+	else
+		return 0;
+}
+
+static int rq_config_run(ConfigFile *cf, ConfigEntry *ce, int type)
+{
+	ConfigEntry	*cep;
+
+	if (type != CONFIG_MAIN)
+		return 0;
+
+	if (!strcmp(ce->ce_varname, "randquote"))
+	{
+		for (cep = ce->ce_entries; cep; cep = cep->ce_next)
+		{
+			if (!strcmp(cep->ce_varname, "on_connect"))
+				rq_settings.on_connect = config_checkval(cep->ce_vardata, CFG_YESNO);
+			else if (!strcmp(cep->ce_varname, "quote_file")) {
+					ircfree(rq_settings.quote_file);
+					ircstrdup(rq_settings.quote_file,cep->ce_vardata);
+			}
+		}
+	}
+
+	return 0;
+}
--- src/modules/textban.c	Thu Jan  1 06:00:00 1970
+++ src/modules/textban.c	Wed Nov 29 11:16:56 2006
@@ -0,0 +1,262 @@
+/*
+ * Text ban. (C) Copyright 2004-2005 Bram Matthys.
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * See README for instructions
+ * Or scroll down ~30 lines to see 2 define's which you can tweak.
+ */
+
+#include "config.h"
+#include "struct.h"
+#include "common.h"
+#include "sys.h"
+#include "numeric.h"
+#include "msg.h"
+#include "proto.h"
+#include "channel.h"
+#include <time.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _WIN32
+#include <io.h>
+#endif
+#include <fcntl.h>
+#include "h.h"
+#ifdef STRIPBADWORDS
+#include "badwords.h"
+#endif
+#ifdef _WIN32
+#include "version.h"
+#endif
+
+/** Max number of text bans per channel.
+ * This is basically the most important setting. It directly affects
+ * how much CPU you want to spend on text processing.
+ * For comparison: with 10 textbans of max length (150), and messages said in
+ * the channel with max length (~500 bytes), on an A1800+ (1.53GHz) machine
+ * this consumes 30 usec per-channel message PEAK/MAX (usec = 1/1000000 of a
+ * second), and in normal (non-supersize messages) count on 10-15 usec.
+ * Basically this means this allows for like >25000 messages per second at
+ * 100% CPU usage in a worth case scenario. Which seems by far sufficient to me.
+ * Also note that (naturally) only local clients are processed, only people
+ * that do not have halfops or higher, and only channels that have any
+ * textbans set.
+ * UPDATE: The speed impact for 15 bans per channel is 42 usec PEAK.
+ * HINT: If you are hitting the "normal banlimit" before you actually hit this
+ *       one, then you might want to tweak the #define MAXBANS and #define
+ *       MAXBANLENGTH in include/struct.h. Doubling MAXBANLENGTH is usually
+ *       a good idea, and then you can enlarge MAXBANS too a bit if you want to.
+ */
+#define MAX_EXTBANT_PER_CHAN     15 /* Max number of ~T bans in a channel. */
+
+/** Max length of a ban.
+ * NOTE: This is mainly for 'cosmetic' purposes. Lowering it does not
+ *       decrease CPU usage for text processing.
+ */
+#define MAX_LENGTH               150 /* Max length of a ban */
+
+/** Benchmark mode.
+ * Should never be used on production servers.
+ * Mainly meant for debugging/profiling purposes for myself, but if you
+ * have a test server and are curious about the speed of this module,
+ * then you can enable it of course ;).
+ */
+#undef BENCHMARK
+
+
+ModuleHeader MOD_HEADER(textban)
+  = {
+	"textban",
+	"v1.0",
+	"ExtBan ~T (textban) by Syzop",
+	"3.2-b8-1",
+	NULL 
+    };
+
+/* Forward declarations */
+char *extban_modeT_conv_param(char *para_in);
+int extban_modeT_is_banned(aClient *sptr, aChannel *chptr, char *ban, int type);
+int extban_modeT_is_ok(aClient *sptr, aChannel *chptr, char *para, int checkt, int what, int what2);
+DLLFUNC char *textban_chanmsg(aClient *, aClient *, aChannel *, char *, int);
+
+DLLFUNC int MOD_INIT(textban)(ModuleInfo *modinfo)
+{
+ExtbanInfo req;
+
+	memset(&req, 0, sizeof(ExtbanInfo));
+	req.flag = 'T';
+	req.conv_param = extban_modeT_conv_param;
+	req.is_banned = extban_modeT_is_banned;
+	req.is_ok = extban_modeT_is_ok;
+	
+	if (!ExtbanAdd(modinfo->handle, req))
+	{
+		config_error("textban module: adding extban ~T failed! module NOT loaded");
+		return MOD_FAILED;
+	}
+
+	ModuleSetOptions(modinfo->handle, MOD_OPT_PERM);
+
+	HookAddPCharEx(modinfo->handle, HOOKTYPE_CHANMSG, textban_chanmsg);
+
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_LOAD(textban)(int module_load)
+{
+	return MOD_SUCCESS;
+}
+
+DLLFUNC int MOD_UNLOAD(textban)(int module_unload)
+{
+	return MOD_SUCCESS;
+}
+
+unsigned int counttextbans(aChannel *chptr)
+{
+Ban *ban;
+unsigned int cnt = 0;
+
+	for (ban = chptr->banlist; ban; ban=ban->next)
+		if ((ban->banstr[0] == '~') && (ban->banstr[1] == 'T') && (ban->banstr[2] == ':'))
+			cnt++;
+	for (ban = chptr->exlist; ban; ban=ban->next)
+		if ((ban->banstr[0] == '~') && (ban->banstr[1] == 'T') && (ban->banstr[2] == ':'))
+			cnt++;
+	return cnt;
+}
+
+
+int extban_modeT_is_ok(aClient *sptr, aChannel *chptr, char *para, int checkt, int what, int what2)
+{
+int n;
+
+	if ((what == MODE_ADD) && (what2 == EXBTYPE_EXCEPT) && MyClient(sptr))
+		return 0; /* except is not supported */
+
+	/* We check the # of bans in the channel, may not exceed MAX_EXTBANT_PER_CHAN */
+	if ((what == MODE_ADD) && (checkt == EXBCHK_PARAM) &&
+	     MyClient(sptr) && !IsAnOper(sptr) &&
+	    ((n = counttextbans(chptr)) >= MAX_EXTBANT_PER_CHAN))
+	{
+		/* We check the # of bans in the channel, may not exceed MAX_EXTBANT_PER_CHAN */
+		sendto_one(sptr, err_str(ERR_BANLISTFULL), me.name, sptr->name, chptr->chname, para);
+		sendnotice(sptr, "Too many textbans for this channel");
+		return 0;
+	}
+	return 1;
+}
+
+/** Ban callbacks */
+char *extban_modeT_conv_param(char *para_in)
+{
+static char retbuf[MAX_LENGTH+1];
+char para[MAX_LENGTH+1], *action, *text, *p;
+
+	strlcpy(para, para_in+3, sizeof(para)); /* work on a copy (and truncate it) */
+
+	/* ~T:<action>:<text> */
+
+	text = strchr(para, ':');
+	if (!text)
+		return NULL;
+	*text++ = '\0';
+	/* para=action, text=text */
+	if (!*text)
+		return NULL; /* empty text */
+	
+	/* ~T:<action>:<text> */
+	if (!strcasecmp(para, "block"))
+		action = "block";
+	else
+		return NULL; /* unknown action */
+
+	/* check the string.. */
+	for (p=text; *p; p++)
+		if ((*p == '\003') || (*p == '\002') || 
+		    (*p == '\037') || (*p == '\026') ||
+		    (*p == ' '))
+			return NULL; /* codes not permitted, would be confusing since they are stripped */
+
+	/* Rebuild the string.. */
+	snprintf(retbuf, sizeof(retbuf), "~T:%s:%s", action, text); /* can be cut off if too long */
+	return retbuf;
+}
+
+int extban_modeT_is_banned(aClient *sptr, aChannel *chptr, char *ban, int type)
+{
+	/* Never banned here */
+	return 0;
+}
+
+/* Channel message callback */
+DLLFUNC char *textban_chanmsg(aClient *cptr, aClient *sptr, aChannel *chptr, char *text, int notice)
+{
+static char filtered[512]; /* temp buffer */
+Ban *ban;
+long fl;
+int done=0;
+char *p;
+#ifdef BENCHMARK
+struct timeval tv_alpha, tv_beta;
+
+	gettimeofday(&tv_alpha, NULL);
+#endif
+
+	if (!MyClient(sptr))
+		return text; /* Remote and servers are not affected */
+
+	fl = get_access(sptr, chptr);
+	if (fl & (CHFL_HALFOP|CHFL_CHANOP|CHFL_CHANPROT|CHFL_CHANOWNER))
+		return text; /* halfop or higher */
+
+	filtered[0] = '\0'; /* NOT needed, but... :P */
+
+	for (ban = chptr->banlist; ban; ban=ban->next)
+	{
+		if ((ban->banstr[0] == '~') && (ban->banstr[1] == 'T') && (ban->banstr[2] == ':'))
+		{
+			if (!done)
+			{
+				/* Prepare the text [done here, to avoid useless CPU time] */
+				strlcpy(filtered, StripControlCodes(text), sizeof(filtered));
+				done = 1;
+			}
+			p = ban->banstr + 3;
+			if (!strncasecmp(p, "block:", 6))
+			{
+				if (!_match(p+6, filtered))
+				{
+					sendto_one(sptr, err_str(ERR_CANNOTSENDTOCHAN),
+						me.name, sptr->name, chptr->chname,
+						"Message blocked due to a text ban", chptr->chname);
+					return NULL;
+				}
+			}
+		}
+	}
+
+#ifdef BENCHMARK
+	gettimeofday(&tv_beta, NULL);
+	ircd_log(LOG_ERROR, "TextBan Timing: %ld microseconds (%s / %s / %d)",
+		((tv_beta.tv_sec - tv_alpha.tv_sec) * 1000000) + (tv_beta.tv_usec - tv_alpha.tv_usec),
+		sptr->name, chptr->chname, strlen(text));
+#endif
+
+	return text;
+}
--- src/s_bsd.c	Sat Jun 17 01:29:14 2006
+++ src/s_bsd.c	Fri Dec  1 22:30:54 2006
@@ -68,6 +68,9 @@
 #endif
 #include "sock.h"		/* If FD_ZERO isn't define up to this point,  */
 #include <string.h>
+#ifdef WITH_ICONV
+#include <iconv.h>
+#endif
 #include "proto.h"
 			/* define it (BSD4.2 needs this) */
 #include "h.h"
@@ -1392,6 +1395,45 @@
 		SetAccess(acptr);
 }
 
+#ifdef WITH_ICONV
+/*
+ *  decoding codepage...
+ */
+int dech_codepage(char *codepage, int *length) {
+    static char buf[READBUF_SIZE];
+	char *msg = &readbuf[0], *buf1=&buf[0];
+    size_t r;
+	size_t insize = *length;
+	size_t outsize = READBUF_SIZE;
+    iconv_t cd;
+	int one = 1;
+
+    if (!codepage) { return 0; }
+
+	if (!stricmp(codepage, DEFAULT_CODEPAGE)) { return 0; }
+
+//	ircd_log(LOG_ERROR, "dech_codepage: %s -> %s; %s", codepage, DEFAULT_CODEPAGE, msg);
+
+    cd = iconv_open (DEFAULT_CODEPAGE, codepage);
+    if (cd == (iconv_t)(-1)) return 0;
+	iconvctl(cd,ICONV_SET_DISCARD_ILSEQ,&one);
+
+    /* perfome convert */
+    r = iconv (cd, &msg, &insize, &buf1, &outsize);
+    if ((r == -1) || (insize != 0)) {
+          iconv_close (cd);
+          return 0;
+    }
+
+    /* calculate size of output string */   
+    *length = READBUF_SIZE - outsize;
+	buf[(*length)] = 0;
+
+    memcpy(readbuf, buf, *length+1);
+    iconv_close (cd);
+}
+#endif
+
 /*
 ** read_packet
 **
@@ -1416,6 +1458,11 @@
 		else
 #endif
 			length = recv(cptr->fd, readbuf, sizeof(readbuf), 0);
+
+#ifdef WITH_ICONV
+		if (!IsServer(cptr)) dech_codepage(cptr->codepage,&length);
+#endif
+
 		cptr->lasttime = now;
 		if (cptr->lasttime > cptr->since)
 			cptr->since = cptr->lasttime;
--- src/s_conf.c	Sat Jun 17 01:29:16 2006
+++ src/s_conf.c	Fri Dec  1 23:34:17 2006
@@ -1503,6 +1503,9 @@
 	ircfree(i->spamfilter_ban_reason);
 	ircfree(i->spamfilter_virus_help_channel);
 	ircfree(i->spamexcept_line);
+#ifdef WITH_ICONV
+	ircfree(i->default_codepage);
+#endif
 }
 
 int	config_test();
@@ -1816,6 +1819,9 @@
 	ConfigItem_alias		*alias_ptr;
 	ConfigItem_help			*help_ptr;
 	ConfigItem_offchans		*of_ptr;
+#ifdef WITH_ICONV
+	ConfigItem_codepage		*codepage_ptr;
+#endif
 	OperStat 			*os_ptr;
 	ListStruct 	*next, *next2;
 	aTKline *tk, *tk_next;
@@ -2130,6 +2136,15 @@
 		DelListItem(alias_ptr, conf_alias);
 		MyFree(alias_ptr);
 	}
+#ifdef WITH_ICONV
+	for (codepage_ptr = iConf.cp; codepage_ptr; codepage_ptr = (ConfigItem_codepage *)next)
+	{
+		next = (ListStruct *)codepage_ptr->next;	 
+		ircfree(codepage_ptr->name);
+		DelListItem(codepage_ptr, iConf.cp);
+		MyFree(codepage_ptr);		
+	}
+#endif
 	for (help_ptr = conf_help; help_ptr; help_ptr = (ConfigItem_help *)next) {
 		aMotd *text;
 		next = (ListStruct *)help_ptr->next;
@@ -2195,6 +2210,18 @@
 		Error("set::kline-address is missing");
 	if (!settings.has_maxchannelsperuser)
 		Error("set::maxchannelsperuser is missing");
+#ifdef WITH_ICONV
+	if (!settings.has_codepage)
+		Error("set::codepage missing");
+	if (!settings.has_cp_default)
+		Error("set::codepage::default missing");
+	if (!settings.has_cplist)
+		Error("set::codepage::codepages missing");
+#endif
+#ifdef USE_MINNICKLEN
+	if (!settings.has_minnicklen)
+		Error("set::minnicklen missing");
+#endif
 	if (!settings.has_dns_nameserver)
 		Error("set::dns::nameserver is missing");
 	if (!settings.has_dns_timeout)
@@ -2418,6 +2445,21 @@
 	return NULL;
 }
 
+#ifdef WITH_ICONV
+ConfigItem_codepage	*Find_codepage(char *name) {
+	ConfigItem_codepage *codepage;
+
+	if (!name)
+		return NULL;
+
+	for (codepage = iConf.cp; codepage; codepage = (ConfigItem_codepage *)codepage->next) {
+		if (!stricmp(codepage->name, name))
+			return codepage;
+	}
+	return NULL;
+}
+#endif
+
 ConfigItem_class	*Find_class(char *name)
 {
 	ConfigItem_class	*p;
@@ -4071,6 +4113,9 @@
 	char	    copy[256];
 	char	    *ip;
 	char	    *port;
+#ifdef WITH_ICONV
+	char        *tempcodepage;
+#endif
 	int	    start, end, iport, isnew;
 	int tmpflags =0;
 
@@ -4105,6 +4150,12 @@
 					tmpflags |= ofp->flag;
 			}
 		}
+#ifdef WITH_ICONV
+		if (!strcmp(cep->ce_varname, "codepage"))
+		{
+			tempcodepage = strdup(cep->ce_vardata);
+		}
+#endif
 	}
 #ifndef USE_SSL
 	tmpflags &= ~LISTENER_SSL;
@@ -4124,6 +4175,10 @@
 			tmpflags |= LISTENER_BOUND;
 
 		listen->options = tmpflags;
+#ifdef WITH_ICONV
+		if (!tempcodepage) listen->codepage = strdup(tempiConf.default_codepage);
+		else listen->codepage = strdup(tempcodepage);
+#endif
 		if (isnew)
 			AddListItem(listen, conf_listen);
 		listen->flag.temporary = 0;
@@ -4141,6 +4196,7 @@
 	int	    start, end;
 	int	    errors = 0;
 	char has_options = 0;
+	char has_codepage = 0;
 	OperFlag    *ofp;
 
 	if (!ce->ce_vardata)
@@ -4256,6 +4312,12 @@
 #endif
 			}
 		}
+#ifdef WITH_ICONV
+		else if (!strcmp(cep->ce_varname, "codepage")) {
+			//do nothing
+			has_codepage = 1;
+		}
+#endif
 		else
 		{
 			config_error_unknown(cep->ce_fileptr->cf_filename, cep->ce_varlinenum,
@@ -4265,6 +4327,13 @@
 		}
 
 	}
+#ifdef WITH_ICONV
+	if (!has_codepage) {
+		config_error("%s:%i: listen: without default codepage define",
+			ce->ce_fileptr->cf_filename, ce->ce_varlinenum);
+		return 1;
+	}
+#endif
 	requiredstuff.conf_listen = 1;
 	return errors;
 }
@@ -6728,6 +6797,15 @@
 				IsupportSetValue(IsupportFind("CHANLIMIT"), tmpbuf);
 			}
 		}
+#ifdef USE_MINNICKLEN
+		else if (!strcmp(cep->ce_varname, "minnicklen")) {
+			tempiConf.minnicklen = atoi(cep->ce_vardata);
+			if (loop.ircd_booted)
+			{
+				IsupportSetValue(IsupportFind("MINNICKLEN"), cep->ce_vardata);
+			}
+		}
+#endif		
 		else if (!strcmp(cep->ce_varname, "maxdccallow")) {
 			tempiConf.maxdccallow = atoi(cep->ce_vardata);
 		}
@@ -6766,6 +6844,27 @@
 			else
 				ircstrdup(tempiConf.network.x_prefix_quit, cep->ce_vardata);
 		}
+#ifdef WITH_ICONV
+		else if (!strcmp(cep->ce_varname, "codepage")) {
+			for (cepp = cep->ce_entries; cepp; cepp = cepp->ce_next) {
+				if (!strcmp(cepp->ce_varname, "default")) {
+					ircstrdup(tempiConf.default_codepage,cepp->ce_vardata);
+				}
+				else if (!strcmp(cepp->ce_varname, "codepages")) {
+					char *name = NULL;
+					ConfigEntry *ccepp;
+					ConfigItem_codepage *cp;
+					for (ccepp = cepp->ce_entries; ccepp; ccepp = ccepp->ce_next) {						 
+						ircstrdup(name, ccepp->ce_varname);
+						cp = MyMallocEx(sizeof(ConfigItem_codepage) + strlen(name));
+						cp->name=name;
+						AddListItem(cp, tempiConf.cp);
+						name = NULL;
+					}
+				}
+			}			
+		}
+#endif
 		else if (!strcmp(cep->ce_varname, "dns")) {
 			for (cepp = cep->ce_entries; cepp; cepp = cepp->ce_next) {
 				if (!strcmp(cepp->ce_varname, "timeout")) {
@@ -7266,6 +7365,21 @@
 			CheckNull(cep);
 			CheckDuplicate(cep, maxdccallow, "maxdccallow");
 		}
+#ifdef USE_MINNICKLEN
+		else if (!strcmp(cep->ce_varname, "minnicklen")) {
+			CheckNull(cep);
+			CheckDuplicate(cep, minnicklen, "minnicklen");
+			tempi = atoi(cep->ce_vardata);
+			if (tempi < 1)
+			{
+				config_error("%s:%i: set::minnicklen must be > 0",
+					cep->ce_fileptr->cf_filename,
+					cep->ce_varlinenum);
+				errors++;
+				continue;
+			}
+		}
+#endif
 		else if (!strcmp(cep->ce_varname, "network-name")) {
 			char *p;
 			CheckNull(cep);
@@ -7347,6 +7461,26 @@
 			CheckDuplicate(cep, restrict_extendedbans, "restrict-extendedbans");
 			CheckNull(cep);
 		}
+#ifdef WITH_ICONV
+		else if (!strcmp(cep->ce_varname, "codepage")) {
+			CheckDuplicate(cep, codepage, "codepage");
+			for (cepp = cep->ce_entries; cepp; cepp = cepp->ce_next) {
+				if (!strcmp(cepp->ce_varname, "default")) {
+					CheckDuplicate(cepp, cp_default, "codepage::default");
+				}
+				else if (!strcmp(cepp->ce_varname, "codepages")) {
+					CheckDuplicate(cepp, cplist, "codepage::codepages");
+				}
+				else
+				{
+					config_error_unknownopt(cepp->ce_fileptr->cf_filename,
+						cepp->ce_varlinenum, "set::codepage", 
+						cepp->ce_varname);
+						errors++;
+				}
+			}
+		}
+#endif
 		else if (!strcmp(cep->ce_varname, "dns")) {
 			for (cepp = cep->ce_entries; cepp; cepp = cepp->ce_next) {
 				CheckNull(cepp);
@@ -9090,6 +9224,9 @@
 		if (listen_ptr->flag.temporary && !listen_ptr->clients)
 		{
 			ircfree(listen_ptr->ip);
+#ifdef WITH_ICONV
+			ircfree(listen_ptr->codepage);
+#endif
 			DelListItem(listen_ptr, conf_listen);
 			MyFree(listen_ptr);
 			i++;
--- src/s_err.c	Fri Feb  3 19:57:20 2006
+++ src/s_err.c	Fri Dec  1 22:38:10 2006
@@ -756,11 +756,19 @@
 /* 697 */ NULL,
 /* 698 */ NULL,
 /* 699 */ NULL,
+#ifdef WITH_ICONV
+/* 700 RPL_CODEPAGE */	":%s 700 %s %s :is now your translation scheme",
+/* 701 RPL_CODEPAGES */	":%s 701 %s :%s%s",
+/* 702 RPL_ENDOFCODEPAGES */ ":%s 702 %s :End of /CODEPAGES list",
+/* 703 RPL_WHOISSCHEME */	":%s 703 %s %s %s :translation scheme",
+/* 704 RPL_STATSCODEPAGE */	":%s 704 %s j %s %d :%s",
+#else
 /* 700 */ NULL,
 /* 701 */ NULL,
 /* 702 */ NULL,
 /* 703 */ NULL,
 /* 704 */ NULL,
+#endif
 /* 705 */ NULL,
 /* 706 */ NULL,
 /* 707 */ NULL,
--- src/s_serv.c	Sat Jun 17 01:29:16 2006
+++ src/s_serv.c	Fri Dec  1 22:38:18 2006
@@ -46,6 +46,10 @@
 #ifdef USE_LIBCURL
 #include <curl/curl.h>
 #endif
+#ifdef WITH_ICONV
+#include <iconv.h>
+#endif
+
 extern VOIDSIG s_die();
 
 static char buf[BUFSIZE];
@@ -165,6 +169,11 @@
 		if (IsAnOper(sptr))
 			sendto_one(sptr, ":%s NOTICE %s :%s", me.name, sptr->name, curl_version());
 #endif
+#ifdef WITH_ICONV
+		if (IsAnOper(sptr))
+			 sendto_one(sptr, ":%s NOTICE %s :libiconv %d.%d", me.name, sptr->name, _libiconv_version >> 8, _libiconv_version & 0xff);
+#endif 
+
 		if (MyClient(sptr))
 normal:
 			reply = RPL_ISUPPORT;
--- src/send.c	Sat Jun 17 01:29:16 2006
+++ src/send.c	Fri Dec  1 22:30:27 2006
@@ -39,6 +39,9 @@
 #include <io.h>
 #endif
 #include <string.h>
+#ifdef WITH_ICONV
+#include <iconv.h>
+#endif
 
 void vsendto_one(aClient *to, char *pattern, va_list vl);
 void sendbufto_one(aClient *to, char *msg, unsigned int quick);
@@ -227,6 +230,44 @@
 	return (IsDead(to)) ? -1 : 0;
 }
 
+#ifdef WITH_ICONV
+/*
+ *  encoding codepage...
+ */
+void ch_codepage(char *codepage,char *text, int *len) {    
+    static char buf[2048];
+    char *msghold = text, *holder=&buf[0];
+    size_t outsize = 2048;
+	size_t r = 0;
+    iconv_t cd;
+	int one = 1;
+	
+    if (!codepage) { return; }
+
+    if (!stricmp(codepage, DEFAULT_CODEPAGE)) { return; }
+
+    cd = iconv_open (codepage, DEFAULT_CODEPAGE);
+    if (cd == (iconv_t)(-1)) { return; }
+	iconvctl(cd,ICONV_SET_DISCARD_ILSEQ,&one);
+
+    /* perfome convert */
+    r = iconv (cd, &msghold, (size_t *)len, &holder, &outsize);
+    if ((r == -1) || (*len != 0)) {
+		  *len = 0;
+          iconv_close (cd);
+          return;
+    }
+
+    /* calculate size of output string */
+    (*len) = 2048 - outsize;
+	ADD_CRLF(buf,(*len));
+
+    memcpy (text,&buf[0],*len);
+    iconv_close (cd);
+    return;
+}
+#endif
+
 /*
  *  send message to single client
  */
@@ -282,6 +323,15 @@
 	if (!quick)
 	{
 		len = strlen(msg);
+	} else
+		len = quick;
+
+#ifdef WITH_ICONV
+	if (!IsServer(to)) ch_codepage(to->codepage,msg,&len);
+#endif
+
+    if (!quick)
+	{
 		if (!len || (msg[len - 1] != '\n'))
 		{
 			if (len > 510)
@@ -290,8 +340,7 @@
 			msg[len++] = '\n';
 			msg[len] = '\0';
 		}
-	} else
-		len = quick;
+	}
 
 	if (len > 512)
 	{
--- src/version.c.SH	Sat Jun 17 01:29:16 2006
+++ src/version.c.SH	Wed Nov 29 11:16:56 2006
@@ -15,7 +15,7 @@
 fi
 
 generation=`expr $generation + 1`
-creation=`date | \
+creation=`env LANG=ru_RU.cp1251 date | \
 awk '{if (NF == 6) \
          { print $1 " "  $2 " " $3 " "  $6 " at " $4 " " $5 } \
 else \
--- src/win32/Win32GUI.rc	Sun Apr 25 06:19:50 2004
+++ src/win32/Win32GUI.rc	Wed Nov 29 11:16:56 2006
@@ -1,4 +1,4 @@
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
 //
 #include "resource.h"
 
@@ -17,12 +17,12 @@
 #undef APSTUDIO_READONLY_SYMBOLS
 
 /////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// Neutral (Sys. Default) resources
 
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUSD)
 #ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
+LANGUAGE LANG_NEUTRAL, SUBLANG_SYS_DEFAULT
+#pragma code_page(1251)
 #endif //_WIN32
 
 /////////////////////////////////////////////////////////////////////////////
@@ -30,119 +30,105 @@
 // Dialog
 //
 
-WIRCD DIALOG DISCARDABLE  0, 0, 228, 127
-STYLE DS_MODALFRAME | DS_3DLOOK | DS_NOFAILCREATE | DS_CENTER | 
+WIRCD DIALOGEX 0, 0, 245, 126
+STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_NOFAILCREATE | DS_CENTER | 
     WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
-FONT 8, "MS Sans Serif"
+FONT 8, "Tahoma", 400, 0, 0xCC
 BEGIN
-    CONTROL         130,IDC_STATIC,"Static",SS_BITMAP | SS_NOTIFY,14,10,200,
+    CONTROL         130,IDC_STATIC,"Static",SS_BITMAP | SS_NOTIFY,14,10,217,
                     92
-    CONTROL         133,IDC_BAR,"Static",SS_BITMAP,14,107,200,15
-    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,14,104,201,1
+    CONTROL         133,IDC_BAR,"Static",SS_BITMAP,14,107,217,15
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,14,104,217,1
 END
 
-FROMVAR DIALOG DISCARDABLE  0, 0, 418, 183
-STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_VISIBLE | 
-    WS_CAPTION | WS_SYSMENU 
-CAPTION "UnrealIRCd License"
-FONT 8, "MS Sans Serif"
+FROMVAR DIALOGEX 0, 0, 418, 183
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | 
+    WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+CAPTION "Лицензия UnrealIRCd"
+FONT 8, "MS Shell Dlg", 400, 0, 0xCC
 BEGIN
     DEFPUSHBUTTON   "OK",IDOK,184,162,50,14
-    CONTROL         "",IDC_TEXT,"RichEdit20A",WS_BORDER | WS_VSCROLL | 
-                    WS_HSCROLL | WS_TABSTOP | 0x18c4,8,7,402,149
-END
-
-HELP DIALOG DISCARDABLE  0, 0, 318, 94
-STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_CAPTION | 
-    WS_SYSMENU
-CAPTION "Where to get help"
-FONT 8, "MS Sans Serif"
-BEGIN
-    DEFPUSHBUTTON   "OK",IDOK,134,73,50,14
-    LTEXT           "Where to get help:",IDC_STATIC,14,11,60,8
-    LTEXT           "Point your IRC client to irc.unrealircd.com and join #Unreal-Support",
-                    IDC_STATIC,14,20,234,9
-    LTEXT           "Email us at",IDC_STATIC,14,30,37,8
-    CONTROL         "unreal-users@lists.sourceforge.net",IDC_EMAIL,"Button",
-                    BS_OWNERDRAW,51,30,110,8
-    LTEXT           "Or visit us on the web at",IDC_STATIC,14,40,78,8
-    CONTROL         "http://www.unrealircd.com",IDC_URL,"Button",
-                    BS_OWNERDRAW,93,40,86,8
-    LTEXT           "Thank you for choosing UnrealIRCd :)",IDC_STATIC,98,55,
-                    121,9
+    CONTROL         "",IDC_TEXT,"RichEdit20A",ES_MULTILINE | ES_AUTOVSCROLL | 
+                    ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN | 
+                    WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,7,7,403,149,
+                    WS_EX_CLIENTEDGE
 END
 
-FROMFILE DIALOG DISCARDABLE  0, 0, 418, 224
-STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_VISIBLE | 
-    WS_CAPTION | WS_SYSMENU | WS_MAXIMIZEBOX
-CAPTION "UnrealIRCd Configuration File"
-FONT 8, "MS Sans Serif"
-BEGIN
-    CONTROL         "",IDC_TEXT,"RichEdit20A",WS_BORDER | WS_VSCROLL | 
-                    WS_HSCROLL | WS_TABSTOP | 0x1084,0,17,418,194
+FROMFILE DIALOGEX 0, 0, 418, 224
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_MAXIMIZEBOX | 
+    WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+CAPTION "Файл конфигурации UnrealIRCd"
+FONT 8, "MS Shell Dlg", 400, 0, 0xCC
+BEGIN
+    CONTROL         "",IDC_TEXT,"RichEdit20A",ES_MULTILINE | ES_AUTOHSCROLL | 
+                    ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,0,
+                    17,418,194,WS_EX_CLIENTEDGE
 END
 
 STATUS DIALOGEX 0, 0, 318, 169
-STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_CAPTION | 
-    WS_SYSMENU
-CAPTION "UnrealIRCd Status"
-FONT 8, "MS Sans Serif", 0, 0, 0x1
+STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | 
+    WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "UnrealIRCd Статистика"
+FONT 8, "MS Shell Dlg", 400, 0, 0xCC
 BEGIN
     CONTROL         "Tree1",IDC_TREE,"SysTreeView32",TVS_HASBUTTONS | 
                     TVS_HASLINES | TVS_DISABLEDRAGDROP | WS_BORDER | 
                     WS_TABSTOP,13,16,100,125
-    GROUPBOX        "Servers",IDC_STATIC,7,7,112,138
-    GROUPBOX        "Global Statistics",IDC_STATIC,122,7,189,78
-    LTEXT           "Clients:",IDC_STATIC,127,18,26,9
+    GROUPBOX        "Сервера",IDC_STATIC,7,7,112,138
+    GROUPBOX        "Общая статистика",IDC_STATIC,122,7,189,78
+    LTEXT           "Клиентов:",IDC_STATIC,127,18,38,9
     LTEXT           "",IDC_CLIENTS,170,18,41,9,SS_SUNKEN,WS_EX_RIGHT
-    LTEXT           "Servers:",IDC_STATIC,221,18,27,8
+    LTEXT           "Серверов:",IDC_STATIC,218,18,36,8
     LTEXT           "",IDC_SERVERS,261,18,41,9,SS_SUNKEN,WS_EX_RIGHT
-    LTEXT           "Channels:",IDC_STATIC,127,34,32,8
+    LTEXT           "Каналов:",IDC_STATIC,127,34,32,8
     LTEXT           "",IDC_CHANNELS,170,33,41,9,SS_SUNKEN,WS_EX_RIGHT
-    LTEXT           "Invisible:",IDC_STATIC,221,34,28,8
+    LTEXT           "Невидимых:",IDC_STATIC,218,34,42,8
     LTEXT           "",IDC_INVISO,261,33,41,9,SS_SUNKEN,WS_EX_RIGHT
-    LTEXT           "Operators:",IDC_STATIC,127,51,34,8
+    LTEXT           "Операторов:",IDC_STATIC,127,51,44,8
     LTEXT           "",IDC_OPERS,170,51,41,9,SS_SUNKEN,WS_EX_RIGHT
-    LTEXT           "Unknown:",IDC_STATIC,221,51,34,8
+    LTEXT           "Неизвесно:",IDC_STATIC,218,51,40,8
     LTEXT           "",IDC_UNKNOWN,261,51,41,9,SS_SUNKEN,WS_EX_RIGHT
-    LTEXT           "Max Clients:",IDC_STATIC,127,69,39,8
-    LTEXT           "",IDC_MAXCLIENTS,170,69,41,9,SS_SUNKEN,WS_EX_RIGHT
-    GROUPBOX        "Local Statistics",IDC_STATIC,122,90,189,55
+    LTEXT           "Максимально:",IDC_STATIC,158,69,50,8
+    LTEXT           "",IDC_MAXCLIENTS,213,69,41,9,SS_SUNKEN,WS_EX_RIGHT
+    GROUPBOX        "Local Statistics",IDC_STATIC,122,90,189,48
     PUSHBUTTON      "OK",IDOK,134,148,50,14
-    LTEXT           "Clients:",IDC_STATIC,127,100,24,8
+    LTEXT           "Клиентов:",IDC_STATIC,127,100,35,8
     LTEXT           "",IDC_LCLIENTS,170,100,41,9,SS_SUNKEN,WS_EX_RIGHT
-    LTEXT           "Servers:",IDC_STATIC,221,100,27,8
+    LTEXT           "Серверов:",IDC_STATIC,218,100,36,8
     LTEXT           "",IDC_LSERVERS,261,100,41,9,SS_SUNKEN,WS_EX_RIGHT
-    LTEXT           "Max Clients:",IDC_STATIC,127,118,39,8
-    LTEXT           "",IDC_LMAXCLIENTS,170,118,41,9,SS_SUNKEN,WS_EX_RIGHT
+    LTEXT           "Максимально:",IDC_STATIC,157,121,50,8
+    LTEXT           "",IDC_LMAXCLIENTS,211,121,41,9,SS_SUNKEN,WS_EX_RIGHT
 END
 
-CONFIGERROR DIALOG DISCARDABLE  0, 0, 331, 178
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION
-CAPTION "Configuration Error"
-FONT 8, "MS Sans Serif"
+CONFIGERROR DIALOGEX 0, 0, 332, 178
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | 
+    WS_CAPTION | WS_THICKFRAME
+CAPTION "Ошибка в настройке"
+FONT 8, "MS Shell Dlg", 400, 0, 0xCC
 BEGIN
     DEFPUSHBUTTON   "OK",IDOK,134,157,50,14
-    EDITTEXT        IDC_CONFIGERROR,7,7,317,142,ES_MULTILINE | 
+    EDITTEXT        IDC_CONFIGERROR,7,7,318,142,ES_MULTILINE | 
                     ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN | 
                     WS_VSCROLL
 END
 
-GOTO DIALOG DISCARDABLE  0, 0, 124, 52
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Goto"
-FONT 8, "MS Sans Serif"
-BEGIN
-    LTEXT           "Line Number:",IDC_STATIC,9,12,43,8
-    EDITTEXT        IDC_GOTO,56,9,48,14,ES_AUTOHSCROLL | ES_NUMBER
-    PUSHBUTTON      "Cancel",IDCANCEL,66,31,50,14
-    DEFPUSHBUTTON   "Go To",IDOK,8,31,50,14
+GOTO DIALOGEX 0, 0, 124, 52
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | 
+    WS_CAPTION | WS_SYSMENU
+CAPTION "Перейти"
+FONT 8, "MS Shell Dlg", 400, 0, 0xCC
+BEGIN
+    LTEXT           "Номер строки:",IDC_STATIC,9,12,51,8
+    EDITTEXT        IDC_GOTO,61,9,43,14,ES_AUTOHSCROLL | ES_NUMBER
+    PUSHBUTTON      "Отмена",IDCANCEL,66,31,50,14
+    DEFPUSHBUTTON   "Перейти",IDOK,8,31,50,14
 END
 
-COLOR DIALOG DISCARDABLE  0, 0, 156, 37
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Color Selection"
-FONT 8, "MS Sans Serif"
+COLOR DIALOGEX 0, 0, 156, 37
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
+    WS_SYSMENU
+CAPTION "Выбор цвета"
+FONT 8, "MS Shell Dlg", 400, 0, 0xCC
 BEGIN
     CONTROL         "",IDC_WHITE,"Button",BS_OWNERDRAW | WS_TABSTOP,4,3,13,
                     12
@@ -177,53 +163,47 @@
                     12
 END
 
-SSLPass DIALOG DISCARDABLE  0, 0, 174, 57
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "SSL Private Key Password"
-FONT 8, "MS Sans Serif"
+SSLPASS DIALOGEX 0, 0, 174, 57
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "SSL Пароль для Личного ключа"
+FONT 8, "Tahoma", 400, 0, 0xCC
 BEGIN
     DEFPUSHBUTTON   "OK",IDOK,33,35,50,14
-    PUSHBUTTON      "Cancel",IDCANCEL,89,35,50,14
+    PUSHBUTTON      "Отмена",IDCANCEL,89,35,50,14
     EDITTEXT        IDC_PASS,11,12,152,14,ES_PASSWORD | ES_AUTOHSCROLL
 END
 
+HELP DIALOGEX 0, 0, 318, 94
+STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | 
+    WS_CAPTION | WS_SYSMENU
+CAPTION "Где получить помощь"
+FONT 8, "Tahoma", 400, 0, 0xCC
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,261,73,50,14
+    LTEXT           "Где получить помощь:",IDC_STATIC,14,11,76,8
+    LTEXT           "Настройте ваш IRC клиент на irc.unrealircd.com и подключайтесь к #Unreal-Support",
+                    IDC_STATIC,14,20,282,9
+    LTEXT           "Пишите нам",IDC_STATIC,14,30,43,8
+    CONTROL         "coders@lists.unrealircd.org",IDC_EMAIL,"Button",
+                    BS_OWNERDRAW,58,30,87,8
+    LTEXT           "Или посетите наш Web-сайт:",IDC_STATIC,14,40,98,8
+    CONTROL         "http://www.unrealircd.com",IDC_URL,"Button",
+                    BS_OWNERDRAW,113,40,86,8
+    LTEXT           "Спасибо за выбор UnrealIRCd :)",IDC_STATIC,103,55,111,9
+    LTEXT           "Перевод выполнен Беляевым Алексеем (",IDC_STATIC,7,75,
+                    143,8,0,WS_EX_TRANSPARENT
+    CONTROL         "spider@omskart.ru",IDC_EMAIL2,"Button",BS_OWNERDRAW,149,
+                    75,62,8
+    LTEXT           ")",IDC_STATIC,211,75,8,8,0,WS_EX_TRANSPARENT
+END
 
-/////////////////////////////////////////////////////////////////////////////
-//
-// 24
-//
-
-1                       24      MOVEABLE PURE   "wircd.exe.manifest"
 
-#ifdef APSTUDIO_INVOKED
 /////////////////////////////////////////////////////////////////////////////
 //
-// TEXTINCLUDE
+// RT_MANIFEST
 //
 
-1 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
-    "#include ""windows.h""\r\n"
-    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
-    "#include ""resource.h""\r\n"
-    "#include ""winver.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
+1                       RT_MANIFEST             "wircd.exe.manifest"
 
 /////////////////////////////////////////////////////////////////////////////
 //
@@ -231,29 +211,24 @@
 //
 
 #ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
+GUIDELINES DESIGNINFO 
 BEGIN
     "WIRCD", DIALOG
     BEGIN
-        BOTTOMMARGIN, 126
+        LEFTMARGIN, 14
+        RIGHTMARGIN, 231
+        TOPMARGIN, 10
+        BOTTOMMARGIN, 122
     END
 
     "FROMVAR", DIALOG
     BEGIN
         LEFTMARGIN, 7
-        RIGHTMARGIN, 411
+        RIGHTMARGIN, 410
         TOPMARGIN, 7
         BOTTOMMARGIN, 176
     END
 
-    "HELP", DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 311
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 87
-    END
-
     "FROMFILE", DIALOG
     BEGIN
         LEFTMARGIN, 7
@@ -273,7 +248,7 @@
     "CONFIGERROR", DIALOG
     BEGIN
         LEFTMARGIN, 7
-        RIGHTMARGIN, 324
+        RIGHTMARGIN, 325
         TOPMARGIN, 7
         BOTTOMMARGIN, 171
     END
@@ -301,11 +276,18 @@
         TOPMARGIN, 7
         BOTTOMMARGIN, 50
     END
+
+    "HELP", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 311
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 87
+    END
 END
 #endif    // APSTUDIO_INVOKED
 
 
-#ifndef _MAC
 /////////////////////////////////////////////////////////////////////////////
 //
 // Version
@@ -348,8 +330,6 @@
     END
 END
 
-#endif    // !_MAC
-
 
 /////////////////////////////////////////////////////////////////////////////
 //
@@ -358,41 +338,41 @@
 
 // Icon with lowest ID value placed first to ensure application icon
 // remains consistent on all systems.
-ICO_MAIN                ICON    DISCARDABLE     "icon1.ico"
+ICO_MAIN                ICON                    "icon1.ico"
 
 /////////////////////////////////////////////////////////////////////////////
 //
 // Bitmap
 //
 
-BMP_LOGO                BITMAP  DISCARDABLE     "unreal.bmp"
-BMP_BAR                 BITMAP  DISCARDABLE     "bar.bmp"
-IDB_BITMAP1             BITMAP  DISCARDABLE     "toolbar.bmp"
+BMP_LOGO                BITMAP                  "unreal.bmp"
+BMP_BAR                 BITMAP                  "bar.bmp"
+IDB_BITMAP1             BITMAP                  "toolbar.bmp"
 
 /////////////////////////////////////////////////////////////////////////////
 //
 // Cursor
 //
 
-CUR_HAND                CURSOR  DISCARDABLE     "hand.CUR"
+CUR_HAND                CURSOR                  "hand.CUR"
 
 /////////////////////////////////////////////////////////////////////////////
 //
 // Menu
 //
 
-MENU_ABOUT MENU DISCARDABLE 
+MENU_ABOUT MENU 
 BEGIN
     POPUP "About"
     BEGIN
-        MENUITEM "&Credits",                    IDM_CREDITS
-        MENUITEM "&DALnet Credits",             IDM_DAL
-        MENUITEM "&License",                    IDM_LICENSE
-        MENUITEM "&Help",                       IDM_HELP
+        MENUITEM "&Авторы",                     IDM_CREDITS
+        MENUITEM "&DALnet авторы",              IDM_DAL
+        MENUITEM "&Лицензия",                   IDM_LICENSE
+        MENUITEM "&Справка",                    IDM_HELP
     END
 END
 
-MENU_CONFIG MENU DISCARDABLE 
+MENU_CONFIG MENU 
 BEGIN
     POPUP "Config"
     BEGIN
@@ -401,45 +381,87 @@
     END
 END
 
-MENU_REHASH MENU DISCARDABLE 
+MENU_REHASH MENU 
 BEGIN
     POPUP "Rehash"
     BEGIN
-        MENUITEM "&All Files",                  IDM_RHALL
+        MENUITEM "&Все файлы",                  IDM_RHALL
         MENUITEM SEPARATOR
-        MENUITEM "&Config file",                IDM_RHCONF
-        MENUITEM "&All MOTD and Rules",         IDM_RHMOTD
+        MENUITEM "&Конфигурацию",               IDM_RHCONF
+        MENUITEM "&Всеl MOTD и Правила",        IDM_RHMOTD
         MENUITEM "&OperMOTD",                   IDM_RHOMOTD
         MENUITEM "&BotMOTD",                    IDM_RHBMOTD
     END
 END
 
-MENU_SYSTRAY MENU DISCARDABLE 
+MENU_SYSTRAY MENU 
 BEGIN
     POPUP "Systray"
     BEGIN
-        MENUITEM "&Rehash",                     IDM_REHASH
-        MENUITEM "&Status",                     IDM_STATUS
-        MENUITEM "&Config",                     IDM_CONFIG
-        MENUITEM "&About",                      IDM_ABOUT
-        MENUITEM "S&hutdown",                   IDM_SHUTDOWN
+        MENUITEM "&Обновить",                   IDM_REHASH
+        MENUITEM "&Статус",                     IDM_STATUS
+        MENUITEM "&Настройка",                  IDM_CONFIG
+        MENUITEM "&О программе",                IDM_ABOUT
+        MENUITEM "В&ыключить",                  IDM_SHUTDOWN
     END
 END
 
-MENU_CONTEXT MENU DISCARDABLE 
+MENU_CONTEXT MENU 
 BEGIN
     POPUP "Context"
     BEGIN
-        MENUITEM "&Undo",                       IDM_UNDO
+        MENUITEM "&Отмена",                     IDM_UNDO
         MENUITEM SEPARATOR
-        MENUITEM "Cu&t",                        IDM_CUT
-        MENUITEM "&Copy",                       IDM_COPY
-        MENUITEM "&Paste",                      IDM_PASTE
-        MENUITEM "&Delete",                     IDM_DELETE
+        MENUITEM "&Вырезать",                   IDM_CUT
+        MENUITEM "&Копировать",                 IDM_COPY
+        MENUITEM "Вст&авить",                   IDM_PASTE
+        MENUITEM "&Удалить",                    IDM_DELETE
         MENUITEM SEPARATOR
-        MENUITEM "&Select All",                 IDM_SELECTALL
+        MENUITEM "В&ыделить всё",               IDM_SELECTALL
     END
 END
+
+#endif    // Neutral (Sys. Default) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+    "#include ""windows.h""\r\n"
+    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+    "#include ""resource.h""\r\n"
+    "#include ""winver.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
 
 #endif    // English (U.S.) resources
 /////////////////////////////////////////////////////////////////////////////
Binary files src/win32/bar.bmp and src/win32/bar.bmp --- src/win32/editor.c	Thu Oct 28 01:45:54 2004
+++ src/win32/editor.c	Wed Nov 29 11:16:56 2006
@@ -60,7 +60,7 @@
 	ti.uId = 1;
 	ti.hinst = hInstance;
 	ti.rect = clrect;
-	ti.lpszText = "Go To";
+	ti.lpszText = "Перейти";
 	SendMessage(hTip, TTM_ADDTOOL, 0, (LPARAM)&ti);
 	return hStatus;
 }
@@ -344,9 +344,9 @@
 			HWND hWnd = GetDlgItem(hDlg, IDC_TEXT), hTip;
 			file = (unsigned char *)lParam;
 			if (file)
-				wsprintf(szText, "UnrealIRCd Editor - %s", file);
+				wsprintf(szText, "UnrealIRCd Редактор - %s", file);
 			else 
-				strcpy(szText, "UnrealIRCd Editor - New File");
+				strcpy(szText, "UnrealIRCd Редактор - Новый файл");
 			SetWindowText(hDlg, szText);
 			lpfnOldWndProc = (FARPROC)SetWindowLong(hWnd, GWL_WNDPROC, (DWORD)RESubClassFunc);
 			hTool = DrawToolbar(hInst, hDlg);
@@ -389,7 +389,7 @@
 				else
 					SendMessage(hTool, TB_ENABLEBUTTON, (WPARAM)IDM_PASTE, (LPARAM)MAKELONG(FALSE,0));
 				SendMessage(hTool, TB_ENABLEBUTTON, (WPARAM)IDM_UNDO, (LPARAM)MAKELONG(FALSE,0));
-				wsprintf(szText, "Line: 1");
+				wsprintf(szText, "Строка: 1");
 				SetWindowText(hStatus, szText);
 			}
 			return TRUE;
@@ -469,7 +469,7 @@
 					currline++;
 					if (currline != prevline) 
 					{
-						wsprintf(buffer, "Line: %d", currline);
+						wsprintf(buffer, "Строка: %d", currline);
 						SetWindowText(hStatus, buffer);
 						prevline = currline;
 					}
@@ -482,34 +482,34 @@
 				switch (lpttt->hdr.idFrom) 
 				{
 					case IDM_NEW:
-						strcpy(lpttt->szText, "New");
+						strcpy(lpttt->szText, "Создать");
 						break;
 					case IDM_SAVE:
-						strcpy(lpttt->szText, "Save");
+						strcpy(lpttt->szText, "Сохранить");
 						break;
 					case IDM_CUT:
-						strcpy(lpttt->szText, "Cut");
+						strcpy(lpttt->szText, "Вырезать");
 						break;
 					case IDM_COPY:
-						strcpy(lpttt->szText, "Copy");
+						strcpy(lpttt->szText, "Копировать");
 						break;
 					case IDM_PASTE:
-						strcpy(lpttt->szText, "Paste");
+						strcpy(lpttt->szText, "Вставить");
 						break;
 					case IDM_UNDO:
-						strcpy(lpttt->szText, "Undo");
+						strcpy(lpttt->szText, "Отменить");
 						break;
 					case IDM_REDO:
-						strcpy(lpttt->szText, "Redo");
+						strcpy(lpttt->szText, "Повторить");
 						break;
 					case IDC_BOLD:
-						strcpy(lpttt->szText, "Bold");
+						strcpy(lpttt->szText, "Жирный");
 						break;
 					case IDC_UNDERLINE:
-						strcpy(lpttt->szText, "Underline");
+						strcpy(lpttt->szText, "Подчёркнутый");
 						break;
 					case IDC_COLOR:
-						strcpy(lpttt->szText, "Text Color");
+						strcpy(lpttt->szText, "Цвет текста");
 						break;
 					case IDC_BGCOLOR:
 						strcpy(lpttt->szText, "Background Color");
@@ -684,7 +684,7 @@
 				int ans;
 				if (SendMessage(GetDlgItem(hDlg, IDC_TEXT), EM_GETMODIFY, 0, 0) != 0) 
 				{
-					sprintf(text, "The text in the %s file has changed.\r\n\r\nDo you want to save the changes?", file ? file : "new");
+					sprintf(text, "Содержимое файла %s изменилось.\r\n\r\nЖелаете сохранить изменения?", file ? file : "new");
 					ans = MessageBox(hDlg, text, "UnrealIRCd", MB_YESNOCANCEL|MB_ICONWARNING);
 					if (ans == IDNO)
 						newfile = TRUE;
@@ -702,7 +702,7 @@
 				{
 					unsigned char szText[256];
 					file = NULL;
-					strcpy(szText, "UnrealIRCd Editor - New File");
+					strcpy(szText, "UnrealIRCd Редактор - Новый файл");
 					SetWindowText(hDlg, szText);
 					SetWindowText(GetDlgItem(hDlg, IDC_TEXT), NULL);
 				}
@@ -752,7 +752,7 @@
 			int ans;
 			if (SendMessage(GetDlgItem(hDlg, IDC_TEXT), EM_GETMODIFY, 0, 0) != 0) 
 			{
-				sprintf(text, "The text in the %s file has changed.\r\n\r\nDo you want to save the changes?", file ? file : "new");
+				sprintf(text, "Содержимое файла %s изменилось.\r\n\r\nЖелаете сохранить изменения?", file ? file : "new");
 				ans = MessageBox(hDlg, text, "UnrealIRCd", MB_YESNOCANCEL|MB_ICONWARNING);
 				if (ans == IDNO)
 					EndDialog(hDlg, TRUE);
--- src/win32/gui.c	Mon Mar 14 03:03:22 2005
+++ src/win32/gui.c	Wed Nov 29 11:16:56 2006
@@ -189,8 +189,7 @@
 
 int CloseUnreal(HWND hWnd)
 {
-	if (MessageBox(hWnd, "Close UnrealIRCd?", "Are you sure?", MB_YESNO|MB_ICONQUESTION) 
-	    == IDNO)
+	if (MessageBox(hWnd, "Закрыть UnrealIRCd?", "Вы уверены?", MB_YESNO|MB_ICONQUESTION) == IDNO)
 		 return 0;
 	else 
 	{
@@ -278,7 +277,7 @@
 
 	if (InitwIRCD(__argc, __argv) != 1)
 	{
-		MessageBox(NULL, "UnrealIRCd has failed to initialize in InitwIRCD()", "UnrealIRCD Initalization Error" ,MB_OK);
+		MessageBox(NULL, "UnrealIRCd has failed to initialize in InitwIRCD()", "UnrealIRCD Ошибка инициализации" ,MB_OK);
 		return FALSE;
 	}
 	ShowWindow(hWnd, SW_SHOW);
@@ -324,7 +323,7 @@
 			hAbout = GetSubMenu(LoadMenu(hInst, MAKEINTRESOURCE(MENU_ABOUT)),0);
 			/* Systray popup menu set the items to point to the other menus*/
 			hTray = GetSubMenu(LoadMenu(hInst, MAKEINTRESOURCE(MENU_SYSTRAY)),0);
-			ModifyMenu(hTray, IDM_REHASH, MF_BYCOMMAND|MF_POPUP|MF_STRING, (UINT)hRehash, "&Rehash");
+			ModifyMenu(hTray, IDM_REHASH, MF_BYCOMMAND|MF_POPUP|MF_STRING, (UINT)hRehash, "&Обновить");
 			ModifyMenu(hTray, IDM_ABOUT, MF_BYCOMMAND|MF_POPUP|MF_STRING, (UINT)hAbout, "&About");
 			
 			SetWindowText(hDlg, WIN32_VERSION);
@@ -366,7 +365,7 @@
 					if (conf_log) 
 					{
 						ConfigItem_log *logs;
-						AppendMenu(hConfig, MF_POPUP|MF_STRING, (UINT)hLogs, "Logs");
+						AppendMenu(hConfig, MF_POPUP|MF_STRING, (UINT)hLogs, "Логи");
 						for (logs = conf_log; logs; logs = (ConfigItem_log *)logs->next) 
 						{
 							AppendMenu(hLogs, MF_STRING, i++, logs->file);
@@ -410,7 +409,7 @@
 						}
 					}
 					AppendMenu(hConfig, MF_SEPARATOR, 0, NULL);
-					AppendMenu(hConfig, MF_STRING, IDM_NEW, "New File");
+					AppendMenu(hConfig, MF_STRING, IDM_NEW, "=ютvщ Їрщы");
 					mii.cbSize = sizeof(MENUITEMINFO);
 					mii.fMask = MIIM_SUBMENU;
 					mii.hSubMenu = hConfig;
@@ -430,15 +429,15 @@
 			POINT p;
 			p.x = LOWORD(lParam);
 			p.y = HIWORD(lParam);
-			if ((p.x >= 24) && (p.x <= 78) && (p.y >= 178) && (p.y <= 190)) 
+			 if ((p.x >= 25) && (p.x <= 94) && (p.y >= 178) && (p.y <= 190)) 
 				SetCursor(hCursor);
-			else if ((p.x >= 85) && (p.x <= 132) && (p.y >= 178) && (p.y <= 190)) 
+ 		 else if ((p.x >= 99) && (p.x <= 150) && (p.y >= 178) && (p.y <= 190)) 
 				SetCursor(hCursor);
-			else if ((p.x >= 140) && (p.x <= 186) && (p.y >= 178) && (p.y <= 190)) 
+ 		 else if ((p.x >= 157) && (p.x <= 232) && (p.y >= 178) && (p.y <= 190)) 
 				SetCursor(hCursor);
-			else if ((p.x >= 194) && (p.x <= 237) && (p.y >= 178) && (p.y <= 190)) 
+ 		 else if ((p.x >= 240) && (p.x <= 284) && (p.y >= 178) && (p.y <= 190)) 
 				SetCursor(hCursor);
-			else if ((p.x >= 245) && (p.x <= 311) && (p.y >= 178) && (p.y <= 190)) 
+ 		 else if ((p.x >= 291) && (p.x <= 342) && (p.y >= 178) && (p.y <= 190)) 
 				SetCursor(hCursor);
 			return 0;
 		}
@@ -447,18 +446,18 @@
 			POINT p;
 	         	p.x = LOWORD(lParam);
 		     	p.y = HIWORD(lParam);
-			if ((p.x >= 24) && (p.x <= 78) && (p.y >= 178) && (p.y <= 190))
+			if ((p.x >= 25) && (p.x <= 94) && (p.y >= 178) && (p.y <= 190))
              		{
 				ClientToScreen(hDlg,&p);
 				TrackPopupMenu(hRehash,TPM_LEFTALIGN|TPM_LEFTBUTTON,p.x,p.y,0,hDlg,NULL);
 				return 0;
 			}
-			else if ((p.x >= 85) && (p.x <= 132) && (p.y >= 178) && (p.y <= 190))
+			else if ((p.x >= 99) && (p.x <= 150) && (p.y >= 178) && (p.y <= 190)) 
 			{
 				ShowDialog(&hStatusWnd, hInst, "Status", hDlg, StatusDLG);
 				return 0;
 			}
-			else if ((p.x >= 140) && (p.x <= 186) && (p.y >= 178) && (p.y <= 190))
+			else if ((p.x >= 157) && (p.x <= 232) && (p.y >= 178) && (p.y <= 190)) 
 			{
 				unsigned long i = 60000;
 				ClientToScreen(hDlg,&p);
@@ -471,7 +470,7 @@
 				if (conf_log) 
 				{
 					ConfigItem_log *logs;
-					AppendMenu(hConfig, MF_POPUP|MF_STRING, (UINT)hLogs, "Logs");
+					AppendMenu(hConfig, MF_POPUP|MF_STRING, (UINT)hLogs, "Логи");
 					for (logs = conf_log; logs; logs = (ConfigItem_log *)logs->next) 
 					{
 						AppendMenu(hLogs, MF_STRING, i++, logs->file);
@@ -515,18 +514,18 @@
 					}
 				}
 				AppendMenu(hConfig, MF_SEPARATOR, 0, NULL);
-				AppendMenu(hConfig, MF_STRING, IDM_NEW, "New File");
+				AppendMenu(hConfig, MF_STRING, IDM_NEW, "=ютvщ Їрщы");
 				TrackPopupMenu(hConfig,TPM_LEFTALIGN|TPM_LEFTBUTTON,p.x,p.y,0,hDlg,NULL);
 
 				return 0;
 			}
-			else if ((p.x >= 194) && (p.x <= 237) && (p.y >= 178) && (p.y <= 190)) 
+			else if ((p.x >= 240) && (p.x <= 284) && (p.y >= 178) && (p.y <= 190))
 			{
 				ClientToScreen(hDlg,&p);
 				TrackPopupMenu(hAbout,TPM_LEFTALIGN|TPM_LEFTBUTTON,p.x,p.y,0,hDlg,NULL);
 				return 0;
 			}
-			else if ((p.x >= 245) && (p.x <= 311) && (p.y >= 178) && (p.y <= 190)) 
+			else if ((p.x >= 291) && (p.x <= 342) && (p.y >= 178) && (p.y <= 190))
 				return CloseUnreal(hDlg);
 		}
 		case WM_COMMAND: 
@@ -561,14 +560,14 @@
 				case IDM_SHUTDOWN:
 					return CloseUnreal(hDlg);
 				case IDM_RHALL:
-					MessageBox(NULL, "Rehashing all files", "Rehashing", MB_OK);
-					sendto_realops("Rehashing all files via the console");
+					MessageBox(NULL, "+сэютыхэv тёх Їрщыv", "+сэютыхэшх", MB_OK);
+					sendto_realops("+сэютыхэшх тёхї Їрщыют шч ъюэёюыш");
 					rehash(&me,&me,0);
 					reread_motdsandrules();
 					break;
 				case IDM_RHCONF:
-					MessageBox(NULL, "Rehashing the Config file", "Rehashing", MB_OK);
-					sendto_realops("Rehashing the Config file via the console");
+					MessageBox(NULL, "+сэютыхэv Їрщыv ъюэЇшуєЁрЎшш", "+сэютыхэшх", MB_OK);
+					sendto_realops("+сэютыхэv Їрщыv ъюэЇшуєЁрЎшш шч ъюэёюыш");
 					rehash(&me,&me,0);
 					break;
 				case IDM_RHMOTD: 
@@ -637,17 +636,17 @@
 
 LRESULT CALLBACK LicenseDLG(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 
 {
-	return FromVarDLG(hDlg, message, wParam, lParam, "UnrealIRCd License", gnulicense);
+	return FromVarDLG(hDlg, message, wParam, lParam, "UnrealIRCd Лицензия", gnulicense);
 }
 
 LRESULT CALLBACK CreditsDLG(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 
 {
-	return FromVarDLG(hDlg, message, wParam, lParam, "UnrealIRCd Credits", unrealcredits);
+	return FromVarDLG(hDlg, message, wParam, lParam, "UnrealIRCd Авторы", unrealcredits);
 }
 
 LRESULT CALLBACK DalDLG(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 
 {
-	return FromVarDLG(hDlg, message, wParam, lParam, "UnrealIRCd DALnet Credits", dalinfotext);
+	return FromVarDLG(hDlg, message, wParam, lParam, "UnrealIRCd DALnet авторы", dalinfotext);
 }
 
 LRESULT CALLBACK FromVarDLG(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam,
@@ -748,7 +747,7 @@
 			unsigned char szText[256];
 			struct stat sb;
 			HWND hWnd = GetDlgItem(hDlg, IDC_TEXT), hTip;
-			wsprintf(szText, "UnrealIRCd Viewer - %s", (unsigned char *)lParam);
+			wsprintf(szText, "UnrealIRCd Редактор - %s", (unsigned char *)lParam);
 			SetWindowText(hDlg, szText);
 			lpfnOldWndProc = (FARPROC)SetWindowLong(hWnd, GWL_WNDPROC, (DWORD)RESubClassFunc);
 			if ((fd = open((unsigned char *)lParam, _O_RDONLY|_O_BINARY)) != -1) 
@@ -876,6 +875,9 @@
 				else if (LOWORD(wParam) == IDC_EMAIL)
 					ShellExecute(NULL, "open", "mailto:unreal-users@lists.sourceforge.net", NULL, NULL, 
 						SW_MAXIMIZE);
+ 				else if (LOWORD(wParam) == IDC_EMAIL2)
+ 					ShellExecute(NULL, "open", "mailto:Alexey%20Belyaev%20<spider@omskart.ru>?subj=UnrealIRCd%203.2", NULL, NULL, 
+ 						SW_MAXIMIZE);
 				EndDialog(hDlg, TRUE);
 				return 0;
 			}
--- src/win32/resource.h	Sun Apr 25 06:19:52 2004
+++ src/win32/resource.h	Wed Nov 29 11:16:56 2006
@@ -62,6 +62,7 @@
 #define IDC_PINK                        1176
 #define IDC_DARKGRAY                    1177
 #define IDC_GRAY                        1178
+#define IDC_EMAIL2                       1179
 #define IDM_CREDITS                     40027
 #define IDM_DAL                         40028
 #define IDM_LICENSE                     40029
Binary files src/win32/unreal.bmp and src/win32/unreal.bmp Binary files src/win32/unreal.res and src/win32/unreal.res --- src/win32/wircd.exe.manifest	Sun Apr 25 06:19:56 2004
+++ src/win32/wircd.exe.manifest	Fri Dec  1 10:34:28 2006
@@ -10,12 +10,11 @@
 <dependency>
     <dependentAssembly>
         <assemblyIdentity
-            type="win32"
-            name="Microsoft.Windows.Common-Controls"
-            version="6.0.0.0"
-            processorArchitecture="X86"
-            publicKeyToken="6595b64144ccf1df"
-            language="*"
+			type='win32' 
+			name='Microsoft.VC80.CRT' 
+			version='8.0.50608.0' 
+			processorArchitecture='x86' 
+			publicKeyToken='1fc8b3b9a1e18e3b' 
         />
     </dependentAssembly>
 </dependency>
--- wircd.def	Fri Feb  3 19:57:18 2006
+++ wircd.def	Fri Dec  1 23:05:59 2006
@@ -1,6 +1,5 @@
-; dlltool --output-def wircd.def.in --export-all-symbols SRC/CHANNEL.OBJ SRC/SEND.OBJ SRC/SOCKET.OBJ SRC/S_CONF.OBJ SRC/FDLIST.OBJ SRC/DBUF.OBJ SRC/CLOAK.OBJ SRC/HASH.OBJ SRC/PARSE.OBJ SRC/IRCD.OBJ SRC/S_NUMERIC.OBJ SRC/WHOWAS.OBJ SRC/S_AUTH.OBJ SRC/HELP.OBJ SRC/S_MISC.OBJ SRC/MATCH.OBJ SRC/CRULE.OBJ SRC/S_DEBUG.OBJ SRC/SUPPORT.OBJ SRC/LIST.OBJ SRC/S_ERR.OBJ SRC/PACKET.OBJ SRC/S_BSD.OBJ SRC/S_SERV.OBJ SRC/S_USER.OBJ SRC/CHARSYS.OBJ SRC/VERSION.OBJ SRC/S_KLINE.OBJ SRC/S_EXTRA.OBJ SRC/IRCSPRINTF.OBJ SRC/LUSERS.OBJ SRC/SCACHE.OBJ SRC/ALN.OBJ SRC/BADWORDS.OBJ SRC/WEBTV.OBJ SRC/RES.OBJ SRC/MODULES.OBJ SRC/S_SVS.OBJ SRC/EVENTS.OBJ SRC/UMODES.OBJ SRC/AUTH.OBJ SRC/CIDR.OBJ SRC/SSL.OBJ SRC/RANDOM.OBJ SRC/EXTCMODES.OBJ SRC/MD5.OBJ SRC/API-ISUPPORT.OBJ SRC/API-COMMAND.OBJ SRC/EXTBANS.OBJ
+; dlltool --output-def wircd.def.in --export-all-symbols SRC/CHANNEL.OBJ SRC/SEND.OBJ SRC/SOCKET.OBJ SRC/S_CONF.OBJ SRC/FDLIST.OBJ SRC/DBUF.OBJ SRC/CLOAK.OBJ SRC/HASH.OBJ SRC/PARSE.OBJ SRC/IRCD.OBJ SRC/S_NUMERIC.OBJ SRC/WHOWAS.OBJ SRC/S_AUTH.OBJ SRC/HELP.OBJ SRC/S_MISC.OBJ SRC/MATCH.OBJ SRC/CRULE.OBJ SRC/S_DEBUG.OBJ SRC/SUPPORT.OBJ SRC/LIST.OBJ SRC/S_ERR.OBJ SRC/PACKET.OBJ SRC/S_BSD.OBJ SRC/S_SERV.OBJ SRC/S_USER.OBJ SRC/CHARSYS.OBJ SRC/VERSION.OBJ SRC/S_KLINE.OBJ SRC/S_EXTRA.OBJ SRC/IRCSPRINTF.OBJ SRC/LUSERS.OBJ SRC/SCACHE.OBJ SRC/ALN.OBJ SRC/RES.OBJ SRC/MODULES.OBJ SRC/S_SVS.OBJ SRC/EVENTS.OBJ SRC/UMODES.OBJ SRC/AUTH.OBJ SRC/CIDR.OBJ SRC/SSL.OBJ SRC/RANDOM.OBJ SRC/EXTCMODES.OBJ SRC/MD5.OBJ SRC/API-ISUPPORT.OBJ SRC/API-COMMAND.OBJ SRC/EXTBANS.OBJ SRC/TIMESYNCH.OBJ SRC/ZIP.OBJ
 EXPORTS
-	extcmode_cmodeT_requirechop
 	AllUmodes
 	AllowClient
 	AuthTypes
@@ -50,6 +49,7 @@
 	Find_alias
 	Find_ban
 	Find_banEx
+	Find_cgiirc
 	Find_channel_allowed
 	Find_class
 	Find_deny_dcc
@@ -86,9 +86,6 @@
 	LRV
 	LastSlot
 	LockEventSystem
-	MD5_Final
-	MD5_Init
-	MD5_Update
 	ModuleGetError
 	ModuleGetErrorStr
 	ModuleGetOptions
@@ -140,6 +137,11 @@
 	SNO_SPAMF
 	SNO_TKL
 	SNO_VHOST
+	SSLKeyPasswd
+	SSLPassDLG
+	SSL_change_fd
+	SSL_set_nonblocking
+	SSL_smart_shutdown
 	SVSNOOP
 	SendUmodes
 	Servers
@@ -213,8 +215,6 @@
 	add_listmode
 	add_local_client
 	add_local_domain
-	add_remote_include
-	add_send_mode_param
 	add_server_to_table
 	add_silence
 	add_throttling_bucket
@@ -224,6 +224,7 @@
 	add_user_to_channel
 	addto_fdlist
 	advanced_check
+	applymeblock
 	areason
 	atime
 	atime_exp
@@ -231,11 +232,10 @@
 	b64_decode
 	b64_encode
 	backupbuf
-	badwords_stats
+	ban_cloakhost
 	ban_flooder
 	ban_ip
 	ban_realhost
-	ban_version
 	ban_virthost
 	banact_chartoval
 	banact_stringtoval
@@ -322,6 +322,7 @@
 	conf_badword_message
 	conf_badword_quit
 	conf_ban
+	conf_cgiirc
 	conf_class
 	conf_debuglevel
 	conf_deny_channel
@@ -389,6 +390,8 @@
 	crule_parseprimary
 	crule_test
 	crule_via
+	ctx_client
+	ctx_server
 	currentrate
 	currentrate2
 	currlife
@@ -420,6 +423,7 @@
 	del_listmode
 	del_silence
 	del_throttling_bucket
+	delete_cgiircblock
 	delete_classblock
 	delete_linkblock
 	delfrom_fdlist
@@ -448,6 +452,7 @@
 	exit_client
 	extban_conv_param_nuh
 	extban_init
+	extban_is_banned_helper
 	extban_modec_conv_param
 	extban_modec_is_banned
 	extban_modec_is_ok
@@ -458,15 +463,15 @@
 	extbanstr
 	extchmstr
 	extcmode_cmodeG_requirechop
+	extcmode_cmodeT_requirechop
 	extcmode_default_requirechop
 	extcmode_default_requirehalfop
 	extcmode_duplicate_paramlist
 	extcmode_free_paramlist
 	extcmode_get_struct
 	extcmode_init
+	extracttime
 	extraflags
-	fast_badword_match
-	fast_badword_replace
 	find_Command
 	find_CommandEx
 	find_Command_simple
@@ -474,7 +479,6 @@
 	find_chasing
 	find_client
 	find_invex
-	find_loaded_remote_include
 	find_match_server
 	find_member_link
 	find_membership_link
@@ -483,7 +487,6 @@
 	find_or_add
 	find_person
 	find_qline
-	find_remote_include
 	find_server
 	find_server_b64_or_real
 	find_server_by_base64
@@ -498,6 +501,7 @@
 	find_throttling_bucket
 	find_tkline_match
 	find_tkline_match_zap
+	find_tkline_match_zap_ex
 	find_user_link
 	findmod_by_bantype
 	flag_add
@@ -536,6 +540,7 @@
 	get_snostr
 	get_sockerr
 	get_sockhost
+	getcloak
 	getrandom16
 	getrandom32
 	getrandom8
@@ -579,19 +584,28 @@
 	infotext
 	init_CommandHash
 	init_conf
+	init_ctx_client
+	init_ctx_server
 	init_dynconf
 	init_fdlist
 	init_ircstats
 	init_modef
 	init_random
 	init_resolver
+	init_ssl
 	init_sys
 	init_throttling_hash
 	initlists
 	initstats
 	initwhowas
 	int6_to_base64_map
+	iplist_onlist
 	ipport_seperate
+	ircd_SSL_accept
+	ircd_SSL_client_handshake
+	ircd_SSL_connect
+	ircd_SSL_read
+	ircd_SSL_write
 	ircd_log
 	ircsprintf
 	ircst
@@ -606,6 +620,7 @@
 	is_chanprot
 	is_half_op
 	is_skochanop
+	isanyserverlinked
 	isipv6
 	isupport_init
 	join_channel
@@ -638,7 +653,6 @@
 	m_license
 	m_module
 	m_motd
-	m_names
 	m_opermotd
 	m_rehash
 	m_restart
@@ -651,6 +665,7 @@
 	make_class
 	make_client
 	make_cmodestr
+	make_compiler_string
 	make_extbanstr
 	make_extcmodestr
 	make_isupportstrings
@@ -658,6 +673,7 @@
 	make_member
 	make_membership
 	make_nick_user_host
+	make_nick_user_host_r
 	make_server
 	make_synchlist
 	make_umodestr
@@ -665,6 +681,7 @@
 	make_user_host
 	make_virthost
 	match
+	match_esc
 	match_ip
 	match_ipv4
 	max_client_count
@@ -683,7 +700,6 @@
 	myargv
 	myctime
 	myncmp
-	mystpcpy
 	next_client
 	nextconnect
 	nextdnscheck
@@ -704,10 +720,10 @@
 	oper_fdlist
 	opermode
 	opermotd
+	our_compiler_version
 	our_crc32
 	our_dlerror
 	our_mod_version
-	our_strcasestr
 	outofmemory
 	parabuf
 	parse
@@ -730,9 +746,9 @@
 	rehash
 	rehash_internal
 	rehash_motdrules
+	reinit_resolver
 	rejoin_dojoinandmode
 	rejoin_doparts
-	remote_include
 	remove_client_from_list
 	remove_dcc_references
 	remove_local_client
@@ -758,9 +774,6 @@
 	save_tunefile
 	sbrk0
 	send_authports
-	send_channel_modes
-	send_channel_modes_sjoin
-	send_channel_modes_sjoin3
 	send_list
 	send_proto
 	send_queued
@@ -831,16 +844,19 @@
 	smotd
 	smotd_tm
 	smycmp
-	snprintf
 	sock_strerror
 	spamf_ugly_vchanoverride
 	spamfilter_getconftargets
 	spamfilter_gettargets
 	spamfilter_target_inttostring
 	spamfiltertargettable
+	ssl_client_handshake
+	ssl_error_str
+	ssl_get_cipher
+	ssl_handshake
+	ssl_pem_passwd_cb
 	start_auth
 	start_of_normal_client_handshake
-	stripbadwords
 	stripbadwords_channel
 	stripbadwords_message
 	stripbadwords_quit
@@ -870,6 +886,7 @@
 	touppertab
 	trim_str
 	trouble_info
+	ts_buildpacket
 	umode_allow_all
 	umode_allow_opers
 	umode_delete
@@ -895,6 +912,8 @@
 	unreal_getpathname
 	unreal_mktemp
 	unreal_setfilemodtime
+	unreal_time_synch
+	unreal_time_synch_error
 	unrealcredits
 	unrealdns_addreqtolist
 	unrealdns_cb_iptoname
@@ -907,15 +926,18 @@
 	unrealdns_removecacherecord
 	unrealdns_removeoldrecords
 	unreallogo
+	unzip_packet
 	valid_host
+	verify_hostname
 	verify_opercount
 	version
 	vsendto_one
 	vsendto_prefix_one
 	vsnprintf
-	w_whois
-	webtv_cmds
-	webtv_parse
 	whowas_next
 	write_pidfile
+	zip_buffer
+	zip_free
+	zip_init
 	zlinebuf
+ 	Find_codepage
