Correct order of arguments to /FSET SEND_ENCRYPTED_MSG and SEND_ENCRYPTED_NOTICE and improve default formatting

The argument order and default format now mirrors SEND_MSG / SEND_NOTICE but with different colours.
This commit is contained in:
Kevin Easton
2017-06-27 16:27:59 +10:00
parent ed597221f2
commit 72ee3e6297
3 changed files with 8 additions and 5 deletions

View File

@@ -1,5 +1,8 @@
[Changes 1.2.2] [Changes 1.2.2]
* Correct order of arguments to /FSET SEND_ENCRYPTED_MSG and
SEND_ENCRYPTED_NOTICE and improve default formatting. (caf)
* Add /FSET ENCRYPTED_PUBLIC and ENCRYPTED_PUBLIC_NOTICE formats, and fix * Add /FSET ENCRYPTED_PUBLIC and ENCRYPTED_PUBLIC_NOTICE formats, and fix
use of ENCRYPTED_PRIVMSG and ENCRYPTED_NOTICE so they use the right number use of ENCRYPTED_PRIVMSG and ENCRYPTED_NOTICE so they use the right number
of arguments. (caf) of arguments. (caf)

View File

@@ -217,8 +217,8 @@
#define DEFAULT_FORMAT_SEND_AWAY_FSET "[Away ($strftime($1 %a %b %d %I:%M%p %Z))] [$tdiff2(${time() - u})] [BX-MsgLog $2]" #define DEFAULT_FORMAT_SEND_AWAY_FSET "[Away ($strftime($1 %a %b %d %I:%M%p %Z))] [$tdiff2(${time() - u})] [BX-MsgLog $2]"
#define DEFAULT_FORMAT_SEND_CTCP_FSET "%K[%rctcp%K(%R$1%K)] %n$2" #define DEFAULT_FORMAT_SEND_CTCP_FSET "%K[%rctcp%K(%R$1%K)] %n$2"
#define DEFAULT_FORMAT_SEND_RCTCP_FSET "%K[%rrctcp%K(%R$1%K)] %n$2-" #define DEFAULT_FORMAT_SEND_RCTCP_FSET "%K[%rrctcp%K(%R$1%K)] %n$2-"
#define DEFAULT_FORMAT_SEND_ENCRYPTED_NOTICE_FSET "%K-%Y$1%K(%p$2%K)-%n $2-" #define DEFAULT_FORMAT_SEND_ENCRYPTED_NOTICE_FSET "%K[%ynotice%K(%Y$1%K)] %n$3-"
#define DEFAULT_FORMAT_SEND_ENCRYPTED_MSG_FSET "%K[%Y$1%K(%p$2%K)]%n $2-" #define DEFAULT_FORMAT_SEND_ENCRYPTED_MSG_FSET "%K[%ymsg%K(%Y$1%K)] %n$3-"
#define DEFAULT_FORMAT_SERVER_FSET "$G%n $1: $2-" #define DEFAULT_FORMAT_SERVER_FSET "$G%n $1: $2-"
@@ -642,8 +642,8 @@
#define DEFAULT_FORMAT_SEND_CTCP_FSET ansi?"%K[%rctcp%K(%R$1%K)] %n$2":"[ctcp($1)] $2" #define DEFAULT_FORMAT_SEND_CTCP_FSET ansi?"%K[%rctcp%K(%R$1%K)] %n$2":"[ctcp($1)] $2"
#define DEFAULT_FORMAT_SEND_RCTCP_FSET ansi?"%K[%rrctcp%K(%R$1%K)] %n$2-":"^B[rctcp(^B$1^B)]^B $2-" #define DEFAULT_FORMAT_SEND_RCTCP_FSET ansi?"%K[%rrctcp%K(%R$1%K)] %n$2-":"^B[rctcp(^B$1^B)]^B $2-"
#define DEFAULT_FORMAT_SEND_DCC_CHAT_FSET ansi?"%K[%rdcc%K(%R$1%K)] %n$2-":"[dcc($1)] $2-" #define DEFAULT_FORMAT_SEND_DCC_CHAT_FSET ansi?"%K[%rdcc%K(%R$1%K)] %n$2-":"[dcc($1)] $2-"
#define DEFAULT_FORMAT_SEND_ENCRYPTED_NOTICE_FSET "%K-%Y$1%K(%p$2%K)-%n $2-" #define DEFAULT_FORMAT_SEND_ENCRYPTED_NOTICE_FSET "%K[%ynotice%K(%Y$1%K)] %n$3-"
#define DEFAULT_FORMAT_SEND_ENCRYPTED_MSG_FSET "%K[%Y$1%K(%p$2%K)]%n $2-" #define DEFAULT_FORMAT_SEND_ENCRYPTED_MSG_FSET "%K[%ymsg%K(%Y$1%K)] %n$3-"
#define DEFAULT_FORMAT_SEND_MSG_FSET ansi?"%K[%rmsg%K(%R$1%K)] %n$3-":"[msg($1)] $3-" #define DEFAULT_FORMAT_SEND_MSG_FSET ansi?"%K[%rmsg%K(%R$1%K)] %n$3-":"[msg($1)] $3-"
#define DEFAULT_FORMAT_SEND_NOTICE_FSET ansi?"%K[%rnotice%K(%R$1%K)] %n$3-":"[notice($1)] $3-" #define DEFAULT_FORMAT_SEND_NOTICE_FSET ansi?"%K[%rnotice%K(%R$1%K)] %n$3-":"[notice($1)] $3-"

View File

@@ -3917,7 +3917,7 @@ struct target_type target[4] =
line = crypt_msg(copy, key); line = crypt_msg(copy, key);
if (hook && do_hook(target[i].hook_type, "%s %s", current_nick, copy)) if (hook && do_hook(target[i].hook_type, "%s %s", current_nick, copy))
put_it("%s", convert_output_format(fget_string_var(target[i].hook_type == SEND_MSG_LIST?FORMAT_SEND_ENCRYPTED_MSG_FSET:FORMAT_SEND_ENCRYPTED_NOTICE_FSET), put_it("%s", convert_output_format(fget_string_var(target[i].hook_type == SEND_MSG_LIST?FORMAT_SEND_ENCRYPTED_MSG_FSET:FORMAT_SEND_ENCRYPTED_NOTICE_FSET),
"%s %s %s %s",update_clock(GET_TIME), get_server_nickname(from_server),current_nick, text)); "%s %s %s %s",update_clock(GET_TIME), current_nick, get_server_nickname(from_server), text));
send_to_server("%s %s :%s", target[i].command, current_nick, line); send_to_server("%s %s :%s", target[i].command, current_nick, line);
new_free(&line); new_free(&line);