[cvslog] (2003-04-04 20:42:04 UTC) Module eggdrop1.7: Change committed

cvslog cvs at tsss.org
Fri Apr 4 14:42:04 CST 2003


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2003-04-04 20:42:04 UTC
Commited by: stdarg <stdarg at techmonkeys.org>

Modified files:
     doc/SCRIPTING-COMMANDS modules/server/scriptcmds.c

Log message:

* match_nick script function... to match nicks.

---------------------- diff included ----------------------
Index: eggdrop1.7/doc/SCRIPTING-COMMANDS
diff -u eggdrop1.7/doc/SCRIPTING-COMMANDS:1.5 eggdrop1.7/doc/SCRIPTING-COMMANDS:1.6
--- eggdrop1.7/doc/SCRIPTING-COMMANDS:1.5	Fri Apr  4 14:30:03 2003
+++ eggdrop1.7/doc/SCRIPTING-COMMANDS	Fri Apr  4 14:41:54 2003
@@ -265,6 +265,14 @@
 
 *** SERVER MODULE COMMANDS ***
 
+  match_nick <nick1> <nick2>
+    Description: Compare nick1 and nick2 case independently, as specified by
+      the current server.
+    Notes: Should also be used for channel name matching.
+    Returns: < 0 if nick1 < nick2
+             = 0 if nick1 = nick2
+	     > 0 if nick1 > nick2
+
   putserv [noqueue|quick|normal|slow] [next] <text>
     Description: sends text to the server through the specified queue. The
       default queue is the normal queue. You can specify the "next"
Index: eggdrop1.7/modules/server/scriptcmds.c
diff -u eggdrop1.7/modules/server/scriptcmds.c:1.25 eggdrop1.7/modules/server/scriptcmds.c:1.26
--- eggdrop1.7/modules/server/scriptcmds.c:1.25	Fri Apr  4 14:30:03 2003
+++ eggdrop1.7/modules/server/scriptcmds.c	Fri Apr  4 14:41:54 2003
@@ -22,7 +22,7 @@
 
 /* FIXME: #include mess
 #ifndef lint
-static const char rcsid[] = "$Id: scriptcmds.c,v 1.25 2003/04/04 20:30:03 stdarg Exp $";
+static const char rcsid[] = "$Id: scriptcmds.c,v 1.26 2003/04/04 20:41:54 stdarg Exp $";
 #endif
 */
 
@@ -56,6 +56,11 @@
 	return match_my_nick(nick);
 }
 
+static int script_match_nick(char *nick1, char *nick2)
+{
+	return (current_server.strcmp)(nick1, nick2);
+}
+
 static int name_to_priority(const char *queue, const char *next)
 {
 	int prio;
@@ -325,6 +330,7 @@
 static script_command_t server_script_cmds[] = {
         {"", "jump", script_jump, NULL, 0, "i", "num", SCRIPT_INTEGER, SCRIPT_VAR_ARGS | SCRIPT_PASS_COUNT},
         {"", "isbotnick", script_isbotnick, NULL, 1, "s", "nick", SCRIPT_INTEGER, 0},
+	{"", "match_nick", script_match_nick, NULL, 2, "ss", "nick1 nick2", SCRIPT_INTEGER, 0},
 	{"", "server_add", server_add, NULL, 1, "sis", "host ?port? ?pass?", SCRIPT_INTEGER, SCRIPT_VAR_ARGS},
 	{"", "server_del", server_del, NULL, 1, "i", "server-num", SCRIPT_INTEGER, 0},
 	{"", "server_clear", server_clear, NULL, 0, "", "", SCRIPT_INTEGER, 0},
----------------------- End of diff -----------------------


More information about the Changes mailing list