From 2c805c096fe55a140680e5f5ab8b814c2cf25a11 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Sun, 15 May 2016 22:05:16 +1000 Subject: [PATCH] Use /FSET RELSN to format /RELSN relayed messages The RELSN format already existed but wasn't used - instead it used SEND_NOTICE. The other relay types already used similar formats for their relayed messages. The default /FSET RELSN looks just like the default /FSET SEND_NOTICE so this shouldn't be noticeable to anyone using the defaults. This required updating the NOTICE-sending code to correctly stash the 'to' in the right place. --- Changelog | 3 +++ source/commands.c | 2 +- source/misc.c | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 43be63b..bb5fc0f 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,8 @@ [Changes 1.2.2] +* Use /FSET RELSN to format /RELSN relayed messages instead of + /FSET SEND_NOTICE. (caf) + * Change formatting of /FSETs SERVER_NOTICE_KLINE and SERVER_NOTICE_GLINE to show the ban type, and improve formatting of SERVER_NOTICE_CLIENT_CONNECT and SERVER_NOTICE_CLIENT_EXIT. (caf) diff --git a/source/commands.c b/source/commands.c index 6875f00..0011e1b 100644 --- a/source/commands.c +++ b/source/commands.c @@ -4010,7 +4010,7 @@ struct target_type target[4] = add_last_type(&last_sent_msg[0], MAX_LAST_MSG, NULL, NULL, target[i].nick_list, copy); } else if ((i == 2) || (i == 3)) - add_last_type(&last_sent_notice[0], MAX_LAST_MSG, target[i].nick_list, NULL, get_server_nickname(from_server), copy); + add_last_type(&last_sent_notice[0], MAX_LAST_MSG, get_server_nickname(from_server), NULL, target[i].nick_list, copy); send_to_server("%s %s :%s", target[i].command, target[i].nick_list, copy); new_free(©); diff --git a/source/misc.c b/source/misc.c index e6aa7aa..ca11204 100644 --- a/source/misc.c +++ b/source/misc.c @@ -1391,9 +1391,9 @@ BUILT_IN_COMMAND(do_dirlasttype) { /* ??? */ t = &last_sent_notice[0]; size = MAX_LAST_MSG; - form = fget_string_var(FORMAT_SEND_NOTICE_FSET); - sform = "%s %s %s %s"; - numargs = 4; + form = fget_string_var(FORMAT_RELSN_FSET); + sform = "%s %s %s"; + numargs = 2; if (len > 5 && command[len-1] == 'T') what = TOPIC; }