[cvslog] (2003-05-11 02:40:38 UTC) Module eggdrop1.7: Change committed

cvslog cvs at tsss.org
Sat May 10 20:40:38 CST 2003


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2003-05-11 02:40:38 UTC
Commited by: stdarg <stdarg at techmonkeys.org>

Removed files:
     src/egg.h src/userent.c src/userent.h src/userrec.c src/userrec.h
     src/users.c src/users.h

Log message:

* Remove some stray files

---------------------- diff included ----------------------
Index: eggdrop1.7/src/egg.h
diff -u eggdrop1.7/src/egg.h:1.17 eggdrop1.7/src/egg.h:removed
--- eggdrop1.7/src/egg.h:1.17	Tue Mar  4 16:02:27 2003
+++ eggdrop1.7/src/egg.h	Sat May 10 21:40:38 2003
@@ -1,423 +0,0 @@
-/*
- * egg.h --
- *
- *	Eggdrop compile-time settings
- *
- *	IF YOU ALTER THIS FILE, YOU NEED TO RECOMPILE THE BOT.
- */
-/*
- * Copyright (C) 1997 Robey Pointer
- * Copyright (C) 1999, 2000, 2001, 2002, 2003 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.
- */
-/*
- * $Id: egg.h,v 1.17 2003/03/04 22:02:27 wcc Exp $
- */
-
-#ifndef _EGG_EGG_H
-#define _EGG_EGG_H
-
-/*
- * HANDLEN note:
- *	 HANDLEN defines the maximum length a handle on the bot can be.
- *	 Standard (and minimum) is 9 characters long.
- *
- *	 Beware that using lengths over 9 chars is 'non-standard' and if
- *	 you wish to link to other bots, they _must_ both have the same
- *	 maximum handle length.
- *
- * NICKMAX note:
- *	 You should leave this at 32 characters and modify nick-len in the
- *	 configuration file instead.
- */
-
-#define HANDLEN   9             /* valid values 9->NICKMAX             */
-#define NICKMAX   32            /* valid values HANDLEN->32            */
-
-
-/* Handy string lengths */
-#define ADDRMAX   45
-#define UHOSTMAX  291 + NICKMAX /* 32 (ident) + 3 (\0, !, @) + NICKMAX */
-#define DIRMAX    512
-
-
-
-/*
- *     The 'configure' script should make this next part automatic,
- *     so you shouldn't need to adjust anything below.
- */
-
-#define NICKLEN         NICKMAX + 1
-#define UHOSTLEN        UHOSTMAX + 1
-#define DIRLEN          DIRMAX + 1
-#define NOTENAMELEN     ((HANDLEN * 2) + 1)
-#define BADNICKCHARS	"-,+*=:!.@#;$%&"
-#define BADHANDCHARS	"-,+*=:!.@#;$%&"
-
-/* Gettext stuff */
-#ifdef ENABLE_NLS
-#  include <libintl.h>
-#  define _(x) gettext(x)
-#  define N_(x) gettext_noop(x)
-#  define P_(x1, x2, n) ngettext(x1, x2, n)
-#else
-#  define _(x) (x)
-#  define N_(x) (x)
-#  define P_(x1, x2, n) ( ((n)!=1) ? (x2) : (x1) )
-#endif
-
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-
-#define ADDRLEN (ADDRMAX + 1)
-
-#if (NICKMAX < 9) || (NICKMAX > 32)
-#  include "invalid NICKMAX value"
-#endif
-
-#if (HANDLEN < 9) || (HANDLEN > 32)
-#  include "invalid HANDLEN value"
-#endif
-
-#if HANDLEN > NICKMAX
-#  include "HANDLEN MUST BE <= NICKMAX"
-#endif
-
-/* NAME_MAX is what POSIX defines, but BSD calls it MAXNAMLEN.
- * Use 255 if we can't find anything else.
- */
-#ifndef NAME_MAX
-#  ifdef MAXNAMLEN
-#    define NAME_MAX	MAXNAMLEN
-#  else
-#    define NAME_MAX	255
-#  endif
-#endif
-
-/* Almost every module needs some sort of time thingy, so... */
-#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
-
-#ifndef HAVE_SRANDOM
-#  define srandom(x) srand(x)
-#endif
-
-#ifndef HAVE_RANDOM
-#  define random() (rand()/16)
-#endif
-
-#ifndef HAVE_SIGACTION		/* old "weird signals" */
-#  define sigaction sigvec
-#  ifndef sa_handler
-#    define sa_handler sv_handler
-#    define sa_mask sv_mask
-#    define sa_flags sv_flags
-#  endif
-#endif
-
-#ifndef HAVE_SIGEMPTYSET
-/* and they probably won't have sigemptyset, dammit */
-#  define sigemptyset(x) ((*(int *)(x))=0)
-#endif
-
-
-/* 32 bit type
- */
-#ifdef UNSIGNED_LONG32
-typedef unsigned long  u_32int_t;
-#else
-# ifdef UNSIGNED_INT32
-typedef unsigned int   u_32int_t;
-# else
-typedef unsigned long  u_32int_t;
-# endif
-#endif
-
-typedef unsigned short int	u_16bit_t;
-typedef unsigned char		u_8bit_t;
-
-/* IP type */
-typedef u_32int_t		IP;
-
-
-/* Public structure for the listening port map */
-struct portmap {
-  int realport;
-  int mappedto;
-  struct portmap *next;
-};
-
-/* Public structure of all the dcc connections */
-struct dcc_table {
-  char *name;
-  int flags;
-  void (*eof) (int);
-  void (*activity) (int, char *, int);
-  int *timeout_val;
-  void (*timeout) ();
-  void (*display) (int, char *);
-  void (*kill) (int, void *);
-  void (*output) (int, char *, void *);
-  void (*outdone) (int);
-};
-
-struct userrec;
-
-struct dcc_t {
-  long sock;			/* This should be a long to keep 64-bit
-				   machines sane			 */
-  char addr[ADDRLEN];		/* IPv4/v6 address as string :)		 */
-  unsigned int port;
-  struct userrec *user;
-  char nick[NICKLEN];
-  char host[UHOSTLEN];
-  struct dcc_table *type;
-  time_t timeval;		/* Use for any timing stuff
-				   - this is used for timeout checking	*/
-  unsigned long status;		/* A LOT of dcc types have status
-				   thingos, this makes it more avaliabe	*/
-  union {
-    struct chat_info *chat;
-    struct file_info *file;
-    struct edit_info *edit;
-    struct xfer_info *xfer;
-    struct bot_info *bot;
-    struct relay_info *relay;
-    struct script_info *script;
-    struct dns_info *dns;
-    struct dupwait_info *dupwait;
-    int ident_sock;
-    void *other;
-  } u;				/* Special use depending on type	*/
-};
-
-struct chat_info {
-  char *away;			/* non-NULL if user is away		*/
-  int msgs_per_sec;		/* used to stop flooding		*/
-  int con_flags;		/* with console: what to show		*/
-  char con_chan[81];		/* with console: what channel to view	*/
-  int channel;			/* 0=party line, -1=off			*/
-  struct msgq *buffer;		/* a buffer of outgoing lines
-				   (for .page cmd)			*/
-  int max_line;			/* maximum lines at once		*/
-  int line_count;		/* number of lines sent since last page	*/
-  int current_lines;		/* number of lines total stored		*/
-  char *su_nick;
-};
-
-struct file_info {
-  struct chat_info *chat;
-  char dir[161];
-};
-
-struct xfer_info {
-  char *filename;
-  char *origname;
-  char dir[DIRLEN];		/* used when uploads go to the current dir */
-  unsigned long length;
-  unsigned long acked;
-  char buf[4];			/* you only need 5 bytes!		   */
-  unsigned char sofar;		/* how much of the byte count received	   */
-  char from[NICKLEN];		/* [GET] user who offered the file	   */
-  FILE *f;			/* pointer to file being sent/received	   */
-  unsigned int type;		/* xfer connection type, see enum below	   */
-  unsigned short ack_type;	/* type of ack				   */
-  unsigned long offset;		/* offset from beginning of file, during
-				   resend.				   */
-  unsigned long block_pending;	/* bytes of this DCC block which weren't
-				   sent yet.				   */
-  time_t start_time;		/* Time when a xfer was started.	   */
-};
-
-struct bot_info {
-  char version[121];		/* channel/version info			*/
-  char linker[NOTENAMELEN + 1];	/* who requested this link		*/
-  int  numver;
-  int  port;			/* base port				*/
-};
-
-struct relay_info {
-  struct chat_info *chat;
-  int sock;
-  int port;
-  int old_status;
-};
-
-struct script_callback_b;
-
-struct script_info {
-  struct dcc_table *type;
-  union {
-    struct chat_info *chat;
-    struct file_info *file;
-    void *other;
-  } u;
-  struct script_callback_b *callback;
-};
-
-struct dns_info {
-  void (*dns_success)(int);	/* is called if the dns request succeeds   */
-  void (*dns_failure)(int);	/* is called if it fails		   */
-  char *host;			/* hostname or IP addr (as string)	   */
-  char *cbuf;			/* temporary buffer. Memory will be free'd
-				   as soon as dns_info is free'd	   */
-  char *cptr;			/* temporary pointer			   */
-  int ibuf;			/* temporary buffer for one integer	   */
-  char dns_type;		/* lookup type, e.g. RES_HOSTBYIP	   */
-  struct dcc_table *type;	/* type of the dcc table we are making the
-				   lookup for				   */
-};
-
-struct dupwait_info {
-  int atr;			/* the bots attributes			*/
-  struct chat_info *chat;	/* holds current chat data		*/
-};
-
-/* Flags about dcc types
- */
-#define DCT_CHAT      0x00000001	/* this dcc type receives botnet
-					   chatter			    */
-#define DCT_MASTER    0x00000002	/* received master chatter	    */
-#define DCT_SHOWWHO   0x00000004	/* show the user in .who	    */
-#define DCT_REMOTEWHO 0x00000008	/* show in remote who		    */
-#define DCT_VALIDIDX  0x00000010	/* valid idx for outputting to
-					   in tcl			    */
-#define DCT_SIMUL     0x00000020	/* can be tcl_simul'd		    */
-#define DCT_CANBOOT   0x00000040	/* can be booted		    */
-#define DCT_GETNOTES  DCT_CHAT		/* can receive notes		    */
-#define DCT_FILES     0x00000080	/* gratuitous hack ;)		    */
-#define DCT_FORKTYPE  0x00000100	/* a forking type		    */
-#define DCT_BOT       0x00000200	/* a bot connection of some sort... */
-#define DCT_FILETRAN  0x00000400	/* a file transfer of some sort	    */
-#define DCT_FILESEND  0x00000800	/* a sending file transfer,
-					   getting = !this		    */
-#define DCT_LISTEN    0x00001000	/* a listening port of some sort    */
-
-/* For dcc chat & files:
- */
-#define STAT_ECHO    0x00001	/* echo commands back?			*/
-#define STAT_DENY    0x00002	/* bad username (ignore password & deny
-				   access)				*/
-#define STAT_CHAT    0x00004	/* in file-system but may return	*/
-#define STAT_TELNET  0x00008	/* connected via telnet			*/
-#define STAT_PARTY   0x00010	/* only on party line via 'p' flag	*/
-#define STAT_BOTONLY 0x00020	/* telnet on bots-only connect		*/
-#define STAT_USRONLY 0x00040	/* telnet on users-only connect		*/
-#define STAT_PAGE    0x00080	/* page output to the user		*/
-
-/* Flags for listening sockets
- */
-#define LSTN_PUBLIC  0x000001	/* No access restrictions		*/
-
-/* For local console: */
-#define STDIN      0
-#define STDOUT     1
-#define STDERR     2
-
-/* Socket flags:
- */
-#define SOCK_UNUSED     0x0001	/* empty socket				*/
-#define SOCK_BINARY     0x0002	/* do not buffer input			*/
-#define SOCK_LISTEN     0x0004	/* listening port			*/
-#define SOCK_CONNECT    0x0008	/* connection attempt			*/
-#define SOCK_NONSOCK    0x0010	/* used for file i/o on debug		*/
-#define SOCK_STRONGCONN 0x0020	/* don't report success until sure	*/
-#define SOCK_EOFD       0x0040	/* it EOF'd recently during a write	*/
-#define SOCK_PROXYWAIT	0x0080	/* waiting for SOCKS traversal		*/
-#define SOCK_PASS	0x0100	/* passed on; only notify in case
-				   of traffic				*/
-#define SOCK_VIRTUAL	0x0200	/* not-connected socket (dont read it!)	*/
-#define SOCK_BUFFER	0x0400	/* buffer data; don't notify dcc funcs	*/
-
-/* Flags to sock_has_data
- */
-enum {
-  SOCK_DATA_OUTGOING,		/* Data in out-queue?			*/
-  SOCK_DATA_INCOMING		/* Data in in-queue?			*/
-};
-
-/* Fake idx's for dprintf - these should be ridiculously large +ve nums
- */
-#define DP_STDOUT       0x7FF1
-#define DP_LOG          0x7FF2
-#define DP_SERVER       0x7FF3
-#define DP_HELP         0x7FF4
-#define DP_STDERR       0x7FF5
-#define DP_MODE         0x7FF6
-#define DP_MODE_NEXT    0x7FF7
-#define DP_SERVER_NEXT  0x7FF8
-#define DP_HELP_NEXT    0x7FF9
-
-/* Return codes for add_note */
-#define NOTE_ERROR      0	/* error			*/
-#define NOTE_OK         1	/* success			*/
-#define NOTE_STORED     2	/* not online; stored		*/
-#define NOTE_FULL       3	/* too many notes stored	*/
-#define NOTE_TCL        4	/* tcl binding caught it	*/
-#define NOTE_AWAY       5	/* away; stored			*/
-#define NOTE_FWD        6	/* away; forwarded		*/
-#define NOTE_REJECT     7	/* ignore mask matched		*/
-
-#define STR_PROTECT     2
-#define STR_DIR         1
-
-/* This is used by the net module to keep track of sockets and what's
- * queued on them
- */
-typedef struct {
-  int		 sock;
-  short		 flags;
-  char		*inbuf;
-  char		*outbuf;
-  unsigned long  outbuflen;	/* Outbuf could be binary data	*/
-  unsigned long	 inbuflen;	/* Inbuf could be binary data	*/
-} sock_list;
-
-enum {
-  EGG_OPTION_SET	= 1,	/* Set option(s).		*/
-  EGG_OPTION_UNSET	= 2	/* Unset option(s).		*/
-};
-
-/* Telnet codes.  See "TELNET Protocol Specification" (RFC 854) and
- * "TELNET Echo Option" (RFC 875) for details.
- */
-
-#define TLN_AYT		246		/* Are You There	*/
-
-#define TLN_WILL	251		/* Will			*/
-#define TLN_WILL_C	"\373"
-#define TLN_WONT	252		/* Won't		*/
-#define TLN_WONT_C	"\374"
-#define TLN_DO		253		/* Do			*/
-#define TLN_DO_C	"\375"
-#define TLN_DONT	254		/* Don't		*/
-#define TLN_DONT_C	"\376"
-#define TLN_IAC		255		/* Interpret As Command	*/
-#define TLN_IAC_C	"\377"
-
-#define TLN_ECHO	1		/* Echo			*/
-#define TLN_ECHO_C	"\001"
-
-#endif				/* !_EGG_EGG_H */
Index: eggdrop1.7/src/userent.c
diff -u eggdrop1.7/src/userent.c:1.39 eggdrop1.7/src/userent.c:removed
--- eggdrop1.7/src/userent.c:1.39	Thu Mar  6 06:08:15 2003
+++ eggdrop1.7/src/userent.c	Sat May 10 21:40:38 2003
@@ -1,841 +0,0 @@
-/*
- * userent.c --
- *
- *	user-entry handling, new stylem more versatile.
- */
-
-#include "main.h"
-#include "users.h"
-#include "logfile.h"
-#include "modules.h"		/* encrypt_pass				*/
-#include "flags.h"		/* USER_*				*/
-#include "dccutil.h"		/* dprintf_eggdrop			*/
-#include "userrec.h"		/* addhost_by_handle			*/
-#include "userent.h"		/* prototypes				*/
-
-extern struct userrec	*userlist;
-extern struct dcc_t	*dcc;
-extern char		 whois_fields[];
-
-static struct user_entry_type *entry_type_list;
-
-
-void init_userent()
-{
-  entry_type_list = 0;
-  add_entry_type(&USERENTRY_COMMENT);
-  add_entry_type(&USERENTRY_XTRA);
-  add_entry_type(&USERENTRY_INFO);
-  add_entry_type(&USERENTRY_LASTON);
-  add_entry_type(&USERENTRY_BOTADDR);
-  add_entry_type(&USERENTRY_PASS);
-  add_entry_type(&USERENTRY_HOSTS);
-  add_entry_type(&USERENTRY_BOTFL);
-}
-
-void list_type_kill(struct list_type *t)
-{
-  struct list_type *u;
-
-  while (t) {
-    u = t->next;
-    if (t->extra)
-      free(t->extra);
-    free(t);
-    t = u;
-  }
-}
-
-int def_unpack(struct userrec *u, struct user_entry *e)
-{
-  char *tmp;
-
-  tmp = e->u.list->extra;
-  e->u.list->extra = NULL;
-  list_type_kill(e->u.list);
-  e->u.string = tmp;
-  return 1;
-}
-
-int def_pack(struct userrec *u, struct user_entry *e)
-{
-  char *tmp;
-
-  tmp = e->u.string;
-  e->u.list = malloc(sizeof(struct list_type));
-  e->u.list->next = NULL;
-  e->u.list->extra = tmp;
-  return 1;
-}
-
-int def_kill(struct user_entry *e)
-{
-  free(e->u.string);
-  free(e);
-  return 1;
-}
-
-int def_write_userfile(FILE * f, struct userrec *u, struct user_entry *e)
-{
-  if (fprintf(f, "--%s %s\n", e->type->name, e->u.string) == EOF)
-    return 0;
-  return 1;
-}
-
-void *def_get(struct userrec *u, struct user_entry *e)
-{
-  return e->u.string;
-}
-
-int def_set(struct userrec *u, struct user_entry *e, void *buf)
-{
-  char *string = (char *) buf;
-
-  if (string && !string[0])
-    string = NULL;
-  if (!string && !e->u.string)
-    return 1;
-  if (string) {
-    int l = strlen (string);
-    char *i;
-
-    if (l > 160)
-      l = 160;
-
-    e->u.string = realloc(e->u.string, l + 1);
-
-    strlcpy (e->u.string, string, sizeof e->u.string);
-
-    for (i = e->u.string; *i; i++)
-      /* Allow bold, inverse, underline, color text here...
-       * But never add cr or lf!! --rtc
-       */
-     if ((unsigned int) *i < 32 && !strchr ("\002\003\026\037", *i))
-        *i = '?';
-  } else { /* string == NULL && e->u.string != NULL */
-    free_null(e->u.string);
-  }
-  return 1;
-}
-
-int def_gotshare(struct userrec *u, struct user_entry *e,
-		 char *data, int idx)
-{
-  return 0;
-}
-
-void def_display(int idx, struct user_entry *e)
-{
-  dprintf(idx, "  %s: %s\n", e->type->name, e->u.string);
-}
-
-int def_dupuser(struct userrec *new, struct userrec *old,
-		struct user_entry *e)
-{
-  return set_user(e->type, new, e->u.string);
-}
-
-static void comment_display(int idx, struct user_entry *e)
-{
-  if (dcc[idx].user && (dcc[idx].user->flags & USER_MASTER))
-    dprintf(idx, "  COMMENT: %.70s\n", e->u.string);
-}
-
-struct user_entry_type USERENTRY_COMMENT =
-{
-  0,				/* always 0 ;) */
-  def_gotshare,
-  def_dupuser,
-  def_unpack,
-  def_pack,
-  def_write_userfile,
-  def_kill,
-  def_get,
-  def_set,
-  NULL,
-  NULL,
-  comment_display,
-  "COMMENT"
-};
-
-struct user_entry_type USERENTRY_INFO =
-{
-  0,				/* always 0 ;) */
-  def_gotshare,
-  def_dupuser,
-  def_unpack,
-  def_pack,
-  def_write_userfile,
-  def_kill,
-  def_get,
-  def_set,
-  NULL,
-  NULL,
-  def_display,
-  "INFO"
-};
-
-int pass_set(struct userrec *u, struct user_entry *e, void *buf)
-{
-  char new[32];
-  register char *pass = buf;
-
-  if (e->u.extra)
-    free(e->u.extra);
-  if (!pass || !pass[0] || (pass[0] == '-'))
-    e->u.extra = NULL;
-  else {
-    unsigned char *p = (unsigned char *) pass;
-
-    if (strlen(pass) > 15)
-      pass[15] = 0;
-    while (*p) {
-      if ((*p <= 32) || (*p == 127))
-	*p = '?';
-      p++;
-    }
-    if ((u->flags & USER_BOT) || (pass[0] == '+'))
-      strcpy(new, pass);
-    else
-      encrypt_pass(pass, new);
-    e->u.extra = strdup(new);
-  }
-  return 1;
-}
-
-struct user_entry_type USERENTRY_PASS =
-{
-  0,
-  def_gotshare,
-  0,
-  def_unpack,
-  def_pack,
-  def_write_userfile,
-  def_kill,
-  def_get,
-  pass_set,
-  NULL,
-  NULL,
-  0,
-  "PASS"
-};
-
-static int laston_unpack(struct userrec *u, struct user_entry *e)
-{
-  char *par, *arg;
-  struct laston_info *li;
-
-  par = e->u.list->extra;
-  arg = newsplit (&par);
-  if (!par[0])
-    par = "???";
-  li = malloc(sizeof(struct laston_info));
-  li->lastonplace = malloc(strlen(par) + 1);
-  li->laston = atoi(arg);
-  strcpy(li->lastonplace, par);
-  list_type_kill(e->u.list);
-  e->u.extra = li;
-  return 1;
-}
-
-static int laston_pack(struct userrec *u, struct user_entry *e)
-{
-  char work[1024];
-  struct laston_info *li;
-
-  li = (struct laston_info *) e->u.extra;
-  sprintf(work, "%lu %s", li->laston, li->lastonplace);
-  e->u.list = malloc(sizeof(struct list_type));
-  e->u.list->next = NULL;
-  e->u.list->extra = strdup(work);
-  free(li->lastonplace);
-  free(li);
-  return 1;
-}
-
-static int laston_write_userfile(FILE * f,
-				 struct userrec *u,
-				 struct user_entry *e)
-{
-  struct laston_info *li = (struct laston_info *) e->u.extra;
-
-  if (fprintf(f, "--LASTON %lu %s\n", li->laston,
-	      li->lastonplace ? li->lastonplace : "") == EOF)
-    return 0;
-  return 1;
-}
-
-static int laston_kill(struct user_entry *e)
-{
-  if (((struct laston_info *) (e->u.extra))->lastonplace)
-    free(((struct laston_info *) (e->u.extra))->lastonplace);
-  free(e->u.extra);
-  free(e);
-  return 1;
-}
-
-static int laston_set(struct userrec *u, struct user_entry *e, void *buf)
-{
-  struct laston_info *li = (struct laston_info *) e->u.extra;
-
-  if (li != buf) {
-    if (li) {
-      free(li->lastonplace);
-      free(li);
-    }
-
-    li = e->u.extra = buf;
-  }
-  return 1;
-}
-
-static int laston_dupuser(struct userrec *new, struct userrec *old,
-			  struct user_entry *e)
-{
-  struct laston_info *li = e->u.extra, *li2;
-
-  if (li) {
-    li2 = malloc(sizeof(struct laston_info));
-
-    li2->laston = li->laston;
-    li2->lastonplace = strdup(li->lastonplace);
-    return set_user(&USERENTRY_LASTON, new, li2);
-  }
-  return 0;
-}
-
-struct user_entry_type USERENTRY_LASTON =
-{
-  0,				/* always 0 ;) */
-  0,
-  laston_dupuser,
-  laston_unpack,
-  laston_pack,
-  laston_write_userfile,
-  laston_kill,
-  def_get,
-  laston_set,
-  NULL,
-  NULL,
-  0,
-  "LASTON"
-};
-
-static int botaddr_unpack(struct userrec *u, struct user_entry *e)
-{
-  char *p = NULL, *q;
-  struct bot_addr *bi;
-
-  bi = calloc(1, sizeof(struct bot_addr));
-  q = (e->u.list->extra);
-  p = strdup(q);
-  if (!(q = strchr_unescape(p, ':', '\\')))
-    bi->address = strdup(p);
-  else {
-    bi->address = strdup(p);
-    bi->telnet_port = atoi(q);
-    if ((q = strchr(q, '/')))
-      bi->relay_port = atoi(q + 1);
-  }
-  free(p);
-  if (!bi->telnet_port)
-    bi->telnet_port = 3333;
-  if (!bi->relay_port)
-    bi->relay_port = bi->telnet_port;
-  list_type_kill(e->u.list);
-  e->u.extra = bi;
-  return 1;
-}
-
-static int botaddr_pack(struct userrec *u, struct user_entry *e)
-{
-  char work[1024];
-  struct bot_addr *bi;
-  char *tmp;
-
-  bi = (struct bot_addr *) e->u.extra;
-  simple_sprintf(work, "%s:%u/%u",
-              (tmp = str_escape(bi->address, ':', '\\')),
-              bi->telnet_port, bi->relay_port);
-  free(tmp);
-  e->u.list = malloc(sizeof(struct list_type));
-  e->u.list->next = NULL;
-  e->u.list->extra = strdup(work);
-  free(bi->address);
-  free(bi);
-  return 1;
-}
-
-static int botaddr_kill(struct user_entry *e)
-{
-  free(((struct bot_addr *) (e->u.extra))->address);
-  free(e->u.extra);
-  free(e);
-  return 1;
-}
-
-static int botaddr_write_userfile(FILE *f, struct userrec *u,
-				  struct user_entry *e)
-{
-  register struct bot_addr *bi = (struct bot_addr *) e->u.extra;
-  register char *tmp;
-  register int res;
-
-  res = (fprintf(f, "--%s %s:%u/%u\n", e->type->name,
-              (tmp = str_escape(bi->address, ':', '\\')),
-	      bi->telnet_port, bi->relay_port) != EOF);
-  free(tmp);
-  return res;
-}
-
-static int botaddr_set(struct userrec *u, struct user_entry *e, void *buf)
-{
-  register struct bot_addr *bi = (struct bot_addr *) e->u.extra;
-
-  if (!bi && !buf)
-    return 1;
-  if (bi != buf) {
-    if (bi) {
-      free(bi->address);
-      free(bi);
-    }
-    bi = e->u.extra = buf;
-  }
-  return 1;
-}
-
-static void botaddr_display(int idx, struct user_entry *e)
-{
-  register struct bot_addr *bi = (struct bot_addr *) e->u.extra;
-
-  dprintf(idx, "  ADDRESS: %.70s\n", bi->address);
-  dprintf(idx, "     users: %d, bots: %d\n", bi->relay_port, bi->telnet_port);
-}
-
-static int botaddr_gotshare(struct userrec *u, struct user_entry *e,
-			    char *buf, int idx)
-{
-  return 0;
-}
-
-static int botaddr_dupuser(struct userrec *new, struct userrec *old,
-			   struct user_entry *e)
-{
-  if (old->flags & USER_BOT) {
-    struct bot_addr *bi = e->u.extra, *bi2;
-
-    if (bi) {
-      bi2 = malloc(sizeof(struct bot_addr));
-
-      bi2->telnet_port = bi->telnet_port;
-      bi2->relay_port = bi->relay_port;
-      bi2->address = strdup(bi->address);
-      return set_user(&USERENTRY_BOTADDR, new, bi2);
-    }
-  }
-  return 0;
-}
-
-struct user_entry_type USERENTRY_BOTADDR =
-{
-  0,				/* always 0 ;) */
-  botaddr_gotshare,
-  botaddr_dupuser,
-  botaddr_unpack,
-  botaddr_pack,
-  botaddr_write_userfile,
-  botaddr_kill,
-  def_get,
-  botaddr_set,
-  NULL,
-  NULL,
-  botaddr_display,
-  "BOTADDR"
-};
-
-int xtra_set(struct userrec *u, struct user_entry *e, void *buf)
-{
-  struct xtra_key *curr, *old = NULL, *new = buf;
-
-  for (curr = e->u.extra; curr; curr = curr->next) {
-    if (curr->key && !strcasecmp(curr->key, new->key)) {
-      old = curr;
-      break;
-    }
-  }
-  if (!old && (!new->data || !new->data[0])) {
-    /* Delete non-existant entry -- doh ++rtc */
-    free(new->key);
-    if (new->data)
-      free(new->data);
-    free(new);
-    return(0);
-  }
-
-  if ((old && old != new) || !new->data || !new->data[0]) {
-    list_delete((struct list_type **) (&e->u.extra),
-		(struct list_type *) old);
-    free(old->key);
-    free(old->data);
-    free(old);
-  }
-  if (old != new && new->data) {
-    if (new->data[0])
-      list_insert((&e->u.extra), new) /* do not add a ';' here */
-  } else {
-    if (new->data)
-      free(new->data);
-    free(new->key);
-    free(new);
-  }
-  return(0);
-}
-
-int xtra_unpack(struct userrec *u, struct user_entry *e)
-{
-  struct list_type *curr, *head;
-  struct xtra_key *t;
-  char *key, *data;
-
-  head = curr = e->u.list;
-  e->u.extra = NULL;
-  while (curr) {
-    t = malloc(sizeof(struct xtra_key));
-
-    data = curr->extra;
-    key = newsplit(&data);
-    if (data[0]) {
-      t->key = strdup(key);
-      t->data = strdup(data);
-      list_insert((&e->u.extra), t);
-    }
-    curr = curr->next;
-  }
-  list_type_kill(head);
-  return 1;
-}
-
-static int xtra_pack(struct userrec *u, struct user_entry *e)
-{
-  struct list_type *t;
-  struct xtra_key *curr, *next;
-
-  curr = e->u.extra;
-  e->u.list = NULL;
-  while (curr) {
-    t = malloc(sizeof(struct list_type));
-    t->extra = malloc(strlen(curr->key) + strlen(curr->data) + 4);
-    sprintf(t->extra, "%s %s", curr->key, curr->data);
-    list_insert((&e->u.list), t);
-    next = curr->next;
-    free(curr->key);
-    free(curr->data);
-    free(curr);
-    curr = next;
-  }
-  return 1;
-}
-
-static int xtra_gotshare(struct userrec *u, struct user_entry *e,
-			 char *buf, int idx)
-{
-  return 0;
-}
-
-static int xtra_dupuser(struct userrec *new, struct userrec *old,
-			struct user_entry *e)
-{
-  struct xtra_key *x1, *x2;
-
-  for (x1 = e->u.extra; x1; x1 = x1->next) {
-    x2 = malloc(sizeof(struct xtra_key));
-
-    x2->key = strdup(x1->key);
-    x2->data = strdup(x1->data);
-    set_user(&USERENTRY_XTRA, new, x2);
-  }
-  return 1;
-}
-
-static int xtra_write_userfile(FILE *f, struct userrec *u, struct user_entry *e)
-{
-  struct xtra_key *x;
-
-  for (x = e->u.extra; x; x = x->next)
-    if (fprintf(f, "--XTRA %s %s\n", x->key, x->data) == EOF)
-      return 0;
-  return 1;
-}
-
-int xtra_kill(struct user_entry *e)
-{
-  struct xtra_key *x, *y;
-
-  for (x = e->u.extra; x; x = y) {
-    y = x->next;
-    free(x->key);
-    free(x->data);
-    free(x);
-  }
-  free(e);
-  return 1;
-}
-
-struct user_entry_type USERENTRY_XTRA =
-{
-  0,
-  xtra_gotshare,
-  xtra_dupuser,
-  xtra_unpack,
-  xtra_pack,
-  xtra_write_userfile,
-  xtra_kill,
-  def_get,
-  xtra_set,
-  NULL,
-  NULL,
-  NULL,
-  "XTRA"
-};
-
-static int hosts_dupuser(struct userrec *new, struct userrec *old,
-			 struct user_entry *e)
-{
-  struct list_type *h;
-
-  for (h = e->u.extra; h; h = h->next)
-    set_user(&USERENTRY_HOSTS, new, h->extra);
-  return 1;
-}
-
-static int hosts_null(struct userrec *u, struct user_entry *e)
-{
-  return 1;
-}
-
-static int hosts_write_userfile(FILE *f, struct userrec *u, struct user_entry *e)
-{
-  struct list_type *h;
-
-  for (h = e->u.extra; h; h = h->next)
-    if (fprintf(f, "--HOSTS %s\n", h->extra) == EOF)
-      return 0;
-  return 1;
-}
-
-static int hosts_kill(struct user_entry *e)
-{
-  list_type_kill(e->u.list);
-  free(e);
-  return 1;
-}
-
-static void hosts_display(int idx, struct user_entry *e)
-{
-  char s[1024];
-  struct list_type *q;
-
-  s[0] = 0;
-  strcpy(s, "  HOSTS: ");
-  for (q = e->u.list; q; q = q->next) {
-    if (s[0] && !s[9])
-      strcat(s, q->extra);
-    else if (!s[0])
-      sprintf(s, "         %s", q->extra);
-    else {
-      if (strlen(s) + strlen(q->extra) + 2 > 65) {
-	dprintf(idx, "%s\n", s);
-	sprintf(s, "         %s", q->extra);
-      } else {
-	strcat(s, ", ");
-	strcat(s, q->extra);
-      }
-    }
-  }
-  if (s[0])
-    dprintf(idx, "%s\n", s);
-}
-
-static int hosts_set(struct userrec *u, struct user_entry *e, void *buf)
-{
-  if (!buf || !strcasecmp(buf, "none")) {
-    /* When the bot crashes, it's in this part, not in the 'else' part */
-    list_type_kill(e->u.list);
-    e->u.list = NULL;
-  } else {
-    char *host = buf, *p = strchr(host, ',');
-    struct list_type **t;
-
-    /* Can't have ,'s in hostmasks */
-    while (p) {
-      *p = '?';
-      p = strchr(host, ',');
-    }
-    /* fred1: check for redundant hostmasks with
-     * controversial "superpenis" algorithm ;) */
-    /* I'm surprised Raistlin hasn't gotten involved in this controversy */
-    t = &(e->u.list);
-    while (*t) {
-      if (wild_match(host, (*t)->extra)) {
-	struct list_type *u;
-
-	u = *t;
-	*t = (*t)->next;
-	if (u->extra)
-	  free(u->extra);
-	free(u);
-      } else
-	t = &((*t)->next);
-    }
-    *t = malloc(sizeof(struct list_type));
-
-    (*t)->next = NULL;
-    (*t)->extra = strdup(host);
-  }
-  return 1;
-}
-
-static int hosts_gotshare(struct userrec *u, struct user_entry *e,
-			  char *buf, int idx)
-{
-  return 0;
-}
-
-struct user_entry_type USERENTRY_HOSTS =
-{
-  0,
-  hosts_gotshare,
-  hosts_dupuser,
-  hosts_null,
-  hosts_null,
-  hosts_write_userfile,
-  hosts_kill,
-  def_get,
-  hosts_set,
-  NULL,
-  NULL,
-  hosts_display,
-  "HOSTS"
-};
-
-int list_append(struct list_type **h, struct list_type *i)
-{
-  for (; *h; h = &((*h)->next));
-  *h = i;
-  return 1;
-}
-
-int list_delete(struct list_type **h, struct list_type *i)
-{
-  for (; *h; h = &((*h)->next))
-    if (*h == i) {
-      *h = i->next;
-      return 1;
-    }
-  return 0;
-}
-
-int list_contains(struct list_type *h, struct list_type *i)
-{
-  for (; h; h = h->next)
-    if (h == i) {
-      return 1;
-    }
-  return 0;
-}
-
-int add_entry_type(struct user_entry_type *type)
-{
-  struct userrec *u;
-
-  list_insert(&entry_type_list, type);
-  for (u = userlist; u; u = u->next) {
-    struct user_entry *e = find_user_entry(type, u);
-
-    if (e && e->name) {
-      e->type = type;
-      e->type->unpack(u, e);
-      free_null(e->name);
-    }
-  }
-  return 1;
-}
-
-int del_entry_type(struct user_entry_type *type)
-{
-  struct userrec *u;
-
-  for (u = userlist; u; u = u->next) {
-    struct user_entry *e = find_user_entry(type, u);
-
-    if (e && !e->name) {
-      e->type->pack(u, e);
-      e->name = strdup(e->type->name);
-      e->type = NULL;
-    }
-  }
-  return list_delete((struct list_type **) &entry_type_list,
-		     (struct list_type *) type);
-}
-
-struct user_entry_type *find_entry_type(char *name)
-{
-  struct user_entry_type *p;
-
-  for (p = entry_type_list; p; p = p->next) {
-    if (!strcasecmp(name, p->name))
-      return p;
-  }
-  return NULL;
-}
-
-struct user_entry *find_user_entry(struct user_entry_type *et,
-				   struct userrec *u)
-{
-  struct user_entry **e, *t;
-
-  for (e = &(u->entries); *e; e = &((*e)->next)) {
-    if (((*e)->type == et) ||
-	((*e)->name && !strcasecmp((*e)->name, et->name))) {
-      t = *e;
-      *e = t->next;
-      t->next = u->entries;
-      u->entries = t;
-      return t;
-    }
-  }
-  return NULL;
-}
-
-void *get_user(struct user_entry_type *et, struct userrec *u)
-{
-  struct user_entry *e;
-
-  if (u && (e = find_user_entry(et, u)))
-    return et->get(u, e);
-  return 0;
-}
-
-int set_user(struct user_entry_type *et, struct userrec *u, void *d)
-{
-  struct user_entry *e;
-  int r;
-
-  if (!u || !et)
-    return 0;
-
-  if (!(e = find_user_entry(et, u))) {
-    e = malloc(sizeof(struct user_entry));
-
-    e->type = et;
-    e->name = NULL;
-    e->u.list = NULL;
-    list_insert((&(u->entries)), e);
-  }
-  r = et->set(u, e, d);
-  if (!e->u.list) {
-    list_delete((struct list_type **) &(u->entries), (struct list_type *) e);
-    free(e);
-  }
-  return r;
-}
Index: eggdrop1.7/src/userent.h
diff -u eggdrop1.7/src/userent.h:1.3 eggdrop1.7/src/userent.h:removed
--- eggdrop1.7/src/userent.h:1.3	Thu Jan  2 15:33:17 2003
+++ eggdrop1.7/src/userent.h	Sat May 10 21:40:38 2003
@@ -1,33 +0,0 @@
-/*
- * userent.h --
- */
-/*
- * Copyright (C) 2000, 2001, 2002, 2003 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.
- */
-/*
- * $Id: userent.h,v 1.3 2003/01/02 21:33:17 wcc Exp $
- */
-
-#ifndef _EGG_USERENT_H
-#define _EGG_USERENT_H
-
-#include "users.h"		/* list_type */
-
-void list_type_kill(struct list_type *);
-int xtra_set();
-
-#endif				/* _EGG_USERENT_H */
Index: eggdrop1.7/src/userrec.c
diff -u eggdrop1.7/src/userrec.c:1.61 eggdrop1.7/src/userrec.c:removed
--- eggdrop1.7/src/userrec.c:1.61	Tue Feb 18 04:37:18 2003
+++ eggdrop1.7/src/userrec.c	Sat May 10 21:40:38 2003
@@ -1,681 +0,0 @@
-/*
- * userrec.c --
- *
- *	add_q() del_q() str2flags() flags2str() str2chflags() chflags2str()
- *	a bunch of functions to find and change user records
- *	change and check user (and channel-specific) flags
- */
-/*
- * Copyright (C) 1997 Robey Pointer
- * Copyright (C) 1999, 2000, 2001, 2002, 2003 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 lint
-static const char rcsid[] = "$Id: userrec.c,v 1.61 2003/02/18 10:37:18 stdarg Exp $";
-#endif
-
-#include <sys/stat.h>
-#include "main.h"
-#include "users.h"
-#include "chan.h"
-#include "modules.h"
-#include "logfile.h"
-#include "modules.h"		/* encrypt_pass				*/
-#include "cmdt.h"		/* cmd_t				*/
-#include "chanprog.h"		/* clear_chanlist, set_chanlist		*/
-#include "dccutil.h"		/* chanout_but				*/
-#include "flags.h"
-#include "userrec.h"		/* prototypes				*/
-
-extern struct dcc_t *dcc;
-extern struct chanset_t *chanset;
-extern int default_flags, default_uflags, dcc_total;
-extern char userfile[], ver[], myname[];
-extern time_t now;
-
-#ifndef MAKING_MODS
-extern struct dcc_table DCC_CHAT;
-#endif /* MAKING_MODS   */
-
-struct userrec	*userlist = NULL; /* user records are stored here	    */
-struct userrec	*lastuser = NULL; /* last accessed user record	    */
-maskrec *global_bans = NULL, *global_exempts = NULL, *global_invites = NULL;
-struct igrec *global_ign = NULL;
-int cache_hit = 0, cache_miss = 0;
-int strict_host = 0;
-int userfile_perm = 0600;
-
-int count_users(struct userrec *bu)
-{
-  int tot = 0;
-  struct userrec *u ;
-
-  for (u = bu; u; u = u->next)
-    tot++;
-  return tot;
-}
-
-/* Convert "nick!~user at host", "nick!+user at host" and "nick!-user at host"
- * to "nick!user at host" if necessary. (drummer)
- */
-char *fixfrom(char *s)
-{
-  char *p;
-  static char buf[512];
-
-  if (s == NULL)
-    return NULL;
-  strlcpy(buf, s, sizeof buf);
-  if (strict_host)
-    return buf;
-  if ((p = strchr(buf, '!')))
-    p++;
-  else
-    p = s;			/* Sometimes we get passed just a
-				 * user at host here... */
-  /* These are ludicrous. */
-  if (strchr("~+-^=", *p) && (p[1] != '@')) /* added check for @ - drummer */
-    strcpy(p, p + 1);
-  /* Bug was: n!~@host -> n!@host  now: n!~@host */
-  return buf;
-}
-
-struct userrec *check_dcclist_hand(const char *handle)
-{
-  int i;
-
-  for (i = 0; i < dcc_total; i++)
-    if (dcc[i].type && !strcasecmp(dcc[i].nick, handle))
-      return dcc[i].user;
-  return NULL;
-}
-
-struct userrec *get_user_by_handle(struct userrec *bu, const char *handle)
-{
-  struct userrec *u, *ret;
-
-  if (!handle)
-    return NULL;
-  if (!handle[0] || (handle[0] == '*'))
-    return NULL;
-  if (bu == userlist) {
-    if (lastuser && !strcasecmp(lastuser->handle, handle)) {
-      cache_hit++;
-      return lastuser;
-    }
-    ret = check_dcclist_hand(handle);
-    if (ret) {
-      cache_hit++;
-      return ret;
-    }
-    ret = check_chanlist_hand(handle);
-    if (ret) {
-      cache_hit++;
-      return ret;
-    }
-    cache_miss++;
-  }
-  for (u = bu; u; u = u->next)
-    if (!strcasecmp(u->handle, handle)) {
-      if (bu == userlist)
-	lastuser = u;
-      return u;
-    }
-  return NULL;
-}
-
-/* Fix capitalization, etc
- */
-void correct_handle(char *handle)
-{
-  struct userrec *u;
-
-  u = get_user_by_handle(userlist, handle);
-  if (u == NULL)
-    return;
-  strcpy(handle, u->handle);
-}
-
-/* This will be usefull in a lot of places, much more code re-use so we
- * endup with a smaller executable bot. <cybah>
- */
-void clear_masks(maskrec *m)
-{
-  maskrec *temp = NULL;
-
-  for (; m; m = temp) {
-    temp = m->next;
-    if (m->mask)
-      free(m->mask);
-    if (m->user)
-      free(m->user);
-    if (m->desc)
-      free(m->desc);
-    free(m);
-  }
-}
-
-void clear_userlist(struct userrec *bu)
-{
-  struct userrec *u, *v;
-  int i;
-
-  for (u = bu; u; u = v) {
-    v = u->next;
-    freeuser(u);
-  }
-  if (userlist == bu) {
-    struct chanset_t *cst;
-
-    for (i = 0; i < dcc_total; i++)
-      dcc[i].user = NULL;
-    clear_chanlist();
-    lastuser = NULL;
-
-    while (global_ign)
-      delignore(global_ign->igmask);
-
-    clear_masks(global_bans);
-    clear_masks(global_exempts);
-    clear_masks(global_invites);
-    global_exempts = global_invites = global_bans = NULL;
-
-    for (cst = chanset; cst; cst = cst->next) {
-      clear_masks(cst->bans);
-      clear_masks(cst->exempts);
-      clear_masks(cst->invites);
-
-      cst->bans = cst->exempts = cst->invites = NULL;
-    }
-  }
-  /* Remember to set your userlist to NULL after calling this */
-}
-
-/* Find CLOSEST host match
- * (if "*!*@*" and "*!*@*clemson.edu" both match, use the latter!)
- *
- * Checks the chanlist first, to possibly avoid needless search.
- */
-struct userrec *get_user_by_host(char *host)
-{
-  struct userrec *u, *ret;
-  struct list_type *q;
-  int cnt, i;
-  char host2[UHOSTLEN];
-
-  if (host == NULL)
-    return NULL;
-  rmspace(host);
-  if (!host[0])
-    return NULL;
-  ret = check_chanlist(host);
-  cnt = 0;
-  if (ret != NULL) {
-    cache_hit++;
-    return ret;
-  }
-  cache_miss++;
-  strlcpy(host2, host, sizeof host2);
-  host = fixfrom(host);
-  for (u = userlist; u; u = u->next) {
-    q = get_user(&USERENTRY_HOSTS, u);
-    for (; q; q = q->next) {
-      i = wild_match(q->extra, host);
-      if (i > cnt) {
-	ret = u;
-	cnt = i;
-      }
-    }
-  }
-  if (ret != NULL) {
-    lastuser = ret;
-    set_chanlist(host2, ret);
-  }
-  return ret;
-}
-
-/* use fixfrom() or dont? (drummer)
- */
-struct userrec *get_user_by_equal_host(char *host)
-{
-  struct userrec *u;
-  struct list_type *q;
-
-  for (u = userlist; u; u = u->next)
-    for (q = get_user(&USERENTRY_HOSTS, u); q; q = q->next)
-      if (!irccmp(q->extra, host))
-	return u;
-  return NULL;
-}
-
-/* Try: pass_match_by_host("-",host)
- * will return 1 if no password is set for that host
- */
-int u_pass_match(struct userrec *u, char *pass)
-{
-  char *cmp, new[32];
-
-  if (!u)
-    return 0;
-  cmp = get_user(&USERENTRY_PASS, u);
-  if (!cmp && (!pass[0] || (pass[0] == '-')))
-    return 1;
-  if (!cmp || !pass || !pass[0] || (pass[0] == '-'))
-    return 0;
-  if (u->flags & USER_BOT) {
-    if (!strcmp(cmp, pass))
-      return 1;
-  } else {
-    if (strlen(pass) > 15)
-      pass[15] = 0;
-    encrypt_pass(pass, new);
-    if (!strcmp(cmp, new))
-      return 1;
-  }
-  return 0;
-}
-
-int write_user(struct userrec *u, FILE * f, int idx)
-{
-  char s[181];
-  struct chanuserrec *ch;
-  struct chanset_t *cst;
-  struct user_entry *ue;
-  struct flag_record fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
-
-  fr.global = u->flags;
-  fr.udef_global = u->flags_udef;
-  build_flags(s, &fr, NULL);
-  if (fprintf(f, "%-10s - %-24s\n", u->handle, s) == EOF)
-    return 0;
-  for (ch = u->chanrec; ch; ch = ch->next) {
-    cst = findchan_by_dname(ch->channel);
-    if (cst && (idx < 0)) {
-      if (idx >= 0) {
-	fr.match = (FR_CHAN | FR_BOT);
-	get_user_flagrec(dcc[idx].user, &fr, ch->channel);
-      }
-    }
-  }
-  for (ue = u->entries; ue; ue = ue->next) {
-    if (ue->name) {
-      struct list_type *lt;
-
-      for (lt = ue->u.list; lt; lt = lt->next)
-	if (fprintf(f, "--%s %s\n", ue->name, lt->extra) == EOF)
-	  return 0;
-    } else {
-      if (!ue->type->write_userfile(f, u, ue))
-	return 0;
-    }
-  }
-  return 1;
-}
-
-int write_ignores(FILE *f, int idx)
-{
-  struct igrec *i;
-  char *mask;
-
-  if ((global_ign) && (fprintf(f, IGNORE_NAME " - -\n") == EOF))
-    return 0;
-
-  for (i = global_ign; i; i = i->next) {
-    mask = str_escape(i->igmask, ':', '\\');
-    if (!mask || fprintf(f, "- %s:%s%lu:%s:%lu:%s\n", mask,
-        (i->flags & IGREC_PERM) ? "+" : "", i->expire, i->user ? i->user :
-        myname, i->added, i->msg ? i->msg : "") == EOF) {
-      if (mask)
-        free(mask);
-      return 0;
-    }
-    free(mask);
-  }
-  return 1;
-}
-
-/* Rewrite the entire user file. Call USERFILE hook as well, probably
- * causing the channel file to be rewritten as well.
- */
-void write_userfile(int idx)
-{
-  FILE *f;
-  char *new_userfile;
-  char s1[81];
-  time_t tt;
-  struct userrec *u;
-  int ok;
-
-  if (userlist == NULL)
-    return;			/* No point in saving userfile */
-
-  new_userfile = malloc(strlen(userfile) + 5);
-  sprintf(new_userfile, "%s~new", userfile);
-
-  f = fopen(new_userfile, "w");
-  chmod(new_userfile, userfile_perm);
-  if (f == NULL) {
-    putlog(LOG_MISC, "*", _("ERROR writing user file."));
-    free(new_userfile);
-    return;
-  }
-  tt = now;
-  strcpy(s1, ctime(&tt));
-  fprintf(f, "#4v: %s -- %s -- written %s", ver, myname, s1);
-  ok = 1;
-  for (u = userlist; u && ok; u = u->next)
-    if (!write_user(u, f, idx))
-      ok = 0;
-  if (!ok || !write_ignores(f, -1) || fflush(f)) {
-    putlog(LOG_MISC, "*", "%s (%s)", _("ERROR writing user file."), strerror(ferror(f)));
-    fclose(f);
-    free(new_userfile);
-    return;
-  }
-  fclose(f);
-  call_hook(HOOK_USERFILE);
-  movefile(new_userfile, userfile);
-  free(new_userfile);
-}
-
-int change_handle(struct userrec *u, char *newh)
-{
-  int i;
-  char s[HANDLEN + 1];
-
-  if (!u)
-    return 0;
-  /* Nothing that will confuse the userfile */
-  if (!newh[1] && strchr(BADHANDCHARS, newh[0]))
-    return 0;
-  strlcpy(s, u->handle, sizeof s);
-  strlcpy(u->handle, newh, sizeof u->handle);
-  for (i = 0; i < dcc_total; i++)
-    if (!strcasecmp(dcc[i].nick, s)) {
-      strlcpy(dcc[i].nick, newh, sizeof dcc[i].nick);
-      if (dcc[i].type == &DCC_CHAT && dcc[i].u.chat->channel >= 0) {
-	chanout_but(-1, dcc[i].u.chat->channel,
-		    "*** Handle change: %s -> %s\n", s, newh);
-      }
-    }
-  return 1;
-}
-
-extern int noxtra;
-
-struct userrec *adduser(struct userrec *bu, char *handle, char *host,
-			char *pass, int flags)
-{
-  struct userrec *u, *x;
-  struct xtra_key *xk;
-
-  u = (struct userrec *) malloc(sizeof(struct userrec));
-
-  /* u->next=bu; bu=u; */
-  strlcpy(u->handle, handle, sizeof u->handle);
-  u->next = NULL;
-  u->chanrec = NULL;
-  u->entries = NULL;
-  if (flags != USER_DEFAULT) { /* drummer */
-    u->flags = flags;
-    u->flags_udef = 0;
-  } else {
-    u->flags = default_flags;
-    u->flags_udef = default_uflags;
-  }
-  set_user(&USERENTRY_PASS, u, pass);
-  if (!noxtra) {
-    char *now2;
-    xk = malloc(sizeof(struct xtra_key));
-    xk->key = strdup("created");
-    now2 = malloc(15);
-    sprintf(now2, "%lu", now);
-    xk->data = malloc(strlen(now2) +1);
-    sprintf(xk->data, "%lu", now);
-    set_user(&USERENTRY_XTRA, u, xk);
-    free(now2); 
-  }
-  /* Strip out commas -- they're illegal */
-  if (host && host[0]) {
-    char *p;
-
-    /* About this fixfrom():
-     *   We should use this fixfrom before every call of adduser()
-     *   but its much easier to use here...  (drummer)
-     *   Only use it if we have a host :) (dw)
-     */
-    host = fixfrom(host);
-    p = strchr(host, ',');
-
-    while (p != NULL) {
-      *p = '?';
-      p = strchr(host, ',');
-    }
-    set_user(&USERENTRY_HOSTS, u, host);
-  } else
-    set_user(&USERENTRY_HOSTS, u, "none");
-  if (bu == userlist)
-    clear_chanlist();
-  if (bu == NULL)
-    bu = u;
-  else {
-    if ((bu == userlist) && (lastuser != NULL))
-      x = lastuser;
-    else
-      x = bu;
-    while (x->next != NULL)
-      x = x->next;
-    x->next = u;
-    if (bu == userlist)
-      lastuser = u;
-  }
-  return bu;
-}
-
-void freeuser(struct userrec *u)
-{
-  struct user_entry *ue, *ut;
-  struct chanuserrec *ch, *z;
-
-  if (u == NULL)
-    return;
-  ch = u->chanrec;
-  while (ch) {
-    z = ch;
-    ch = ch->next;
-    if (z->info != NULL)
-      free(z->info);
-    free(z);
-  }
-  u->chanrec = NULL;
-  for (ue = u->entries; ue; ue = ut) {
-    ut = ue->next;
-    if (ue->name) {
-      struct list_type *lt, *ltt;
-
-      for (lt = ue->u.list; lt; lt = ltt) {
-	ltt = lt->next;
-	free(lt->extra);
-	free(lt);
-      }
-      free(ue->name);
-      free(ue);
-    } else {
-      ue->type->kill(ue);
-    }
-  }
-  free(u);
-}
-
-int deluser(char *handle)
-{
-  struct userrec *u = userlist, *prev = NULL;
-  int fnd = 0;
-
-  while ((u != NULL) && (!fnd)) {
-    if (!strcasecmp(u->handle, handle))
-      fnd = 1;
-    else {
-      prev = u;
-      u = u->next;
-    }
-  }
-  if (!fnd)
-    return 0;
-  if (prev == NULL)
-    userlist = u->next;
-  else
-    prev->next = u->next;
-  for (fnd = 0; fnd < dcc_total; fnd++)
-    if (dcc[fnd].type && dcc[fnd].user == u)
-      dcc[fnd].user = 0;	/* Clear any dcc users for this entry,
-				 * null is safe-ish */
-  clear_chanlist();
-  freeuser(u);
-  lastuser = NULL;
-  return 1;
-}
-
-int delhost_by_handle(char *handle, char *host)
-{
-  struct userrec *u;
-  struct list_type *q, *qnext, *qprev;
-  struct user_entry *e = NULL;
-  int i = 0;
-
-  u = get_user_by_handle(userlist, handle);
-  if (!u)
-    return 0;
-  q = get_user(&USERENTRY_HOSTS, u);
-  qprev = q;
-  if (q) {
-    if (!irccmp(q->extra, host)) {
-      e = find_user_entry(&USERENTRY_HOSTS, u);
-      e->u.extra = q->next;
-      free(q->extra);
-      free(q);
-      i++;
-      qprev = NULL;
-      q = e->u.extra;
-    } else
-      q = q->next;
-    while (q) {
-      qnext = q->next;
-      if (!irccmp(q->extra, host)) {
-	if (qprev)
-	  qprev->next = q->next;
-	else if (e) {
-	  e->u.extra = q->next;
-	  qprev = NULL;
-	}
-	free(q->extra);
-	free(q);
-	i++;
-      } else
-        qprev = q;
-      q = qnext;
-    }
-  }
-  if (!qprev)
-    set_user(&USERENTRY_HOSTS, u, "none");
-  clear_chanlist();
-  return i;
-}
-
-void addhost_by_handle(char *handle, char *host)
-{
-  struct userrec *u = get_user_by_handle(userlist, handle);
-
-  set_user(&USERENTRY_HOSTS, u, host);
-  clear_chanlist();
-}
-
-void touch_laston(struct userrec *u, char *where, time_t timeval)
-{
-  if (!u)
-    return;
-  if (timeval > 1) {
-    struct laston_info *li =
-    (struct laston_info *) get_user(&USERENTRY_LASTON, u);
-
-    if (!li)
-      li = malloc(sizeof(struct laston_info));
-
-    else if (li->lastonplace)
-      free(li->lastonplace);
-    li->laston = timeval;
-    if (where)
-      li->lastonplace = strdup(where);
-    else
-      li->lastonplace = NULL;
-    set_user(&USERENTRY_LASTON, u, li);
-  } else if (timeval == 1) {
-    set_user(&USERENTRY_LASTON, u, 0);
-  }
-}
-
-/*  Go through all channel records and try to find a matching
- *  nick. Will return the user's user record if that is known
- *  to the bot.  (Fabian)
- *
- *  Warning: This is unreliable by concept!
- */
-struct userrec *get_user_by_nick(char *nick)
-{
-  struct chanset_t *chan;
-  memberlist *m;
-
-  for (chan = chanset; chan; chan = chan->next) {
-    for (m = chan->channel.member; m && m->nick[0] ;m = m->next) {
-      if (!irccmp(nick, m->nick)) {
-  	char word[512];
-
-	snprintf(word, sizeof word, "%s!%s", m->nick, m->userhost);
-	/* No need to check the return value ourself */
-	return get_user_by_host(word);;
-      }
-    }
-  }
-  /* Sorry, no matches */
-  return NULL;
-}
-
-void user_del_chan(char *dname)
-{
-  struct chanuserrec *ch, *och;
-  struct userrec *u;
-
-  for (u = userlist; u; u = u->next) {
-    ch = u->chanrec;
-    och = NULL;
-    while (ch) {
-      if (!irccmp(dname, ch->channel)) {
-	if (och)
-	  och->next = ch->next;
-	else
-	  u->chanrec = ch->next;
-
-	if (ch->info)
-	  free(ch->info);
-	free(ch);
-	break;
-      }
-      och = ch;
-      ch = ch->next;
-    }
-  }
-}
Index: eggdrop1.7/src/userrec.h
diff -u eggdrop1.7/src/userrec.h:1.5 eggdrop1.7/src/userrec.h:removed
--- eggdrop1.7/src/userrec.h:1.5	Wed Jan 29 01:42:50 2003
+++ eggdrop1.7/src/userrec.h	Sat May 10 21:40:38 2003
@@ -1,51 +0,0 @@
-/*
- * userrec.h --
- */
-/*
- * Copyright (C) 2000, 2001, 2002, 2003 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.
- */
-/*
- * $Id: userrec.h,v 1.5 2003/01/29 07:42:50 wcc Exp $
- */
-
-#ifndef _EGG_USERREC_H
-#define _EGG_USERREC_H
-
-#include "users.h"		/* userrec		*/
-#include "chan.h"		/* maskrec		*/
-
-struct userrec *adduser(struct userrec *, char *, char *, char *, int);
-void addhost_by_handle(char *, char *);
-void clear_masks(struct maskrec *);
-void clear_userlist(struct userrec *);
-int u_pass_match(struct userrec *, char *);
-int delhost_by_handle(char *, char *);
-int ishost_for_handle(char *, char *);
-int count_users(struct userrec *);
-int deluser(char *);
-void freeuser(struct userrec *);
-int change_handle(struct userrec *, char *);
-void correct_handle(char *);
-int write_user(struct userrec *, FILE *, int);
-int write_ignores(FILE *f, int);
-void write_userfile(int);
-struct userrec *check_dcclist_hand(const char *);
-void touch_laston(struct userrec *, char *, time_t);
-void user_del_chan(char *);
-char *fixfrom(char *);
-
-#endif				/* !_EGG_USERREC_H */
Index: eggdrop1.7/src/users.c
diff -u eggdrop1.7/src/users.c:1.53 eggdrop1.7/src/users.c:removed
--- eggdrop1.7/src/users.c:1.53	Thu Mar  6 06:08:15 2003
+++ eggdrop1.7/src/users.c	Sat May 10 21:40:38 2003
@@ -1,956 +0,0 @@
-/*
- * users.c --
- *
- *	testing and enforcing ignores
- *	adding and removing ignores
- *	listing ignores
- *	auto-linking bots
- *	sending and receiving a userfile from a bot
- *	listing users ('.whois' and '.match')
- *	reading the user file
- *
- * dprintf'ized, 9nov1995
- */
-/*
- * Copyright (C) 1997 Robey Pointer
- * Copyright (C) 1999, 2000, 2001, 2002, 2003 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 lint
-static const char rcsid[] = "$Id: users.c,v 1.53 2003/03/06 12:08:15 tothwolf Exp $";
-#endif
-
-#include "main.h"
-#include "users.h"
-#include "chan.h"
-#include "modules.h"
-#include "logfile.h"
-#include "misc.h"
-#include "chanprog.h"		/* clear_chanlist			*/
-#include "dccutil.h"		/* dprintf_eggdrop, chatout, lostdcc	*/
-#include "net.h"		/* killsock				*/
-#include "userrec.h"		/* clear_masks				*/
-#include "users.h"		/* prototypes				*/
-
-char natip[121] = "";
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-char spaces[33] = "                                 ";
-char spaces2[33] = "                                 ";
-
-extern struct dcc_t *dcc;
-extern struct userrec *userlist, *lastuser;
-extern struct chanset_t *chanset;
-extern int dcc_total;
-extern char myname[];
-extern time_t now;
-extern int userfile_perm;
-
-#ifndef MAKING_MODS
-extern struct dcc_table DCC_BOT, DCC_BOT_NEW, DCC_FORK_BOT, DCC_DNSWAIT;
-#endif /* MAKING_MODS   */
-
-char userfile[121] = "";	/* where the user records are stored */
-int ignore_time = 10;		/* how many minutes will ignores last? */
-
-static script_linked_var_t user_script_vars[] = {
-	{"", "userfile_perm", &userfile_perm, SCRIPT_INTEGER, NULL},
-	{0}
-};
-
-int old_user_init()
-{
-	script_link_vars(user_script_vars);
-	return(0);
-}
-
-/* is this nick!user at host being ignored? */
-int match_ignore(char *uhost)
-{
-  struct igrec *ir;
-
-  for (ir = global_ign; ir; ir = ir->next)
-    if (wild_match(ir->igmask, uhost))
-      return 1;
-  return 0;
-}
-
-int equals_ignore(char *uhost)
-{
-  struct igrec *u = global_ign;
-
-  for (; u; u = u->next)
-    if (!irccmp(u->igmask, uhost)) {
-      if (u->flags & IGREC_PERM)
-	return 2;
-      else
-	return 1;
-    }
-  return 0;
-}
-
-int delignore(char *ign)
-{
-  int i, j;
-  struct igrec **u;
-  struct igrec *t;
-  char temp[256];
-
-  i = 0;
-  if (!strchr(ign, '!') && (j = atoi(ign))) {
-    for (u = &global_ign, j--; *u && j; u = &((*u)->next), j--);
-    if (*u) {
-      strlcpy(temp, (*u)->igmask, sizeof temp);
-      i = 1;
-    }
-  } else {
-    /* find the matching host, if there is one */
-    for (u = &global_ign; *u && !i; u = &((*u)->next))
-      if (!irccmp(ign, (*u)->igmask)) {
-        strlcpy(temp, ign, sizeof temp);
-	i = 1;
-	break;
-      }
-  }
-  if (i) {
-    free((*u)->igmask);
-    if ((*u)->msg)
-      free((*u)->msg);
-    if ((*u)->user)
-      free((*u)->user);
-    t = *u;
-    *u = (*u)->next;
-    free(t);
-  }
-  return i;
-}
-
-void addignore(char *ign, char *from, char *mnote, time_t expire_time)
-{
-  struct igrec *p;
-
-  if (equals_ignore(ign))
-    delignore(ign);		/* remove old ignore */
-  p = malloc(sizeof(struct igrec));
-
-  p->next = global_ign;
-  global_ign = p;
-  p->expire = expire_time;
-  p->added = now;
-  p->flags = expire_time ? 0 : IGREC_PERM;
-  p->igmask = strdup(ign);
-  p->user = strdup(from);
-  p->msg = strdup(mnote);
-}
-
-/* take host entry from ignore list and display it ignore-style */
-void display_ignore(int idx, int number, struct igrec *ignore)
-{
-  char dates[81], s[41];
-
-  if (ignore->added) {
-    daysago(now, ignore->added, s);
-    sprintf(dates, "Started %s", s);
-  } else
-    dates[0] = 0;
-  if (ignore->flags & IGREC_PERM)
-    strcpy(s, "(perm)");
-  else {
-    char s1[41];
-
-    days(ignore->expire, now, s1);
-    sprintf(s, "(expires %s)", s1);
-  }
-  if (number >= 0)
-    dprintf(idx, "  [%3d] %s %s\n", number, ignore->igmask, s);
-  else
-    dprintf(idx, "IGNORE: %s %s\n", ignore->igmask, s);
-  if (ignore->msg && ignore->msg[0])
-    dprintf(idx, "        %s: %s\n", ignore->user, ignore->msg);
-  else
-    dprintf(idx, "        %s %s\n", _("placed by"), ignore->user);
-  if (dates[0])
-    dprintf(idx, "        %s\n", dates);
-}
-
-/* list the ignores and how long they've been active */
-void tell_ignores(int idx, char *match)
-{
-  struct igrec *u = global_ign;
-  int k = 1;
-
-  if (u == NULL) {
-    dprintf(idx, "No ignores.\n");
-    return;
-  }
-  dprintf(idx, "%s:\n", _("Currently ignoring"));
-  for (; u; u = u->next) {
-    if (match[0]) {
-      if (wild_match(match, u->igmask) ||
-	  wild_match(match, u->msg) ||
-	  wild_match(match, u->user))
-	display_ignore(idx, k, u);
-      k++;
-    } else
-      display_ignore(idx, k++, u);
-  }
-}
-
-/* check for expired timed-ignores */
-void check_expired_ignores()
-{
-  struct igrec **u = &global_ign;
-
-  if (!*u)
-    return;
-  while (*u) {
-    if (!((*u)->flags & IGREC_PERM) && (now >= (*u)->expire)) {
-      putlog(LOG_MISC, "*", "%s %s (%s)", _("No longer ignoring"), (*u)->igmask,
-	     _("expired"));
-      delignore((*u)->igmask);
-    } else {
-      u = &((*u)->next);
-    }
-  }
-}
-
-/*        Channel mask loaded from user file. This function is
- *      add(ban|invite|exempt)_fully merged into one. <cybah>
- */
-static void addmask_fully(struct chanset_t *chan, maskrec **m, maskrec **global,
-                         char *mask, char *from,
-			 char *note, time_t expire_time, int flags,
-			 time_t added, time_t last)
-{
-  maskrec *p = malloc(sizeof(maskrec));
-  maskrec **u = (chan) ? m : global;
-
-  p->next = *u;
-  *u = p;
-  p->expire = expire_time;
-  p->added = added;
-  p->lastactive = last;
-  p->flags = flags;
-  p->mask = strdup(mask);
-  p->user = strdup(from);
-  p->desc = strdup(note);
-}
-
-static void restore_chanban(struct chanset_t *chan, char *host)
-{
-  char *expi, *add, *last, *user, *desc;
-  int flags = 0;
-
-  expi = strchr_unescape(host, ':', '\\');
-  if (expi) {
-    if (*expi == '+') {
-      flags |= MASKREC_PERM;
-      expi++;
-    }
-    add = strchr(expi, ':');
-    if (add) {
-      if (add[-1] == '*') {
-	flags |= MASKREC_STICKY;
-	add[-1] = 0;
-      } else
-	*add = 0;
-      add++;
-      if (*add == '+') {
-	last = strchr(add, ':');
-	if (last) {
-	  *last = 0;
-	  last++;
-	  user = strchr(last, ':');
-	  if (user) {
-	    *user = 0;
-	    user++;
-	    desc = strchr(user, ':');
-	    if (desc) {
-	      *desc = 0;
-	      desc++;
-	      addmask_fully(chan, &chan->bans, &global_bans, host, user,
-			    desc, atoi(expi), flags, atoi(add), atoi(last));
-	      return;
-	    }
-	  }
-	}
-      } else {
-	desc = strchr(add, ':');
-	if (desc) {
-	  *desc = 0;
-	  desc++;
-	  addmask_fully(chan, &chan->bans, &global_bans, host, add, desc,
-			atoi(expi), flags, now, 0);
-	  return;
-	}
-      }
-    }
-  }
-  putlog(LOG_MISC, "*", "*** Malformed banline for %s.",
-	 chan ? chan->dname : "global_bans");
-}
-
-static void restore_chanexempt(struct chanset_t *chan, char *host)
-{
-  char *expi, *add, *last, *user, *desc;
-  int flags = 0;
-
-  expi = strchr_unescape(host, ':', '\\');
-  if (expi) {
-      if (*expi == '+') {
-	flags |= MASKREC_PERM;
-	expi++;
-      }
-    add = strchr(expi, ':');
-    if (add) {
-      if (add[-1] == '*') {
-	flags |= MASKREC_STICKY;
-	add[-1] = 0;
-      } else
-	*add = 0;
-      add++;
-      if (*add == '+') {
-	last = strchr(add, ':');
-	if (last) {
-	  *last = 0;
-	  last++;
-	  user = strchr(last, ':');
-	  if (user) {
-	    *user = 0;
-	    user++;
-	    desc = strchr(user, ':');
-	    if (desc) {
-	      *desc = 0;
-	      desc++;
-	      addmask_fully(chan, &chan->exempts, &global_exempts, host, user,
-			    desc, atoi(expi), flags, atoi(add), atoi(last));
-	      return;
-	    }
-	  }
-	}
-      } else {
-	desc = strchr(add, ':');
-	if (desc) {
-	  *desc = 0;
-	  desc++;
-	  addmask_fully(chan, &chan->exempts, &global_exempts, host, add,
-			desc, atoi(expi), flags, now, 0);
-	  return;
-	}
-      }
-    }
-  }
-  putlog(LOG_MISC, "*", "*** Malformed exemptline for %s.",
-	 chan ? chan->dname : "global_exempts");
-}
-
-static void restore_chaninvite(struct chanset_t *chan, char *host)
-{
-  char *expi, *add, *last, *user, *desc;
-  int flags = 0;
-
-  expi = strchr_unescape(host, ':', '\\');
-  if (expi) {
-    if (*expi == '+') {
-      flags |= MASKREC_PERM;
-      expi++;
-    }
-    add = strchr(expi, ':');
-    if (add) {
-      if (add[-1] == '*') {
-	flags |= MASKREC_STICKY;
-	add[-1] = 0;
-      } else
-	*add = 0;
-      add++;
-      if (*add == '+') {
-	last = strchr(add, ':');
-	if (last) {
-	  *last = 0;
-	  last++;
-	  user = strchr(last, ':');
-	  if (user) {
-	    *user = 0;
-	    user++;
-	    desc = strchr(user, ':');
-	    if (desc) {
-	      *desc = 0;
-	      desc++;
-	      addmask_fully(chan, &chan->invites, &global_invites, host, user,
-			    desc, atoi(expi), flags, atoi(add), atoi(last));
-	      return;
-	    }
-	  }
-	}
-      } else {
-	desc = strchr(add, ':');
-	if (desc) {
-	  *desc = 0;
-	  desc++;
-	  addmask_fully(chan, &chan->invites, &global_invites, host, add,
-			desc, atoi(expi), flags, now, 0);
-	  return;
-	}
-      }
-    }
-  }
-  putlog(LOG_MISC, "*", "*** Malformed inviteline for %s.",
-	 chan ? chan->dname : "global_invites");
-}
-
-static void restore_ignore(char *host)
-{
-  char *expi, *user, *added, *desc;
-  int flags = 0;
-  struct igrec *p;
-
-  expi = strchr_unescape(host, ':', '\\');
-  if (expi) {
-    if (*expi == '+') {
-      flags |= IGREC_PERM;
-      expi++;
-    }
-    user = strchr(expi, ':');
-    if (user) {
-      *user = 0;
-      user++;
-      added = strchr(user, ':');
-      if (added) {
-	*added = 0;
-	added++;
-	desc = strchr(added, ':');
-	if (desc) {
-	  *desc = 0;
-	  desc++;
-	} else
-	  desc = NULL;
-      } else {
-	added = "0";
-	desc = NULL;
-      }
-      p = malloc(sizeof(struct igrec));
-
-      p->next = global_ign;
-      global_ign = p;
-      p->expire = atoi(expi);
-      p->added = atoi(added);
-      p->flags = flags;
-      p->igmask = strdup(host);
-      p->user = strdup(user);
-      if (desc)
-	p->msg = strdup(desc);
-      else
-	p->msg = NULL;
-      return;
-    }
-  }
-  putlog(LOG_MISC, "*", "*** Malformed ignore line.");
-}
-
-void tell_user(int idx, struct userrec *u, int master)
-{
-  char s[81], s1[81];
-  int n, l = HANDLEN - strlen(u->handle);
-  time_t now2;
-  struct chanuserrec *ch;
-  struct user_entry *ue;
-  struct laston_info *li;
-  struct flag_record fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
-
-  fr.global = u->flags;
-  fr.udef_global = u->flags_udef;
-  build_flags(s, &fr, NULL);
-  n = 0;
-  li = get_user(&USERENTRY_LASTON, u);
-  if (!li || !li->laston)
-    strcpy(s1, "never");
-  else {
-    now2 = now - li->laston;
-    if (now2 > 86400)
-      strftime(s1, 7, "%d %b", localtime(&li->laston));
-    else
-      strftime(s1, 6, "%H:%M", localtime(&li->laston));
-  }
-  spaces[l] = 0;
-  dprintf(idx, "%s%s %-5s%5d %-15s %s (%-10.10s)\n", u->handle, spaces,
-	  get_user(&USERENTRY_PASS, u) ? "yes" : "no", n, s, s1,
-	  (li && li->lastonplace) ? li->lastonplace : "nowhere");
-  spaces[l] = ' ';
-  /* channel flags? */
-  for (ch = u->chanrec; ch; ch = ch->next) {
-    fr.match = FR_CHAN | FR_GLOBAL;
-    get_user_flagrec(dcc[idx].user, &fr, ch->channel);
-    if (glob_op(fr) || chan_op(fr)) {
-      if (ch->laston == 0L)
-	strcpy(s1, "never");
-      else {
-	now2 = now - (ch->laston);
-	if (now2 > 86400)
-	  strftime(s1, 7, "%d %b", localtime(&ch->laston));
-	else
-	  strftime(s1, 6, "%H:%M", localtime(&ch->laston));
-      }
-      fr.match = FR_CHAN;
-      fr.chan = ch->flags;
-      fr.udef_chan = ch->flags_udef;
-      build_flags(s, &fr, NULL);
-      spaces[HANDLEN - 9] = 0;
-      dprintf(idx, "%s  %-18s %-15s %s\n", spaces, ch->channel, s, s1);
-      spaces[HANDLEN - 9] = ' ';
-      if (ch->info != NULL)
-	dprintf(idx, "    INFO: %s\n", ch->info);
-    }
-  }
-  /* user-defined extra fields */
-  for (ue = u->entries; ue; ue = ue->next)
-    if (!ue->name && ue->type->display)
-      ue->type->display(idx, ue);
-}
-
-/* show user by ident */
-void tell_user_ident(int idx, char *id, int master)
-{
-  struct userrec *u;
-
-  u = get_user_by_handle(userlist, id);
-  if (u == NULL)
-    u = get_user_by_host(id);
-  if (u == NULL) {
-    dprintf(idx, "%s.\n", _("Cant find anyone matching that"));
-    return;
-  }
-  spaces[HANDLEN - 6] = 0;
-  dprintf(idx, "HANDLE%s PASS NOTES FLAGS           LAST\n", spaces);
-  spaces[HANDLEN - 6] = ' ';
-  tell_user(idx, u, master);
-}
-
-/* match string:
- * wildcard to match nickname or hostmasks
- * +attr to find all with attr */
-void tell_users_match(int idx, char *mtch, int start, int limit,
-		      int master, char *chname)
-{
-  struct userrec *u;
-  int fnd = 0, cnt, nomns = 0, flags = 0;
-  struct list_type *q;
-  struct flag_record user, pls, mns;
-
-  dprintf(idx, "*** %s '%s':\n", _("Matching"), mtch);
-  cnt = 0;
-  spaces[HANDLEN - 6] = 0;
-  dprintf(idx, "HANDLE%s PASS NOTES FLAGS           LAST\n", spaces);
-  spaces[HANDLEN - 6] = ' ';
-  if (start > 1)
-    dprintf(idx, "(%s %d)\n", _("skipping first"), start - 1);
-  if (strchr("+-&|", *mtch)) {
-    user.match = pls.match = FR_GLOBAL | FR_BOT | FR_CHAN;
-    break_down_flags(mtch, &pls, &mns);
-    mns.match = pls.match ^ (FR_AND | FR_OR);
-    if (!mns.global && !mns.udef_global && !mns.chan && !mns.udef_chan &&
-	!mns.bot) {
-      nomns = 1;
-      if (!pls.global && !pls.udef_global && !pls.chan && !pls.udef_chan &&
-	  !pls.bot) {
-	/* happy now BB you weenie :P */
-	dprintf(idx, "Unknown flag specified for matching!!\n");
-	return;
-      }
-    }
-    if (!chname || !chname[0])
-      chname = dcc[idx].u.chat->con_chan;
-    flags = 1;
-  }
-  for (u = userlist; u; u = u->next) {
-    if (flags) {
-      get_user_flagrec(u, &user, chname);
-      if (flagrec_eq(&pls, &user)) {
-	if (nomns || !flagrec_eq(&mns, &user)) {
-	  cnt++;
-	  if ((cnt <= limit) && (cnt >= start))
-	    tell_user(idx, u, master);
-	  if (cnt == limit + 1)
-	    dprintf(idx, _("(more than %d matches; list truncated)\n"), limit);
-	}
-      }
-    } else if (wild_match(mtch, u->handle)) {
-      cnt++;
-      if ((cnt <= limit) && (cnt >= start))
-	tell_user(idx, u, master);
-      if (cnt == limit + 1)
-	dprintf(idx, _("(more than %d matches; list truncated)\n"), limit);
-    } else {
-      fnd = 0;
-      for (q = get_user(&USERENTRY_HOSTS, u); q; q = q->next) {
-	if ((wild_match(mtch, q->extra)) && (!fnd)) {
-	  cnt++;
-	  fnd = 1;
-	  if ((cnt <= limit) && (cnt >= start)) {
-	    tell_user(idx, u, master);
-	  }
-	  if (cnt == limit + 1)
-	    dprintf(idx, _("(more than %d matches; list truncated)\n"), limit);
-	}
-      }
-    }
-  }
-  dprintf(idx, _("--- Found %d match%s.\n"), cnt, cnt == 1 ? "" : "es");
-}
-
-void backup_userfile(void)
-{
-  char s[125];
-
-  putlog(LOG_MISC, "*", _("Backing up user file..."));
-  snprintf(s, sizeof s, "%s~bak", userfile);
-  copyfile(userfile, s);
-}
-
-/*
- * tagged lines in the user file:
- * * OLD:
- * #  (comment)
- * ;  (comment)
- * -  hostmask(s)
- * +  email
- * *  dcc directory
- * =  comment
- * :  info line
- * .  xtra (Tcl)
- * !  channel-specific
- * !! global laston
- * :: channel-specific bans
- * NEW:
- * *ban global bans
- * *ignore global ignores
- * ::#chan channel bans
- * - entries in each
- * <handle> begin user entry
- * --KEY INFO - info on each
- * NEWER:
- * % exemptmask(s)
- * @ Invitemask(s)
- * *exempt global exempts
- * *Invite global Invites
- * && channel-specific exempts
- * &&#chan channel exempts
- * $$ channel-specific Invites
- * $$#chan channel Invites
- */
-
-int noxtra = 0;
-int readuserfile(char *file, struct userrec **ret)
-{
-  char *p, buf[512], lasthand[512], *attr, *pass, *code, s1[512], *s;
-  FILE *f;
-  struct userrec *bu, *u = NULL;
-  struct chanset_t *cst = NULL;
-  int i;
-  char ignored[512];
-  struct flag_record fr;
-  struct chanuserrec *cr;
-
-  bu = (*ret);
-  ignored[0] = 0;
-  if (bu == userlist) {
-    clear_chanlist();
-    lastuser = NULL;
-    global_bans = NULL;
-    global_ign = NULL;
-    global_exempts = NULL;
-    global_invites = NULL;
-  }
-  lasthand[0] = 0;
-  f = fopen(file, "r");
-  if (f == NULL)
-    return 0;
-  noxtra = 1;
-  /* read opening comment */
-  s = buf;
-  fgets(s, 180, f);
-  if (s[1] < '4') {
-    fatal(_("Old userfile, use tclsh scripts/weed <userfile> c to convert"), 0);
-  }
-  if (s[1] > '4')
-    fatal(_("Invalid userfile format."), 0);
-  while (!feof(f)) {
-    s = buf;
-    fgets(s, 511, f);
-    if (!feof(f)) {
-      if (s[0] != '#' && s[0] != ';' && s[0]) {
-	code = newsplit(&s);
-	rmspace(s);
-	if (!strcmp(code, "-")) {
-	  if (!lasthand[0])
-	    continue;		/* Skip this entry.	*/
-	  if (u) {		/* only break it down if there a real users */
-	    p = strchr(s, ',');
-	    while (p != NULL) {
-	      splitc(s1, s, ',');
-	      rmspace(s1);
-	      if (s1[0])
-		set_user(&USERENTRY_HOSTS, u, s1);
-	      p = strchr(s, ',');
-	    }
-	  }
-	  /* channel bans are never stacked with , */
-	  if (s[0]) {
-	    if (lasthand[0] && strchr(CHANMETA, lasthand[0]) != NULL)
-	      restore_chanban(cst, s);
-	    else if (lasthand[0] == '*') {
-	      if (lasthand[1] == 'i')
-		restore_ignore(s);
-	      else
-		restore_chanban(NULL, s);
-	    } else if (lasthand[0])
-	      set_user(&USERENTRY_HOSTS, u, s);
-	  }
-	} else if (!strcmp(code, "%")) { /* exemptmasks */
-	  if (!lasthand[0])
-	    continue;		/* Skip this entry.	*/
-	  if (s[0]) {
-	    if (lasthand[0] == '#' || lasthand[0] == '+')
-	      restore_chanexempt(cst,s);
-	    else if (lasthand[0] == '*')
-	      if (lasthand[1] == 'e')
-		restore_chanexempt(NULL, s);
-	  }
-	} else if (!strcmp(code, "@")) { /* Invitemasks */
-	  if (!lasthand[0])
-	    continue;		/* Skip this entry.	*/
-	  if (s[0]) {
-	    if (lasthand[0] == '#' || lasthand[0] == '+')
-	      restore_chaninvite(cst,s);
-	    else if (lasthand[0] == '*')
-	      if (lasthand[1] == 'I')
-		restore_chaninvite(NULL, s);
-	  }
-	} else if (!strcmp(code, "!")) {
-	  /* ! #chan laston flags [info] */
-	  char *chname, *st, *fl;
-
-	  if (u) {
-	    chname = newsplit(&s);
-	    st = newsplit(&s);
-	    fl = newsplit(&s);
-	    rmspace(s);
-	    fr.match = FR_CHAN;
-	    break_down_flags(fl, &fr, 0);
-	    if (findchan_by_dname(chname)) {
-	      for (cr = u->chanrec; cr; cr = cr->next)
-		if (!irccmp(cr->channel, chname))
-		  break;
-	      if (!cr) {
-		cr = (struct chanuserrec *)
-		  malloc(sizeof(struct chanuserrec));
-
-		cr->next = u->chanrec;
-		u->chanrec = cr;
-		strlcpy(cr->channel, chname, sizeof cr->channel);
-		cr->laston = atoi(st);
-		cr->flags = fr.chan;
-		cr->flags_udef = fr.udef_chan;
-		if (s[0])
-		  cr->info = strdup(s);
-		else
-		  cr->info = NULL;
-	      }
-	    }
-	  }
-	} else if (!strncmp(code, "::", 2)) {
-	  /* channel-specific bans */
-	  strcpy(lasthand, &code[2]);
-	  u = NULL;
-	  if (!findchan_by_dname(lasthand)) {
-	    strcpy(s1, lasthand);
-	    strcat(s1, " ");
-	    if (strstr(ignored, s1) == NULL) {
-	      strcat(ignored, lasthand);
-	      strcat(ignored, " ");
-	    }
-	    lasthand[0] = 0;
-	  } else {
-	    cst = findchan_by_dname(lasthand);
-	    if (*ret == userlist) {
-	      clear_masks(cst->bans);
-	      cst->bans = NULL;
-	    } else {
-	      /* otherwise ignore any bans for this channel */
-	      cst = NULL;
-	      lasthand[0] = 0;
-	    }
-	  }
-	} else if (!strncmp(code, "&&", 2)) {
-	  /* channel-specific exempts */
-	  strcpy(lasthand, &code[2]);
-	  u = NULL;
-	  if (!findchan_by_dname(lasthand)) {
-	    strcpy(s1, lasthand);
-	    strcat(s1, " ");
-	    if (strstr(ignored, s1) == NULL) {
-	      strcat(ignored, lasthand);
-	      strcat(ignored, " ");
-	    }
-	    lasthand[0] = 0;
-	  } else {
-	    cst = findchan_by_dname(lasthand);
-	    if (*ret == userlist) {
-	      clear_masks(cst->exempts);
-	      cst->exempts = NULL;
-	    } else {
-	      /* otherwise ignore any exempts for this channel */
-	      cst = NULL;
-	      lasthand[0] = 0;
-	    }
-	  }
-	} else if (!strncmp(code, "$$", 2)) {
-	  /* channel-specific invites */
-	  strcpy(lasthand, &code[2]);
-	  u = NULL;
-	  if (!findchan_by_dname(lasthand)) {
-	    strcpy(s1, lasthand);
-	    strcat(s1, " ");
-	    if (strstr(ignored, s1) == NULL) {
-	      strcat(ignored, lasthand);
-	      strcat(ignored, " ");
-	    }
-	    lasthand[0] = 0;
-	  } else {
-	    cst = findchan_by_dname(lasthand);
-	    if (*ret == userlist) {
-	      clear_masks(cst->invites);
-              cst->invites = NULL;
-	    } else {
-	      /* otherwise ignore any invites for this channel */
-	      cst = NULL;
-	      lasthand[0] = 0;
-	    }
-	  }
-	} else if (!strncmp(code, "--", 2)) {
-	  if (u) {
-	    /* new format storage */
-	    struct user_entry *ue;
-	    int ok = 0;
-
-	    for (ue = u->entries; ue && !ok; ue = ue->next)
-	      if (ue->name && !strcasecmp(code + 2, ue->name)) {
-		struct list_type *list;
-
-		list = malloc(sizeof(struct list_type));
-
-		list->next = NULL;
-		list->extra = strdup(s);
-		list_append((&ue->u.list), list);
-		ok = 1;
-	      }
-	    if (!ok) {
-	      ue = malloc(sizeof(struct user_entry));
-
-	      ue->name = malloc(strlen(code + 1));
-	      ue->type = NULL;
-	      strcpy(ue->name, code + 2);
-	      ue->u.list = malloc(sizeof(struct list_type));
-
-	      ue->u.list->next = NULL;
-	      ue->u.list->extra = strdup(s);
-	      list_insert((&u->entries), ue);
-	    }
-	  }
-	} else if (!irccmp(code, BAN_NAME)) {
-	  strcpy(lasthand, code);
-	  u = NULL;
-	} else if (!irccmp(code, IGNORE_NAME)) {
-	  strcpy(lasthand, code);
-	  u = NULL;
-	} else if (!irccmp(code, EXEMPT_NAME)) {
-	  strcpy(lasthand, code);
-	  u = NULL;
-	} else if (!irccmp(code, INVITE_NAME)) {
-	  strcpy(lasthand, code);
-	  u = NULL;
-	} else if (code[0] == '*') {
-	  lasthand[0] = 0;
-	  u = NULL;
-	} else {
-	  pass = newsplit(&s);
-	  attr = newsplit(&s);
-	  rmspace(s);
-	  if (!attr[0] || !pass[0]) {
-	    putlog(LOG_MISC, "*", "* %s '%s'!", _("Corrupt user record"), code);
-	    lasthand[0] = 0;
-	  } else {
-	    u = get_user_by_handle(bu, code);
-	    if (u) {
-	      putlog(LOG_MISC, "*", "* %s '%s'!", _("Duplicate user record"), code);
-	      lasthand[0] = 0;
-	      u = NULL;
-	    } else {
-	      fr.match = FR_GLOBAL;
-	      break_down_flags(attr, &fr, 0);
-	      strcpy(lasthand, code);
-	      cst = NULL;
-	      if (strlen(code) > HANDLEN)
-		code[HANDLEN] = 0;
-	      if (strlen(pass) > 20) {
-		putlog(LOG_MISC, "*", "* %s '%s'", _("Corrupted password reset for"), code);
-		strcpy(pass, "-");
-	      }
-	      bu = adduser(bu, code, 0, pass,
-			   sanity_check(fr.global &USER_VALID));
-
-	      u = get_user_by_handle(bu, code);
-	      for (i = 0; i < dcc_total; i++)
-		if (dcc[i].type && !strcasecmp(code, dcc[i].nick))
-		  dcc[i].user = u;
-	      u->flags_udef = fr.udef_global;
-	      /* if s starts with '/' it's got file info */
-	    }
-	  }
-	}
-      }
-    }
-  }
-  fclose(f);
-  (*ret) = bu;
-  if (ignored[0]) {
-    putlog(LOG_MISC, "*", "%s %s", _("Ignored masks for channel(s):"), ignored);
-  }
-  putlog(LOG_MISC, "*", "Userfile loaded, unpacking...");
-  for (u = bu; u; u = u->next) {
-    struct user_entry *e;
-
-    if (!(u->flags & USER_BOT) && !strcasecmp (u->handle, myname)) {
-      putlog(LOG_MISC, "*", "(!) I have an user record, but without +b");
-      /* u->flags |= USER_BOT; */
-    }
-
-    for (e = u->entries; e; e = e->next)
-      if (e->name) {
-	struct user_entry_type *uet = find_entry_type(e->name);
-
-	if (uet) {
-	  e->type = uet;
-	  uet->unpack(u, e);
-	  free_null(e->name);
-	}
-      }
-  }
-  noxtra = 0;
-  /* process the user data *now* */
-  return 1;
-}
Index: eggdrop1.7/src/users.h
diff -u eggdrop1.7/src/users.h:1.19 eggdrop1.7/src/users.h:removed
--- eggdrop1.7/src/users.h:1.19	Tue Feb 25 00:52:19 2003
+++ eggdrop1.7/src/users.h	Sat May 10 21:40:38 2003
@@ -1,202 +0,0 @@
-/*
- * users.h --
- *
- *	structures and definitions used by users.c and userrec.c
- */
-/*
- * Copyright (C) 1997 Robey Pointer
- * Copyright (C) 1999, 2000, 2001, 2002, 2003 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.
- */
-/*
- * $Id: users.h,v 1.19 2003/02/25 06:52:19 stdarg Exp $
- */
-
-#ifndef _EGG_USERS_H
-#define _EGG_USERS_H
-
-/* List functions :) , next *must* be the 1st item in the struct */
-struct list_type {
-  struct list_type *next;
-  char *extra;
-};
-
-#define list_insert(a,b) {						\
-    	(b)->next = *(a);						\
-	*(a) = (b);							\
-}
-int list_append(struct list_type **, struct list_type *);
-int list_delete(struct list_type **, struct list_type *);
-int list_contains(struct list_type *, struct list_type *);
-
-
-/* New userfile format stuff
- */
-struct userrec;
-struct user_entry;
-struct user_entry_type {
-  struct user_entry_type *next;
-  int (*got_share) (struct userrec *, struct user_entry *, char *, int);
-  int (*dup_user) (struct userrec *, struct userrec *, struct user_entry *);
-  int (*unpack) (struct userrec *, struct user_entry *);
-  int (*pack) (struct userrec *, struct user_entry *);
-  int (*write_userfile) (FILE *, struct userrec *, struct user_entry *);
-  int (*kill) (struct user_entry *);
-  void *(*get) (struct userrec *, struct user_entry *);
-  int (*set) (struct userrec *, struct user_entry *, void *);
-  void *ignore1;
-  void *ignore2;
-  void (*display) (int idx, struct user_entry *);
-  char *name;
-};
-
-
-#ifndef MAKING_MODS
-extern struct user_entry_type USERENTRY_COMMENT, USERENTRY_LASTON,
- USERENTRY_XTRA, USERENTRY_INFO, USERENTRY_BOTADDR, USERENTRY_HOSTS,
- USERENTRY_PASS, USERENTRY_BOTFL;
-#endif
-
-
-struct laston_info {
-  time_t laston;
-  char *lastonplace;
-};
-
-struct bot_addr {
-  int telnet_port;
-  int relay_port;
-  char *address;
-};
-
-struct user_entry {
-  struct user_entry *next;
-  struct user_entry_type *type;
-  union {
-    char *string;
-    void *extra;
-    struct list_type *list;
-    unsigned long ulong;
-  } u;
-  char *name;
-};
-
-struct xtra_key {
-  struct xtra_key *next;
-  char *key;
-  char *data;
-};
-
-struct filesys_stats {
-  int uploads;
-  int upload_ks;
-  int dnloads;
-  int dnload_ks;
-};
-
-int user_init();
-int add_entry_type(struct user_entry_type *);
-int del_entry_type(struct user_entry_type *);
-struct user_entry_type *find_entry_type(char *);
-struct user_entry *find_user_entry(struct user_entry_type *, struct userrec *);
-void *get_user(struct user_entry_type *, struct userrec *);
-int set_user(struct user_entry_type *, struct userrec *, void *);
-
-void addignore(char *, char *, char *, time_t);
-int delignore(char *);
-void tell_ignores(int, char *);
-int match_ignore(char *);
-void check_expired_ignores();
-void tell_file_stats(int, char *);
-void tell_user_ident(int, char *, int);
-void tell_users_match(int, char *, int, int, int, char *);
-int readuserfile(char *, struct userrec **);
-void backup_userfile(void);
-
-#define bot_flags(u)	((long)get_user(&USERENTRY_BOTFL, (u)))
-#define is_bot(u)	((u) && ((u)->flags & USER_BOT))
-#define is_master(u)	((u) && ((u)->flags & USER_MASTER))
-#define is_owner(u)	((u) && ((u)->flags & USER_OWNER))
-
-/* Fake users used to store ignores and bans
- */
-#define IGNORE_NAME "*ignore"
-#define BAN_NAME    "*ban"
-#define EXEMPT_NAME "*exempt"
-#define INVITE_NAME "*Invite"
-
-/* Channel-specific info
- */
-struct chanuserrec {
-  struct chanuserrec *next;
-  char channel[81];
-  time_t laston;
-  unsigned long flags;
-  unsigned long flags_udef;
-  char *info;
-};
-
-/* New-style userlist
- */
-struct userrec {
-  struct userrec *next;
-  char handle[HANDLEN + 1];
-  unsigned long flags;
-  unsigned long flags_udef;
-  struct chanuserrec *chanrec;
-  struct user_entry *entries;
-};
-
-struct igrec {
-  struct igrec *next;
-  char *igmask;
-  time_t expire;
-  char *user;
-  time_t added;
-  char *msg;
-  int flags;
-};
-extern struct igrec *global_ign;
-
-#define IGREC_PERM   2
-
-/*
- * Note: Flags are in eggdrop.h
- */
-
-struct userrec *adduser();
-struct userrec *get_user_by_handle(struct userrec *, const char *);
-user_t *get_user_authed(char *handle, char *pass);
-struct userrec *get_user_by_host(char *);
-struct userrec *get_user_by_nick(char *);
-struct userrec *check_chanlist();
-struct userrec *check_chanlist_hand();
-
-/* All the default userentry stuff, for code re-use
- */
-int def_unpack(struct userrec *u, struct user_entry *e);
-int def_pack(struct userrec *u, struct user_entry *e);
-int def_kill(struct user_entry *e);
-int def_write_userfile(FILE *f, struct userrec *u, struct user_entry *e);
-void *def_get(struct userrec *u, struct user_entry *e);
-int def_set(struct userrec *u, struct user_entry *e, void *buf);
-int def_gotshare(struct userrec *u, struct user_entry *e,
-		 char *data, int idx);
-void def_display(int idx, struct user_entry *e);
-int def_dupuser(struct userrec *new, struct userrec *old,
-		struct user_entry *e);
-
-#endif				/* !_EGG_USERS_H */
----------------------- End of diff -----------------------


More information about the Changes mailing list