Ver Fonte

* Move tclhash.* to binds.* (tcl hasnt been used in years)

svn: 2823
Bryan Drewery há 20 anos atrás
pai
commit
3d73dd7ea4

+ 1 - 1
src/Makefile.in

@@ -16,6 +16,7 @@ OBJCOPY = @OBJCOPY@
 OBJS = auth.o \
 	base64.o \
 	binary.o \
+	binds.o \
 	bg.o \
 	botcmd.o \
 	botmsg.o \
@@ -47,7 +48,6 @@ OBJS = auth.o \
 	shell.o \
 	socket.o \
 	sprintf.o \
-	tclhash.o \
 	userent.o \
 	userrec.o \
 	users.o

+ 8 - 8
src/tclhash.c → src/binds.c

@@ -19,7 +19,7 @@
  */
 
 /*
- * tclhash.c -- handles:
+ * binds.c -- handles:
  *   bind and unbind
  *   checking and triggering the various in-bot bindings
  *   listing current bindings
@@ -31,7 +31,7 @@
 
 
 #include "common.h"
-#include "tclhash.h"
+#include "binds.h"
 #include "cmds.h"
 #include "debug.h"
 #include "chan.h"
@@ -78,7 +78,7 @@ static int internal_bind_cleanup()
 
 static void schedule_bind_cleanup()
 {
-	if (already_scheduled) 
+	if (already_scheduled)
           return;
 
 	already_scheduled = 1;
@@ -317,7 +317,7 @@ static int bind_entry_exec(bind_table_t *table, bind_entry_t *entry, void **al)
 	}
 
 	return(retval);
-}		
+}
 
 int check_bind(bind_table_t *table, const char *match, struct flag_record *flags, ...)
 {
@@ -325,7 +325,7 @@ int check_bind(bind_table_t *table, const char *match, struct flag_record *flags
 	int ret;
 
 	va_start (args, flags);
-	ret = bind_vcheck_hits (table, match, flags, NULL, args);	
+	ret = bind_vcheck_hits (table, match, flags, NULL, args);
 	va_end (args);
 
 	return ret;
@@ -372,7 +372,7 @@ static int bind_vcheck_hits (bind_table_t *table, const char *match, struct flag
 		if (table->match_type & MATCH_FLAGS) {
 /*wtf?			if (!(entry->user_flags.builtin | entry->user_flags.udef)) cmp = 1;
 			else if (!user_flags) cmp = 0;
-			else 
+			else
 */
 			if (entry->flags & MATCH_FLAGS_AND) cmp = flagrec_eq(&entry->user_flags, flags);
 			else cmp = flagrec_ok(&entry->user_flags, flags);
@@ -433,7 +433,7 @@ void add_builtins(const char *table_name, cmd_t *cmds)
                   cmdlist[cmdi].flags.match = FR_GLOBAL | FR_CHAN;
                   break_down_flags(cmds->flags, &(cmdlist[cmdi].flags), NULL);
                   cmdi++;
-                } 
+                }
 		simple_snprintf(name, sizeof name, "*%s:%s", table->name, cmds->funcname ? cmds->funcname : cmds->name);
 		bind_entry_add(table, cmds->flags, cmds->type, cmds->name, name, 0, cmds->func, NULL);
           }
@@ -444,7 +444,7 @@ void rem_builtins(const char *table_name, cmd_t *cmds)
 {
 	bind_table_t *table = bind_table_lookup(table_name);
 
-	if (!table) 
+	if (!table)
           return;
 
 	char name[50] = "";

+ 4 - 4
src/tclhash.h → src/binds.h

@@ -1,10 +1,10 @@
 /*
- * tclhash.h
+ * binds.h
  *
  */
 
-#ifndef _EGG_TCLHASH_H
-#define _EGG_TCLHASH_H
+#ifndef _EGG_BINDS_H
+#define _EGG_BINDS_H
 
 #include "cmds.h"
 
@@ -80,4 +80,4 @@ bind_table_t *bind_table_lookup_or_fake(const char *name);
 void add_builtins(const char *table_name, cmd_t *cmds);
 void rem_builtins(const char *table_name, cmd_t *cmds);
 
-#endif				/* _EGG_TCLHASH_H */
+#endif				/* _EGG_BINDS_H */

+ 1 - 1
src/botcmd.c

@@ -33,7 +33,7 @@
 #include "src/mod/share.mod/share.h"
 #include "src/mod/update.mod/update.h"
 #include "net.h"
-#include "tclhash.h"
+#include "binds.h"
 #include "misc.h"
 #include "dcc.h"
 #include "userrec.h"

+ 1 - 1
src/cmds.c

@@ -43,7 +43,7 @@
 #include "users.h"
 #include "egg_timer.h"
 #include "userent.h"
-#include "tclhash.h"
+#include "binds.h"
 #include "match.h"
 #include "main.h"
 #include "dccutil.h"

+ 1 - 1
src/core_binds.c

@@ -36,7 +36,7 @@
 #include "set.h"
 #include "users.h"
 #include "misc.h"
-#include "tclhash.h"
+#include "binds.h"
 #include "dcc.h"
 
 extern cmd_t 		C_dcc[];

+ 1 - 1
src/dcc.c

@@ -31,7 +31,7 @@
 #include "dcc.h"
 #include "settings.h"
 #include "enclink.h"
-#include "tclhash.h"
+#include "binds.h"
 #include "adns.h"
 #include "main.h"
 #include "cmds.h"

+ 1 - 1
src/main.c

@@ -45,7 +45,7 @@
 #include "users.h"
 #include "shell.h"
 #include "userrec.h"
-#include "tclhash.h"
+#include "binds.h"
 #include "set.h"
 #include "dccutil.h"
 #include "crypt.h"

+ 1 - 1
src/mod/channels.mod/channels.c

@@ -45,7 +45,7 @@
 #include "src/botnet.h"
 #include "src/botmsg.h"
 #include "src/net.h"
-#include "src/tclhash.h"
+#include "src/binds.h"
 #include "src/cmds.h"
 
 

+ 1 - 1
src/mod/console.mod/console.c

@@ -29,7 +29,7 @@
 #include "console.h"
 #include "src/common.h"
 #include "src/mod/share.mod/share.h"
-#include "src/tclhash.h"
+#include "src/binds.h"
 #include "src/tandem.h"
 #include "src/cmds.h"
 #include "src/users.h"

+ 1 - 1
src/mod/ctcp.mod/ctcp.c

@@ -36,7 +36,7 @@
 #include "src/net.h"
 #include "src/userrec.h"
 #include "src/botmsg.h"
-#include "src/tclhash.h"
+#include "src/binds.h"
 #include "src/egg_timer.h"
 #include "src/mod/server.mod/server.h"
 #include <netinet/in.h>

+ 1 - 1
src/mod/irc.mod/irc.c

@@ -45,7 +45,7 @@
 #include "src/chanprog.h"
 #include "src/auth.h"
 #include "src/userrec.h"
-#include "src/tclhash.h"
+#include "src/binds.h"
 #include "src/userent.h"
 #include "src/egg_timer.h"
 #include "src/mod/share.mod/share.h"

+ 1 - 1
src/mod/server.mod/server.c

@@ -31,7 +31,7 @@
 #include "src/rfc1459.h"
 #include "src/settings.h"
 #include "src/match.h"
-#include "src/tclhash.h"
+#include "src/binds.h"
 #include "src/users.h"
 #include "src/userrec.h"
 #include "src/main.h"

+ 1 - 1
src/mod/server.mod/server.h

@@ -6,7 +6,7 @@
 #ifndef _EGG_MOD_SERVER_SERVER_H
 #define _EGG_MOD_SERVER_SERVER_H
 
-#include "src/tclhash.h"
+#include "src/binds.h"
 #include "src/dcc.h"
 #include "src/set.h"
 

+ 1 - 1
src/mod/update.mod/update.c

@@ -34,7 +34,7 @@
 #include "src/tandem.h"
 #include "src/misc_file.h"
 #include "src/net.h"
-#include "src/tclhash.h"
+#include "src/binds.h"
 #include "src/egg_timer.h"
 #include "src/misc.h"