diff options
author | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-02-11 05:37:05 +0000 |
---|---|---|
committer | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-02-11 05:37:05 +0000 |
commit | f19412921768cfadec42215e538588108d3c8b40 (patch) | |
tree | b31b822ff354e9a92df7ff35caf37300ce93061d | |
parent | d7ad5a8d621b2b25e687134191b9296482fd68de (diff) |
BUILD : 1.7.8 (573) BUGS : 296 NOTES : mod_current_buffer was not set in all possible cases
git-svn-id: svn://svn.anope.org/anope/trunk@573 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@423 5417fbe8-f217-4b02-8779-1006273d7864
-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. |