From ba935451d8eb2e90d334676f06c5bf5c8898a4f0 Mon Sep 17 00:00:00 2001 From: "certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Mon, 13 Mar 2006 16:02:30 +0000 Subject: [PATCH] BUILD : 1.7.13 (1007)# BUGS : 476 # NOTES : Applied Trystan's patch. git-svn-id: svn://svn.anope.org/anope/trunk@1007 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@732 5417fbe8-f217-4b02-8779-1006273d7864 --- Changes | 4 +++- src/misc.c | 9 +++++---- src/process.c | 21 ++++++++++++--------- version.log | 6 +++++- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/Changes b/Changes index 1d4d9dfa2..8cf768b2d 100644 --- a/Changes +++ b/Changes @@ -46,6 +46,9 @@ Provided by illu. - 2006 01/25 F Updated the french language file. [ #00] Provided by Trystan - 2006 +03/05 F Fixed moduleNoteiceLang() issue. [#469] +03/12 F moduleGetLastBuffer() returning NULL on alias and pseudo clients [#476] +03/12 F nickIsServices() returns correctly for aliases [ #00] 03/01 A Clarity on module loading status numbers. [#435] 03/01 F Applied ultiamte3 chan sqline patch. [#412] 03/01 F Crash when not giving user for moduleGetLangString. [#454] @@ -53,7 +56,6 @@ Provided by Trystan - 2006 02/20 F Fixed some TS6 issues with do_cmode() and do_nick() [#396] 02/12 F Double unbanning of in certain conditions. [ #00] 01/25 F va_copy issue for various platforms. [ #00] -03/05 F Fixed moduleNoteiceLang() issue. [#469] Provided by ThaPrince - 2006 02/28 F fantasy kick now honours protected, just like cs versions. [ #00] diff --git a/src/misc.c b/src/misc.c index 22f329717..563b39e86 100644 --- a/src/misc.c +++ b/src/misc.c @@ -826,10 +826,11 @@ int nickIsServices(char *tempnick, int bot) s = strchr(nick, '@'); if (s) { - *s++ = 0; - if (stricmp(s, ServerName) != 0) - free(nick); - return found; + *s++ = 0; + if (stricmp(s, ServerName) != 0) { + free(nick); + return found; + } } if (s_NickServ && (stricmp(nick, s_NickServ) == 0)) diff --git a/src/process.c b/src/process.c index bc2876107..bde7dda20 100644 --- a/src/process.c +++ b/src/process.c @@ -20,7 +20,6 @@ extern char *mod_current_module_name; extern User *mod_current_user; extern char *mod_current_buffer; /*************************************************************************/ -/*************************************************************************/ /* Use ignore code? */ int allow_ignore = 1; @@ -139,7 +138,6 @@ IgnoreData *get_ignore(const char *nick) return ign; } -/*************************************************************************/ /*************************************************************************/ /* split_buf: Split a buffer into arguments and store the arguments in an @@ -248,16 +246,21 @@ void process() av[0] to see if its a service nick if so assign mod_current_buffer the value from AV[1] else just assign av[0] - TSL */ /* First check if the ircd proto module overrides this -GD */ + /* fix to moduleGetLastBuffer() bug 476: + fixed in part by adding {} to nickIsServices() + however if you have a pseudo they could not use moduleGetLastBuffer() + cause they are not part of nickIsServices, even those the ac count is 2 + that was ignored and only the first param was passed on which is fine for + Bahmut ircd aliases but not for pseudo clients on. So additional logic is + that if the ac is greater then 1 copy av[1] else copy av[0] + I also changed from if statments, cause attempting to access a array member + that is not set can lead to odd things - TSL (3/12/06) */ if (!anope_set_mod_current_buffer(ac, av)) { - if (av[0]) { + if (ac >= 1) { if (nickIsServices(av[0], 1)) { - if (av[1]) { - mod_current_buffer = sstrdup(av[1]); - } else { - mod_current_buffer = sstrdup(av[0]); - } + mod_current_buffer = (ac > 1 ? sstrdup(av[1]) : sstrdup(av[0])); } else { - mod_current_buffer = sstrdup(av[0]); + mod_current_buffer = (ac > 1 ? sstrdup(av[1]) : sstrdup(av[0])); } } else { mod_current_buffer = NULL; diff --git a/version.log b/version.log index 65b041989..eca13372e 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="13" VERSION_EXTRA="-svn" -VERSION_BUILD="1006" +VERSION_BUILD="1007" # $Log$ # +# BUILD : 1.7.13 (1007) +# BUGS : 476 +# NOTES : Applied Trystan's patch. +# # BUILD : 1.7.13 (1006) # BUGS : 468 # NOTES : Fixed a counting issue in /os stats uplink and ran indent on src/core/os_uplink.c