diff options
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/process.c | 19 | ||||
-rw-r--r-- | version.log | 6 |
3 files changed, 23 insertions, 3 deletions
@@ -3,6 +3,7 @@ Anope Version S V N Provided by Anope Dev. <dev@anope.org> - 2005 02/05 A Support for Unreal 3.2 +I channel mode. [ #00] 02/03 A Merged anope-win32 branch into the main, now Win32 ready. [ #00] +02/10 F mod_current_buffer was not set in all possible cases [#296] 02/07 F Updated userkey information in example.conf. [ #00] 02/06 F Win32 Module Load Errors. [#294] 02/05 F Change Ident function did not update the vident. [#293] diff --git a/src/process.c b/src/process.c index 2a3c04021..d4ea8b29e 100644 --- a/src/process.c +++ b/src/process.c @@ -238,8 +238,23 @@ void process() if (mod_current_buffer) { free(mod_current_buffer); } - if (av[1]) { - mod_current_buffer = sstrdup(av[1]); + /* fix to moduleGetLastBuffer() bug 296 */ + /* old logic was that since its meant for PRIVMSG that we would get + the NICK as AV[0] and the rest would be in av[1], however on Bahamut + based systems when you do /cs it assumes we will translate the command + to the NICK and thus AV[0] is the message. The new logic is to check + 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 */ + if (av[0]) { + if (nickIsServices(av[0], 0)) { + if (av[1]) { + mod_current_buffer = sstrdup(av[1]); + } else { + mod_current_buffer = sstrdup(av[0]); + } + } else { + mod_current_buffer = sstrdup(av[0]); + } } else { mod_current_buffer = NULL; } diff --git a/version.log b/version.log index 22195d648..03b53fc0c 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="8" -VERSION_BUILD="572" +VERSION_BUILD="573" # $Log$ # +# BUILD : 1.7.8 (573) +# BUGS : 296 +# NOTES : mod_current_buffer was not set in all possible cases +# # BUILD : 1.7.8 (572) # BUGS : # NOTES : fixed grammar. |