[packages/eggdrop] - up to 1.8.3; dropped patches and moduels that don't build with 1.8.x series

arekm arekm at pld-linux.org
Sun Sep 23 12:32:28 CEST 2018


commit 12f43ebfd3f4e643f0e161ff4e77a8a0cfaed561
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Sep 23 12:32:19 2018 +0200

    - up to 1.8.3; dropped patches and moduels that don't build with 1.8.x series

 eggdrop-FHS.patch                |   5 +-
 eggdrop-autobotchk.patch         |   7 +-
 eggdrop-build.patch              |  65 ++-
 eggdrop-doc_makefile.patch       |  19 +-
 eggdrop-ipv6-ssl.patch           | 821 --------------------------------------
 eggdrop-multilevel_sharing.patch | 451 ---------------------
 eggdrop-nohostwhowhom.patch      |  91 -----
 eggdrop-ssl.patch                | 830 ---------------------------------------
 eggdrop-topicprot.patch          | 273 -------------
 eggdrop.spec                     |  45 +--
 ssl-md5.patch                    |  34 --
 x32.patch                        |  11 -
 12 files changed, 52 insertions(+), 2600 deletions(-)
---
diff --git a/eggdrop.spec b/eggdrop.spec
index 30e171e..6495479 100644
--- a/eggdrop.spec
+++ b/eggdrop.spec
@@ -1,19 +1,16 @@
 #
 # Conditional build:
-%bcond_with	suzi	# encoding enhancements
-%bcond_without	ssl		# openssl patch
-#
 Summary:	Eggdrop is an IRC bot, written in C
 Summary(pl.UTF-8):	Eggdrop jest botem IRC napisanym w C
 Summary(pt_BR.UTF-8):	Bot de IRC escrito em C
 Summary(ru.UTF-8):	Eggdrop, это IRC-бот написанный на языке C.
 Name:		eggdrop
-Version:	1.6.21
-Release:	2
+Version:	1.8.3
+Release:	1
 License:	GPL v2
 Group:		Applications/Communications
-Source0:	ftp://ftp.eggheads.org/pub/eggdrop/source/1.6/%{name}%{version}.tar.bz2
-# Source0-md5:	5663b2daecc790e6e9237e1d5a2caa50
+Source0:	ftp://ftp.eggheads.org/pub/eggdrop/source/1.8/%{name}-%{version}.tar.gz
+# Source0-md5:	30b076b813a6b04f7421ab709309af7b
 # In order to unify filenames, following language packs and third-party modules were
 # repackaged. Some files were renamed, but none modified. Original archives can be
 # found by looking at http://www.egghelp.org/
@@ -44,8 +41,7 @@ Source24:	%{name}-module-irctree-1.1.tar.gz
 # Source24-md5:	8bf884c57adbb131228fe47bffc69836
 Source25:	%{name}-module-megahal-2.6b.tar.gz
 # Source25-md5:	1c8762d63d16c95bee3a2399614b8ac5
-Source26:	%{name}-module-stats-1.3.3dev1.tar.gz
-# Source26-md5:	f50299b06dc9c8d29f7abb19defaa917
+
 Source27:	%{name}-module-idea-1.0.2.tar.gz
 # Source27-md5:	dce4a43dfcfb72e143c71e8f6c6fc8c8
 Source28:	%{name}-module-twofish-1.0.tar.gz
@@ -56,20 +52,18 @@ Source30:	http://eggdrop.msk.ru/files/irc/%{name}1.6.19-patch-sp0009.tar.bz2
 # Source30-md5:	37df8dbb76a2b2283e2e80c182dc9967
 Patch0:		%{name}-FHS.patch
 Patch1:		%{name}-doc_makefile.patch
-Patch2:		%{name}-multilevel_sharing.patch
+
 # http://www.egghelp.org/files.htm#patches
-Patch3:		%{name}-topicprot.patch
+
 Patch4:		%{name}-config_encryption.patch
 Patch5:		%{name}-autobotchk.patch
 # http://www.egghelp.org/files.htm#patches
-Patch6:		%{name}-ssl.patch
+
 Patch7:		%{name}-nolibs.patch
-Patch8:		%{name}-nohostwhowhom.patch
+
 Patch9:		%{name}-nmu.patch
-Patch10:	%{name}-ipv6-ssl.patch
-Patch11:	ssl-md5.patch
+
 Patch12:	%{name}-build.patch
-Patch13:	x32.patch
 URL:		http://www.eggheads.org/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -158,31 +152,18 @@ Eggdrop находится на канале в целях оказания за
 соответствующих прав и привилегий.
 
 %prep
-%setup -q -n %{name}%{version} -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a20 -a21 -a22 -a23 -a24 -a25 -a26 -a27 -a28 -a30
-%{?with_ssl:%patch6 -p0}
+%setup -q -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a20 -a21 -a22 -a23 -a24 -a25 -a27 -a28 -a30
 mv aclocal.m4 acinclude.m4
 %patch0 -p1
 %patch1 -p1
-%patch3 -p1
+
 %patch4 -p1
 %patch5 -p1
 %patch7 -p1
-%patch8 -p1
-
-%if %{with suzi}
-patch -p1 < eggdrop1.6.19-sp.0009.diff || exit 1
-%else
-%patch2 -p1
-%endif
 
 #%patch9 -p0 - wtf is this?
-#%{?with_ssl:%patch10 -p1}
-%if "%{pld_release}" == "ac"
-%patch11 -p1
-%endif
 
 %patch12 -p1
-%patch13 -p1
 
 # detect threaded tcl version
 sed -i -e 's#TclpFinalizeThreadData#Tcl_FinalizeThread#g' acinclude.m4
@@ -230,7 +211,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc docs/* %{?with_suzi:docs/*utf-8*.txt}
+%doc docs/*
 %attr(755,root,root) %{_bindir}/%{name}
 %dir %{_libdir}/%{name}
 %dir %{_libdir}/%{name}/modules
diff --git a/eggdrop-FHS.patch b/eggdrop-FHS.patch
index 6eea963..082dd7d 100644
--- a/eggdrop-FHS.patch
+++ b/eggdrop-FHS.patch
@@ -6,7 +6,7 @@
  # ^- This should contain a fully qualified path to your Eggdrop executable.
  #
  # $Id$
-@@ -185,22 +185,22 @@ set sort-users 0
+@@ -241,19 +241,19 @@ set userfile "LamestBot.user"
  
  # Specify here where Eggdrop should look for help files. Don't modify this
  # setting unless you know what you're doing!
@@ -18,9 +18,6 @@
 -set text-path "text/"
 +set text-path "/usr/share/eggdrop/"
  
- # Set here a place to store temporary files.
- set temp-path "/tmp"
- 
  # The MOTD (Message Of The day) is displayed when people dcc chat or telnet
  # to the bot. Look at doc/TEXT-SUBSTITUTIONS for options.
 -set motd "text/motd"
diff --git a/eggdrop-autobotchk.patch b/eggdrop-autobotchk.patch
index 175fcb9..e315802 100644
--- a/eggdrop-autobotchk.patch
+++ b/eggdrop-autobotchk.patch
@@ -10,7 +10,7 @@ diff -burNp eggdrop1.6.19/scripts/autobotchk eggdrop1.6.19.new/scripts/autobotch
  
  while {[set opt [newsplit argv]] != ""} {
    switch -- $opt {
-@@ -143,16 +143,6 @@ if {[string match "*/scripts" $dir]} {
+@@ -184,16 +184,6 @@ if {[string match "*/scripts" $dir]} {
  
  set dir [string trimright $dir /]
  
@@ -24,6 +24,7 @@ diff -burNp eggdrop1.6.19/scripts/autobotchk eggdrop1.6.19.new/scripts/autobotch
 -  exit
 -}
 -
- puts -nonewline "Opening '$config' for processing ... "
+ foreach config $confs {
+   puts -nonewline "Opening '$config' for processing ... "
  
- if {[catch {open $dir/$config r} fd]} {
+
diff --git a/eggdrop-build.patch b/eggdrop-build.patch
index a9243d9..605550f 100644
--- a/eggdrop-build.patch
+++ b/eggdrop-build.patch
@@ -1,42 +1,27 @@
---- eggdrop1.6.21/src/main.c~	2014-06-03 13:04:54.000000000 +0200
-+++ eggdrop1.6.21/src/main.c	2014-06-03 13:06:28.394788350 +0200
-@@ -503,7 +503,7 @@
-         break;                  /* this should never be reached */
-       case 'h':
-         printf("\n%s\n\n", version);
--        printf(EGG_USAGE);
-+        printf("%s", EGG_USAGE);
-         printf("\n");
-         bg_send_quit(BG_ABORT);
-         exit(0);
-@@ -1073,7 +1073,7 @@
-   putlog(LOG_ALL, "*", "--- Loading %s (%s)", ver, s);
-   chanprog();
-   if (!encrypt_pass) {
--    printf(MOD_NOCRYPT);
-+    printf("%s", MOD_NOCRYPT);
-     bg_send_quit(BG_ABORT);
-     exit(1);
-   }
---- eggdrop1.6.21/src/mod/transfer.mod/transfer.c~	2011-02-13 15:19:34.000000000 +0100
-+++ eggdrop1.6.21/src/mod/transfer.mod/transfer.c	2014-06-03 13:07:45.957421377 +0200
-@@ -786,7 +786,7 @@
+--- eggdrop-1.8.3/src/mod/megahal.mod/megahal.c.org	2018-09-23 12:27:07.121843921 +0200
++++ eggdrop-1.8.3/src/mod/megahal.mod/megahal.c	2018-09-23 12:27:39.979508041 +0200
+@@ -291,13 +291,13 @@ static void strip_mirc_codes(int flags,
+       }
+       break;
+     case 0x16:                 /* Reverse video */
+-      if (flags & STRIP_REV) {
++      if (flags & STRIP_REVERSE) {
+         text++;
+         continue;
+       }
+       break;
+     case 0x1f:                 /* Underlined text */
+-      if (flags & STRIP_UNDER) {
++      if (flags & STRIP_UNDERLINE) {
+         text++;
+         continue;
+       }
+@@ -336,7 +336,7 @@ static void do_megahal(int idx, char *pr
  
- static void display_dcc_fork_send(int idx, char *buf)
- {
--  sprintf(buf, TRANSFER_CONN_SEND);
-+  sprintf(buf, "%s", TRANSFER_CONN_SEND);
- }
+   strcpy(buff, text);
+   text = buff;
+-  strip_mirc_codes(STRIP_BOLD | STRIP_REV | STRIP_UNDER | STRIP_COLOR, text);
++  strip_mirc_codes(STRIP_BOLD | STRIP_REVERSE | STRIP_UNDERLINE | STRIP_COLOR, text);
+ 
+   putlog(LOG_DEBUG, "*", "MegaHAL: learning: %s", text);
  
- static int expmem_dcc_xfer(void *x)
---- eggdrop1.6.21/src/misc.c~	2011-07-09 17:07:48.000000000 +0200
-+++ eggdrop1.6.21/src/misc.c	2014-06-03 13:11:19.524671122 +0200
-@@ -601,7 +601,7 @@
-                * then reset repeats. We want the current time here,
-                * so put that in the file first.
-                */
--              fprintf(logs[i].f, stamp);
-+              fprintf(logs[i].f, "%s", stamp);
-               fprintf(logs[i].f, MISC_LOGREPEAT, logs[i].repeats);
-               logs[i].repeats = 0;
-               /* No need to reset logs[i].szlast here
diff --git a/eggdrop-doc_makefile.patch b/eggdrop-doc_makefile.patch
index 0038101..ecb6859 100644
--- a/eggdrop-doc_makefile.patch
+++ b/eggdrop-doc_makefile.patch
@@ -1,12 +1,11 @@
 --- eggdrop1.6.21/doc/Makefile.in~	2012-03-31 04:32:33.000000000 +0300
 +++ eggdrop1.6.21/doc/Makefile.in	2012-03-31 04:32:58.536425562 +0300
-@@ -14,7 +14,8 @@
- 
+@@ -14,7 +14,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
  DOCS = ABOUT BANS BOTNET BUG-REPORT COMPILE-GUIDE CONTENTS \
- Changes1.6 FIRST-SCRIPT KNOWN-PROBLEMS MODULES PARTYLINE PATCH-HOWTO \
--TEXT-SUBSTITUTIONS TRICKS USERS Versions WEIRD-MESSAGES tcl-commands.doc
-+TEXT-SUBSTITUTIONS TRICKS USERS Versions WEIRD-MESSAGES tcl-commands.doc \
-+LANGUAGE.finnish LANGUAGE.portuguese LANGUAGE.portuguese.br
+ Changes1.8 FIRST-SCRIPT IPV6 KNOWN-PROBLEMS MODULES PARTYLINE PATCH-HOWTO \
+ TEXT-SUBSTITUTIONS TLS TRICKS USERS Versions WEIRD-MESSAGES tcl-commands.doc \
+-FAQ
++FAQ LANGUAGE.finnish LANGUAGE.portuguese LANGUAGE.portuguese.br
  
  MAN1 = man1/eggdrop.1
  
@@ -21,8 +20,8 @@
  	@echo "Copying docs."
  	@for i in $(DOCS); do \
  		$(INSTALL_DATA) $(srcdir)/$$i $(DEST)/doc/; \
-@@ -70,3 +75,4 @@
- 			$(INSTALL_DATA) $$i $(DEST)/doc/html/; \
- 		done; \
- 	fi
+@@ -125,3 +125,4 @@ install:
+                         $(INSTALL_DATA) $$i $(DEST)/doc/html/_static; \
+                 done; \
+         fi
 +	@cp -pr $(srcdir)/modules/* $(DEST)/doc/modules
diff --git a/eggdrop-ipv6-ssl.patch b/eggdrop-ipv6-ssl.patch
deleted file mode 100644
index 925191d..0000000
--- a/eggdrop-ipv6-ssl.patch
+++ /dev/null
@@ -1,821 +0,0 @@
-diff -urN eggdrop1.6.19/config.h.in eggdrop1.6.19-ipv6/config.h.in
---- config.h.in	 2006-11-20 12:38:25.000000000 +0100
-+++ config.h.in	2008-07-27 22:13:41.000000000 +0200
-@@ -372,6 +372,9 @@
- /* Define to `unsigned' if <sys/types.h> does not define. */
- #undef size_t
-
-+/* Define if there is IPV6 */
-+#define IPV6
-+
- /* Define to empty if the keyword `volatile' does not work. Warning: valid
-    code using `volatile' can become incorrect without. Disable with care. */
- #undef volatile
-diff -urN eggdrop1.6.19/eggdrop.conf eggdrop1.6.19-ipv6/eggdrop.conf
---- eggdrop.conf	2008-02-16 21:15:30.000000000 +0100
-+++ eggdrop.conf	2008-07-27 22:13:43.000000000 +0200
-@@ -56,7 +56,9 @@
- # by hostname or by IP. You may also want to set the hostname here if
- # Eggdrop has trouble detecting it when it starts up.
- #set my-hostname "virtual.host.com"
--#set my-ip "99.99.0.0"
-+#set my-ip "98.76.54.32"
-+#set my-hostname6 "virtual.host6.com"
-+#set my-ip6 "2002:624c:3620::1"
-
- # If you want to have your Eggdrop messages displayed in a language other
- # than English, change this setting to match your preference. An alternative
-diff -urN eggdrop1.6.19/src/botnet.c eggdrop1.6.19-ipv6/src/botnet.c
---- src/botnet.c	2008-02-16 22:41:03.000000000 +0100
-+++ src/botnet.c	2008-07-27 22:13:40.000000000 +0200
-@@ -1063,7 +1063,7 @@
-   strcpy(dcc[i].u.bot->version, "(primitive bot)");
-   dcc[i].u.bot->numver = idx;
-   dcc[i].u.bot->port = dcc[i].port;     /* Remember where i started */
--  dcc[i].sock = getsock(SOCK_STRONGCONN);
-+  dcc[i].sock = getsock(SOCK_STRONGCONN,getprotocol(dcc[i].host));
-   nfree(linker);
-   if (dcc[i].sock < 0 ||
-       open_telnet_raw(dcc[i].sock, iptostr(htonl(dcc[i].addr)),
-@@ -1099,7 +1099,7 @@
-     return;
-   }
-   killsock(dcc[idx].sock);
--  dcc[idx].sock = getsock(SOCK_STRONGCONN);
-+  dcc[idx].sock = getsock(SOCK_STRONGCONN,getprotocol(dcc[idx].host));
-   dcc[uidx].u.relay->sock = dcc[idx].sock;
-   dcc[idx].port++;
-   dcc[idx].timeval = now;
-@@ -1145,7 +1145,7 @@
-     return;
-   }
-
--  dcc[i].sock = getsock(SOCK_STRONGCONN | SOCK_VIRTUAL);
-+  dcc[i].sock = getsock(SOCK_STRONGCONN | SOCK_VIRTUAL,getprotocol(bi->address));
-   if (dcc[i].sock < 0) {
-     lostdcc(i);
-     dprintf(idx, "%s\n", MISC_NOFREESOCK);
-diff -urN eggdrop1.6.19/src/chanprog.c eggdrop1.6.19-ipv6/src/chanprog.c
---- src/chanprog.c	2008-02-16 22:41:03.000000000 +0100
-+++ src/chanprog.c	2008-07-27 22:13:41.000000000 +0200
-@@ -294,6 +294,8 @@
-           botnetnick, ver, i, i == 1 ? "" : "s",
-           (int) (expected_memory() / 1024));
-
-+  dprintf(idx, "Unofficial IPv6 patch for v1.6.19 based on the v1.6.18 IPv6 patch \n");
-+
-   s[0] = 0;
-   if (now2 > 86400) {
-     /* days */
-diff -urN eggdrop1.6.19/src/dcc.c eggdrop1.6.19-ipv6/src/dcc.c
---- src/dcc.c	2008-02-16 22:41:03.000000000 +0100
-+++ src/dcc.c	2008-07-27 22:13:42.000000000 +0200
-@@ -234,7 +234,7 @@
-
-   /* Try next port */
-   killsock(dcc[idx].sock);
--  dcc[idx].sock = getsock(SOCK_STRONGCONN);
-+  dcc[idx].sock = getsock(SOCK_STRONGCONN,getprotocol(dcc[idx].host));
-   dcc[idx].port++;
-   dcc[idx].timeval = now;
-   if (dcc[idx].sock < 0 ||
-@@ -1174,7 +1174,8 @@
-   changeover_dcc(i, &DCC_IDENTWAIT, 0);
-   dcc[i].timeval = now;
-   dcc[i].u.ident_sock = dcc[idx].sock;
--  sock = open_telnet(iptostr(htonl(dcc[i].addr)), 113);
-+  // sock = open_telnet(iptostr(htonl(dcc[i].addr)), 113);
-+  sock = open_telnet(dcc[i].host, 113);
-   putlog(LOG_MISC, "*", DCC_TELCONN, dcc[i].host, dcc[i].port);
-   s[0] = 0;
-   if (sock < 0) {
-diff -urN eggdrop1.6.19/src/main.c eggdrop1.6.19-ipv6/src/main.c
---- src/main.c	2008-02-16 22:41:03.000000000 +0100
-+++ src/main.c	2008-07-28 18:35:52.000000000 +0200
-@@ -90,8 +90,8 @@
-  * modified versions of this bot.
-  */
-
--char egg_version[1024] = "1.6.19";
--int egg_numver = 1061800;
-+char egg_version[1024] = "1.6.19";
-+int egg_numver = 1061900;
-
- char notify_new[121] = "";      /* Person to send a note to for new users */
- int default_flags = 0;          /* Default user flags                     */
-@@ -239,7 +239,7 @@
-      *       _not_ safe <cybah>
-      */
-     x = creat("DEBUG.DEBUG", 0644);
--    setsock(x, SOCK_NONSOCK);
-+    setsock(x, SOCK_NONSOCK,AF_INET);
-     if (x >= 0) {
-       strncpyz(s, ctime(&now), sizeof s);
-       dprintf(-x, "Debug (%s) written %s\n", ver, s);
-@@ -264,7 +264,7 @@
-   putlog(LOG_MISC, "*", "* Please REPORT this BUG!");
-   putlog(LOG_MISC, "*", "* Check doc/BUG-REPORT on how to do so.");
-   x = creat("DEBUG", 0644);
--  setsock(x, SOCK_NONSOCK);
-+  setsock(x, SOCK_NONSOCK,AF_INET);
-   if (x < 0) {
-     putlog(LOG_MISC, "*", "* Failed to write DEBUG");
-   } else {
-@@ -906,7 +906,7 @@
-       userlist = adduser(userlist, dcc[n].nick, "none", "-", USER_PARTY);
-       dcc[n].user = get_user_by_handle(userlist, dcc[n].nick);
-     }
--    setsock(STDOUT, 0);          /* Entry in net table */
-+    setsock(STDOUT, 0,AF_INET);          /* Entry in net table */
-     dprintf(n, "\n### ENTERING DCC CHAT SIMULATION ###\n\n");
-     dcc_chatter(n);
-   }
-diff -urN eggdrop1.6.19/src/mod/filesys.mod/filesys.c eggdrop1.6.19-ipv6/src/mod/filesys.mod/filesys.c
---- src/mod/filesys.mod/filesys.c	2008-02-16 22:41:09.000000000 +0100
-+++ src/mod/filesys.mod/filesys.c	2008-07-27 22:13:44.000000000 +0200
-@@ -820,7 +820,7 @@
-       lostdcc(i);
-     } else {
-       dcc[i].timeval = now;
--      dcc[i].sock = getsock(SOCK_BINARY);
-+      dcc[i].sock = getsock(SOCK_BINARY,getprotocol(ip));
-       if (dcc[i].sock < 0 || open_telnet_dcc(dcc[i].sock, ip, prt) < 0)
-         dcc[i].type->eof(i);
-     }
-@@ -865,7 +865,7 @@
-   } else {
-     ip = newsplit(&msg);
-     prt = newsplit(&msg);
--    sock = getsock(0);
-+    sock = getsock(0,getprotocol(ip));
-     if (sock < 0 || open_telnet_dcc(sock, ip, prt) < 0) {
-       neterror(buf);
-       if (!quiet_reject)
-diff -urN eggdrop1.6.19/src/mod/module.h eggdrop1.6.19-ipv6/src/mod/module.h
---- src/mod/module.h	2008-02-16 22:41:06.000000000 +0100
-+++ src/mod/module.h	2008-07-27 22:13:45.000000000 +0200
-@@ -198,7 +198,8 @@
- /* 80 - 83 */
- #define new_dcc ((int (*) (struct dcc_table *, int))global[80])
- #define lostdcc ((void (*) (int))global[81])
--#define getsock ((int (*) (int))global[82])
-+/* #define getsock ((int (*) (int))global[82]) */
-+#define getsock ((int (*) (int,int))global[82])
- #define killsock ((void (*) (int))global[83])
- /* 84 - 87 */
- #define open_listen ((int (*) (int *))global[84])
-@@ -469,6 +470,7 @@
- #define quiet_reject (*(int *)(global[284]))
- #define file_readable ((int (*) (char *))global[285])
- /* IPv6 leftovers: 286 */
-+#define getprotocol ((int (*)(char *))global[286]) /* get protocol */
- /* IPv6 leftovers: 287 */
- /* 288 - 291 */
- /* IPv6 leftovers: 288 */
-diff -urN eggdrop1.6.19/src/mod/server.mod/server.c eggdrop1.6.19-ipv6/src/mod/server.mod/server.c
---- src/mod/server.mod/server.c	2008-02-16 22:41:10.000000000 +0100
-+++ src/mod/server.mod/server.c	2008-07-27 22:13:47.000000000 +0200
-@@ -1517,7 +1517,7 @@
-     return;
-   }
-   egg_snprintf(ip, sizeof ip, "%lu", iptolong(htonl(dcc[i].addr)));
--  dcc[i].sock = getsock(0);
-+  dcc[i].sock = getsock(0,getprotocol(ip));
-   if (dcc[i].sock < 0 || open_telnet_dcc(dcc[i].sock, ip, buf) < 0) {
-     neterror(buf);
-     if (!quiet_reject)
-diff -urN eggdrop1.6.19/src/mod/server.mod/servmsg.c eggdrop1.6.19-ipv6/src/mod/server.mod/servmsg.c
---- src/mod/server.mod/servmsg.c	2008-02-16 22:41:10.000000000 +0100
-+++ src/mod/server.mod/servmsg.c	2008-07-27 22:13:47.000000000 +0200
-@@ -1261,7 +1261,9 @@
-     /* I'm resolving... don't start another server connect request */
-     resolvserv = 1;
-     /* Resolve the hostname. */
--    dcc_dnsipbyhost(dcc[servidx].host);
-+    // dcc_dnsipbyhost(dcc[servidx].host);
-+    server_resolve_success(servidx);
-+
-   }
- }
-
-@@ -1283,7 +1285,9 @@
-   dcc[servidx].addr = dcc[servidx].u.dns->ip;
-   strcpy(pass, dcc[servidx].u.dns->cbuf);
-   changeover_dcc(servidx, &SERVER_SOCKET, 0);
--  serv = open_telnet(iptostr(htonl(dcc[servidx].addr)), dcc[servidx].port);
-+    //serv = open_telnet(iptostr(htonl(dcc[servidx].addr)), dcc[servidx].port);
-+  serv = open_telnet(dcc[servidx].host, dcc[servidx].port);
-+
-   if (serv < 0) {
-     neterror(s);
-     putlog(LOG_SERV, "*", "%s %s (%s)", IRC_FAILEDCONNECT, dcc[servidx].host,
-diff -urN eggdrop1.6.19/src/mod/share.mod/share.c eggdrop1.6.19-ipv6/src/mod/share.mod/share.c
---- src/mod/share.mod/share.c	2008-02-16 22:41:11.000000000 +0100
-+++ src/mod/share.mod/share.c	2008-07-27 22:13:48.000000000 +0200
-@@ -1137,7 +1137,7 @@
-   } else {
-     ip = newsplit(&par);
-     port = newsplit(&par);
--    sock = getsock(SOCK_BINARY); /* Don't buffer this -> mark binary. */
-+    sock = getsock(SOCK_BINARY,getprotocol(ip)); /* Don't buffer this -> mark binary. */
-     if (sock < 0 || open_telnet_dcc(sock, ip, port) < 0) {
-       killsock(sock);
-       putlog(LOG_BOTS, "*", "Asynchronous connection failed!");
-diff -urN eggdrop1.6.19/src/modules.c eggdrop1.6.19-ipv6/src/modules.c
---- src/modules.c	2008-02-16 22:41:04.000000000 +0100
-+++ src/modules.c	2008-07-27 22:13:45.000000000 +0200
-@@ -99,6 +99,7 @@
- extern tand_t *tandbot;
- extern Tcl_Interp *interp;
- extern sock_list *socklist;
-+extern int getprotocol(char *);
-
- int cmd_die();
- int xtra_kill();
-@@ -561,7 +562,7 @@
-   /* 284 - 287 */
-   (Function) & quiet_reject,      /* int                                 */
-   (Function) file_readable,
--  (Function) 0,                   /* IPv6 leftovers: 286                 */
-+  (Function) getprotocol,         /* IPv6 leftovers: 286                 */
-   (Function) 0,                   /* IPv6 leftovers: 287                 */
-   /* 288 - 291 */
-   (Function) 0,                   /* IPv6 leftovers: 288                 */
-diff -urN eggdrop1.6.19/src/net.c eggdrop1.6.19-ipv6/src/net.c
---- src/net.c	2008-02-16 22:41:04.000000000 +0100
-+++ src/net.c	2008-07-27 22:13:46.000000000 +0200
-@@ -60,6 +60,9 @@
- 
- char hostname[121] = "";      /* Hostname can be specified in the config file.*/
- char myip[121] = "";          /* IP can be specified in the config file.      */
-+char myip6[121] = "";		/* IPV6 can be specified in the config file.	*/
-+char hostname6[121] = "";	/* Hostname6 can be specified in the config file*/
-+
- char firewall[121] = "";      /* Socks server for firewall.                   */
- int firewallport = 1080;      /* Default port of socks 4/5 firewalls.         */
- char botuser[21] = "eggdrop"; /* Username of the user running the bot.        */
-@@ -88,6 +91,28 @@
-   return ret;
- }
- 
-+/* define the protocol based on a given host */
-+int getprotocol(char *host)
-+{
-+#ifndef IPV6
-+	return AF_INET;
-+#else
-+	struct hostent *he;
-+	if (!setjmp(alarmret)) {
-+		alarm(resolve_timeout);
-+		he = gethostbyname2(host,AF_INET6);
-+		alarm(0);
-+	} else
-+		he = NULL;
-+	
-+	if(!he)
-+	{
-+		return AF_INET; // we check no resolve on IPv4 and assume it, if IPv6 does not works
-+	}
-+	return AF_INET6;
-+#endif
-+}
-+
- /* Initialize the socklist
-  */
- void init_net()
-@@ -114,6 +139,9 @@
-   return tot;
- }
- 
-+struct hostent *myipv6he;
-+char myipv6host[120];
-+
- /* Get my ip number
-  */
- IP getmyip()
-@@ -122,6 +150,25 @@
-   char s[121];
-   IP ip;
-   struct in_addr *in;
-+    
-+  myipv6he = NULL;
-+  
-+  #ifdef IPV6
-+  	if (myip[0]) {
-+  		myipv6he = gethostbyname2(myip6,AF_INET6);
-+  		if (myipv6he==NULL)
-+  			fatal("Hostname IPV6 self-lookup failed.",0);
-+  	}
-+  	if (hostname6[0]) {
-+  		myipv6he = gethostbyname2(hostname6,AF_INET6);
-+  		if (myipv6he==NULL)
-+  			fatal("Hostname IPV6 self-lookup failed.",0);
-+  	}
-+  	if(myipv6he!=NULL)
-+  	{
-+  		inet_ntop(AF_INET6,&myipv6he,myipv6host,119);
-+  	}
-+  #endif
-   if (myip[0]) {
-     if ((myip[strlen(myip) - 1] >= '0') && (myip[strlen(myip) - 1] <= '9'))
-       return (IP) inet_addr(myip);
-@@ -133,9 +180,10 @@
-     gethostname(s, 120);
-     hp = gethostbyname(s);
-   }
--  if (hp == NULL)
-+  if (hp == NULL && myipv6he==NULL)
-     fatal("Hostname self-lookup failed. Please set 'my-ip' in the config "
-           "file.", 0);
-+  if (hp == NULL) return 0;
-   in = (struct in_addr *) (hp->h_addr_list[0]);
-   ip = (IP) (in->s_addr);
-   return ip;
-@@ -244,7 +292,7 @@
- 
- /* Return a free entry in the socket entry
-  */
--int allocsock(int sock, int options)
-+int allocsock(int sock, int options, int af_ty)
- {
-   int i;
- 
-@@ -255,6 +303,7 @@
-       socklist[i].inbuflen = socklist[i].outbuflen = 0;
-       socklist[i].flags = options;
-       socklist[i].sock = sock;
-+      socklist[i].af = af_ty;
-       return i;
-     }
-   }
-@@ -264,9 +313,9 @@
- 
- /* Request a normal socket for i/o
-  */
--void setsock(int sock, int options)
-+void setsock(int sock, int options, int af_ty)
- {
--  int i = allocsock(sock, options), parm;
-+  int i = allocsock(sock, options, af_ty), parm;
- 
-   if (((sock != STDOUT) || backgrd) && !(socklist[i].flags & SOCK_NONSOCK)) {
-     parm = 1;
-@@ -284,12 +333,12 @@
-   fcntl(sock, F_SETFL, O_NONBLOCK);
- }
- 
--int getsock(int options)
-+int getsock(int options, int AF_DEF)
- {
--  int sock = socket(AF_INET, SOCK_STREAM, 0);
-+  int sock = socket(AF_DEF, SOCK_STREAM, 0);
- 
-   if (sock >= 0)
--    setsock(sock, options);
-+    setsock(sock, options, AF_DEF);
-   else
-     putlog(LOG_MISC, "*", "Warning: Can't create new socket!");
-   return sock;
-@@ -328,23 +377,39 @@
-  */
- static int proxy_connect(int sock, char *host, int port, int proxy)
- {
-+  #ifdef IPV6
-+	unsigned char x[32];
-+#else
-   unsigned char x[10];
-+#endif
-+
-   struct hostent *hp;
-   char s[256];
-+  int af_ty;
-   int i;
-+  af_ty=getprotocol(host);
- 
-   /* socks proxy */
-   if (proxy == PROXY_SOCKS) {
-     /* numeric IP? */
--    if (host[strlen(host) - 1] >= '0' && host[strlen(host) - 1] <= '9') {
-+    if ((host[strlen(host) - 1] >= '0' && host[strlen(host) - 1] <= '9') && af_ty!=AF_INET6) {
-       IP ip = ((IP) inet_addr(host));
-       egg_memcpy(x, &ip, 4);
-     } else {
-       /* no, must be host.domain */
-       if (!sigsetjmp(alarmret, 1)) {
-+   #ifdef IPV6
-         alarm(resolve_timeout);
-+       if (af_ty==AF_INET6)
-+       {
-+               hp = gethostbyname(host);
-+       } else {
-+   #endif
-         hp = gethostbyname(host);
-+   #ifdef IPV6
-+       }
-         alarm(0);
-+   #endif
-       } else
-         hp = NULL;
-       if (hp == NULL) {
-@@ -356,6 +421,17 @@
-     for (i = 0; i < MAXSOCKS; i++)
-       if (!(socklist[i].flags & SOCK_UNUSED) && socklist[i].sock == sock)
-         socklist[i].flags |= SOCK_PROXYWAIT;    /* drummer */
-+          
-+ #ifdef IPV6
-+ 	if (af_ty==AF_INET6)
-+ 		egg_snprintf(s, sizeof s,"\004\001%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%s", (port >> 8) % 256, (port % 256),
-+ 		x[0], x[1], x[2], x[3],
-+ 		x[4], x[5], x[6], x[7],
-+ 		x[8], x[9], x[10], x[11],
-+ 		x[12], x[13], x[14], x[15],
-+ 		botuser);
-+ 	else
-+ #endif   
-       egg_snprintf(s, sizeof s, "\004\001%c%c%c%c%c%c%s", (port >> 8) % 256,
-                    (port % 256), x[0], x[1], x[2], x[3], botuser);
-     tputs(sock, s, strlen(botuser) + 9);        /* drummer */
-@@ -366,6 +442,19 @@
-   return sock;
- }
- 
-+/*
-+ * Return protocol of socket
-+ */
-+int getsockproto(int sock)
-+{
-+	int i;
-+	for (i = 0 ; i < MAXSOCKS ; i++) {
-+		if (socklist[i].sock == sock)
-+			return socklist[i].af;
-+	}
-+	return AF_INET; // default
-+}
-+
- /* Starts a connection attempt to a socket
-  *
-  * If given a normal hostname, this will be resolved to the corresponding
-@@ -379,9 +468,15 @@
- int open_telnet_raw(int sock, char *server, int sport)
- {
-   struct sockaddr_in name;
-+#ifdef IPV6
-+  struct sockaddr_in6 name6;
-+  unsigned long succ;
-+#endif
-+  int rc;
-   struct hostent *hp;
-   char host[121];
--  int i, port, rc;
-+  int i, port;
-+  int af_ty;
-   volatile int proxy;
- 
-   /* firewall?  use socks */
-@@ -399,6 +494,43 @@
-     strcpy(host, server);
-     port = sport;
-   }
-+#ifdef IPV6
-+	af_ty = getprotocol(host);
-+	if(af_ty==AF_INET6)
-+	{
-+		succ=getmyip();
-+		bzero((char *) &name6, sizeof(struct sockaddr_in6));
-+		
-+		name6.sin6_family = AF_INET6;
-+		if (myip[0])
-+		{
-+			if (myipv6he==NULL)
-+			{
-+				memcpy(&name6.sin6_addr,&in6addr_any,16);
-+			} else {
-+				memcpy(&name6.sin6_addr,myipv6he->h_addr,myipv6he->h_length);
-+			}
-+		} else {
-+		
-+		}
-+		if (bind(sock, (struct sockaddr *) &name6, sizeof(name6)) < 0) {
-+			killsock(sock);
-+			return -1;
-+		}
-+		bzero((char *) &name6, sizeof(struct sockaddr_in6));
-+		name6.sin6_family = AF_INET6;
-+		name6.sin6_port = htons(port);
-+		if (!setjmp(alarmret)) {
-+			alarm(resolve_timeout);
-+			hp = gethostbyname2(host,AF_INET6);
-+			alarm(0) ;
-+		} else {
-+			hp = NULL ;
-+		}
-+		egg_memcpy((char *) &name6.sin6_addr, hp->h_addr, hp->h_length);
-+		name6.sin6_family = hp->h_addrtype;
-+	} else {
-+#endif
-   egg_bzero((char *) &name, sizeof(struct sockaddr_in));
- 
-   name.sin_family = AF_INET;
-@@ -428,11 +560,20 @@
-     egg_memcpy(&name.sin_addr, hp->h_addr, hp->h_length);
-     name.sin_family = hp->h_addrtype;
-   }
-+#ifdef IPV6
-+	}
-+#endif  
-   for (i = 0; i < MAXSOCKS; i++) {
-     if (!(socklist[i].flags & SOCK_UNUSED) && (socklist[i].sock == sock))
-       socklist[i].flags = (socklist[i].flags & ~SOCK_VIRTUAL) | SOCK_CONNECT;
-   }
--  rc = connect(sock, (struct sockaddr *) &name, sizeof(struct sockaddr_in));
-+  //rc = connect(sock, (struct sockaddr *) &name, sizeof(struct sockaddr_in));
-+#ifdef IPV6
-+	if (af_ty == AF_INET6)
-+		rc = connect(sock, (struct sockaddr *) &name6, sizeof(struct sockaddr_in6));
-+	else
-+#endif
-+		rc = connect(sock, (struct sockaddr *) &name, sizeof(struct sockaddr_in)) ;
-   if (rc < 0) {
-     if (errno == EINPROGRESS) {
-       /* Firewall?  announce connect attempt to proxy */
-@@ -451,8 +592,12 @@
- /* Ordinary non-binary connection attempt */
- int open_telnet(char *server, int port)
- {
--  int sock = getsock(0), ret = open_telnet_raw(sock, server, port);
-+  int sock = getsock(0,getprotocol(server)), ret = open_telnet_raw(sock, server, port);
-+ 
-+  putlog(LOG_DEBUG, "*", "net.c / open_telnet");
- 
-+  if (ret < 0)
-+  	killsock(sock);
-   return ret;
- }
- 
-@@ -462,7 +607,12 @@
- int open_address_listen(IP addr, int *port)
-  {
-   int sock = 0;
-+  int af_def;
-+  unsigned long ipp;
-   socklen_t addrlen;
-+#ifdef IPV6
-+  struct sockaddr_in6 name6;
-+#endif 
-   struct sockaddr_in name;
- 
-   if (firewall[0]) {
-@@ -473,7 +623,8 @@
-   }
- 
-   if (getmyip() > 0) {
--    sock = getsock(SOCK_LISTEN);
-+     af_def=AF_INET;
-+    sock = getsock(SOCK_LISTEN,af_def);
-     if (sock < 1)
-       return -1;
- 
-@@ -483,7 +634,7 @@
-     name.sin_addr.s_addr = addr;
-     if (bind(sock, (struct sockaddr *) &name, sizeof(name)) < 0) {
-       killsock(sock);
--      return -1;
-+      goto tryv6;
-     }
-     /* what port are we on? */
-     addrlen = sizeof(name);
-@@ -494,9 +645,37 @@
-     *port = ntohs(name.sin_port);
-     if (listen(sock, 1) < 0) {
-       killsock(sock);
-+      goto tryv6;
-+    }
-+    return sock;
-+  }
-+  tryv6:
-+#ifdef IPV6
-+	ipp=getmyip();
-+	af_def=AF_INET6;
-+	if(af_def==AF_INET6 && myipv6he!=NULL)
-+	{
-+		sock = getsock(SOCK_LISTEN,af_def);
-+		bzero((char *) &name6,sizeof(name6));
-+		name6.sin6_family=af_def;
-+		name6.sin6_port=htons(*port);
-+		memcpy(&name6.sin6_addr,myipv6he->h_addr,myipv6he->h_length);
-+		if (bind(sock, (struct sockaddr *) &name6, sizeof(name6)) < 0) {
-+			killsock(sock);
-+			return -1;
-+		}
-+		addrlen = sizeof(name6);
-+		if (getsockname(sock, (struct sockaddr *) &name6, &addrlen) < 0) {
-+			killsock(sock);
-+			return -1;
-+		}
-+		*port = ntohs(name6.sin6_port);
-+		if (listen(sock, 1) < 0) {
-+			killsock(sock);
-       return -1;
-     }
-   }
-+#endif
- 
-   return sock;
- }
-@@ -520,6 +699,9 @@
-   return inet_ntoa(a);
- }
- 
-+unsigned long notalloc=0;
-+
-+
- /* Short routine to answer a connect received on a socket made previously
-  * by open_listen ... returns hostname of the caller & the new socket
-  * does NOT dispose of old "public" socket!
-@@ -529,23 +711,57 @@
- {
-   int new_sock;
-   socklen_t addrlen;
-+  int af_ty;
-+#ifdef IPV6
-+  struct sockaddr_in6 from6;
-+#endif
-   struct sockaddr_in from;
-+  af_ty=getsockproto(sock);
- 
-   addrlen = sizeof(struct sockaddr);
-+#ifdef IPV6
-+	if (af_ty==AF_INET6)
-+	{
-+		addrlen = sizeof(from6);
-+		new_sock = accept(sock, (struct sockaddr *) &from6, &addrlen);
-+	} else {
-+#endif
-+	addrlen = sizeof(struct sockaddr);
-   new_sock = accept(sock, (struct sockaddr *) &from, &addrlen);
-+#ifdef IPV6
-+	}
-+#endif
- 
-   if (new_sock < 0)
-     return -1;
-   if (ip != NULL) {
-+#ifdef IPV6
-+	if (af_ty==AF_INET6)
-+	{
-+		*ip=notalloc;
-+		inet_ntop(AF_INET6,&from6,caller,119);
-+		caller[120]=0;
-+	} else {
-+#endif   
-     *ip = from.sin_addr.s_addr;
-     /* DNS is now done asynchronously. We now only provide the IP address. */
-     strncpyz(caller, iptostr(*ip), 121);
-     *ip = ntohl(*ip);
-+#ifdef IPV6
-+	}
-+#endif
-   }
-   if (port != NULL)
-+  {
-+#ifdef IPV6
-+  	if (af_ty==AF_INET6)
-+  		*port = ntohs(from6.sin6_port);
-+  	else
-+#endif
-     *port = ntohs(from.sin_port);
-+	}
-   /* Set up all the normal socket crap */
--  setsock(new_sock, (binary ? SOCK_BINARY : 0));
-+  setsock(new_sock, (binary ? SOCK_BINARY : 0),af_ty);
-   return new_sock;
- }
- 
-@@ -562,6 +778,14 @@
-     p = atoi(port);
-   else
-     p = 2000;
-+#ifdef IPV6
-+	if(getprotocol(server)==AF_INET6)
-+	{
-+		server[0]=0;
-+		if(strlen(server)<500)
-+			strcpy(sv,server);
-+	} else {
-+#endif  
-   if (server != NULL)
-     addr = my_atoul(server);
-   else
-@@ -573,6 +797,9 @@
-   c[2] = (addr >> 8) & 0xff;
-   c[3] = addr & 0xff;
-   sprintf(sv, "%u.%u.%u.%u", c[0], c[1], c[2], c[3]);
-+#ifdef IPV6
-+	}
-+#endif 
-   p = open_telnet_raw(sock, sv, p);
-   return p;
- }
-@@ -1112,6 +1339,14 @@
-   if (!dcc_sanitycheck)
-     return 1;
- 
-+#ifdef IPV6
-+	if(getprotocol(ipaddy)==AF_INET6)
-+	{
-+		return 1;
-+	}
-+#endif
-+
-+
-   if (prt < 1) {
-     putlog(LOG_MISC, "*", "ALERT: (%s!%s) specified an impossible port of %u!",
-            nick, from, prt);
-diff -urN eggdrop1.6.19/src/proto.h eggdrop1.6.19-ipv6/src/proto.h
---- src/proto.h	2008-02-16 22:41:04.000000000 +0100
-+++ src/proto.h	2008-07-27 22:13:46.000000000 +0200
-@@ -245,9 +245,11 @@
- unsigned long iptolong(IP);
- IP getmyip();
- void neterror(char *);
--void setsock(int, int);
--int allocsock(int, int);
--int getsock(int);
-+void setsock(int, int, int);
-+int allocsock(int, int, int);
-+int getsock(int, int);
-+int getprotocol(char *);
-+char *hostnamefromip(unsigned long);
- void killsock(int);
- int answer(int, char *, unsigned long *, unsigned short *, int);
- inline int open_listen(int *);
-diff -urN eggdrop1.6.19/src/tcl.c eggdrop1.6.19-ipv6/src/tcl.c
---- src/tcl.c	2008-02-16 22:41:04.000000000 +0100
-+++ src/tcl.c	2008-07-27 22:13:49.000000000 +0200
-@@ -46,7 +46,7 @@
- extern time_t online_since;
-
- extern char origbotname[], botuser[], motdfile[], admin[], userfile[],
--            firewall[], helpdir[], notify_new[], hostname[], myip[], moddir[],
-+            firewall[], helpdir[], notify_new[], hostname[], hostname6[], myip[], myip6[], moddir[],
-             tempdir[], owner[], network[], botnetnick[], bannerfile[],
-             egg_version[], natip[], configfile[], logfile_suffix[], textdir[],
-             pid_file[];
-@@ -461,6 +461,8 @@
-   {"owner",           owner,          120,           STR_PROTECT},
-   {"my-ip",           myip,           120,                     0},
-   {"my-hostname",     hostname,       120,                     0},
-+  {"my-ip6",       myip6,                120,                     0},
-+  {"my-hostname6",    hostname6,         120,                     0},
-   {"network",         network,        40,                      0},
-   {"whois-fields",    whois_fields,   1024,                    0},
-   {"nat-ip",          natip,          120,                     0},
-diff -urN eggdrop1.6.19/src/tcldcc.c eggdrop1.6.19-ipv6/src/tcldcc.c
---- src/tcldcc.c	2008-02-16 22:41:04.000000000 +0100
-+++ src/tcldcc.c	2008-07-27 22:13:50.000000000 +0200
-@@ -850,7 +850,7 @@
-     Tcl_AppendResult(irp, "out of dcc table space", NULL);
-     return TCL_ERROR;
-   }
--  sock = getsock(0);
-+  sock = getsock(0,getprotocol(argv[1]));
-
-   if (sock < 0) {
-     Tcl_AppendResult(irp, MISC_NOFREESOCK, NULL);
-diff -urN eggdrop1.6.19/src/tclmisc.c eggdrop1.6.19-ipv6/src/tclmisc.c
---- src/tclmisc.c	2008-02-16 22:41:04.000000000 +0100
-+++ src/tclmisc.c	2008-07-27 22:13:50.000000000 +0200
-@@ -428,6 +428,21 @@
-   return TCL_OK;
- }
-
-+extern char myipv6host[120];
-+
-+static int tcl_myip6 STDVAR
-+{
-+       char s[120];
-+       getmyip();
-+
-+       BADARGS(1, 1, "");
-+       s[0]=0;
-+       if (strlen(myipv6host)<120)
-+               strcpy(s,myipv6host);
-+       Tcl_AppendResult(irp, s, NULL);
-+       return TCL_OK;
-+}
-+
- static int tcl_rand STDVAR
- {
-   unsigned long x;*** eggdrop1.6.19/src/net.h.org	Thu Feb  5 23:55:45 2009
---- src/net.h.org	2009-02-05 23:59:43.000000000 +0100
-+++ src/net.h	2009-02-05 23:59:52.000000000 +0100
-@@ -22,9 +22,7 @@
-   char		*outbuf;
-   unsigned long  outbuflen;	/* Outbuf could be binary data	*/
-   unsigned long	 inbuflen;	/* Inbuf could be binary data	*/
--#ifdef USE_IPV6
-   unsigned int af;
--#endif /* USE_IPV6 */
- } sock_list;
- 
- #endif				/* _EGG_NET_H */
diff --git a/eggdrop-multilevel_sharing.patch b/eggdrop-multilevel_sharing.patch
deleted file mode 100644
index 46c6cf3..0000000
--- a/eggdrop-multilevel_sharing.patch
+++ /dev/null
@@ -1,451 +0,0 @@
-diff -burN eggdrop1.6.17.orig/doc/tcl-commands.doc eggdrop1.6.17/doc/tcl-commands.doc
---- eggdrop1.6.17.orig/doc/tcl-commands.doc	2004-11-01 12:48:53.000000000 +0100
-+++ eggdrop1.6.17/doc/tcl-commands.doc	2004-11-01 14:21:10.565861080 +0100
-@@ -1258,6 +1258,17 @@
-     Module: filesys
- 
- 
-+
-+***### SHARE MODULE COMMANDS ###***
-+
-+  noshare <command> [<arg1> <arg2> ...]
-+    Description: executes command with setting noshare = 1 in code,
-+      that means, if you i.e. do chattr using this command,
-+      bot will make changes on his userlist, but won't send changes
-+      to other bots. This is useful in some situations.
-+    Returns: whatever is returned by <command>
-+    Module: share
-+
- *** MISCELLANEOUS COMMANDS ***
- 
-   bind <type> <flags> <keyword/mask> [proc-name]
-diff -burN eggdrop1.6.17.orig/doc/USERS eggdrop1.6.17/doc/USERS
---- eggdrop1.6.17.orig/doc/USERS	2004-11-01 12:48:53.000000000 +0100
-+++ eggdrop1.6.17/doc/USERS	2004-11-01 14:21:10.567860776 +0100
-@@ -77,6 +77,11 @@
- 
-     u  (unshared)       user record is not sent to other bots.
- 
-+    s  (protected)      is working similar like u flag, but changes can be made
-+                        only from bot that is aggressively sharing with us (Hub).
-+                        User cannot be changed by bot that is connected below
-+                        this bot. (This flag can be useful in multilevel sharing)
-+
-     h  (highlight)      use bold text in help/text files.
- 
-     All global flags other then u, h, b, c, x, j, and p are also
-diff -burN eggdrop1.6.17.orig/eggdrop.conf eggdrop1.6.17/eggdrop.conf
---- eggdrop1.6.17.orig/eggdrop.conf	2004-11-01 12:48:53.000000000 +0100
-+++ eggdrop1.6.17/eggdrop.conf	2004-11-01 14:21:10.570860320 +0100
-@@ -1145,11 +1145,21 @@
- # changes from other bots should be ignored?
- #set private-globals "mnot"
- 
-+# When sharing user lists, which channel flags changes from other bots
-+# should be ignored?
-+#set private-chanflags "mn"
-+
- # When sharing user lists, don't accept ANY userfile changes from other
- # bots? Paranoid people should use this feature on their hub bot. This
- # will force all userlist changes to be made via the hub.
- #set private-user 0
- 
-+# When you have multilevel botnet, this option permits hub, to make changes,
-+# even when private-global, private-chanflags and/or private-user are set.
-+# NOTE: this option doesn't permit hub to force flags filtered by
-+# private-globals
-+#set permit-hub 1
-+
- # This setting makes the bot discard its own bot records in favor of
- # the ones sent by the hub.
- # NOTE: No passwords or botflags are shared, only ports and
-diff -burN eggdrop1.6.17.orig/help/cmds2.help eggdrop1.6.17/help/cmds2.help
---- eggdrop1.6.17.orig/help/cmds2.help	2004-11-01 12:48:53.000000000 +0100
-+++ eggdrop1.6.17/help/cmds2.help	2004-11-01 14:21:10.572860016 +0100
-@@ -372,6 +372,7 @@
-       %bp%b - party-line (user has access to the partyline)
-       %bq%b - quiet (user cannot gain voice on any channel)
-       %br%b - dehalfop (user cannot gain halfops on any channel)
-+      %bs%b - protected (when sharing changes can be made only by hub)
-       %bt%b - botnet master (user has access to features related to the botnet)
-       %bu%b - unshared (user's user record is not sent to other bots)
-       %bv%b - voice (user gets +v automatically on +autovoice channels)
-diff -burN eggdrop1.6.17.orig/src/cmds.c eggdrop1.6.17/src/cmds.c
---- eggdrop1.6.17.orig/src/cmds.c	2004-11-01 12:48:53.000000000 +0100
-+++ eggdrop1.6.17/src/cmds.c	2004-11-01 14:21:10.576859408 +0100
-@@ -1551,8 +1551,8 @@
-       mns.chan &= ~(BOT_SHARE);
-     }
-     if (!glob_owner(user)) {
--      pls.global &=~(USER_OWNER | USER_MASTER | USER_BOTMAST | USER_UNSHARED);
--      mns.global &=~(USER_OWNER | USER_MASTER | USER_BOTMAST | USER_UNSHARED);
-+      pls.global &=~(USER_OWNER | USER_MASTER | USER_BOTMAST | USER_UNSHARED | USER_PROTECTED);
-+      mns.global &=~(USER_OWNER | USER_MASTER | USER_BOTMAST | USER_UNSHARED | USER_PROTECTED);
- 
-       if (chan) {
-         pls.chan &= ~USER_OWNER;
-diff -burN eggdrop1.6.17.orig/src/flags.h eggdrop1.6.17/src/flags.h
---- eggdrop1.6.17.orig/src/flags.h	2004-11-01 12:48:53.000000000 +0100
-+++ eggdrop1.6.17/src/flags.h	2004-11-01 14:21:10.577859256 +0100
-@@ -44,8 +44,8 @@
- 
- /*
-  * userflags:
-- *   abcdefgh?jklmnopqr?tuvwxyz + user defined A-Z
-- *   unused letters: is
-+ *   abcdefgh?jklmnopqrstuvwxyz + user defined A-Z
-+ *   unused letters: i
-  *
-  * botflags:
-  *   0123456789ab????ghi??l???p?rs???????
-@@ -55,7 +55,7 @@
-  *   a??defg???klmno?qr??uv??yz + user defined A-Z
-  *   unused letters: bchijpstwx
-  */
--#define USER_VALID 0x03fbfeff   /* Sum of all USER_ flags */
-+#define USER_VALID 0x03fffeff   /* Sum of all USER_ flags */
- #define CHAN_VALID 0x03777c79   /* Sum of all CHAN_ flags */
- #define BOT_VALID  0x7fe689C1   /* Sum of all BOT_  flags */
- 
-@@ -78,7 +78,7 @@
- #define USER_PARTY         0x00008000 /* p  user has party line access            */
- #define USER_QUIET         0x00010000 /* q  user is global de-voice               */
- #define USER_DEHALFOP      0x00020000 /* r  user is global de-halfop              */
--#define USER_S             0x00040000 /* s  unused                                */
-+#define USER_PROTECTED     0x00040000 /* s  user is protected (cannot be removed/changed by downlinks  */
- #define USER_BOTMAST       0x00080000 /* t  user is botnet master                 */
- #define USER_UNSHARED      0x00100000 /* u  not shared with sharebots             */
- #define USER_VOICE         0x00200000 /* v  user is +v on all channels            */
-@@ -166,6 +166,7 @@
- #define glob_hilite(x)          ((x).global & USER_HIGHLITE)
- #define chan_exempt(x)          ((x).chan & USER_EXEMPT)
- #define glob_exempt(x)          ((x).global & USER_EXEMPT)
-+#define glob_protected(x)	((x).global & USER_PROTECTED)
- 
- #define bot_global(x)           ((x).bot & BOT_GLOBAL)
- #define bot_chan(x)             ((x).chan & BOT_AGGRESSIVE)
-diff -burN eggdrop1.6.17.orig/src/mod/share.mod/share.c eggdrop1.6.17/src/mod/share.mod/share.c
---- eggdrop1.6.17.orig/src/mod/share.mod/share.c	2004-11-01 12:48:53.000000000 +0100
-+++ eggdrop1.6.17/src/mod/share.mod/share.c	2004-11-01 14:27:44.822924896 +0100
-@@ -50,11 +50,14 @@
- static int private_global = 0;
- static int private_user = 0;
- static char private_globals[50];
-+static char private_chanflags[50];
- static int allow_resync = 0;
- static struct flag_record fr = { 0, 0, 0, 0, 0, 0 };
- static int resync_time = 900;
- static int overr_local_bots = 0;        /* Override local bots?             */
- 
-+static int permit_hub = 0; /* Permit hub to do changes even, when we use private_*, */
-+                           /* but not private_globals (this have a reason) */
- 
- /* Store info for sharebots */
- struct share_msgq {
-@@ -81,6 +84,7 @@
- static void q_resync(char *, struct chanset_t *);
- static void cancel_user_xfer(int, void *);
- static int private_globals_bitmask();
-+static int private_chanflags_bitmask();
- 
- #include "share.h"
- 
-@@ -314,7 +318,7 @@
-   char *hand;
-   struct userrec *u;
- 
--  if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-+  if ((dcc[idx].status & STAT_SHARE) && (!private_user || PERMIT_HUB(idx))) {
-     hand = newsplit(&par);
-     u = get_user_by_handle(userlist, hand);
-     if (u && !(u->flags & USER_UNSHARED)) {
-@@ -336,26 +340,33 @@
-   int bfl, ofl;
-   module_entry *me;
- 
--  if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-+  if ((dcc[idx].status & STAT_SHARE) && (!private_user || PERMIT_HUB(idx))) {
-     hand = newsplit(&par);
-     u = get_user_by_handle(userlist, hand);
--    if (u && !(u->flags & USER_UNSHARED)) {
-+    if (u && !(u->flags & USER_UNSHARED) && !IS_USER_PROTECTED(u, idx)) {
-       atr = newsplit(&par);
-       cst = findchan_by_dname(par);
-       if (!par[0] || (cst && channel_shared(cst))) {
--        if (!(dcc[idx].status & STAT_GETTING) && (cst || !private_global))
--          shareout_but(cst, idx, "a %s %s %s\n", hand, atr, par);
-         noshare = 1;
-         if (par[0] && cst) {
-+	  int pchbm = 0;
-+	  if (!PERMIT_HUB(idx))
-+	  	pchbm = private_chanflags_bitmask();
-           fr.match = (FR_CHAN | FR_BOT);
-+	  /* bot's sharing flags */
-           get_user_flagrec(dcc[idx].user, &fr, par);
-           if (bot_chan(fr) || bot_global(fr)) {
-             fr.match = FR_CHAN;
-             fr2.match = FR_CHAN;
-             break_down_flags(atr, &fr, 0);
-             get_user_flagrec(u, &fr2, par);
--            fr.chan = (fr2.chan & BOT_AGGRESSIVE) |
--                      (fr.chan & ~BOT_AGGRESSIVE);
-+            fr.chan = (fr2.chan & BOT_AGGRESSIVE) | (fr.chan & ~BOT_AGGRESSIVE);
-+	    /* Checking for forced flags */
-+	    if ( (pchbm & USER_OWNER) && chan_owner(fr) && !chan_owner(fr2))
-+		    fr.chan &= ~(USER_MASTER | USER_OP);
-+	    else if ( (pchbm & USER_MASTER) && chan_master(fr) && !chan_master(fr2))
-+		    fr.chan &= ~USER_OP;
-+	    fr.chan = (fr2.chan & pchbm) | (fr.chan & ~pchbm);
-             set_user_flagrec(u, &fr, par);
-             check_dcc_chanattrs(u, par, fr.chan, fr2.chan);
-             noshare = 0;
-@@ -372,7 +383,7 @@
-             putlog(LOG_CMDS, "*",
-                    "Rejected flags for unshared channel %s from %s",
-                    par, dcc[idx].nick);
--        } else if (!private_global) {
-+        } else if (!private_global || PERMIT_HUB(idx)) {
-           int pgbm = private_globals_bitmask();
- 
-           /* Don't let bot flags be altered */
-@@ -391,15 +402,18 @@
-           if (!(dcc[idx].status & STAT_GETTING))
-             putlog(LOG_CMDS, "*", "%s: chattr %s %s", dcc[idx].nick, hand, s);
-           if ((me = module_find("irc", 0, 0))) {
-+	    struct chanset_t *tmpcst;
-             Function *func = me->funcs;
- 
--            for (cst = chanset; cst; cst = cst->next)
--              (func[IRC_RECHECK_CHANNEL]) (cst, 0);
-+            for (tmpcst = chanset; tmpcst; tmpcst = tmpcst->next)
-+              (func[IRC_RECHECK_CHANNEL]) (tmpcst, 0);
-           }
-         } else
-           putlog(LOG_CMDS, "*", "Rejected global flags for %s from %s",
-                  hand, dcc[idx].nick);
-         noshare = 0;
-+	if (!(dcc[idx].status & STAT_GETTING) && (cst || !private_global || PERMIT_HUB(idx)))
-+		shareout_but(cst, idx, "a %s %s %s\n", hand, s, par);
-       }
-     }
-   }
-@@ -411,7 +425,7 @@
-   struct chanset_t *chan;
-   struct userrec *u;
- 
--  if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-+  if ((dcc[idx].status & STAT_SHARE) && (!private_user || PERMIT_HUB(idx))) {
-     user = newsplit(&par);
-     if ((u = get_user_by_handle(userlist, user))) {
-       chan = findchan_by_dname(par);
-@@ -440,7 +454,7 @@
-   struct chanset_t *chan;
-   struct userrec *u;
- 
--  if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-+  if ((dcc[idx].status & STAT_SHARE) && (!private_user || PERMIT_HUB(idx))) {
-     user = newsplit(&par);
-     if ((u = get_user_by_handle(userlist, user))) {
-       chan = findchan_by_dname(par);
-@@ -466,13 +480,13 @@
-   char *nick, *host, *pass, s[100];
-   struct userrec *u;
- 
--  if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-+  if ((dcc[idx].status & STAT_SHARE) && (!private_user || PERMIT_HUB(idx))) {
-     nick = newsplit(&par);
-     host = newsplit(&par);
-     pass = newsplit(&par);
- 
-     if (!(u = get_user_by_handle(userlist, nick)) ||
--        !(u->flags & USER_UNSHARED)) {
-+        !((u->flags & USER_UNSHARED) || IS_USER_PROTECTED(u, idx))) {
-       fr.global = 0;
- 
-       fr.match = FR_GLOBAL;
-@@ -517,9 +531,9 @@
-   struct userrec *u;
- 
-   /* If user is a share bot, ignore command */
--  if ((dcc[idx].status & STAT_SHARE) && !private_user &&
-+  if ((dcc[idx].status & STAT_SHARE) && (!private_user || PERMIT_HUB(idx)) &&
-       (u = get_user_by_handle(userlist, par)) &&
--      !(u->flags & USER_UNSHARED) &&
-+      !(u->flags & USER_UNSHARED) && !IS_USER_PROTECTED(u, idx) &&
-       !((u->flags & USER_BOT) && (bot_flags(u) & BOT_SHARE))) {
-     noshare = 1;
-     if (deluser(par)) {
-@@ -535,10 +549,10 @@
-   char *hand;
-   struct userrec *u;
- 
--  if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-+  if ((dcc[idx].status & STAT_SHARE) && (!private_user || PERMIT_HUB(idx))) {
-     hand = newsplit(&par);
-     if ((u = get_user_by_handle(userlist, hand)) &&
--        !(u->flags & USER_UNSHARED)) {
-+        !(u->flags & USER_UNSHARED) && !IS_USER_PROTECTED(u, idx)) {
-       shareout_but(NULL, idx, "+h %s %s\n", hand, par);
-       set_user(&USERENTRY_HOSTS, u, par);
-       putlog(LOG_CMDS, "*", "%s: +host %s %s", dcc[idx].nick, hand, par);
-@@ -551,10 +565,10 @@
-   char *hand, p[32];
-   struct userrec *u;
- 
--  if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-+  if ((dcc[idx].status & STAT_SHARE) && (!private_user || PERMIT_HUB(idx))) {
-     hand = newsplit(&par);
-     if (!(u = get_user_by_handle(userlist, hand)) ||
--        !(u->flags & USER_UNSHARED)) {
-+        !((u->flags & USER_UNSHARED) || IS_USER_PROTECTED(u, idx))) {
-       if (!(dcc[idx].status & STAT_GETTING))
-         shareout_but(NULL, idx, "+bh %s %s\n", hand, par);
-       /* Add bot to userlist if not there */
-@@ -577,10 +591,10 @@
-   char *hand;
-   struct userrec *u;
- 
--  if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-+  if ((dcc[idx].status & STAT_SHARE) && (!private_user || PERMIT_HUB(idx))) {
-     hand = newsplit(&par);
-     if ((u = get_user_by_handle(userlist, hand)) &&
--        !(u->flags & USER_UNSHARED)) {
-+        !(u->flags & USER_UNSHARED) && !IS_USER_PROTECTED(u, idx)) {
-       shareout_but(NULL, idx, "-h %s %s\n", hand, par);
-       noshare = 1;
-       delhost_by_handle(hand, par);
-@@ -597,11 +611,11 @@
-   struct user_entry_type *uet;
-   struct user_entry *e;
- 
--  if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-+  if ((dcc[idx].status & STAT_SHARE) && (!private_user || PERMIT_HUB(idx))) {
-     key = newsplit(&par);
-     hand = newsplit(&par);
-     if (!(u = get_user_by_handle(userlist, hand)) ||
--        !(u->flags & USER_UNSHARED)) {
-+        !((u->flags & USER_UNSHARED) || IS_USER_PROTECTED(u,idx))) {
-       if (!(uet = find_entry_type(key)))
-         /* If it's not a supported type, forget it */
-         debug2("Ignore ch %s from %s (unknown type)", key, dcc[idx].nick);
-@@ -645,10 +659,10 @@
-   struct chanset_t *cst;
-   struct userrec *u;
- 
--  if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-+  if ((dcc[idx].status & STAT_SHARE) && (!private_user || PERMIT_HUB(idx))) {
-     hand = newsplit(&par);
-     if ((u = get_user_by_handle(userlist, hand)) &&
--        !(u->flags & USER_UNSHARED) && share_greet) {
-+        !(u->flags & USER_UNSHARED) && !IS_USER_PROTECTED(u, idx) && share_greet) {
-       chan = newsplit(&par);
-       cst = findchan_by_dname(chan);
-       fr.match = (FR_CHAN | FR_BOT);
-@@ -2039,11 +2053,13 @@
-   {"private-global",  &private_global},
-   {"private-user",      &private_user},
-   {"override-bots", &overr_local_bots},
-+  {"permit-hub",          &permit_hub},
-   {NULL,                         NULL}
- };
- 
- static tcl_strings my_strings[] = {
-   {"private-globals", private_globals, 50, 0},
-+  {"private-chanflags", private_chanflags, 50, 0},
-   {NULL,              NULL,            0,  0}
- };
- 
-@@ -2062,6 +2078,38 @@
-   {NULL,    NULL, NULL,                 NULL}
- };
- 
-+static int tcl_noshare STDVAR
-+{
-+  int res;
-+  char *x;
-+
-+  if (argc < 2) {
-+    Tcl_AppendResult(irp, "wrong # args: should be \"",
-+    argv[0], " arg ?arg ...?\"", NULL);
-+    return TCL_ERROR;
-+  }
-+
-+  Context;
-+
-+  noshare = 1;
-+
-+  x = Tcl_Merge(argc - 1, argv + 1);
-+  res = Tcl_Eval(irp, x);
-+  Tcl_Free((char *) x);
-+
-+  noshare = 0;
-+
-+  Context;
-+  return res;
-+}
-+
-+
-+static tcl_cmds my_tclcmds[] =
-+{
-+  {"noshare", tcl_noshare},
-+  {NULL,      NULL}
-+};
-+
- static char *share_close()
- {
-   int i;
-@@ -2094,6 +2142,7 @@
-   delay_free_mem();
-   rem_tcl_ints(my_ints);
-   rem_tcl_strings(my_strings);
-+  rem_tcl_commands(my_tclcmds);
-   rem_builtins(H_dcc, my_cmds);
-   rem_help_reference("share.help");
-   return NULL;
-@@ -2213,6 +2262,7 @@
-   DCC_BOT.kill = cancel_user_xfer;
-   add_tcl_ints(my_ints);
-   add_tcl_strings(my_strings);
-+  add_tcl_commands(my_tclcmds);
-   add_builtins(H_dcc, my_cmds);
-   uff_init();
-   uff_addtable(internal_uff_table);
-@@ -2226,3 +2276,11 @@
-   break_down_flags(private_globals, &fr, 0);
-   return fr.global;
- }
-+
-+int private_chanflags_bitmask()
-+{
-+	struct flag_record fr = {FR_CHAN, 0, 0, 0, 0, 0};
-+
-+	break_down_flags(private_chanflags, &fr, 0);
-+	return fr.chan;
-+}
-diff -burN eggdrop1.6.17.orig/src/mod/share.mod/share.h eggdrop1.6.17/src/mod/share.mod/share.h
---- eggdrop1.6.17.orig/src/mod/share.mod/share.h	2004-11-01 12:48:53.000000000 +0100
-+++ eggdrop1.6.17/src/mod/share.mod/share.h	2004-11-01 14:21:10.583858344 +0100
-@@ -52,6 +52,11 @@
-                              * `priority'.                                   */
- } uff_table_t;
- 
-+/* Do we allow hub to change user value <TaKeDa> */
-+#define PERMIT_HUB(x) (permit_hub && (dcc[x].status & STAT_AGGRESSIVE))
-+/* Is user protected and if he is do we allow changes? <TaKeDa> */
-+#define IS_USER_PROTECTED(user,idx) (!(dcc[idx].status & STAT_AGGRESSIVE) && (user->flags & USER_PROTECTED))
-+
- #ifndef MAKING_SHARE
- /* 4 - 7 */
- #define finish_share ((void (*) (int))share_funcs[4])
-diff -burN eggdrop1.6.17.orig/src/patch.h eggdrop1.6.17/src/patch.h
---- eggdrop1.6.17.orig/src/patch.h	2004-11-01 12:48:53.000000000 +0100
-+++ eggdrop1.6.17/src/patch.h	2004-11-01 14:21:10.584858192 +0100
-@@ -36,7 +36,7 @@
-  *
-  *
-  */
--/* PATCH GOES HERE */
-+patch("multilevel_sharing");
- /*
-  *
-  *
diff --git a/eggdrop-nohostwhowhom.patch b/eggdrop-nohostwhowhom.patch
deleted file mode 100644
index 4a43d56..0000000
--- a/eggdrop-nohostwhowhom.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From http://www.egghelp.org/files/patches/nohostwhowhom1.6.17.desc:
-
-"With this patch, eggdrop won't send hosts upon joining the botnet or
- on a remote who."
-
-Patch created by BarkerJr <http://barkerjr.net/irc/eggdrop/>
-
-diff -ur eggdrop1.6.17/src/botcmd.c eggdrop1.6.17.new/src/botcmd.c
---- eggdrop1.6.17/src/botcmd.c	2004-09-06 15:35:37.000000000 -0400
-+++ eggdrop1.6.17.new/src/botcmd.c	2004-09-06 15:44:57.000000000 -0400
-@@ -357,8 +357,8 @@
-   for (i = 0; i < dcc_total; i++)
-     if (dcc[i].type->flags & DCT_REMOTEWHO)
-       if (dcc[i].u.chat->channel == chan) {
--        k = sprintf(s, "  %c%-15s %s", (geticon(i) == '-' ? ' ' : geticon(i)),
--                    dcc[i].nick, dcc[i].host);
-+        k = sprintf(s, "  %c%-15s hidden",
-+                    (geticon(i) == '-' ? ' ' : geticon(i)), dcc[i].nick);
-         if (now - dcc[i].timeval > 300) {
-           unsigned long days, hrs, mins;
- 
-@@ -397,8 +397,8 @@
-           ok = 1;
-           botnet_send_priv(idx, botnetnick, nick, NULL, "%s:", BOT_OTHERPEOPLE);
-         }
--        l = sprintf(s, "  %c%-15s %s", (geticon(i) == '-' ? ' ' : geticon(i)),
--                    dcc[i].nick, dcc[i].host);
-+        l = sprintf(s, "  %c%-15s hidden",
-+                    (geticon(i) == '-' ? ' ' : geticon(i)), dcc[i].nick);
-         if (now - dcc[i].timeval > 300) {
-           k = (now - dcc[i].timeval) / 60;
-           if (k < 60)
-diff -ur eggdrop1.6.17/src/botmsg.c eggdrop1.6.17.new/src/botmsg.c
---- eggdrop1.6.17/src/botmsg.c	2004-09-06 15:35:37.000000000 -0400
-+++ eggdrop1.6.17.new/src/botmsg.c	2004-09-06 15:35:57.000000000 -0400
-@@ -611,15 +611,15 @@
-   int l;
- 
-   if (tands > 0) {
--    l = simple_sprintf(OBUF, "j %s %s %D %c%D %s\n",
-+    l = simple_sprintf(OBUF, "j %s %s %D %c%D hidden\n",
-                        botnetnick, dcc[useridx].nick,
-                        dcc[useridx].u.chat->channel, geticon(useridx),
--                       dcc[useridx].sock, dcc[useridx].host);
-+                       dcc[useridx].sock);
-     send_tand_but(-1, OBUF, -l);
- #ifndef NO_OLD_BOTNET
--    tandout_but(-1, "join %s %s %d %c%d %s\n", botnetnick,
-+    tandout_but(-1, "join %s %s %d %c%d hidden\n", botnetnick,
-                 dcc[useridx].nick, dcc[useridx].u.chat->channel,
--                geticon(useridx), dcc[useridx].sock, dcc[useridx].host);
-+                geticon(useridx), dcc[useridx].sock);
-     tandout_but(-1, "chan %s %d %s %s %s.\n",
-                 botnetnick, dcc[useridx].u.chat->channel,
-                 dcc[useridx].nick, NET_JOINEDTHE,
-diff -ur eggdrop1.6.17/src/botnet.c eggdrop1.6.17.new/src/botnet.c
---- eggdrop1.6.17/src/botnet.c	2004-09-06 15:35:37.000000000 -0400
-+++ eggdrop1.6.17.new/src/botnet.c	2004-09-06 15:35:57.000000000 -0400
-@@ -752,16 +752,16 @@
-             (dcc[i].u.chat->channel < GLOBAL_CHANS)) {
- #ifndef NO_OLD_BOTNET
-           if (b_numver(z) < NEAT_BOTNET)
--            l = simple_sprintf(x, "join %s %s %d %c%d %s\n",
-+            l = simple_sprintf(x, "join %s %s %d %c%d hidden\n",
-                                botnetnick, dcc[i].nick,
-                                dcc[i].u.chat->channel, geticon(i),
--                               dcc[i].sock, dcc[i].host);
-+                               dcc[i].sock);
-           else
- #endif
--            l = simple_sprintf(x, "j !%s %s %D %c%D %s\n",
-+            l = simple_sprintf(x, "j !%s %s %D %c%D hidden\n",
-                                botnetnick, dcc[i].nick,
-                                dcc[i].u.chat->channel, geticon(i),
--                               dcc[i].sock, dcc[i].host);
-+                               dcc[i].sock);
-           tputs(dcc[z].sock, x, l);
- #ifndef NO_OLD_BOTNET
-           if (b_numver(z) < NEAT_BOTNET) {
-diff -ur eggdrop1.6.17/src/patch.h eggdrop1.6.17.new/src/patch.h
---- eggdrop1.6.17/src/patch.h	2004-09-06 15:35:37.000000000 -0400
-+++ eggdrop1.6.17.new/src/patch.h	2004-09-06 15:36:26.000000000 -0400
-@@ -36,7 +36,7 @@
-  *
-  *
-  */
--/* PATCH GOES HERE */
-+patch("nohostwhowhom");
- /*
-  *
-  *
diff --git a/eggdrop-ssl.patch b/eggdrop-ssl.patch
deleted file mode 100644
index c86a045..0000000
--- a/eggdrop-ssl.patch
+++ /dev/null
@@ -1,830 +0,0 @@
---- Makefile.in	2004-03-27 06:50:00.000000000 +0000
-+++ Makefile.in	2004-03-27 06:50:00.000000000 +0000
-@@ -62,6 +62,10 @@
- INSTALL_DATA = @INSTALL_DATA@
- INSTALL_SCRIPT = @INSTALL_SCRIPT@
- 
-+# Stuff for SSL
-+XSSL_LIBS = @SSL_LIBS@
-+XSSL_INCLUDE = @SSL_INCLUDE@
-+
- # Stuff for Tcl
- TCLLIB = @TCLLIB@
- TCLLIBFN = @TCLLIBFN@
-@@ -95,7 +99,8 @@
- MAKE_MODEGG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(MOD_CC)' 'LD=$(MOD_LD)' \
- 'STRIP=$(MOD_STRIP)' 'RANLIB=$(RANLIB)' 'CFLGS=$(CFLGS)' \
- 'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
--'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(standard build)' 'MODOBJS='
-+'XSSL_LIBS=$(XSSL_LIBS)' 'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' \
-+'XSSL_INCLUDE=$(XSSL_INCLUDE)' 'EGGBUILD=' 'MODOBJS='
- 
- MAKE_MODULES = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \
- 'STRIP=$(SHLIB_STRIP)' 'CFLGS=$(CFLGS)' 'XLIBS=$(XLIBS)' \
-@@ -105,12 +110,13 @@
- 'STRIP=$(STRIP)' 'RANLIB=$(RANLIB)' 'CFLGS=$(CFLGS) -DSTATIC' \
- 'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
- 'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(static version)' \
--'MODOBJS=mod/*.o'
-+'XSSL_INCLUDE=$(XSSL_INCLUDE)' 'XSSL_LIBS=$(XSSL_LIBS)' 'MODOBJS=mod/*.o'
- 
- MAKE_DEBEGG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(MOD_CC)' 'LD=$(MOD_LD)' \
- 'STRIP=touch' 'RANLIB=$(RANLIB)' 'CFLGS=$(DEBCFLGS) $(CFLGS)' \
- 'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
--'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(debug version)' 'MODOBJS='
-+'XSSL_LIBS=$(XSSL_LIBS)' 'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' \
-+'XSSL_INCLUDE=$(XSSL_INCLUDE)' 'EGGBUILD=(debug version)' 'MODOBJS='
- 
- MAKE_DEBMODULES = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \
- 'XLIBS=$(XLIBS)' 'STRIP=touch' 'CFLGS=$(DEBCFLGS) $(CFLGS)' \
-@@ -119,7 +125,8 @@
- MAKE_SDEBUG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD)' \
- 'STRIP=touch' 'RANLIB=$(RANLIB)' 'CFLGS=$(DEBCFLGS) $(CFLGS) -DSTATIC' \
- 'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' 'XLIBS=$(XLIBS)' \
--'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(static debug version)' 'MODOBJS=mod/*.o'
-+'XSSL_INCLUDE=$(XSSL_INCLUDE)' 'XSSL_LIBS=$(XSSL_LIBS)' 'EGGEXEC=$(EGGEXEC)' \
-+'EGGBUILD=(static and debug version)' 'MODOBJS=mod/*.o'
- 
- MAKE_DEPEND = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)'
- 
---- aclocal.m4	2004-03-27 06:50:00.000000000 +0000
-+++ aclocal.m4	2012-03-31 19:46:26.881862392 +0300
-@@ -37,6 +37,64 @@
- ])
- 
- 
-+dnl  EGG_SSL_CRAP()
-+dnl
-+AC_DEFUN(EGG_SSL_CRAP, [dnl
-+#ssl checks
-+AC_MSG_CHECKING(whether to include SSL support)
-+AC_ARG_WITH(ssl,
-+[  --with-ssl[=PATH]         Include SSL support (DIR is OpenSSL's install dir).],
-+[
-+  case "$withval" in
-+    no)
-+      AC_MSG_RESULT(no) ;;
-+    yes)
-+      AC_MSG_RESULT(yes)
-+      AC_CHECK_LIB(ssl,SSL_accept,[AC_DEFINE(EGG_SSL_EXT)
-+      SSL_LIBS="-lssl -lcrypto"],[AC_MSG_ERROR([You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL])],-lcrypto)
-+      ;;
-+    *)
-+dnl A whole whack of possible places where this might be
-+      test -f $withval/openssl/ssl.h && SSL_INCLUDE="$withval"
-+      test -f $withval/include/openssl/ssl.h && SSL_INCLUDE="$withval/include"
-+
-+      test -f $withval/lib/libssl.a && SSL_LIB="$withval/lib"
-+      test -f $withval/lib/ssl/libssl.a && SSL_LIB="$withval/lib/ssl"
-+      test -f $withval/lib/openssl/libssl.a && SSL_LIB="$withval/lib/openssl/ssl"
-+      test -f $withval/libssl.a && SSL_LIB="$withval"
-+      test -f $withval/ssl/libssl.a && SSL_LIB="$withval/ssl"
-+      test -f $withval/openssl/libssl.a && SSL_LIB="$withval/openssl"
-+
-+      test -f $withval/lib/libcrypto.a && CRYPTO_LIB="$withval/lib"
-+      test -f $withval/lib/ssl/libcrypto.a && CRYPTO_LIB="$withval/lib/ssl"
-+      test -f $withval/lib/openssl/libcrypto.a && CRYPTO_LIB="$withval/lib/openssl/ssl"
-+      test -f $withval/libcrypto.a && CRYPTO_LIB="$withval"
-+      test -f $withval/ssl/libcrypto.a && CRYPTO_LIB="$withval/ssl"
-+      test -f $withval/openssl/libcrypto.a && CRYPTO_LIB="$withval/openssl"
-+
-+      if test -n "$SSL_INCLUDE" && test -n "$SSL_LIB" && test -n "$CRYPTO_LIB"; then
-+        SSL_LIBS="-lssl -lcrypto -L$SSL_LIB -L$CRYPTO_LIB";
-+        AC_DEFINE([EGG_SSL_EXT], [], [SSL support])
-+        AC_MSG_RESULT(yes)
-+      else
-+        AC_MSG_RESULT(no)
-+        AC_MSG_ERROR([You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL])
-+      fi ;;
-+  esac
-+],[
-+    AC_MSG_RESULT(will try to find)
-+    AC_CHECK_LIB(ssl,SSL_accept,[AC_DEFINE(EGG_SSL_EXT)
-+     SSL_LIBS="-lssl -lcrypto"],[AC_MSG_ERROR([OpenSSL was not found. Please supply a pathname to OpenSSL])],-lcrypto)
-+    AC_CHECK_HEADERS("openssl/ssl.h",,[AC_MSG_ERROR([OpenSSL was not found. Please supply a pathname to OpenSSL])],)
-+
-+    AC_SUBST(SSL_LIBS)dnl
-+    AC_SUBST(SSL_INCLUDE)dnl
-+])
-+
-+#end of ssl checks
-+])dnl
-+
-+
- dnl EGG_MSG_CONFIGURE_END()
- dnl
- AC_DEFUN([EGG_MSG_CONFIGURE_END],
---- config.h.in	2004-03-27 06:50:00.000000000 +0000
-+++ config.h.in	2004-03-27 06:50:00.000000000 +0000
-@@ -62,6 +62,9 @@
-    */
- #undef HAVE_DECL_TZNAME
- 
-+/* Defines ssl mode  */
-+#undef EGG_SSL_EXT 
-+
- /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
-    */
- #undef HAVE_DIRENT_H
---- configure.ac	2004-03-27 06:50:00.000000000 +0000
-+++ configure.ac	2004-03-27 06:50:00.000000000 +0000
-@@ -151,6 +151,7 @@
-                 /usr/local/pkgs/tcl/include /sys/include \
-                 /usr/pkg/lib /beos/system/include /beos/devel/include $HOME"
- 
-+EGG_SSL_CRAP
- 
- # We save the cache (if used) here to speed things up if we can't find Tcl.
- AC_CACHE_SAVE
---- src/Makefile.in	2004-03-27 06:50:00.000000000 +0000
-+++ src/Makefile.in	2004-03-27 06:50:00.000000000 +0000
-@@ -11,6 +11,8 @@
- INSTALL_PROGRAM = @INSTALL_PROGRAM@
- INSTALL_DATA = @INSTALL_DATA@
- INSTALL_SCRIPT = @INSTALL_SCRIPT@
-+XSSL_LIBS = @SSL_LIBS@
-+XSSL_INCLUDE = @SSL_INCLUDE@
- 
- CC = @CC@
- LD = @CC@
-@@ -37,7 +39,7 @@
- 	@echo "Linking eggdrop $(EGGBUILD)."
- 	@echo ""
- 	@touch mod/mod.xlibs
--	$(LD) -o ../$(EGGEXEC) $(eggdrop_objs) $(MODOBJS) $(XLIBS) md5/md5c.o compat/*.o `cat mod/mod.xlibs`
-+	$(LD) -o ../$(EGGEXEC) $(eggdrop_objs) $(MODOBJS) $(XLIBS) md5/md5c.o compat/*.o `cat mod/mod.xlibs` $(XSSL_LIBS) $(XSSL_INCLUDE)
- 	$(STRIP) ../$(EGGEXEC)
- 	@echo ""
- 	@echo "Successful compile: $(EGGEXEC)"
---- src/dcc.c	2004-03-27 06:50:00.000000000 +0000
-+++ src/dcc.c	2004-03-27 06:50:00.000000000 +0000
-@@ -32,7 +32,11 @@
- #include "tandem.h"
- 
- /* Includes for botnet md5 challenge/response code <cybah> */
-+#ifndef EGG_SSL_EXT
- #include "md5/md5.h"
-+#else
-+#include "openssl/md5.h"
-+#endif
- 
- extern struct userrec *userlist;
- extern struct chanset_t *chanset;
---- src/dccutil.c	2004-03-27 06:50:00.000000000 +0000
-+++ src/dccutil.c	2004-03-27 06:50:00.000000000 +0000
-@@ -33,6 +33,7 @@
- #include "chan.h"
- #include "modules.h"
- #include "tandem.h"
-+#include "net.h"
- 
- extern struct dcc_t *dcc;
- extern int dcc_total, dcc_flood_thr, backgrd, copy_to_tmp, max_socks;
---- src/eggdrop.h	2004-03-27 06:50:00.000000000 +0000
-+++ src/eggdrop.h	2004-03-27 06:50:00.000000000 +0000
-@@ -678,15 +678,6 @@
-   ClientData cd;
- };
- 
--typedef struct sock_list {
--  int sock;
--  short flags;
--  union {
--    struct sock_handler sock;
--    struct tclsock_handler tclsock;
--  } handler;
--} sock_list;
--
- enum {
-   EGG_OPTION_SET = 1,           /* Set option(s).               */
-   EGG_OPTION_UNSET = 2          /* Unset option(s).             */
---- src/main.c	2004-03-27 06:50:00.000000000 +0000
-+++ src/main.c	2004-03-27 06:50:00.000000000 +0000
-@@ -164,6 +164,10 @@
- int cx_ptr = 0;
- #endif
- 
-+#ifdef EGG_SSL_EXT
-+void init_ssl();
-+int clean_ssl();
-+#endif
- 
- void fatal(const char *s, int recoverable)
- {
-@@ -174,6 +178,9 @@
-   for (i = 0; i < dcc_total; i++)
-     if (dcc[i].sock >= 0)
-       killsock(dcc[i].sock);
-+  #ifdef EGG_SSL_EXT
-+  clean_ssl();
-+  #endif
-   unlink(pid_file);
-   if (!recoverable) {
-     bg_send_quit(BG_ABORT);
-@@ -1029,6 +1036,9 @@
-   init_userent();
-   init_misc();
-   init_bots();
-+#ifdef EGG_SSL_EXT
-+  init_ssl();
-+#endif
-   init_modules();
-   if (backgrd)
-     bg_prepare_split();
---- src/md5/md5.h	2004-03-27 06:50:00.000000000 +0000
-+++ src/md5/md5.h	2004-03-27 06:50:00.000000000 +0000
-@@ -5,6 +5,9 @@
-  * Written by Solar Designer <solar at openwall.com> in 2001, and placed in
-  * the public domain.  See md5c.c for more information.
-  */
-+#include "../config.h"
-+#ifndef EGG_SSL_EXT
-+
- 
- #ifndef _MD5_H
- #define _MD5_H
-@@ -24,3 +27,4 @@
- extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
- 
- #endif
-+#endif
---- src/md5/md5c.c	2004-03-27 06:50:00.000000000 +0000
-+++ src/md5/md5c.c	2004-03-27 06:50:00.000000000 +0000
-@@ -17,9 +17,23 @@
- 
- #include <string.h>
- 
-+#ifndef EGG_SSL_EXT
- #include "md5.h"
-+#else
-+#include "openssl/md5.h"
-+#endif
-+
- #include "compat/compat.h"
- 
-+typedef unsigned long MD5_u32plus;
-+
-+typedef struct {
-+	MD5_u32plus lo, hi;
-+	MD5_u32plus a, b, c, d;
-+	unsigned char buffer[64];
-+	MD5_u32plus block[16];
-+} MD5_CTX;
-+
- /*
-  * The basic MD5 functions.
-  *
---- src/mod/compress.mod/compress.c	2004-03-27 06:50:00.000000000 +0000
-+++ src/mod/compress.mod/compress.c	2004-03-27 06:50:00.000000000 +0000
-@@ -36,6 +36,8 @@
- #include "src/mod/module.h"
- #include "share.mod/share.h"
- 
-+#include <zlib.h>
-+
- #ifdef HAVE_MMAP
- #  undef panic
- #  include <sys/types.h>
---- src/mod/irc.mod/chan.c	2004-03-27 06:50:00.000000000 +0000
-+++ src/mod/irc.mod/chan.c	2004-03-27 06:50:00.000000000 +0000
-@@ -991,10 +991,10 @@
-         q = strchr(p, ' ');
-         if (q != NULL) {
-           *q = 0;
--          set_key(chan, p);
-+          set_keyegg(chan, p);
-           strcpy(p, q + 1);
-         } else {
--          set_key(chan, p);
-+          set_keyegg(chan, p);
-           *p = 0;
-         }
-       }
---- src/mod/irc.mod/irc.c	2004-03-27 06:50:00.000000000 +0000
-+++ src/mod/irc.mod/irc.c	2004-03-27 06:50:00.000000000 +0000
-@@ -256,7 +256,7 @@
- 
- /* Set the key.
-  */
--static void set_key(struct chanset_t *chan, char *k)
-+static void set_keyegg(struct chanset_t *chan, char *k)
- {
-   nfree(chan->channel.key);
-   if (k == NULL) {
---- src/mod/irc.mod/irc.h	2004-03-27 06:50:00.000000000 +0000
-+++ src/mod/irc.mod/irc.h	2004-03-27 06:50:00.000000000 +0000
-@@ -68,7 +68,7 @@
- 
- static void reset_chan_info(struct chanset_t *, int);
- static void recheck_channel(struct chanset_t *, int);
--static void set_key(struct chanset_t *, char *);
-+static void set_keyegg(struct chanset_t *, char *);
- static void maybe_revenge(struct chanset_t *, char *, char *, int);
- static int detect_chan_flood(char *, char *, char *, struct chanset_t *, int,
-                              char *);
---- src/mod/irc.mod/mode.c	2004-03-27 06:50:00.000000000 +0000
-+++ src/mod/irc.mod/mode.c	2004-03-27 06:50:00.000000000 +0000
-@@ -1209,7 +1209,7 @@
-           if (!(chan = modebind_refresh(ch, from, &user, NULL, NULL)))
-             return 0;
-           if (ms2[0] == '+') {
--            set_key(chan, op);
-+            set_keyegg(chan, op);
-             if (channel_active(chan))
-               got_key(chan, nick, from, op);
-           } else {
-@@ -1220,7 +1220,7 @@
-                        !chan_master(user) && !match_my_nick(nick))
-                 add_mode(chan, '+', 'k', chan->key_prot);
-             }
--            set_key(chan, NULL);
-+            set_keyegg(chan, NULL);
-           }
-           break;
-         case 'o':
---- src/mod/module.h~	2012-03-31 15:38:27.000000000 +0300
-+++ src/mod/module.h	2012-03-31 15:44:10.254563119 +0300
-@@ -473,8 +473,13 @@
- /* 284 - 287 */
- #define quiet_reject (*(int *)(global[284]))
- #define file_readable ((int (*) (char *))global[285])
-+#ifdef EGG_SSL_EXT
-+#define net_switch_to_ssl ((int (*)(int))global[286])
-+#define ssl_use (*(int *)global[287]) /* kyotou */
-+#else
- /* IPv6 leftovers: 286 */
- /* IPv6 leftovers: 287 */
-+#endif
- /* 288 - 291 */
- /* IPv6 leftovers: 288 */
- #define strip_mirc_codes ((void (*)(int, char *))global[289])
---- src/mod/server.mod/servmsg.c	2004-03-27 06:50:00.000000000 +0000
-+++ src/mod/server.mod/servmsg.c	2004-03-27 06:50:00.000000000 +0000
-@@ -1360,6 +1360,14 @@
-       fatal("NO SERVERS WILL ACCEPT MY CONNECTION.", 0);
-   } else {
-     dcc[servidx].sock = serv;
-+	#ifdef EGG_SSL_EXT
-+	if (ssl_use) {
-+		if (net_switch_to_ssl(serv)==0) {
-+			putlog(LOG_SERV, "*", "SSL %s %s (Error while switching to SSL)", IRC_FAILEDCONNECT, dcc[servidx].host);
-+			lostdcc(servidx);    
-+		}
-+	}    
-+	#endif
-     /* Queue standard login */
-     dcc[servidx].timeval = now;
-     SERVER_SOCKET.timeout_val = &server_timeout;
---- src/modules.c	2004-03-27 06:50:00.000000000 +0000
-+++ src/modules.c	2004-03-27 06:50:00.000000000 +0000
-@@ -29,9 +29,17 @@
- #include "main.h"
- #include "modules.h"
- #include "tandem.h"
-+
-+#ifndef EGG_SSL_EXT
- #include "md5/md5.h"
-+#else
-+#include "openssl/md5.h"
-+#endif
-+
- #include "users.h"
- 
-+#include "net.h"
-+
- #ifndef STATIC
- #  ifdef MOD_USE_SHL
- #    include <dl.h>
-@@ -94,6 +102,10 @@
-            password_timeout, force_expire, protect_readonly, reserved_port_min,
-            reserved_port_max, copy_to_tmp, quiet_reject;
- 
-+#ifdef EGG_SSL_EXT
-+extern int      ssl_use;
-+#endif
-+
- extern party_t *party;
- extern time_t now, online_since;
- extern tand_t *tandbot;
-@@ -128,6 +140,10 @@
- }
- #endif /* STATIC */
- 
-+#ifdef EGG_SSL_EXT
-+int net_switch_to_ssl(int);
-+#endif
-+
- 
- /* The null functions */
- void null_func()
-@@ -561,8 +576,13 @@
-   /* 284 - 287 */
-   (Function) & quiet_reject,      /* int                                 */
-   (Function) file_readable,
-+#ifdef EGG_SSL_EXT
-+  (Function) net_switch_to_ssl,   /* 286 */
-+  (Function) &ssl_use,           /* 287 kyotou  */
-+#else
-   (Function) 0,                   /* IPv6 leftovers: 286                 */
-   (Function) 0,                   /* IPv6 leftovers: 287                 */
-+#endif
-   /* 288 - 291 */
-   (Function) 0,                   /* IPv6 leftovers: 288                 */
-   (Function) strip_mirc_codes,
---- src/net.c	2004-03-27 06:50:00.000000000 +0000
-+++ src/net.c	2004-03-27 06:50:00.000000000 +0000
-@@ -52,6 +52,18 @@
- #  endif
- #endif
- 
-+#ifdef EGG_SSL_EXT
-+#  ifndef EGG_SSL_INCS
-+#    include <openssl/ssl.h>
-+#    include <openssl/err.h>
-+#    include <openssl/rand.h>
-+#    define EGG_SSL_INCS 1
-+#  endif
-+#endif
-+
-+#include "net.h"
-+
-+
- extern struct dcc_t *dcc;
- extern int backgrd, use_stderr, resolve_timeout, dcc_total;
- extern unsigned long otraffic_irc_today, otraffic_bn_today, otraffic_dcc_today,
-@@ -64,7 +76,11 @@
- int firewallport = 1080;      /* Default port of socks 4/5 firewalls.         */
- char botuser[21] = "eggdrop"; /* Username of the user running the bot.        */
- int dcc_sanitycheck = 0;      /* Do some sanity checking on dcc connections.  */
--
-+#ifdef EGG_SSL_EXT
-+SSL_CTX *ssl_ctx=NULL;
-+char	*tls_rand_file = NULL;
-+int     ssl_use = 0;
-+#endif
- sock_list *socklist = NULL;   /* Enough to be safe.                           */
- sigjmp_buf alarmret;          /* Env buffer for alarm() returns.              */
- 
-@@ -87,6 +103,73 @@
-   return ret;
- }
- 
-+#ifdef EGG_SSL_EXT
-+int seed_PRNG(void)
-+{
-+    char stackdata[1024];
-+    static char rand_file[300];
-+    FILE *fh;
-+
-+#if OPENSSL_VERSION_NUMBER >= 0x00905100
-+    if (RAND_status())
-+      return 0;     /* PRNG already good seeded */
-+#endif
-+    /* if the device '/dev/urandom' is present, OpenSSL uses it by default.
-+     * check if it's present, else we have to make random data ourselfs.
-+     */
-+    if ((fh = fopen("/dev/urandom", "r"))) {
-+      fclose(fh);
-+      return 0;
-+    }
-+    if (RAND_file_name(rand_file, sizeof(rand_file)))
-+      tls_rand_file = rand_file;
-+    else
-+      return 1;
-+    if (!RAND_load_file(rand_file, 1024)) {
-+      /* no .rnd file found, create new seed */
-+      unsigned int c;
-+      c = time(NULL);
-+      RAND_seed(&c, sizeof(c));
-+      c = getpid();
-+      RAND_seed(&c, sizeof(c));
-+      RAND_seed(stackdata, sizeof(stackdata));
-+    }
-+#if OPENSSL_VERSION_NUMBER >= 0x00905100
-+    if (!RAND_status())
-+      return 2;   /* PRNG still badly seeded */
-+#endif
-+    return 0;
-+}
-+
-+void init_ssl()
-+{
-+  int i;
-+  struct threaddata *td = threaddata();
-+ 
-+  for (i = 0; i < td->MAXSOCKS; i++) {
-+    td->socklist[i].ssl = NULL;
-+  }
-+
-+  SSL_load_error_strings();
-+  OpenSSL_add_ssl_algorithms();
-+  ssl_ctx=SSL_CTX_new(SSLv23_client_method());
-+  if (!ssl_ctx)
-+  fatal("SSL_CTX_new() failed",0);
-+  if (seed_PRNG())
-+    fatal("Wasn't able to properly seed the PRNG!",0);
-+}
-+
-+int clean_ssl() {
-+   if (ssl_ctx) {
-+      SSL_CTX_free(ssl_ctx);
-+      ssl_ctx = NULL;
-+  }
-+  if (tls_rand_file)
-+      RAND_write_file(tls_rand_file);
-+ return 0;
-+}
-+#endif
-+
- int expmem_net()
- {
-   int i, tot = 0;
-@@ -249,6 +332,7 @@
-       td->socklist[i].handler.sock.outbuflen = 0;
-       td->socklist[i].flags = options;
-       td->socklist[i].sock = sock;
-+      td->socklist[i].ssl = NULL;
-       return i;
-     }
-   }
-@@ -345,6 +429,13 @@
- 
-   for (i = 0; i < td->MAXSOCKS; i++) {
-     if ((td->socklist[i].sock == sock) && !(td->socklist[i].flags & SOCK_UNUSED)) {
-+#ifdef EGG_SSL_EXT
-+      if (td->socklist[i].ssl) {
-+        SSL_shutdown(td->socklist[i].ssl);
-+        SSL_free(td->socklist[i].ssl);
-+        td->socklist[i].ssl = NULL;
-+      }
-+#endif
-       if (!(td->socklist[i].flags & SOCK_TCL)) { /* nothing to free for tclsocks */
-         close(td->socklist[i].sock);
-         if (td->socklist[i].handler.sock.inbuf != NULL) {
-@@ -508,6 +599,65 @@
-   return sock;
- }
- 
-+#ifdef EGG_SSL_EXT
-+int net_switch_to_ssl(int sock) {
-+int err;
-+int i=0;
-+struct threaddata *td = threaddata();
-+
-+    debug0("net_switch_to_ssl()");
-+    while (i < td->MAXSOCKS) {
-+     if (td->socklist[i].sock==sock) {
-+      break;
-+     }
-+     i++;
-+    }
-+    if (i == td->MAXSOCKS) {
-+        debug0("Error while swithing to SSL - sock not found in list");
-+	return 0;
-+    }
-+
-+    if (td->socklist[i].ssl) {
-+        debug0("Error while swithing to SSL - already in ssl");
-+	return 0;
-+    }
-+    td->socklist[i].ssl = SSL_new(ssl_ctx);
-+    if (!td->socklist[i].ssl) {
-+        debug0("Error while swithing to SSL - SSL_new() error");
-+	return 0;
-+    }
-+
-+     SSL_set_fd(td->socklist[i].ssl, td->socklist[i].sock);
-+     err = SSL_connect(td->socklist[i].ssl);
-+   
-+     while (err <= 0) {
-+        int errs;
-+        errs=SSL_get_error(td->socklist[i].ssl,err);
-+        if ((errs!=SSL_ERROR_WANT_READ)&&(errs!=SSL_ERROR_WANT_WRITE)&&
-+	        (errs!=SSL_ERROR_WANT_X509_LOOKUP)) {
-+		putlog(LOG_DEBUG,"*", "SSL_connect() = %d, %s", err,
-+			(char *)ERR_error_string(ERR_get_error(), NULL));
-+	 	SSL_shutdown(td->socklist[i].ssl);
-+	 	SSL_free(td->socklist[i].ssl);
-+	 	td->socklist[i].ssl = NULL;
-+	        return 0;	    
-+        }
-+        usleep(1000);
-+        err = SSL_connect(td->socklist[i].ssl);
-+     }
-+
-+     if (err==1) {
-+      debug0("SSL_connect() success"); 
-+      return 1;
-+     }
-+     debug0("Error while SSL_connect()"); 
-+     SSL_shutdown(td->socklist[i].ssl);
-+     SSL_free(td->socklist[i].ssl); 
-+     td->socklist[i].ssl = NULL;
-+     return 0;
-+}
-+#endif
-+
- /* Ordinary non-binary connection attempt */
- int open_telnet(char *server, int port)
- {
-@@ -715,6 +865,9 @@
-     for (i = 0; i < slistmax; i++) {
-       if (!tclonly && ((!(slist[i].flags & (SOCK_UNUSED | SOCK_TCL))) &&
-           ((FD_ISSET(slist[i].sock, &fdr)) ||
-+#ifdef EGG_SSL_EXT
-+          ((slist[i].ssl)&&(SSL_pending(slist[i].ssl))) ||
-+#endif
-           ((slist[i].sock == STDOUT) && (!backgrd) &&
-           (FD_ISSET(STDIN, &fdr)))))) {
-         if (slist[i].flags & (SOCK_LISTEN | SOCK_CONNECT)) {
-@@ -739,7 +892,33 @@
-         if ((slist[i].sock == STDOUT) && !backgrd)
-           x = read(STDIN, s, grab);
-         else
--          x = read(slist[i].sock, s, grab);
-+#ifdef EGG_SSL_EXT
-+        {
-+          if (slist[i].ssl) {
-+            x = SSL_read(slist[i].ssl, s, grab);
-+
-+            if (x < 0) {
-+              int err = SSL_get_error(slist[i].ssl, x);
-+              x = -1;
-+
-+              switch (err) {
-+                case SSL_ERROR_WANT_READ:
-+                  errno = EAGAIN;
-+                  break;
-+                case SSL_ERROR_WANT_WRITE:
-+                  errno = EAGAIN;
-+                  break;
-+                case SSL_ERROR_WANT_X509_LOOKUP:
-+                  errno = EAGAIN;
-+                  break;
-+              }
-+            }
-+          } else
-+            x = read(slist[i].sock, s, grab);
-+        }
-+#else
-+        x = read(slist[i].sock, s, grab);
-+#endif
-         if (x <= 0) {           /* eof */
-           if (errno != EAGAIN) { /* EAGAIN happens when the operation would
-                                   * block on a non-blocking socket, if the
-@@ -1046,6 +1225,26 @@
-         socklist[i].handler.sock.outbuflen += len;
-         return;
-       }
-+#ifdef EGG_SSL_EXT
-+      if (socklist[i].ssl) {
-+       x=SSL_write(socklist[i].ssl,s,len);
-+ 	   if (x < 0) {
-+	    int err = SSL_get_error(socklist[i].ssl, x);
-+	    x = -1;
-+	    switch (err) {
-+	    	case SSL_ERROR_WANT_READ:
-+			errno = EAGAIN;
-+		    break;
-+        	case SSL_ERROR_WANT_WRITE:
-+		    errno = EAGAIN;
-+		    break;
-+        	case SSL_ERROR_WANT_X509_LOOKUP:
-+		    errno = EAGAIN;
-+		    break;
-+		}
-+  	   }
-+      } else
-+#endif      
-       /* Try. */
-       x = write(z, s, len);
-       if (x == -1)
-@@ -1113,6 +1312,29 @@
-         (socklist[i].handler.sock.outbuf != NULL) && (FD_ISSET(socklist[i].sock, &wfds))) {
-       /* Trick tputs into doing the work */
-       errno = 0;
-+#ifdef EGG_SSL_EXT
-+      if (socklist[i].ssl) {
-+         x = write(socklist[i].sock, socklist[i].handler.sock.outbuf,
-+              socklist[i].handler.sock.outbuflen);
-+
-+         if (x < 0) {
-+           int err = SSL_get_error(socklist[i].ssl, x);
-+           x = -1;
-+
-+           switch (err) {
-+             case SSL_ERROR_WANT_READ:
-+               errno = EAGAIN;
-+               break;
-+             case SSL_ERROR_WANT_WRITE:
-+               errno = EAGAIN;
-+               break;
-+             case SSL_ERROR_WANT_X509_LOOKUP:
-+               errno = EAGAIN;
-+               break;
-+             }
-+          }
-+       } else
-+#endif
-       x = write(socklist[i].sock, socklist[i].handler.sock.outbuf, socklist[i].handler.sock.outbuflen);
-       if ((x < 0) && (errno != EAGAIN)
- #ifdef EBADSLT
---- src/net.h	1970-01-01 01:00:00.000000000 +0100
-+++ src/net.h	2004-03-27 06:50:00.000000000 +0000
-@@ -0,0 +1,26 @@
-+#ifndef _EGG_NET_H
-+#define _EGG_NET_H
-+#ifdef EGG_SSL_EXT
-+# ifndef EGG_SSL_INCS
-+#  include <openssl/ssl.h>
-+#  include <openssl/err.h>
-+#  include <openssl/rand.h>
-+#  define EGG_SSL_INCS 1
-+# endif
-+#endif
-+
-+/* This is used by the net module to keep track of sockets and what's
-+ * queued on them
-+ */
-+typedef struct sock_list {
-+  int sock;
-+#ifdef EGG_SSL_EXT
-+  SSL *ssl;
-+#endif
-+  short flags;
-+  union {
-+    struct sock_handler sock;
-+    struct tclsock_handler tclsock;
-+  } handler;
-+} sock_list;
-+#endif				/* _EGG_NET_H */
---- src/patch.h	2004-03-27 06:50:00.000000000 +0000
-+++ src/patch.h	2004-03-27 06:50:00.000000000 +0000
-@@ -36,7 +36,9 @@
-  *
-  *
-  */
--/* PATCH GOES HERE */
-+#ifdef EGG_SSL_EXT
-+  patch("SSL");
-+#endif
- /*
-  *
-  *
---- src/proto.h	2004-03-27 06:50:00.000000000 +0000
-+++ src/proto.h	2004-03-27 06:50:00.000000000 +0000
-@@ -33,6 +33,7 @@
- 
- #include "lush.h"
- #include "misc_file.h"
-+#include "net.h"
- 
- #define dprintf dprintf_eggdrop
- 
---- src/tcl.c	2004-03-27 06:50:00.000000000 +0000
-+++ src/tcl.c	2004-03-27 06:50:00.000000000 +0000
-@@ -44,6 +44,9 @@
- 
- 
- extern time_t online_since;
-+#ifdef EGG_SSL_EXT
-+extern int      ssl_use;
-+#endif
- 
- extern char origbotname[], botuser[], motdfile[], admin[], userfile[],
-             firewall[], helpdir[], notify_new[], hostname[], myip[], moddir[],
-@@ -553,6 +556,9 @@
-   {"enable-simul",          &enable_simul,         0}, /* compat */
-   {"debug-output",          &debug_output,         0}, /* compat */
-   {"use-console-r",         &use_console_r,        0}, /* compat */
-+#ifdef EGG_SSL_EXT
-+  {"use-ssl",			&ssl_use,		0},
-+#endif
-   {NULL,                    NULL,                  0}
- };
- 
---- src/tclhash.h	2004-03-27 06:50:00.000000000 +0000
-+++ src/tclhash.h	2004-03-27 06:50:00.000000000 +0000
-@@ -25,6 +25,7 @@
- #ifndef _EGG_TCLHASH_H
- #define _EGG_TCLHASH_H
- 
-+#include "net.h"
- 
- #define TC_DELETED   0x0001     /* This command/trigger was deleted. */
- 
---- src/tclmisc.c	2004-03-27 06:50:00.000000000 +0000
-+++ src/tclmisc.c	2004-03-27 06:50:00.000000000 +0000
-@@ -26,7 +26,12 @@
- #include "main.h"
- #include "modules.h"
- #include "tandem.h"
-+
-+#ifndef EGG_SSL_EXT
- #include "md5/md5.h"
-+#else
-+#include "openssl/md5.h"
-+#endif
- 
- #ifdef TIME_WITH_SYS_TIME
- #  include <sys/time.h>
diff --git a/eggdrop-topicprot.patch b/eggdrop-topicprot.patch
deleted file mode 100644
index f01664d..0000000
--- a/eggdrop-topicprot.patch
+++ /dev/null
@@ -1,273 +0,0 @@
-diff -urN eggdrop1.6.19/src/chan.h eggdrop1.6.19-topicprot/src/chan.h
---- eggdrop1.6.19/src/chan.h     2008-02-16 22:41:03.000000000 +0100
-+++ eggdrop1.6.19-topicprot/src/chan.h      2008-07-26 11:28:08.000000000 +0200
-@@ -191,6 +191,7 @@
-   int mode_mns_prot;     /* modes to reject                   */
-   int limit_prot;        /* desired limit                     */
-   char key_prot[121];    /* desired password                  */
-+  char topic_prot[501];  /* desired topic                     */
-   char pls[21];          /* positive mode changes             */
-   char mns[21];          /* negative mode changes             */
-   char *key;             /* new key to set                    */
-diff -urN eggdrop1.6.19/src/chanprog.c eggdrop1.6.19-topicprot/src/chanprog.c
---- eggdrop1.6.19/src/chanprog.c        2008-02-16 22:41:03.000000000 +0100
-+++ eggdrop1.6.19-topicprot/src/chanprog.c   2008-07-26 11:28:09.000000000 +0200
-@@ -690,3 +690,23 @@
-
-   return 0;
- }
-+
-+/* If we have a protected topic and the bot is opped, halfoped,
-+* or the channel is -t, change the topic. (Sup 11May2001)
-+*/
-+void check_topic(struct chanset_t *chan)
-+{
-+  memberlist *m = NULL;
-+
-+  if (chan->topic_prot[0]) {
-+    m = ismember(chan, botname);
-+    if (!m)
-+      return;
-+    if (chan->channel.topic) {
-+      if (!egg_strcasecmp(chan->topic_prot, chan->channel.topic))
-+       return;
-+    }
-+    if (chan_hasop(m) || !channel_optopic(chan) || chan_hashalfop(m))
-+      dprintf(DP_SERVER, "TOPIC %s :%s\n", chan->name, chan->topic_prot);
-+  }
-+}
-diff -urN eggdrop1.6.19/src/mod/channels.mod/channels.c eggdrop1.6.19-topicprot/src/mod/channels.mod/channels.c
---- eggdrop1.6.19/src/mod/channels.mod/channels.c        2008-02-16 22:41:06.000000000 +0100
-+++ eggdrop1.6.19-topicprot/src/mod/channels.mod/channels.c  2008-07-26 11:28:09.000000000 +0200
-@@ -385,6 +385,7 @@
-   FILE *f;
-   char s[121], w[1024], w2[1024], name[163];
-   char need1[242], need2[242], need3[242], need4[242], need5[242];
-+  char topic[1002];
-   struct chanset_t *chan;
-   struct udef_struct *ul;
-
-@@ -405,6 +406,7 @@
-     convert_element(chan->dname, name);
-     get_mode_protect(chan, w);
-     convert_element(w, w2);
-+    convert_element(chan->topic_prot, topic);
-     convert_element(chan->need_op, need1);
-     convert_element(chan->need_invite, need2);
-     convert_element(chan->need_key, need3);
-@@ -417,7 +417,7 @@
-     convert_element(chan->need_unban, need4);
-     convert_element(chan->need_limit, need5);
-     fprintf(f,
--            "channel add %s { chanmode %s idle-kick %d stopnethack-mode %d "
-+            "channel add %s { chanmode %s idle-kick topic %d stopnethack-mode %d "
-             "revenge-mode %d need-op %s need-invite %s need-key %s "
-             "need-unban %s need-limit %s flood-chan %d:%d flood-ctcp %d:%d "
-             "flood-join %d:%d flood-kick %d:%d flood-deop %d:%d "
-@@ -428,7 +428,7 @@
-             "%crevenge %crevengebot %cautovoice %csecret %cshared %ccycle "
-             "%cseen %cinactive %cdynamicexempts %cuserexempts %cdynamicinvites "
-             "%cuserinvites %cnodesynch %cstatic }" "\n",
--            name, w2, chan->idle_kick, chan->stopnethack_mode,
-+            name, w2, topic, chan->idle_kick, chan->stopnethack_mode,
-             chan->revenge_mode, need1, need2, need3, need4, need5,
-             chan->flood_pub_thr, chan->flood_pub_time,
-             chan->flood_ctcp_thr, chan->flood_ctcp_time,
-diff -urN eggdrop1.6.19/src/mod/channels.mod/cmdschan.c eggdrop1.6.19-topicprot/src/mod/channels.mod/cmdschan.c
---- eggdrop1.6.19/src/mod/channels.mod/cmdschan.c        2008-02-16 22:41:07.000000000 +0100
-+++ eggdrop1.6.19-topicprot/src/mod/channels.mod/cmdschan.c  2008-07-26 21:59:43.000000000 +0200
-@@ -1268,7 +1268,7 @@
-     dprintf(idx, "Settings for %s channel %s:\n",
-             channel_static(chan) ? "static" : "dynamic", chan->dname);
-     get_mode_protect(chan, work);
--    dprintf(idx, "Protect modes (chanmode): %s\n", work[0] ? work : "None");
-+    dprintf(idx, "Protect topic: %s\n", chan->topic_prot[0] ? chan->topic_prot : "None");
-     if (chan->idle_kick)
-       dprintf(idx, "Idle Kick after (idle-kick): %d\n", chan->idle_kick);
-     else
-diff -urN eggdrop1.6.19/src/mod/channels.mod/help/chaninfo.help eggdrop1.6.19-topicprot/src/mod/channels.mod/help/chaninfo.help
---- eggdrop1.6.19/src/mod/channels.mod/help/chaninfo.help     2003-02-02 05:20:44.000000000 +0100
-+++ eggdrop1.6.19-topicprot/src/mod/channels.mod/help/chaninfo.help       2008-07-26 11:28:08.000000000 +0200
-@@ -4,6 +4,7 @@
-      It shows any of the following:
-         %bchanmode%b   These modes are enforced on the channel. Both + and -
-                    modes can be enforced.
-+        %btopic%b      which topic is enforced on the channel
-         %bidle-kick%b  Kick idle users that are not +f or above on the channel
-                    after how many minutes (set this to 0 to disable).
- %{+n}
-diff -urN eggdrop1.6.19/src/mod/channels.mod/tclchan.c eggdrop1.6.19-topicprot/src/mod/channels.mod/tclchan.c
---- eggdrop1.6.19/src/mod/channels.mod/tclchan.c  2008-02-16 22:41:07.000000000 +0100
-+++ eggdrop1.6.19-topicprot/src/mod/channels.mod/tclchan.c   2008-07-26 11:28:14.000000000 +0200
-@@ -1223,6 +1223,15 @@
-         return TCL_ERROR;
-       }
-       chan->invite_time = atoi(item[i]);
-+     } else if (!strcmp(item[i], "topic")) {
-+       i++;
-+       if (i >= items) {
-+        if (irp)
-+          Tcl_AppendResult(irp, "channel topic needs argument", NULL);
-+        return TCL_ERROR;
-+       }
-+       strncpyz(chan->topic_prot, item[i], sizeof(chan->topic_prot));
-+       check_topic(chan);
-     } else if (!strcmp(item[i], "+enforcebans"))
-       chan->status |= CHAN_ENFORCEBANS;
-     else if (!strcmp(item[i], "-enforcebans"))
-diff -urN eggdrop1.6.19/src/mod/irc.mod/chan.c eggdrop1.6.19-topicprot/src/mod/irc.mod/chan.c
---- eggdrop1.6.19/src/mod/irc.mod/chan.c	2008-02-16 22:41:09.000000000 +0100
-+++ eggdrop1.6.19-topicprot/src/mod/irc.mod/chan.c	2008-07-26 11:28:08.000000000 +0200
-@@ -1513,12 +1513,14 @@
-   memberlist *m;
-   struct chanset_t *chan;
-   struct userrec *u;
-+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
-
-   chname = newsplit(&msg);
-   fixcolon(msg);
-   u = get_user_by_host(from);
-   nick = splitnick(&from);
-   chan = findchan(chname);
-+  get_user_flagrec(u, &fr, chname);
-   if (chan) {
-     putlog(LOG_JOIN, chan->dname, "Topic changed on %s by %s!%s: %s",
-            chan->dname, nick, from, msg);
-@@ -1527,6 +1529,8 @@
-       m->last = now;
-     set_topic(chan, msg);
-     check_tcl_topc(nick, from, u, chan->dname, msg);
-+    if (egg_strcasecmp(botname, nick) && !glob_master(fr) && !chan_master(fr))
-+      check_topic(chan);
-   }
-   return 0;
- }
-@@ -1545,6 +1549,7 @@
-   if (chan) {
-     set_topic(chan, NULL);
-     check_tcl_topc("*", "*", NULL, chan->dname, "");
-+    check_topic(chan);
-   }
-   return 0;
- }
-@@ -1564,6 +1569,7 @@
-     fixcolon(msg);
-     set_topic(chan, msg);
-     check_tcl_topc("*", "*", NULL, chan->dname, msg);
-+    check_topic(chan);
-   }
-   return 0;
- }
-diff -urN eggdrop1.6.19/src/mod/irc.mod/cmdsirc.c eggdrop1.6.19-topicprot/src/mod/irc.mod/cmdsirc.c
---- eggdrop1.6.19/src/mod/irc.mod/cmdsirc.c 2008-02-16 22:41:09.000000000 +0100
-+++ eggdrop1.6.19-topicprot/src/mod/irc.mod/cmdsirc.c   2008-07-26 11:28:11.000000000 +0200
-@@ -898,6 +898,7 @@
- static void cmd_topic(struct userrec *u, int idx, char *par)
- {
-   struct chanset_t *chan;
-+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
-
-   if (par[0] && (strchr(CHANMETA, par[0]) != NULL)) {
-     char *chname = newsplit(&par);
-@@ -923,6 +924,13 @@
-     dprintf(idx, "I'm not a channel op or halfop on %s and the channel is "
-             "+t.\n", chan->dname);
-   else {
-+      if (chan->topic_prot[0]) {
-+       get_user_flagrec(u, &fr, chan->dname);
-+       if (!glob_master(fr) && !chan_master(fr)) {
-+         dprintf(idx, "The topic of %s is protected.\n", chan->dname);
-+         return;
-+       }
-+      }
-     dprintf(DP_SERVER, "TOPIC %s :%s\n", chan->name, par);
-     dprintf(idx, "Changing topic...\n");
-     putlog(LOG_CMDS, "*", "#%s# (%s) topic %s", dcc[idx].nick,
-diff -urN eggdrop1.6.19/src/mod/irc.mod/mode.c eggdrop1.6.19-topicprot/src/mod/irc.mod/mode.c
---- eggdrop1.6.19/src/mod/irc.mod/mode.c    2008-02-16 22:41:09.000000000 +0100
-+++ eggdrop1.6.19-topicprot/src/mod/irc.mod/mode.c      2008-07-26 11:28:12.000000000 +0200
-@@ -460,9 +460,11 @@
-     }
-   }
-   m->flags |= WASOP;
--  if (check_chan)
-+  if (check_chan) {
-     recheck_channel(chan, 1);
--}
-+    check_topic(chan);
-+  }
-+ }
-
- static void got_halfop(struct chanset_t *chan, char *nick, char *from,
-                        char *who, struct userrec *opu,
-@@ -549,9 +551,11 @@
-     }
-   }
-   m->flags |= WASHALFOP;
--  if (check_chan)
-+  if (check_chan) {
-     recheck_channel(chan, 1);
--}
-+    check_topic(chan);
-+  }
-+ }
-
- static void got_deop(struct chanset_t *chan, char *nick, char *from,
-                      char *who, struct userrec *opu)
-@@ -1246,6 +1250,8 @@
-                      (chan->mode_mns_prot & todo)))
-               add_mode(chan, ms2[0] == '+' ? '-' : '+', *chg, "");
-           }
-+          if ((ms2[0] == '-') && ((*chg == 't') || (*chg == 'h')))
-+            check_topic(chan);
-         }
-         chg++;
-       }
-diff -urN eggdrop1.6.19/src/mod/module.h eggdrop1.6.19-topicprot/src/mod/module.h
---- eggdrop1.6.19/src/mod/module.h  2008-02-16 22:41:06.000000000 +0100
-+++ eggdrop1.6.19-topicprot/src/mod/module.h    2008-07-26 11:28:12.000000000 +0200
-@@ -361,7 +361,7 @@
- #define rem_tcl_coups ((void (*) (tcl_coups *))global[210])
- #define botname ((char *)(global[211]))
- /* 212 - 215 */
--/* 212: remove_gunk() -- UNUSED (drummer) */
-+#define check_topic ((void (*)(struct chanset_t *))global[212])
- #define check_tcl_chjn ((void (*) (const char *,const char *,int,char,int,const char *))global[213])
- #define sanitycheck_dcc ((int (*)(char *, char *, char *, char *))global[214])
- #define isowner ((int (*)(char *))global[215])
-diff -urN eggdrop1.6.19/src/modules.c eggdrop1.6.19-topicprot/src/modules.c
---- eggdrop1.6.19/src/modules.c 2008-02-16 22:41:04.000000000 +0100
-+++ eggdrop1.6.19-topicprot/src/modules.c   2008-07-26 11:28:13.000000000 +0200
-@@ -461,7 +461,7 @@
-   (Function) rem_tcl_coups,
-   (Function) botname,
-   /* 212 - 215 */
--  (Function) 0,                   /* remove_gunk() -- UNUSED! (drummer)  */
-+  (Function) check_topic,
-   (Function) check_tcl_chjn,
-   (Function) sanitycheck_dcc,
-   (Function) isowner,
-diff -urN eggdrop1.6.19/src/patch.h eggdrop1.6.19-topicprot/src/patch.h
---- eggdrop1.6.19/src/patch.h   2008-04-19 06:21:20.000000000 +0200
-+++ eggdrop1.6.19-topicprot/src/patch.h     2008-07-26 11:28:13.000000000 +0200
-@@ -36,7 +36,7 @@
-  *
-  *
-  */
--/* PATCH GOES HERE */
-+patch("topicprot");
- /*
-  *
-  *
-diff -urN eggdrop1.6.19/src/proto.h eggdrop1.6.19-topicprot/src/proto.h
---- eggdrop1.6.19/src/proto.h   2008-02-16 22:41:04.000000000 +0100
-+++ eggdrop1.6.19-topicprot/src/proto.h     2008-07-26 21:52:01.000000000 +0200
-@@ -114,6 +114,7 @@
- void set_chanlist(const char *host, struct userrec *rec);
- void clear_chanlist(void);
- void clear_chanlist_member(const char *nick);
-+void check_topic(struct chanset_t *);
-
- /* cmds.c */
- int check_dcc_attrs(struct userrec *, int);
-
diff --git a/ssl-md5.patch b/ssl-md5.patch
deleted file mode 100644
index e0c9f54..0000000
--- a/ssl-md5.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- eggdrop1.6.21/src/Makefile.in	2012-03-31 21:43:01.365906412 +0300
-+++ eggdrop1.6.21/src/Makefile.in	2012-03-31 21:51:20.130394596 +0300
-@@ -35,11 +35,11 @@
- 	@echo ""
- 	@cd .. && $(MAKE)
- 
--../$(EGGEXEC): build_msg $(eggdrop_objs) $(XREQS) compile_md5 compatability
-+../$(EGGEXEC): build_msg $(eggdrop_objs) $(XREQS) compatability
- 	@echo "Linking eggdrop $(EGGBUILD)."
- 	@echo ""
- 	@touch mod/mod.xlibs
--	$(LD) -o ../$(EGGEXEC) $(eggdrop_objs) $(MODOBJS) $(XLIBS) md5/md5c.o compat/*.o `cat mod/mod.xlibs` $(XSSL_LIBS) $(XSSL_INCLUDE)
-+	$(LD) -o ../$(EGGEXEC) $(eggdrop_objs) $(MODOBJS) $(XLIBS) compat/*.o `cat mod/mod.xlibs` $(XSSL_LIBS) $(XSSL_INCLUDE)
- 	$(STRIP) ../$(EGGEXEC)
- 	@echo ""
- 	@echo "Successful compile: $(EGGEXEC)"
---- eggdrop1.6.21/src/mod/idea.mod/idea.c~	2003-07-01 03:36:24.000000000 +0300
-+++ eggdrop1.6.21/src/mod/idea.mod/idea.c	2012-03-31 21:52:35.356441426 +0300
-@@ -29,6 +29,7 @@
- #define MAKING_ENCRYPTION
- 
- #include "src/mod/module.h"
-+#ifndef EGG_SSL_EXT
- /*
- #include "../../md5/md5c.c"
- #include "../../md5/md5.h"
-@@ -45,6 +46,7 @@
- #undef MD5_Init
- #define MD5_Init ((void (*)(MD5_CTX *))global[277])
- #undef global
-+#endif
- static Function *global = NULL;
- /********************************************/
- 
diff --git a/x32.patch b/x32.patch
deleted file mode 100644
index a5b2179..0000000
--- a/x32.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- eggdrop1.6.21/configure.ac~	2015-08-09 19:29:58.000000000 +0200
-+++ eggdrop1.6.21/configure.ac	2015-08-09 19:30:54.025503281 +0200
-@@ -135,7 +135,7 @@
- tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .dll .dylib .sl .a"
- 
- tcllibpaths="$HOME/lib $HOME/tcl/lib \
--             /usr/local/lib /usr/lib /lib /lib64 /usr/lib64 \
-+             /usr/local/lib /usr/lib /lib /lib64 /usr/lib64 /libx32 /usr/libx32 \
-              /usr/local/lib/tcl8.5 /usr/lib/tcl8.5 \
-              /usr/local/lib/tcl8.4 /usr/lib/tcl8.4 \
-              /usr/local/lib/tcl8.3 /usr/lib/tcl8.3 \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/eggdrop.git/commitdiff/12f43ebfd3f4e643f0e161ff4e77a8a0cfaed561




More information about the pld-cvs-commit mailing list