From abb5e062330abd0444dbc14870cfa62baddfefbd Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Thu, 10 Dec 2009 13:07:23 +0000 Subject: [PATCH] Modify the RPL_WHOISACTUALLY numeric handling to work on Bahamut as well. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@82 13b04d17-f746-0410-82c6-800466cd88b0 --- include/color.h | 6 +++--- source/numbers.c | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/include/color.h b/include/color.h index 5d9febe..721cc6a 100644 --- a/include/color.h +++ b/include/color.h @@ -304,7 +304,7 @@ #define DEFAULT_FORMAT_WHOIS_IDLE_FSET "%K. %Wi%ndle %K:%n $0 hours $1 mins $2 secs (signon: $stime($3))" #define DEFAULT_FORMAT_WHOIS_SHIT_FSET "%g³ %Ws%nhit %K:%n L:$0 [$1] $2 $3-" #define DEFAULT_FORMAT_WHOIS_SIGNON_FSET "%K: %Ws%nignon %K:%n $0-" -#define DEFAULT_FORMAT_WHOIS_ACTUALLY_FSET "%K| %Wa%nctually %K:%n $0 is from $1" +#define DEFAULT_FORMAT_WHOIS_ACTUALLY_FSET "%K| %Wa%nctually %K:%n $0-" #define DEFAULT_FORMAT_WHOIS_NAME_FSET "%G³ %Wi%nrcname %K:%n $0-" #define DEFAULT_FORMAT_WHOIS_NICK_FSET "%G³ %W$0 %K(%n$1@$2%K) (%n$3-%K)" #define DEFAULT_FORMAT_WHOIS_OPER_FSET "%K| %Wo%nperator %K:%n $0 $1-" @@ -725,7 +725,7 @@ #define DEFAULT_FORMAT_WHOIS_IDLE_FSET ansi?"%K: %Wi%ndle : $0 hours $1 mins $2 secs (signon: $stime($3))":": idle : $0 hours $1 mins $2 secs (signon: $stime($3))" #define DEFAULT_FORMAT_WHOIS_SHIT_FSET ansi?"%g| %Ws%nhit : L:$0 [$1] $2 $3-":"| shit : L:$0 [$1] $2 $3-" #define DEFAULT_FORMAT_WHOIS_SIGNON_FSET ansi?"%K| %Ws%nignon : $0-":"| signon : $0-" -#define DEFAULT_FORMAT_WHOIS_ACTUALLY_FSET ansi?"%K: %Wa%nctually : $0 is from $1":": actually : $0 is from $1" +#define DEFAULT_FORMAT_WHOIS_ACTUALLY_FSET ansi?"%K: %Wa%nctually : $0-":": actually : $0-" #define DEFAULT_FORMAT_WHOIS_NAME_FSET ansi?"%G: %Wi%nrcname : $0-":": ircname : $0-" #define DEFAULT_FORMAT_WHOIS_NICK_FSET ansi?"%G| %W$0 %K(%n$1@$2%K) %K(%W$3-%K)":"| $0 ($1@$2) ($3-)" #define DEFAULT_FORMAT_WHOIS_OPER_FSET ansi?"%K| %Wo%nperator : $0 $1-":"| operator : $0 $1-" @@ -747,7 +747,7 @@ #define DEFAULT_FORMAT_WHOIS_IDLE_FSET ansi?"%K: %Wi%ndle : $0 hours $1 mins $2 secs (signon: $stime($3))":": idle : $0 hours $1 mins $2 secs (signon: $stime($3))" #define DEFAULT_FORMAT_WHOIS_SHIT_FSET ansi?"%g| %Ws%nhit : L:$0 [$1] $2 $3-":"| shit : L:$0 [$1] $2 $3-" #define DEFAULT_FORMAT_WHOIS_SIGNON_FSET ansi?"%K %Ws%nignon : $0-":" signon : $0-" -#define DEFAULT_FORMAT_WHOIS_ACTUALLY_FSET ansi?"%K| %Wa%nctually : $0 is from $1":"| actually : $0 is from $1" +#define DEFAULT_FORMAT_WHOIS_ACTUALLY_FSET ansi?"%K| %Wa%nctually : $0-":"| actually : $0-" #define DEFAULT_FORMAT_WHOIS_NAME_FSET ansi?"%G³ %Wi%nrcname : $0-":"³ ircname : $0-" #define DEFAULT_FORMAT_WHOIS_NICK_FSET ansi?"%G| %W$0 %K(%n$1@$2%K) %K(%W$3-%K)":"| $0 ($1@$2) ($3-)" #define DEFAULT_FORMAT_WHOIS_OPER_FSET ansi?"%K| %Wo%nperator : $0 $1-":"| operator : $0 $1-" diff --git a/source/numbers.c b/source/numbers.c index e3bf3b6..0b60705 100644 --- a/source/numbers.c +++ b/source/numbers.c @@ -915,9 +915,18 @@ void numbered_command(char *from, int comm, char **ArgList) case 338: /* #define RPL_WHOISACTUALLY 338 */ { - PasteArgs(ArgList, 1); - if (do_hook(current_numeric, "%s %s %s", from, ArgList[0], ArgList[1])) - put_it("%s", convert_output_format(fget_string_var(FORMAT_WHOIS_ACTUALLY_FSET),"%s %s", ArgList[0], ArgList[1])); + if (ArgList[2]) + { + /* hybrid / ratbox: :actually using host */ + if (do_hook(current_numeric, "%s %s %s %s", from, ArgList[0], ArgList[2], ArgList[1])) + put_it("%s", convert_output_format(fget_string_var(FORMAT_WHOIS_ACTUALLY_FSET),"%s %s %s", ArgList[0], ArgList[2], ArgList[1])); + } + else + { + /* Bahamut: :is actually user@host [ip] */ + if (do_hook(current_numeric, "%s %s %s", from, ArgList[0], ArgList[1])) + put_it("%s", convert_output_format(fget_string_var(FORMAT_WHOIS_ACTUALLY_FSET),"%s %s", ArgList[0], ArgList[1])); + } break; } case 340: /* #define RPL_INVITING_OTHER 340 */