[cvslog] (2002-10-11 09:00:45 UTC) Module eggdrop1.7: Change committed

cvslog cvs at tsss.org
Fri Oct 11 04:01:01 CST 2002


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2002-10-11 09:00:45 UTC
Commited by: stdarg <stdarg at techmonkeys.org>

Modified files:
     lib/eggdrop/eggdrop.h modules/javascript/javascript.c
     modules/perlscript/mod_iface.c modules/perlscript/perlscript.c
     modules/server/binds.c modules/server/dcc.c
     modules/server/input.c modules/server/servsock.c
     modules/tclscript/tclscript.c src/scriptuser.c src/users.h

Log message:

* Started switching over user code to the new interface.

---------------------- diff included ----------------------
Index: eggdrop1.7/lib/eggdrop/eggdrop.h
diff -u eggdrop1.7/lib/eggdrop/eggdrop.h:1.12 eggdrop1.7/lib/eggdrop/eggdrop.h:1.13
--- eggdrop1.7/lib/eggdrop/eggdrop.h:1.12	Wed Oct  9 23:41:59 2002
+++ eggdrop1.7/lib/eggdrop/eggdrop.h	Fri Oct 11 04:00:34 2002
@@ -21,7 +21,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 /*
- * $Id: eggdrop.h,v 1.12 2002/10/10 04:41:59 stdarg Exp $
+ * $Id: eggdrop.h,v 1.13 2002/10/11 09:00:34 stdarg Exp $
  */
 
 #ifndef _EGGDROP_H
@@ -44,6 +44,8 @@
 #include <eggdrop/throttle.h>
 #include <eggdrop/hash_table.h>
 #include <eggdrop/xml.h>
+#include <eggdrop/flags.h>
+#include <eggdrop/users.h>
 
 BEGIN_C_DECLS
 
Index: eggdrop1.7/modules/javascript/javascript.c
diff -u eggdrop1.7/modules/javascript/javascript.c:1.13 eggdrop1.7/modules/javascript/javascript.c:1.14
--- eggdrop1.7/modules/javascript/javascript.c:1.13	Wed Oct  9 23:41:59 2002
+++ eggdrop1.7/modules/javascript/javascript.c	Fri Oct 11 04:00:34 2002
@@ -20,7 +20,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: javascript.c,v 1.13 2002/10/10 04:41:59 stdarg Exp $";
+static const char rcsid[] = "$Id: javascript.c,v 1.14 2002/10/11 09:00:34 stdarg Exp $";
 #endif
 
 #include <stdio.h>
@@ -451,7 +451,7 @@
 		case SCRIPT_USER: {
 			/* An eggdrop user record (struct userrec *). */
 			char *handle;
-			struct userrec *u = (struct userrec *)v->value;
+			user_t *u = v->value;
 
 			if (u) handle = u->handle;
 			else handle = "*";
@@ -534,11 +534,11 @@
 			break;
 		}
 		case SCRIPT_USER: {
-			struct userrec *u;
+			user_t *u;
 			char *handle;
 
 			handle = JS_GetStringBytes(JS_ValueToString(cx, val));
-			u = get_user_by_handle(userlist, handle);
+			u = user_lookup_by_handle(handle);
 			var->value = u;
 			if (!u) {
 				JS_ReportError(cx, "User not found: %s", handle);
Index: eggdrop1.7/modules/perlscript/mod_iface.c
diff -u eggdrop1.7/modules/perlscript/mod_iface.c:1.9 eggdrop1.7/modules/perlscript/mod_iface.c:1.10
--- eggdrop1.7/modules/perlscript/mod_iface.c:1.9	Wed Oct  9 23:41:59 2002
+++ eggdrop1.7/modules/perlscript/mod_iface.c	Fri Oct 11 04:00:34 2002
@@ -20,7 +20,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: mod_iface.c,v 1.9 2002/10/10 04:41:59 stdarg Exp $";
+static const char rcsid[] = "$Id: mod_iface.c,v 1.10 2002/10/11 09:00:34 stdarg Exp $";
 #endif
 
 #include <stdio.h>
@@ -37,21 +37,6 @@
 extern int perlscript_destroy();
 extern script_module_t my_script_interface;
 extern char *real_perl_cmd(char *text);
-
-/* A get_user_by_handle() command for perlscript.c */
-void *fake_get_user_by_handle(char *handle)
-{
-	return get_user_by_handle(userlist, handle);
-}
-
-/* Get the handle from a userrec, or "*" if it's NULL. */
-char *fake_get_handle(void *user_record)
-{
-	struct userrec *u = (struct userrec *)user_record;
-
-	if (u && u->handle) return(u->handle);
-	return("*");
-}
 
 /* Log an error message. */
 int log_error(char *msg)
Index: eggdrop1.7/modules/perlscript/perlscript.c
diff -u eggdrop1.7/modules/perlscript/perlscript.c:1.22 eggdrop1.7/modules/perlscript/perlscript.c:1.23
--- eggdrop1.7/modules/perlscript/perlscript.c:1.22	Sat Sep 21 02:40:16 2002
+++ eggdrop1.7/modules/perlscript/perlscript.c	Fri Oct 11 04:00:34 2002
@@ -20,7 +20,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: perlscript.c,v 1.22 2002/09/21 07:40:16 stdarg Exp $";
+static const char rcsid[] = "$Id: perlscript.c,v 1.23 2002/10/11 09:00:34 stdarg Exp $";
 #endif
 
 #include <stdio.h>
@@ -37,6 +37,8 @@
 #include "lib/egglib/mstack.h"
 #include "lib/egglib/msprintf.h"
 #include <eggdrop/eggdrop.h>
+#include <eggdrop/flags.h>
+#include <eggdrop/users.h>
 
 static PerlInterpreter *ginterp; /* Our global interpreter. */
 
@@ -67,8 +69,6 @@
 } my_args_data_t;
 
 /* Functions from mod_iface.c */
-extern void *fake_get_user_by_handle(char *handle);
-extern char *fake_get_handle(void *user_record);
 extern int log_error(char *msg);
  
 static int my_load_script(void *ignore, char *fname)
@@ -364,8 +364,9 @@
 		case SCRIPT_USER: {
 			char *handle;
 			int str_len;
+			user_t *u = v->value;
 
-			handle = fake_get_handle(v->value);
+			handle = u->handle;
 
 			str_len = strlen(handle);
 			result = newSVpv(handle, str_len);
@@ -410,13 +411,13 @@
 			break;
 		}
 		case SCRIPT_USER: { /* User. */
-			void *user_record;
+			user_t *u;
 			char *handle;
 
 			handle = SvPV(sv, len);
-			if (handle) user_record = fake_get_user_by_handle(handle);
-			else user_record = NULL;
-			var->value = user_record;
+			if (handle) u = user_lookup_by_handle(handle);
+			else u = NULL;
+			var->value = u;
 			break;
 		}
 		default:
Index: eggdrop1.7/modules/server/binds.c
diff -u eggdrop1.7/modules/server/binds.c:1.4 eggdrop1.7/modules/server/binds.c:1.5
--- eggdrop1.7/modules/server/binds.c:1.4	Wed Oct  9 23:41:59 2002
+++ eggdrop1.7/modules/server/binds.c	Fri Oct 11 04:00:34 2002
@@ -54,12 +54,12 @@
 	bind_add_list("ctcp", ctcp_dcc_binds);
 }
 
-void check_tcl_notc(char *nick, char *uhost, struct userrec *u, char *dest, char *arg)
+void check_tcl_notc(char *nick, char *uhost, user_t *u, char *dest, char *arg)
 {
   bind_check(BT_notice, arg, nick, uhost, u, arg, dest);
 }
 
-static int check_tcl_ctcpr(char *nick, char *uhost, struct userrec *u,
+static int check_tcl_ctcpr(char *nick, char *uhost, user_t *u,
 			   char *dest, char *keyword, char *args,
 			   bind_table_t *table)
 {
Index: eggdrop1.7/modules/server/dcc.c
diff -u eggdrop1.7/modules/server/dcc.c:1.3 eggdrop1.7/modules/server/dcc.c:1.4
--- eggdrop1.7/modules/server/dcc.c:1.3	Wed Oct  9 23:41:59 2002
+++ eggdrop1.7/modules/server/dcc.c	Fri Oct 11 04:00:34 2002
@@ -613,7 +613,7 @@
 	bind_check(BT_dcc_chat, nick, nick, uhost, u, type, ip, nport);
 }
 
-static void got_resume(char *nick, char *uhost, struct userrec *u, char *text)
+static void got_resume(char *nick, char *uhost, user_t *u, char *text)
 {
 	int port, pos, n;
 	dcc_send_t *send;
@@ -641,7 +641,7 @@
 	}
 }
 
-static void got_accept(char *nick, char *uhost, struct userrec *u, char *text)
+static void got_accept(char *nick, char *uhost, user_t *u, char *text)
 {
 	int port, pos, n;
 	dcc_send_t *send;
@@ -708,7 +708,7 @@
 }
 
 /* PRIVMSG ((target) :^ADCC CHAT ((type) ((longip) ((port)^A */
-static int got_dcc(char *nick, char *uhost, struct userrec *u, char *dest, char *cmd, char *text)
+static int got_dcc(char *nick, char *uhost, user_t *u, char *dest, char *cmd, char *text)
 {
 	if (!strncasecmp(text, "chat ", 5)) {
 		got_chat(nick, uhost, u, text+5);
Index: eggdrop1.7/modules/server/input.c
diff -u eggdrop1.7/modules/server/input.c:1.2 eggdrop1.7/modules/server/input.c:1.3
--- eggdrop1.7/modules/server/input.c:1.2	Wed Oct  9 23:41:59 2002
+++ eggdrop1.7/modules/server/input.c	Fri Oct 11 04:00:34 2002
@@ -12,7 +12,7 @@
 #include "nicklist.h"
 
 /* 001: welcome to IRC */
-static int got001(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int got001(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
 	current_server.registered = 1;
 
@@ -39,7 +39,7 @@
 /* Got 442: not on channel
 	:server 442 nick #chan :You're not on that channel
  */
-static int got442(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int got442(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
 	struct chanset_t *chan;
 	char *chname = args[1];
@@ -60,7 +60,7 @@
   return 0;
 }
 
-static int check_ctcp_ctcr(int which, int to_channel, struct userrec *u, char *nick, char *uhost, char *dest, char *trailing)
+static int check_ctcp_ctcr(int which, int to_channel, user_t *u, char *nick, char *uhost, char *dest, char *trailing)
 {
 	char *cmd, *space, *logdest, *text, *ctcptype;
 	bind_table_t *table;
@@ -120,7 +120,7 @@
 /* Got a private (or public) message.
 	:nick!uhost PRIVMSG dest :msg
  */
-static int gotmsg(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int gotmsg(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
 	char *dest, *trailing, *first, *space, *text;
 	struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
@@ -198,7 +198,7 @@
 /* Got a private notice.
 	:nick!uhost NOTICE dest :hello there
  */
-static int gotnotice(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int gotnotice(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
 	char *dest, *trailing;
 	struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
@@ -246,7 +246,7 @@
 /* WALLOPS: oper's nuisance
 	:csd.bu.edu WALLOPS :Connect '*.uiuc.edu 6667' from Joshua
  */
-static int gotwall(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int gotwall(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
 	char *msg;
 	int r;
@@ -264,7 +264,7 @@
 /* 432 : Bad nickname
  * If we're registered already, then just inform the user and keep the current
  * nick. Otherwise, generate a random nick so that we can get registered. */
-static int got432(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int got432(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
 	char *badnick;
 
@@ -282,7 +282,7 @@
 /* 433 : Nickname in use
  * Change nicks till we're acceptable or we give up
  */
-static int got433(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int got433(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
 	char *badnick;
 
@@ -299,7 +299,7 @@
 }
 
 /* 435 : Cannot change to a banned nickname. */
-static int got435(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int got435(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
 	char *banned_nick, *chan;
 
@@ -310,7 +310,7 @@
 }
 
 /* 437 : Nickname juped (IRCnet) */
-static int got437(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int got437(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
 	char *chan;
 
@@ -326,13 +326,13 @@
 }
 
 /* 438 : Nick change too fast */
-static int got438(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int got438(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
 	putlog(LOG_MISC, "*", "%s", _("Nick change was too fast."));
 	return(0);
 }
 
-static int got451(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int got451(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
   /* Usually if we get this then we really messed up somewhere
    * or this is a non-standard server, so we log it and kill the socket
@@ -344,7 +344,7 @@
 }
 
 /* Got error */
-static int goterror(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int goterror(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
   putlog(LOG_SERV | LOG_MSGS, "*", "-ERROR from server- %s", args[0]);
   putlog(LOG_SERV, "*", "Disconnecting from server.");
@@ -353,7 +353,7 @@
 }
 
 /* Got nick change.  */
-static int gotnick(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int gotnick(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
 	char *newnick = args[0];
 
@@ -362,14 +362,14 @@
 }
 
 /* Pings are immediately returned, no queue. */
-static int gotping(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int gotping(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
 	printserv(SERVER_NOQUEUE, "PONG :%s", args[0]);
 	return(0);
 }
 
 /* 311 : save our user at host from whois reply */
-static int got311(char *from_nick, char *from_uhost, struct userrec *u, char *cmd, int nargs, char *args[])
+static int got311(char *from_nick, char *from_uhost, user_t *u, char *cmd, int nargs, char *args[])
 {
 	char *nick, *user, *host, *realname;
   
@@ -401,8 +401,8 @@
 	{"435", (Function) got435},
 	{"438", (Function) got438},
 	{"437",	(Function) got437},
-	{"451",	(Function) got451,},
-	{"442",	(Function) got442,},
-	{"311", (Function) got311,},
+	{"451",	(Function) got451},
+	{"442",	(Function) got442},
+	{"311", (Function) got311},
 	{NULL, NULL, NULL, NULL}
 };
Index: eggdrop1.7/modules/server/servsock.c
diff -u eggdrop1.7/modules/server/servsock.c:1.3 eggdrop1.7/modules/server/servsock.c:1.4
--- eggdrop1.7/modules/server/servsock.c:1.3	Wed Oct  9 23:41:59 2002
+++ eggdrop1.7/modules/server/servsock.c	Fri Oct 11 04:00:35 2002
@@ -123,7 +123,7 @@
 	/* The components of any irc message. */
 	irc_msg_t msg;
 	char *from_nick = NULL, *from_uhost = NULL, *prefix = NULL;
-	struct userrec *u = NULL;
+	user_t *u = NULL;
 
 	if (!len) return(0);
 
@@ -139,7 +139,7 @@
 		from_nick = msg.prefix;
 		from_uhost = strchr(from_nick, '!');
 		if (from_uhost) {
-			u = get_user_by_host(from_nick);
+			u = user_lookup_by_irchost(from_nick);
 			*from_uhost = 0;
 			from_uhost++;
 		}
Index: eggdrop1.7/modules/tclscript/tclscript.c
diff -u eggdrop1.7/modules/tclscript/tclscript.c:1.22 eggdrop1.7/modules/tclscript/tclscript.c:1.23
--- eggdrop1.7/modules/tclscript/tclscript.c:1.22	Wed Oct  9 23:41:59 2002
+++ eggdrop1.7/modules/tclscript/tclscript.c	Fri Oct 11 04:00:35 2002
@@ -20,7 +20,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: tclscript.c,v 1.22 2002/10/10 04:41:59 stdarg Exp $";
+static const char rcsid[] = "$Id: tclscript.c,v 1.23 2002/10/11 09:00:35 stdarg Exp $";
 #endif
 
 #include "lib/eggdrop/module.h"
@@ -404,7 +404,7 @@
 		case SCRIPT_USER: {
 			/* An eggdrop user record (struct userrec *). */
 			char *handle;
-			struct userrec *u = (struct userrec *)v->value;
+			user_t *u = v->value;;
 
 			if (u) handle = u->handle;
 			else handle = "*";
@@ -491,12 +491,12 @@
 			break;
 		}
 		case SCRIPT_USER: {
-			struct userrec *u;
+			user_t *u;
 			script_var_t handle;
 
 			/* Call ourselves recursively to get the handle as a string. */
 			tcl_to_c_var(myinterp, obj, &handle, SCRIPT_STRING);
-			u = get_user_by_handle(userlist, (char *)handle.value);
+			u = user_lookup_by_handle((char *)handle.value);
 			if (handle.type & SCRIPT_FREE) free(handle.value);
 			var->value = u;
 			if (!u) {
Index: eggdrop1.7/src/scriptuser.c
diff -u eggdrop1.7/src/scriptuser.c:1.3 eggdrop1.7/src/scriptuser.c:1.4
--- eggdrop1.7/src/scriptuser.c:1.3	Fri Oct 11 01:56:02 2002
+++ eggdrop1.7/src/scriptuser.c	Fri Oct 11 04:00:35 2002
@@ -11,11 +11,8 @@
 	return(NULL);
 }
 
-static int script_handle_to_uid(char *handle)
+static int script_handle_to_uid(user_t *u)
 {
-	user_t *u;
-
-	u = user_lookup_by_handle(handle);
 	if (u) return(u->uid);
 	return(0);
 }
@@ -41,10 +38,8 @@
 	return(0);
 }
 
-static int script_user_addmask(int uid, char *ircmask)
+static int script_user_addmask(user_t *u, char *ircmask)
 {
-	user_t *u = user_lookup_by_uid(uid);
-	if (!u) return(-1);
 	user_add_ircmask(u, ircmask);
 	return(0);
 }
@@ -58,10 +53,9 @@
 	return(NULL);
 }
 
-static char *script_user_get(int nargs, int uid, char *chan, char *setting)
+static char *script_user_get(int nargs, user_t *u, char *chan, char *setting)
 {
 	char *value;
-	user_t *u;
 
 	/* If there's a missing arg, it's the channel. */
 	if (nargs == 2) {
@@ -69,17 +63,13 @@
 		chan = NULL;
 	}
 
-	u = user_lookup_by_uid(uid);
-	if (!u) return(NULL);
-
 	user_get_setting(u, chan, setting, &value);
 	return(value);
 }
 
-static int script_user_set(int nargs, int uid, char *chan, char *setting, char *value)
+static int script_user_set(int nargs, user_t *u, char *chan, char *setting, char *value)
 {
 	int i;
-	user_t *u;
 
 	/* If there's a missing arg, it's the channel. */
 	if (nargs == 3) {
@@ -88,8 +78,6 @@
 		chan = NULL;
 	}
 
-	u = user_lookup_by_uid(uid);
-	if (!u) return(-1);
 	i = user_set_setting(u, chan, setting, value);
 	return(i);
 }
@@ -101,13 +89,8 @@
 	return(0);
 }
 
-static int script_setflags(int uid, char *chan, char *flags)
+static int script_setflags(user_t *u, char *chan, char *flags)
 {
-	user_t *u;
-
-	u = user_lookup_by_uid(uid);
-	if (!u) return(-1);
-
 	if (!flags) {
 		flags = chan;
 		chan = NULL;
@@ -117,14 +100,11 @@
 	return(0);
 }
 
-static char *script_getflags(int uid, char *chan)
+static char *script_getflags(user_t *u, char *chan)
 {
-	user_t *u;
 	flags_t flags;
 	char flagstr[64];
 
-	u = user_lookup_by_uid(uid);
-	if (!u) return(NULL);
 	if (user_get_flags(u, chan, &flags)) return(NULL);
 	flag_to_str(&flags, flagstr);
 	return strdup(flagstr);
@@ -132,16 +112,16 @@
 
 script_command_t script_new_user_cmds[] = {
 	{"", "user_uid_to_handle", script_uid_to_handle, NULL, 1, "i", "uid", SCRIPT_STRING, 0},
-	{"", "user_handle_to_uid", script_handle_to_uid, NULL, 1, "s", "handle", SCRIPT_INTEGER, 0},
+	{"", "user_handle_to_uid", script_handle_to_uid, NULL, 1, "U", "handle", SCRIPT_INTEGER, 0},
 	{"", "user_validhandle", script_validhandle, NULL, 1, "s", "handle", SCRIPT_INTEGER, 0},
 	{"", "user_validuid", script_validuid, NULL, 1, "i", "uid", SCRIPT_INTEGER, 0},
 	{"", "user_add", script_adduser, NULL, 1, "s", "handle", SCRIPT_INTEGER, 0},
-	{"", "user_addmask", script_user_addmask, NULL, 2, "is", "uid ircmask", SCRIPT_INTEGER, 0},
+	{"", "user_addmask", script_user_addmask, NULL, 2, "Us", "user ircmask", SCRIPT_INTEGER, 0},
 	{"", "user_find", script_user_find, NULL, 1, "s", "irchost", SCRIPT_STRING, 0},
-	{"", "user_get", script_user_get, NULL, 2, "iss", "uid ?channel? setting", SCRIPT_STRING, SCRIPT_VAR_ARGS | SCRIPT_PASS_COUNT},
-	{"", "user_set", script_user_set, NULL, 3, "isss", "uid ?channel? setting value", SCRIPT_INTEGER, SCRIPT_VAR_ARGS | SCRIPT_PASS_COUNT},
-	{"", "user_getflags", script_getflags, NULL, 1, "is", "uid ?chan?", SCRIPT_STRING | SCRIPT_FREE, SCRIPT_VAR_ARGS},
-	{"", "user_setflags", script_setflags, NULL, 2, "iss", "uid ?chan? flags", SCRIPT_INTEGER, SCRIPT_VAR_ARGS},
+	{"", "user_get", script_user_get, NULL, 2, "Uss", "user ?channel? setting", SCRIPT_STRING, SCRIPT_VAR_ARGS | SCRIPT_PASS_COUNT},
+	{"", "user_set", script_user_set, NULL, 3, "Usss", "user ?channel? setting value", SCRIPT_INTEGER, SCRIPT_VAR_ARGS | SCRIPT_PASS_COUNT},
+	{"", "user_getflags", script_getflags, NULL, 1, "Us", "user ?chan?", SCRIPT_STRING | SCRIPT_FREE, SCRIPT_VAR_ARGS},
+	{"", "user_setflags", script_setflags, NULL, 2, "Uss", "user ?chan? flags", SCRIPT_INTEGER, SCRIPT_VAR_ARGS},
 	{"", "user_load", user_save, NULL, 0, "s", "?fname?", SCRIPT_INTEGER, SCRIPT_VAR_ARGS},
 	{"", "user_save", script_user_save, NULL, 0, "s", "?fname?", SCRIPT_INTEGER, SCRIPT_VAR_ARGS},
 	{0}
Index: eggdrop1.7/src/users.h
diff -u eggdrop1.7/src/users.h:1.15 eggdrop1.7/src/users.h:1.16
--- eggdrop1.7/src/users.h:1.15	Fri Sep 20 16:41:49 2002
+++ eggdrop1.7/src/users.h	Fri Oct 11 04:00:35 2002
@@ -22,7 +22,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 /*
- * $Id: users.h,v 1.15 2002/09/20 21:41:49 stdarg Exp $
+ * $Id: users.h,v 1.16 2002/10/11 09:00:35 stdarg Exp $
  */
 
 #ifndef _EGG_USERS_H
@@ -164,8 +164,6 @@
   struct chanuserrec *chanrec;
   struct user_entry *entries;
 };
-
-typedef struct userrec user_t;
 
 struct igrec {
   struct igrec *next;
----------------------- End of diff -----------------------



More information about the Changes mailing list