From c7d8cfb9a5db8174d122e7140fbdce5711f48778 Mon Sep 17 00:00:00 2001 From: unknown_lamer Date: Tue, 28 Jun 2005 10:57:28 +0000 Subject: [PATCH] [project @ 2005-06-28 10:57:28 by unknown_lamer] Pass from->getNick () instead of from->getAddress () to hooks/action --- AUTHORS | 2 +- ChangeLog | 3 +++ NEWS | 2 ++ TODO | 9 ++------- source/Parser.C | 11 ++--------- 5 files changed, 10 insertions(+), 17 deletions(-) diff --git a/AUTHORS b/AUTHORS index 176f0de..4285e29 100644 --- a/AUTHORS +++ b/AUTHORS @@ -9,4 +9,4 @@ unknown_lamer on OpenProjects and OFTC Patches by: Jos Hulzink -Dale Smith \ No newline at end of file +Dale Smith (Documentation, Detailed Error Reporting) \ No newline at end of file diff --git a/ChangeLog b/ChangeLog index 52aa3f2..441b35f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-06-28 Clinton Ebadi + * source/Parser.C (parseCTCP): Hook::ACTION is now passed + from->getNick () instead of from->getAddress () (consistency fix) + * source/Main.C: Merged error handling patch from dsmith * source/Parser.C: Merged error handling diff --git a/NEWS b/NEWS index 79ad6fd..9b15378 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,8 @@ Version 2.1.8: * hooks/disconnect is now called when the bot is disconnected from the server unintentionally (network connection timeout, server died, etc.) + * hooks/action is now passed the user's nick instead of the full + address like all other hooks + Message Sending * Implemented bot:notice * bot:msg and bot:say may both send to channels and users (instead diff --git a/TODO b/TODO index b55c38f..5ff87a4 100644 --- a/TODO +++ b/TODO @@ -7,21 +7,16 @@ Done: * bot:protection/[none|no-ban|no-kick|no-deop] constants * bot:aop/[no|yes] constants * Utils::valid_nickname_p should have a configurable max nick length +* More detailed script error reporting +* Commands::sendCTCP, Commands::sendCTCPReply 2.2: * Finish Texinfo manual -* Register a lazy catch handler (in Interp::Startup) that prints more - debug info to the log (filename, line number, column number, - etc.). Check the mod_guile source for the lazy catch handler in it. -* Utils::valid_nickname_p should have a configurable max nick length - (now that most networks allow for longer than nine character - nicks). This is dependant upon the new configuration system * Finish adding commands to Scheme for sending messages (e.g. bot:send-CTCP to send a CTCP message) * Add util functions for doing stuff like quoting CTCP messages * Finish adding hooks/send hooks * Add DCC_CHAT_END hook for Scheme -* Commands::sendCTCP, Commands::sendCTCPReply 2.4: * Use configuration database class diff --git a/source/Parser.C b/source/Parser.C index 813813b..cbecfe7 100644 --- a/source/Parser.C +++ b/source/Parser.C @@ -881,18 +881,11 @@ Parser::parseCTCP (ServerConnection * cnx, else if (command == "ACTION") { cnx->bot->botInterp->RunHooks (Hook::ACTION, - // FIXME: from->getAddress should - // be nick. MAYBE, depending on - // whether this could be - // considered a bug or a feature - // change to normalize - // hooks/action with the other - // hooks. Maybe a 3.0 change? - from->getAddress () + " " + to + + from->getNick () + " " + to + " " + rest, scm_listify (Utils:: str2scm (from-> - getAddress + getNick ()), Utils:: str2scm (to), -- 2.20.1