diff --git a/README b/README index 27e5794..aa872cc 100644 --- a/README +++ b/README @@ -17,22 +17,22 @@ Installation: Stats.mod should work with eggdrop 1.8.4 and newer. -The following instructions assume, ~/eggdrop-1.9.5/ is the directory +The following instructions assume, ~/eggdrop-1.10.0/ is the directory where you installed your eggdrop from. (of course, other source dirs will work as well) Unfortunately, you need to compile stats.mod within your eggdrop source, so if you removed your original compile directory, you'll have to compile the whole bot again... sorry. -Put stats.mod.1.14.tar.gz in ~/eggdrop-1.9.5/src/mod/, -and unpack it (tar xfz stats.mod-1.14.tar.gz). Change directory -back to ~/eggdrop-1.9.5/. Type 'make config'. Type 'make', wait until compiling +Put stats.mod.1.15.tar.gz in ~/eggdrop-1.10.0/src/mod/, +and unpack it (tar xfz stats.mod-1.15.tar.gz). Change directory +back to ~/eggdrop-1.10.0/. Type 'make config'. Type 'make', wait until compiling is done and use 'make install' to install the bot and stats.mod. -Don't forget to copy the language files from ~/eggdrop-1.9.5/src/mod/stats.mod/ +Don't forget to copy the language files from ~/eggdrop-1.10.0/src/mod/stats.mod/ to ~/eggdrop/language/ ! -All settings can be found in ~/eggdrop-1.9.5/src/mod/stats.mod/stats.conf +All settings can be found in ~/eggdrop-1.10.0/src/mod/stats.mod/stats.conf I suggest to copy it to your eggdrop directory (probably ~/eggdrop/), edit it to fit your needs and put a 'source stats.conf' at the end of your eggdrop config file. This will execute the config file with every diff --git a/UPDATES b/UPDATES index 9f1238f..7e65eaf 100644 --- a/UPDATES +++ b/UPDATES @@ -1,9 +1,13 @@ Changes in Stats.mod: (since v1.0.1) -------------------- +1.15 +- Tcl_AppendResult() -> Tcl_SetResult() +- Fix typo: prcedure -> procedure +- Cleanup + 1.14 - Fix heap-use-after-free requires https://github.com/eggheads/eggdrop/pull/1610) - 1.13 - Fix heap-buffer-overflow diff --git a/generic_binary_tree.c b/generic_binary_tree.c index b7565fd..ee95018 100644 --- a/generic_binary_tree.c +++ b/generic_binary_tree.c @@ -161,7 +161,7 @@ static void btree_recursive_free(struct generic_binary_tree *tree, * calls the specified function for each item in the tree. * NOTE: getall() calls the proc _before_ it proceeds into recursion. This way, * one can safely store the tree into a file without mixing up its form. - * But if you delete an item from the called prcedure, this function + * But if you delete an item from the called procedure, this function * WILL crash. Use btree_getall()_expanded instead. */ static void btree_getall(struct generic_binary_tree *tree, void (*func) (void *)) diff --git a/stats.c b/stats.c index 4743064..bd978e6 100644 --- a/stats.c +++ b/stats.c @@ -31,7 +31,7 @@ #define MAKING_STATS #define MODULE_NAME "stats" -#define MODULE_VERSION "1.14" +#define MODULE_VERSION "1.15" #ifndef NO_EGG #include "../module.h" #include "../irc.mod/irc.h" @@ -449,7 +449,7 @@ char *stats_start(Function * global_funcs) chanlangs = NULL; slang_glob_init(); - module_register(MODULE_NAME, stats_table, 1, 14); + module_register(MODULE_NAME, stats_table, 1, 15); if (!(irc_funcs = module_depend(MODULE_NAME, "irc", 1, 0))) return "You need the irc module to use the stats module."; if (!(server_funcs = module_depend(MODULE_NAME, "server", 1, 0))) diff --git a/tclstats.c b/tclstats.c index 82288ea..dd8cd5e 100644 --- a/tclstats.c +++ b/tclstats.c @@ -27,7 +27,7 @@ static int tcl_incrstats STDVAR set = 0; type = typetoi(argv[3]); if (type == -3) { - Tcl_AppendResult(irp, "invalid type", NULL); + Tcl_SetResult(irp, "invalid type", TCL_STATIC); return TCL_ERROR; } incrstats(argv[1], argv[2], type, atoi(argv[4]), set); @@ -41,17 +41,17 @@ static int tcl_getstats STDVAR BADARGS(4, 5, " user chan type ?today?"); if (typetoi(argv[3]) < 0) { - Tcl_AppendResult(irp, "invalid type", NULL); + Tcl_SetResult(irp, "invalid type", TCL_STATIC); return TCL_ERROR; } if (argc == 5) today = atoi(argv[4]); if ((today != 1) && (today != 0)) { - Tcl_AppendResult(irp, "invalid today parameter. Must be 0 or 1.", NULL); + Tcl_SetResult(irp, "invalid today parameter. Must be 0 or 1.", TCL_STATIC); return TCL_ERROR; } sprintf(s, "%d", getstats(argv[1], argv[2], argv[3], today)); - Tcl_AppendResult(irp, s, NULL); + Tcl_SetResult(irp, s, TCL_STATIC); return TCL_OK; } @@ -66,7 +66,7 @@ static int tcl_livestats STDVAR } port = atoi(argv[1]); if (port < 1) { - Tcl_AppendResult(irp, "invalid port", NULL); + Tcl_SetResult(irp, "invalid port", TCL_STATIC); return TCL_ERROR; } start_httpd(port); @@ -83,7 +83,7 @@ static int tcl_resetuser STDVAR chan = argv[2]; ls = findlocstats(chan, user); if (!ls) { - Tcl_AppendResult(irp, "couldn't find stats for user", NULL); + Tcl_SetResult(irp, "couldn't find stats for user", TCL_STATIC); return TCL_ERROR; } resetlocstats(ls); @@ -100,7 +100,7 @@ static int tcl_resetslang STDVAR static int tcl_getslang STDVAR { BADARGS(2, 2, " ID"); - Tcl_AppendResult(irp, getslang(atoi(argv[1])), NULL); + Tcl_SetResult(irp, getslang(atoi(argv[1])), TCL_STATIC); return TCL_OK; } @@ -111,9 +111,9 @@ static int tcl_nick2suser STDVAR BADARGS(3, 3, " nick channel"); m = getschanmember(argv[1], argv[2]); if (m && m->user) - Tcl_AppendResult(irp, m->user->user, NULL); + Tcl_SetResult(irp, m->user->user, TCL_STATIC); else - Tcl_AppendResult(irp, "*", NULL); + Tcl_SetResult(irp, "*", TCL_STATIC); return TCL_OK; } @@ -125,13 +125,13 @@ static int tcl_findsuser STDVAR BADARGS(2, 2, " nick!user@host"); ou = get_user_by_host(argv[1]); if (ou) - Tcl_AppendResult(irp, ou->handle, NULL); + Tcl_SetResult(irp, ou->handle, TCL_STATIC); else { u = findsuser(argv[1]); if (u) - Tcl_AppendResult(irp, u->user, NULL); + Tcl_SetResult(irp, u->user, TCL_STATIC); else - Tcl_AppendResult(irp, "*", NULL); + Tcl_SetResult(irp, "*", TCL_STATIC); } return TCL_OK; } @@ -142,7 +142,7 @@ static int tcl_loadstatsskin STDVAR BADARGS(2, 2, " skinfile"); if (!loadskin(argv[1])) { - Tcl_AppendResult(irp, "Couldn't load skin!!!", NULL); + Tcl_SetResult(irp, "Couldn't load skin!", TCL_STATIC); return TCL_ERROR; } else { return TCL_OK; @@ -170,7 +170,7 @@ static int tcl_loadstatslang STDVAR slang = slang_find(coreslangs, shortname); Assert(slang); if (!slang_load(slang, filename)) { - Tcl_AppendResult(irp, "Couldn't open slang file!!!", NULL); + Tcl_SetResult(irp, "Couldn't open slang file!!!", TCL_STATIC); return TCL_ERROR; } return TCL_OK; @@ -185,13 +185,13 @@ static int tcl_schattr STDVAR BADARGS(3, 99, " user [+/-list] [+/-addhosts] ..."); u = findsuser_by_name(argv[1]); if (!u) { - Tcl_AppendResult(irp, "Unknown user.", NULL); + Tcl_SetResult(irp, "Unknown user.", TCL_STATIC); return TCL_ERROR; } for (i = 2; i < argc; i++) { if (!user_changeflag(u, argv[i])) { snprintf(s, sizeof(s), "Unknown flag: %s", argv[i]); - Tcl_AppendResult(irp, s, NULL); + Tcl_SetResult(irp, s, TCL_STATIC); return TCL_ERROR; } }