[cvslog] [CVS] Module eggdrop1.8: Change committed

cvs at eggheads.org cvs at eggheads.org
Sun Oct 24 06:39:47 CST 2010


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.8
Commit time: 2010-10-24 12:39:46 UTC
Committer  : Rumen Stoyanov <pseudo at egg6.net>

Modified files:
     eggdrop.conf doc/Changes1.8 doc/MODULES doc/html/index.html
     doc/settings/CONTENTS help/core.help src/patch.h

Removed files:
     src/mod/wire.mod/Makefile src/mod/wire.mod/modinfo
     src/mod/wire.mod/wire.c src/mod/wire.mod/wire.h
     src/mod/wire.mod/help/wire.help
     src/mod/wire.mod/language/wire.danish.lang
     src/mod/wire.mod/language/wire.english.lang
     src/mod/wire.mod/language/wire.finnish.lang
     src/mod/wire.mod/language/wire.french.lang
     src/mod/wire.mod/language/wire.german.lang

Log message:

Removed wire.mod and all references to it. Botnet and partyline encryption are now available using ssl.

---------------------- diff included ----------------------
Index: eggdrop1.8/doc/Changes1.8
diff -u eggdrop1.8/doc/Changes1.8:1.23 eggdrop1.8/doc/Changes1.8:1.24
--- eggdrop1.8/doc/Changes1.8:1.23	Sat Oct 23 05:16:12 2010
+++ eggdrop1.8/doc/Changes1.8	Sun Oct 24 06:39:36 2010
@@ -1,4 +1,4 @@
-$Id: Changes1.8,v 1.23 2010/10/23 11:16:12 pseudo Exp $
+$Id: Changes1.8,v 1.24 2010/10/24 12:39:36 pseudo Exp $
 
 Eggdrop Changes (since version 1.8.0)
 
@@ -6,6 +6,10 @@
 
 1.8.0 (CVS):
 
+  - Removed wire.mod and all references to it. Botnet and partyline encryption
+    are now available using ssl.
+    Patch by: guppy
+
   - Modified SIGQUIT handler to restart the bot by default.
   - Added support for evnt bind procs to cancel default signal actions.
   - Removed the die-on-sighup and die-on-sigterm variables.
Index: eggdrop1.8/doc/MODULES
diff -u eggdrop1.8/doc/MODULES:1.2 eggdrop1.8/doc/MODULES:1.3
--- eggdrop1.8/doc/MODULES:1.2	Tue Jul 27 15:49:41 2010
+++ eggdrop1.8/doc/MODULES	Sun Oct 24 06:39:36 2010
@@ -1,4 +1,4 @@
-$Id: MODULES,v 1.2 2010/07/27 21:49:41 pseudo Exp $
+$Id: MODULES,v 1.3 2010/10/24 12:39:36 pseudo Exp $
 
 Eggdrop Module Information
 Last revised: March 04, 2003
@@ -125,10 +125,6 @@
               for more information, including details on what information is
               sent to the uptime server.
 
-    wire      This module provides all the standard .wire partyline commands.
-              It is an encrypted partyline communication tool, compatible with
-              wire.tcl.
-
     woobie    This is for demonstrative purposes only. If you are looking for
               starting point in writing modules, woobie is the right thing.
 
Index: eggdrop1.8/doc/html/index.html
diff -u eggdrop1.8/doc/html/index.html:1.2 eggdrop1.8/doc/html/index.html:1.3
--- eggdrop1.8/doc/html/index.html:1.2	Tue Jul 27 15:49:41 2010
+++ eggdrop1.8/doc/html/index.html	Sun Oct 24 06:39:36 2010
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: index.html,v 1.2 2010/07/27 21:49:41 pseudo Exp $ -->
+<!-- $Id: index.html,v 1.3 2010/10/24 12:39:36 pseudo Exp $ -->
 
 <html>
   <head>
@@ -107,8 +107,6 @@
 
         <li><a href="mod-uptime.html">Uptime Module</a></li>
 
-        <li><a href="mod-wire.html">Wire Module</a></li>
-
         <li><a href="mod-woobie.html">Woobie Module</a></li>
       </ul>
     </blockquote>
Index: eggdrop1.8/doc/settings/CONTENTS
diff -u eggdrop1.8/doc/settings/CONTENTS:1.1.1.1 eggdrop1.8/doc/settings/CONTENTS:1.2
--- eggdrop1.8/doc/settings/CONTENTS:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/doc/settings/CONTENTS	Sun Oct 24 06:39:36 2010
@@ -1,4 +1,4 @@
-$Id: CONTENTS,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
+$Id: CONTENTS,v 1.2 2010/10/24 12:39:36 pseudo Exp $
 
 Directory Contents - doc/settings/
 Last revised: April 16, 2003
@@ -55,9 +55,6 @@
   mod.uptime
     Documentation for the uptime module is provided in this file.
 
-  mod.wire
-    Documentation for the wire module is provided in this file.
-
   mod.woobie
     Documentation for the woobie module is provided in this file.
     ________________________________________________________________________
Index: eggdrop1.8/eggdrop.conf
diff -u eggdrop1.8/eggdrop.conf:1.6 eggdrop1.8/eggdrop.conf:1.7
--- eggdrop1.8/eggdrop.conf:1.6	Sat Oct 23 05:16:11 2010
+++ eggdrop1.8/eggdrop.conf	Sun Oct 24 06:39:33 2010
@@ -1,7 +1,7 @@
 #! /path/to/executable/eggdrop
 # ^- This should contain a fully qualified path to your Eggdrop executable.
 #
-# $Id: eggdrop.conf,v 1.6 2010/10/23 11:16:11 pseudo Exp $
+# $Id: eggdrop.conf,v 1.7 2010/10/24 12:39:33 pseudo Exp $
 #
 # This is a sample Eggdrop configuration file which includes all possible
 # settings that can be used to configure your bot.
@@ -1471,14 +1471,6 @@
 #loadmodule assoc
 
 
-#### WIRE MODULE ####
-
-# This module provides all the standard .wire commands via dcc. It is an
-# encrypted partyline communication tool, compatible with wire.tcl. An
-# encryption module must be loaded to use this module. Un-comment the
-# following line to load the wire module.
-#loadmodule wire
-
 #### UPTIME MODULE ####
 
 # This module reports uptime statistics to http://uptime.eggheads.org.
Index: eggdrop1.8/help/core.help
diff -u eggdrop1.8/help/core.help:1.4 eggdrop1.8/help/core.help:1.5
--- eggdrop1.8/help/core.help:1.4	Sat Oct 23 05:16:12 2010
+++ eggdrop1.8/help/core.help	Sun Oct 24 06:39:36 2010
@@ -43,7 +43,7 @@
 %b'.help <module> module'%b. Possible modules include:
    %bassoc      channels     compress      console      ctcp%b
    %bfilesys    irc          notes         seen         server%b
-   %bshare      transfer     uptime        wire%b
+   %bshare      transfer     uptime%b
 %{-}
 
 You may receive a list of commands provided by all loaded modules by
Index: eggdrop1.8/src/mod/wire.mod/Makefile
diff -u eggdrop1.8/src/mod/wire.mod/Makefile:1.1.1.1 eggdrop1.8/src/mod/wire.mod/Makefile:removed
--- eggdrop1.8/src/mod/wire.mod/Makefile:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/mod/wire.mod/Makefile	Sun Oct 24 06:39:46 2010
@@ -1,45 +0,0 @@
-# Makefile for src/mod/wire.mod/
-# $Id: Makefile,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
-
-srcdir = .
-
-
-doofus:
-	@echo ""
-	@echo "Let's try this from the right directory..."
-	@echo ""
-	@cd ../../../ && make
-
-static: ../wire.o
-
-modules: ../../../wire.$(MOD_EXT)
-
-../wire.o:
-	$(CC) $(CFLAGS) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/wire.c
-	@rm -f ../wire.o
-	mv wire.o ../
-
-../../../wire.$(MOD_EXT): ../wire.o
-	$(LD) -o ../../../wire.$(MOD_EXT) ../wire.o $(XLIBS) $(MODULE_XLIBS)
-	$(STRIP) ../../../wire.$(MOD_EXT)
-
-depend:
-	$(CC) $(CFLAGS) -MM $(srcdir)/wire.c -MT ../wire.o > .depend
-
-clean:
-	@rm -f .depend *.o *.$(MOD_EXT) *~
-
-distclean: clean
-
-#safety hash
-../wire.o: .././wire.mod/wire.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h ../../../src/users.h ../../../src/chan.h \
-  .././wire.mod/wire.h
Index: eggdrop1.8/src/mod/wire.mod/help/wire.help
diff -u eggdrop1.8/src/mod/wire.mod/help/wire.help:1.1.1.1 eggdrop1.8/src/mod/wire.mod/help/wire.help:removed
--- eggdrop1.8/src/mod/wire.mod/help/wire.help:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/mod/wire.mod/help/wire.help	Sun Oct 24 06:39:46 2010
@@ -1,4 +0,0 @@
-%{help=wire module}%{+n}
-###  %bwire module%b
-   This module provides all the standard .wire partyline commands. It is an
-   encrypted partyline communication tool, compatible with wire.tcl.
Index: eggdrop1.8/src/mod/wire.mod/language/wire.danish.lang
diff -u eggdrop1.8/src/mod/wire.mod/language/wire.danish.lang:1.1.1.1 eggdrop1.8/src/mod/wire.mod/language/wire.danish.lang:removed
--- eggdrop1.8/src/mod/wire.mod/language/wire.danish.lang:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/mod/wire.mod/language/wire.danish.lang	Sun Oct 24 06:39:46 2010
@@ -1,15 +0,0 @@
-# wire.danish.lang
-#   language messages for wire module
-#
-# $Id: wire.danish.lang,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
-
-0xa000,Du er ikke på en krypteret linie.
-0xa001,For øjeblikket på krypteret linie
-0xa002,Du benytter ikke længere en krypteret linie.
-0xa003,Skifter den krypterede linies krypteringsnøgle til
-0xa004,Al tekst, som starter med ; vil nu gå over den krypterede linie.
-0xa005,For at se hvem der er på den krypterede linie, skriv '.onwire'.
-0xa006,For at forlade, skriv '.wire off'.
-0xa007,joined wire
-0xa008,left the wire.
-0xa009,WIRE modulet bliver fjernet.
Index: eggdrop1.8/src/mod/wire.mod/language/wire.english.lang
diff -u eggdrop1.8/src/mod/wire.mod/language/wire.english.lang:1.1.1.1 eggdrop1.8/src/mod/wire.mod/language/wire.english.lang:removed
--- eggdrop1.8/src/mod/wire.mod/language/wire.english.lang:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/mod/wire.mod/language/wire.english.lang	Sun Oct 24 06:39:46 2010
@@ -1,15 +0,0 @@
-# wire.english.lang
-#   language messages for wire module
-#
-# $Id: wire.english.lang,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
-
-0xa000,You are not on a wire.
-0xa001,Currently on wire
-0xa002,You are no longer on a wire.
-0xa003,Changing wire encryption key to
-0xa004,All text starting with ; will now go over the wire.
-0xa005,To see who's on your wire, type '.onwire'.
-0xa006,To leave, type '.wire off'.
-0xa007,joined wire
-0xa008,left the wire.
-0xa009,WIRE module being unloaded.
Index: eggdrop1.8/src/mod/wire.mod/language/wire.finnish.lang
diff -u eggdrop1.8/src/mod/wire.mod/language/wire.finnish.lang:1.1.1.1 eggdrop1.8/src/mod/wire.mod/language/wire.finnish.lang:removed
--- eggdrop1.8/src/mod/wire.mod/language/wire.finnish.lang:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/mod/wire.mod/language/wire.finnish.lang	Sun Oct 24 06:39:46 2010
@@ -1,15 +0,0 @@
-# wire.finnish.lang
-#   kieli tiedostot wire moduuliin
-#
-# $Id: wire.finnish.lang,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
-
-0xa000,You are not on a wire.
-0xa001,Nykyään wirella
-0xa002,Et ole pitkään wire.
-0xa003,Wire kryptaus avain vaihdettu
-0xa004,Kaikki teksti aloitettu ; Nyt on menty wiren yli.
-0xa005,Näet kuka on wiressa komennolla '.onwire'.
-0xa006,Lähde komennolla '.wire off'.
-0xa007,liitytty wireen
-0xa008,lähdetty wirestä.
-0xa009,WIRE moduuli ei ladattu.
Index: eggdrop1.8/src/mod/wire.mod/language/wire.french.lang
diff -u eggdrop1.8/src/mod/wire.mod/language/wire.french.lang:1.1.1.1 eggdrop1.8/src/mod/wire.mod/language/wire.french.lang:removed
--- eggdrop1.8/src/mod/wire.mod/language/wire.french.lang:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/mod/wire.mod/language/wire.french.lang	Sun Oct 24 06:39:47 2010
@@ -1,17 +0,0 @@
-# wire.french.lang
-#   language messages for wire module
-#
-# Traduction par Fraggle, voir core.french.lang pour plus d'informations
-#
-# $Id: wire.french.lang,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
-
-0xa000,Vous n'êtes pas sur un wire.
-0xa001,Actuellement sur wire
-0xa002,Vous n'êtes plus sur un wire.
-0xa003,Changement de la clé de cryptage du wire à
-0xa004,Tout les textes commençant par ; iront maintenant par dessus le wire.
-0xa005,Pour voir qui est sur votre wire, tapez '.onwire'.
-0xa006,Pour quitter, tapez '.wire off'.
-0xa007,a rejoint le wire
-0xa008,a quitté le wire.
-0xa009,WIRE module est en train d'être déchargé.
Index: eggdrop1.8/src/mod/wire.mod/language/wire.german.lang
diff -u eggdrop1.8/src/mod/wire.mod/language/wire.german.lang:1.1.1.1 eggdrop1.8/src/mod/wire.mod/language/wire.german.lang:removed
--- eggdrop1.8/src/mod/wire.mod/language/wire.german.lang:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/mod/wire.mod/language/wire.german.lang	Sun Oct 24 06:39:47 2010
@@ -1,17 +0,0 @@
-# wire.german.lang
-#   language messages for wire module
-#
-# german translation by rtc
-#
-# $Id: wire.german.lang,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
-
-0xa000,Du bist nicht auf einem heissen Draht.
-0xa001,Gerade auf dem heissen Draht
-0xa002,Du bist ab sofort nicht mehr auf den heissen Draht.
-0xa003,Codierungsschluessel des heissen Drahtes wird geaendert auf
-0xa004,Text, der mit ; beginnt geht ab sofort ueber den heissen Draht.
-0xa005,Gib '.wire' ein um zu sehen, wer bei Dir auf dem heissen Draht ist.
-0xa006,Gib '.wire off' ein, wenn Du aufhoeren willst.
-0xa007,hat den heissen Draht betreten
-0xa008,hat den heissen Draht verlassen.
-0xa009,WIRE-modul wird entfernt.
Index: eggdrop1.8/src/mod/wire.mod/modinfo
diff -u eggdrop1.8/src/mod/wire.mod/modinfo:1.1.1.1 eggdrop1.8/src/mod/wire.mod/modinfo:removed
--- eggdrop1.8/src/mod/wire.mod/modinfo:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/mod/wire.mod/modinfo	Sun Oct 24 06:39:47 2010
@@ -1,5 +0,0 @@
-# $Id: modinfo,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
-DESC:This module provides all the standard .wire partyline commands. It's an
-DESC:encrypted partyline communication tool, compatible with `wire.tcl'.
-DESC:
-DESC:Most users won't need this module. If unsure ENABLE it.
Index: eggdrop1.8/src/mod/wire.mod/wire.c
diff -u eggdrop1.8/src/mod/wire.mod/wire.c:1.2 eggdrop1.8/src/mod/wire.mod/wire.c:removed
--- eggdrop1.8/src/mod/wire.mod/wire.c:1.2	Tue Jul 27 15:49:42 2010
+++ eggdrop1.8/src/mod/wire.mod/wire.c	Sun Oct 24 06:39:47 2010
@@ -1,622 +0,0 @@
-/*
- * wire.c -- part of wire.mod
- *   An encrypted partyline communication.
- *   Compatible with wire.tcl.
- *   This module does not support wire usage in the files area.
- *
- * by ButchBub - Scott G. Taylor (staylor at mrynet.com)
- *
- * Version   Date            Req'd Eggver    Notes                    Who
- * .......   ..........      ............    ....................     ......
- * 1.0       1997-07-17      1.2.0           Initial.                 BB
- * 1.1       1997-07-28      1.2.0           Release version.         BB
- * 1.2       1997-08-19      1.2.1           Update and bugfixes.     BB
- * 1.3       1997-09-24      1.2.2.0         Reprogrammed for 1.2.2   BB
- * 1.4       1997-11-25      1.2.2.0         Added language addition  Kirk
- * 1.5       1998-07-12      1.3.0.0         Fixed ;me and updated    BB
- *
- * $Id: wire.c,v 1.2 2010/07/27 21:49:42 pseudo Exp $
- */
-/*
- * Copyright (C) 1999 - 2010 Eggheads Development Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-#define MODULE_NAME "wire"
-#define MAKING_WIRE
-
-#include "src/mod/module.h"
-
-#ifdef TIME_WITH_SYS_TIME
-#  include <sys/time.h>
-#  include <time.h>
-#else
-#  ifdef HAVE_SYS_TIME_H
-#    include <sys/time.h>
-#  else
-#    include <time.h>
-#  endif
-#endif
-
-#include "src/users.h"
-#include "src/chan.h"
-#include "wire.h"
-
-#undef global
-static Function *global = NULL, *encryption_funcs = NULL;
-
-typedef struct wire_t {
-  int sock;
-  char *crypt;
-  char *key;
-  struct wire_t *next;
-} wire_list;
-
-static wire_list *wirelist;
-
-static cmd_t wire_bot[] = {
-  {0, 0, 0, 0},                 /* Saves having to malloc :P */
-  {0, 0, 0, 0}                  /* add_builtin expects a terminating elem */
-};
-
-static void wire_leave();
-static void wire_join();
-static void wire_display();
-
-static int wire_expmem()
-{
-  wire_list *w = wirelist;
-  int size = 0;
-
-  while (w) {
-    size += sizeof(wire_list);
-    size += strlen(w->crypt) + 1;
-    size += strlen(w->key) + 1;
-    w = w->next;
-  }
-  return size;
-}
-
-static void nsplit(char *to, char *from)
-{
-  char *x, *y = from;
-
-  x = newsplit(&y);
-  strcpy(to, x);
-  strcpy(from, y);
-}
-
-static void wire_filter(char *from, char *cmd, char *param)
-{
-  char wirecrypt[512];
-  char wirewho[512];
-  char wiretmp2[512];
-  char wiretmp[512];
-  char wirereq[512];
-  wire_list *w = wirelist;
-  char reqsock;
-  time_t now2 = now;
-  char idle[20];
-  char *enctmp;
-
-  strcpy(wirecrypt, &cmd[5]);
-  strcpy(wiretmp, param);
-  nsplit(wirereq, param);
-
-/*
- * !wire<crypt"wire"> !wirereq <destbotsock> <crypt"destbotnick">
- * -----  wirecrypt    wirereq    wirewho         param
- */
-
-  if (!strcmp(wirereq, "!wirereq")) {
-    nsplit(wirewho, param);
-    while (w) {
-      if (!strcmp(w->crypt, wirecrypt)) {
-        int idx = findanyidx(w->sock);
-
-        reqsock = atoi(wirewho);
-        if (now2 - dcc[idx].timeval > 300) {
-          unsigned long Days, hrs, mins;
-
-          Days = (now2 - dcc[idx].timeval) / 86400;
-          hrs = ((now2 - dcc[idx].timeval) - (Days * 86400)) / 3600;
-          mins = ((now2 - dcc[idx].timeval) - (hrs * 3600)) / 60;
-          if (Days > 0)
-            sprintf(idle, " [%s %lud%luh]", WIRE_IDLE, Days, hrs);
-          else if (hrs > 0)
-            sprintf(idle, " [%s %luh%lum]", WIRE_IDLE, hrs, mins);
-          else
-            sprintf(idle, " [%s %lum]", WIRE_IDLE, mins);
-        } else
-          idle[0] = 0;
-        sprintf(wirereq, "----- %c%-9s %-9s  %s%s",
-                geticon(idx), dcc[idx].nick, botnetnick, dcc[idx].host, idle);
-        enctmp = encrypt_string(w->key, wirereq);
-        strcpy(wiretmp, enctmp);
-        nfree(enctmp);
-        sprintf(wirereq, "zapf %s %s !wire%s !wireresp %s %s %s",
-                botnetnick, from, wirecrypt, wirewho, param, wiretmp);
-        dprintf(nextbot(from), "%s\n", wirereq);
-        if (dcc[idx].u.chat->away) {
-          sprintf(wirereq, "-----    %s: %s\n", WIRE_AWAY,
-                  dcc[idx].u.chat->away);
-          enctmp = encrypt_string(w->key, wirereq);
-          strcpy(wiretmp, enctmp);
-          nfree(enctmp);
-          sprintf(wirereq, "zapf %s %s !wire%s !wireresp %s %s %s",
-                  botnetnick, from, wirecrypt, wirewho, param, wiretmp);
-          dprintf(nextbot(from), "%s\n", wirereq);
-        }
-      }
-      w = w->next;
-    }
-    return;
-  }
-  if (!strcmp(wirereq, "!wireresp")) {
-    nsplit(wirewho, param);
-    reqsock = atoi(wirewho);
-    w = wirelist;
-    nsplit(wiretmp2, param);
-    while (w) {
-      if (w->sock == reqsock) {
-        int idx = findanyidx(reqsock);
-
-        enctmp = decrypt_string(w->key, wiretmp2);
-        strcpy(wirewho, enctmp);
-        nfree(enctmp);
-        if (!strcmp(dcc[idx].nick, wirewho)) {
-          enctmp = decrypt_string(w->key, param);
-          dprintf(idx, "%s\n", enctmp);
-          nfree(enctmp);
-          return;
-        }
-      }
-      w = w->next;
-    }
-    return;
-  }
-  while (w) {
-    if (!strcmp(wirecrypt, w->crypt))
-      wire_display(findanyidx(w->sock), w->key, wirereq, param);
-    w = w->next;
-  }
-}
-
-static void wire_display(int idx, char *key, char *from, char *message)
-{
-  char *enctmp;
-
-  enctmp = decrypt_string(key, message);
-  if (from[0] == '!')
-    dprintf(idx, "----- > %s %s\n", &from[1], enctmp + 1);
-  else
-    dprintf(idx, "----- <%s> %s\n", from, enctmp);
-  nfree(enctmp);
-}
-
-static int cmd_wirelist(struct userrec *u, int idx, char *par)
-{
-  wire_list *w = wirelist;
-  int entry = 0;
-
-  dprintf(idx, "Current Wire table:  (Base table address = %p)\n", w);
-  while (w) {
-    dprintf(idx, "entry %d: w=%p  idx=%d  sock=%d  next=%p\n",
-            ++entry, w, findanyidx(w->sock), w->sock, w->next);
-    w = w->next;
-  }
-  return 0;
-}
-
-static int cmd_onwire(struct userrec *u, int idx, char *par)
-{
-  wire_list *w, *w2;
-  char wiretmp[512], wirecmd[512], idxtmp[512];
-  char idle[20], *enctmp;
-  time_t now2 = now;
-
-  w = wirelist;
-  while (w) {
-    if (w->sock == dcc[idx].sock)
-      break;
-    w = w->next;
-  }
-  if (!w) {
-    dprintf(idx, "%s\n", WIRE_NOTONWIRE);
-    return 0;
-  }
-  dprintf(idx, "----- %s '%s':\n", WIRE_CURRENTLYON, w->key);
-  dprintf(idx, "----- Nick       Bot        Host\n");
-  dprintf(idx, "----- ---------- ---------- ------------------------------\n");
-  enctmp = encrypt_string(w->key, "wire");
-  sprintf(wirecmd, "!wire%s", enctmp);
-  nfree(enctmp);
-  enctmp = encrypt_string(w->key, dcc[idx].nick);
-  strcpy(wiretmp, enctmp);
-  nfree(enctmp);
-  simple_sprintf(idxtmp, "!wirereq %d %s", dcc[idx].sock, wiretmp);
-  botnet_send_zapf_broad(-1, botnetnick, wirecmd, idxtmp);
-  w2 = wirelist;
-  while (w2) {
-    if (!strcmp(w2->key, w->key)) {
-      int idx2 = findanyidx(w2->sock);
-
-      if (now2 - dcc[idx2].timeval > 300) {
-        unsigned long Days, hrs, mins;
-
-        Days = (now2 - dcc[idx2].timeval) / 86400;
-        hrs = ((now2 - dcc[idx2].timeval) - (Days * 86400)) / 3600;
-        mins = ((now2 - dcc[idx2].timeval) - (hrs * 3600)) / 60;
-        if (Days > 0)
-          sprintf(idle, " [%s %lud%luh]", WIRE_IDLE, Days, hrs);
-        else if (hrs > 0)
-          sprintf(idle, " [%s %luh%lum]", WIRE_IDLE, hrs, mins);
-        else
-          sprintf(idle, " [%s %lum]", WIRE_IDLE, mins);
-      } else
-        idle[0] = 0;
-      dprintf(idx, "----- %c%-9s %-9s  %s%s\n",
-              geticon(idx2), dcc[idx2].nick, botnetnick, dcc[idx2].host, idle);
-      if (dcc[idx2].u.chat->away)
-        dprintf(idx, "-----    %s: %s\n", WIRE_AWAY, dcc[idx2].u.chat->away);
-    }
-    w2 = w2->next;
-  }
-  return 0;
-}
-
-static int cmd_wire(struct userrec *u, int idx, char *par)
-{
-  wire_list *w = wirelist;
-
-  if (!par[0]) {
-    dprintf(idx, "%s: .wire [<encrypt-key>|OFF|info]\n", MISC_USAGE);
-    return 0;
-  }
-  while (w) {
-    if (w->sock == dcc[idx].sock)
-      break;
-    w = w->next;
-  }
-  if (!egg_strcasecmp(par, "off")) {
-    if (w) {
-      wire_leave(w->sock);
-      dprintf(idx, "%s\n", WIRE_NOLONGERWIRED);
-      return 0;
-    }
-    dprintf(idx, "%s\n", WIRE_NOTONWIRE);
-    return 0;
-  }
-  if (!egg_strcasecmp(par, "info")) {
-    if (w)
-      dprintf(idx, "%s '%s'.\n", WIRE_CURRENTLYON, w->key);
-    else
-      dprintf(idx, "%s\n", WIRE_NOTONWIRE);
-    return 0;
-  }
-  if (w) {
-    dprintf(idx, "%s %s...\n", WIRE_CHANGINGKEY, par);
-    wire_leave(w->sock);
-  } else {
-    dprintf(idx, "----- %s\n", WIRE_INFO1);
-    dprintf(idx, "----- %s\n", WIRE_INFO2);
-    dprintf(idx, "----- %s\n", WIRE_INFO3);
-  }
-  wire_join(idx, par);
-  cmd_onwire((struct userrec *) 0, idx, "");
-  return 0;
-}
-
-static char *chof_wire(char *from, int idx)
-{
-  wire_leave(dcc[idx].sock);
-  return NULL;
-}
-
-static void wire_join(int idx, char *key)
-{
-  char wirecmd[512];
-  char wiremsg[512];
-  char wiretmp[512];
-  char *enctmp;
-  wire_list *w = wirelist, *w2;
-
-  while (w) {
-    if (w->next == 0)
-      break;
-    w = w->next;
-  }
-  if (!wirelist) {
-    wirelist = nmalloc(sizeof *wirelist);
-    w = wirelist;
-  } else {
-    w->next = nmalloc(sizeof *w->next);
-    w = w->next;
-  }
-  w->sock = dcc[idx].sock;
-  w->key = nmalloc(strlen(key) + 1);
-  strcpy(w->key, key);
-  w->next = 0;
-  enctmp = encrypt_string(w->key, "wire");
-  strcpy(wiretmp, enctmp);
-  nfree(enctmp);
-  w->crypt = nmalloc(strlen(wiretmp) + 1);
-  strcpy(w->crypt, wiretmp);
-  sprintf(wirecmd, "!wire%s", wiretmp);
-  sprintf(wiremsg, "%s joined wire '%s'", dcc[idx].nick, key);
-  enctmp = encrypt_string(w->key, wiremsg);
-  strcpy(wiretmp, enctmp);
-  nfree(enctmp);
-  {
-    char x[1024];
-
-    simple_sprintf(x, "%s %s", botnetnick, wiretmp);
-    botnet_send_zapf_broad(-1, botnetnick, wirecmd, x);
-  }
-  w2 = wirelist;
-  while (w2) {
-    if (!strcmp(w2->key, w->key))
-      dprintf(findanyidx(w2->sock), "----- %s %s '%s'.\n",
-              dcc[findanyidx(w->sock)].nick, WIRE_JOINED, w2->key);
-    w2 = w2->next;
-  }
-  w2 = wirelist;
-  while (w2) {                  /* Is someone using this key here already? */
-    if (w2 != w)
-      if (!strcmp(w2->key, w->key))
-        break;
-    w2 = w2->next;
-  }
-  if (!w2) {                    /* Someone else is NOT using this key, so
-                                 * we add a bind */
-    wire_bot[0].name = wirecmd;
-    wire_bot[0].flags = "";
-    wire_bot[0].func = (IntFunc) wire_filter;
-    add_builtins(H_bot, wire_bot);
-  }
-}
-
-static void wire_leave(int sock)
-{
-  char wirecmd[513];
-  char wiremsg[513];
-  char wiretmp[513];
-  char *enctmp;
-  wire_list *w = wirelist;
-  wire_list *w2 = wirelist;
-  wire_list *wlast = wirelist;
-
-  while (w) {
-    if (w->sock == sock)
-      break;
-    w = w->next;
-  }
-  if (!w)
-    return;
-  enctmp = encrypt_string(w->key, "wire");
-  strcpy(wirecmd, enctmp);
-  nfree(enctmp);
-  sprintf(wiretmp, "%s left the wire.", dcc[findanyidx(w->sock)].nick);
-  enctmp = encrypt_string(w->key, wiretmp);
-  strcpy(wiremsg, enctmp);
-  nfree(enctmp);
-  {
-    char x[1024];
-
-    simple_sprintf(x, "!wire%s %s", wirecmd, botnetnick);
-    botnet_send_zapf_broad(-1, botnetnick, x, wiremsg);
-  }
-  w2 = wirelist;
-  while (w2) {
-    if (w2->sock != sock && !strcmp(w2->key, w->key)) {
-      dprintf(findanyidx(w2->sock), "----- %s %s\n",
-              dcc[findanyidx(w->sock)].nick, WIRE_LEFT);
-    }
-    w2 = w2->next;
-  }
-  /* Check to see if someone else is using this wire key.
-   * If so, then don't remove the wire filter binding.
-   */
-  w2 = wirelist;
-  while (w2) {
-    if (w2 != w && !strcmp(w2->key, w->key))
-      break;
-    w2 = w2->next;
-  }
-  if (!w2) {                    /* Someone else is NOT using this key */
-    wire_bot[0].name = wirecmd;
-    wire_bot[0].flags = "";
-    wire_bot[0].func = (IntFunc) wire_filter;
-    rem_builtins(H_bot, wire_bot);
-  }
-  w2 = wirelist;
-  wlast = 0;
-  while (w2) {
-    if (w2 == w)
-      break;
-    wlast = w2;
-    w2 = w2->next;
-  }
-  if (wlast) {
-    if (w->next)
-      wlast->next = w->next;
-    else
-      wlast->next = 0;
-  } else if (!w->next)
-    wirelist = 0;
-  else
-    wirelist = w->next;
-  nfree(w->crypt);
-  nfree(w->key);
-  nfree(w);
-}
-
-static char *cmd_putwire(int idx, char *message)
-{
-  wire_list *w = wirelist;
-  wire_list *w2 = wirelist;
-  int wiretype;
-  char wirecmd[512];
-  char wiremsg[512];
-  char wiretmp[512];
-  char wiretmp2[512];
-  char *enctmp;
-
-  while (w) {
-    if (w->sock == dcc[idx].sock)
-      break;
-    w = w->next;
-  }
-  if (!w)
-    return "";
-  if (!message[1])
-    return "";
-  if ((strlen(message) > 3) && !strncmp(&message[1], "me", 2) &&
-      (message[3] == ' ')) {
-    sprintf(wiretmp2, "!%s@%s", dcc[idx].nick, botnetnick);
-    enctmp = encrypt_string(w->key, &message[3]);
-    wiretype = 1;
-  } else {
-    sprintf(wiretmp2, "%s@%s", dcc[idx].nick, botnetnick);
-    enctmp = encrypt_string(w->key, &message[1]);
-    wiretype = 0;
-  }
-  strcpy(wiremsg, enctmp);
-  nfree(enctmp);
-  enctmp = encrypt_string(w->key, "wire");
-  strcpy(wiretmp, enctmp);
-  nfree(enctmp);
-  sprintf(wirecmd, "!wire%s", wiretmp);
-  sprintf(wiretmp, "%s %s", wiretmp2, wiremsg);
-  botnet_send_zapf_broad(-1, botnetnick, wirecmd, wiretmp);
-  sprintf(wiretmp, "%s%s", wiretype ? "!" : "", dcc[findanyidx(w->sock)].nick);
-  while (w2) {
-    if (!strcmp(w2->key, w->key))
-      wire_display(findanyidx(w2->sock), w2->key, wiretmp, wiremsg);
-    w2 = w2->next;
-  }
-  return "";
-}
-
-/* a report on the module status */
-static void wire_report(int idx, int details)
-{
-  if (details) {
-    int count = 0, size = wire_expmem();
-    wire_list *w = wirelist;
-
-    while (w) {
-      count++;
-      w = w->next;
-    }
-
-    dprintf(idx, "    %d wire%s\n", count, (count != 1) ? "s" : "");
-    dprintf(idx, "    Using %d byte%s of memory\n", size,
-            (size != 1) ? "s" : "");
-  }
-}
-
-static cmd_t wire_dcc[] = {
-  {"wire",     "",   (IntFunc) cmd_wire,     NULL},
-  {"onwire",   "",   (IntFunc) cmd_onwire,   NULL},
-  {"wirelist", "n",  (IntFunc) cmd_wirelist, NULL},
-  {NULL,       NULL, NULL,                    NULL}
-};
-
-static cmd_t wire_chof[] = {
-  {"*", "",    (IntFunc) chof_wire, "wire:chof"},
-  {NULL, NULL, NULL,                        NULL}
-};
-
-static cmd_t wire_filt[] = {
-  {";*", "",   (IntFunc) cmd_putwire, "wire:filt"},
-  {NULL, NULL, NULL,                          NULL}
-};
-
-static char *wire_close()
-{
-  wire_list *w = wirelist;
-  char wiretmp[512];
-  char *enctmp;
-  p_tcl_bind_list H_temp;
-
-  /* Remove any current wire encrypt bindings for now, don't worry
-   * about duplicate unbinds.
-   */
-  while (w) {
-    enctmp = encrypt_string(w->key, "wire");
-    sprintf(wiretmp, "!wire%s", enctmp);
-    nfree(enctmp);
-    wire_bot[0].name = wiretmp;
-    wire_bot[0].flags = "";
-    wire_bot[0].func = (IntFunc) wire_filter;
-    rem_builtins(H_bot, wire_bot);
-    w = w->next;
-  }
-  w = wirelist;
-  while (w && w->sock) {
-    dprintf(findanyidx(w->sock), "----- %s\n", WIRE_UNLOAD);
-    dprintf(findanyidx(w->sock), "----- %s\n", WIRE_NOLONGERWIRED);
-    wire_leave(w->sock);
-    w = wirelist;
-  }
-  rem_help_reference("wire.help");
-  rem_builtins(H_dcc, wire_dcc);
-  H_temp = find_bind_table("filt");
-  rem_builtins(H_temp, wire_filt);
-  H_temp = find_bind_table("chof");
-  rem_builtins(H_temp, wire_chof);
-  del_lang_section("wire");
-  module_undepend(MODULE_NAME);
-  return NULL;
-}
-
-EXPORT_SCOPE char *wire_start();
-
-static Function wire_table[] = {
-  (Function) wire_start,
-  (Function) wire_close,
-  (Function) wire_expmem,
-  (Function) wire_report,
-};
-
-char *wire_start(Function *global_funcs)
-{
-  p_tcl_bind_list H_temp;
-
-  global = global_funcs;
-
-  module_register(MODULE_NAME, wire_table, 2, 1);
-  if (!module_depend(MODULE_NAME, "eggdrop", 108, 0)) {
-    module_undepend(MODULE_NAME);
-    return "This module requires Eggdrop 1.8.0 or later.";
-  }
-
-  if (!(encryption_funcs = module_depend(MODULE_NAME, "encryption", 2, 1))) {
-    module_undepend(MODULE_NAME);
-    return "This module requires an encryption module.";
-  }
-
-  add_help_reference("wire.help");
-  add_builtins(H_dcc, wire_dcc);
-  H_temp = find_bind_table("filt");
-  add_builtins(H_filt, wire_filt);
-  H_temp = find_bind_table("chof");
-  add_builtins(H_chof, wire_chof);
-  wirelist = NULL;
-  add_lang_section("wire");
-  return NULL;
-}
Index: eggdrop1.8/src/mod/wire.mod/wire.h
diff -u eggdrop1.8/src/mod/wire.mod/wire.h:1.1.1.1 eggdrop1.8/src/mod/wire.mod/wire.h:removed
--- eggdrop1.8/src/mod/wire.mod/wire.h:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/mod/wire.mod/wire.h	Sun Oct 24 06:39:47 2010
@@ -1,40 +0,0 @@
-/*
- * wire.h -- part of wire.mod
- *
- * $Id: wire.h,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
- */
-/*
- * Copyright (C) 1999 - 2010 Eggheads Development Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-#ifndef _EGG_MOD_WIRE_WIRE_H
-#define _EGG_MOD_WIRE_WIRE_H
-
-#define WIRE_IDLE               MISC_IDLE
-#define WIRE_AWAY               MISC_AWAY
-#define WIRE_NOTONWIRE          get_language(0xa000)
-#define WIRE_CURRENTLYON        get_language(0xa001)
-#define WIRE_NOLONGERWIRED      get_language(0xa002)
-#define WIRE_CHANGINGKEY        get_language(0xa003)
-#define WIRE_INFO1              get_language(0xa004)
-#define WIRE_INFO2              get_language(0xa005)
-#define WIRE_INFO3              get_language(0xa006)
-#define WIRE_JOINED             get_language(0xa007)
-#define WIRE_LEFT               get_language(0xa008)
-#define WIRE_UNLOAD             get_language(0xa009)
-
-#endif /* _EGG_MOD_WIRE_WIRE_H */
Index: eggdrop1.8/src/patch.h
diff -u eggdrop1.8/src/patch.h:1.14 eggdrop1.8/src/patch.h:1.15
--- eggdrop1.8/src/patch.h:1.14	Sat Oct 23 05:16:12 2010
+++ eggdrop1.8/src/patch.h	Sun Oct 24 06:39:36 2010
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.14 2010/10/23 11:16:12 pseudo Exp $
+ * $Id: patch.h,v 1.15 2010/10/24 12:39:36 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1287832418");            /* current unixtime */
+patch("1287923885");            /* current unixtime */
 /*
  *
  *
  */
-patch("binddie");
+patch("wireless");
 /*
  *
  *
----------------------- End of diff -----------------------


More information about the Changes mailing list