Add /on NOTICE_GROUP and /fset NOTICE_GROUP analogous to MSG_GROUP

This hook and format are used for NOTICEs where the destination isn't
a channel and isn't yourself - eg. global targets like $$*.org.  This was
already the case for PRIVMSGs (using the MSG_GROUP hook and format).

Previously these were being routed like a normal NOTICE, and those don't
display the target, so it looked exactly like a private NOTICE to you.

This will also catch server notices sent before you're registered.
This commit is contained in:
Kevin Easton
2016-03-31 23:55:14 +11:00
parent 05eb8d946f
commit b1277f75d4
7 changed files with 59 additions and 22 deletions

View File

@@ -141,6 +141,7 @@ IrcVariable fset_array[] =
{ "NONICK", 0,STR_TYPE_VAR, 0, NULL, NULL, 0, 0},
{ "NOTE", 0,STR_TYPE_VAR, 0, NULL, NULL, 0, 0},
{ "NOTICE", 0,STR_TYPE_VAR, 0, NULL, NULL, 0, 0},
{ "NOTICE_GROUP", 0,STR_TYPE_VAR, 0, NULL, NULL, 0, 0},
{ "NOTIFY_OFF", 0,STR_TYPE_VAR, 0, NULL, NULL, 0, 0},
{ "NOTIFY_ON", 0,STR_TYPE_VAR, 0, NULL, NULL, 0, 0},
{ "NOTIFY_SIGNOFF", 0,STR_TYPE_VAR, 0, NULL, NULL, 0, 0},
@@ -657,6 +658,7 @@ void create_fsets(Window *win, int ansi)
fset_string_var(FORMAT_NONICK_FSET, DEFAULT_FORMAT_NONICK_FSET);
fset_string_var(FORMAT_NOTE_FSET, DEFAULT_FORMAT_NOTE_FSET);
fset_string_var(FORMAT_NOTICE_FSET, DEFAULT_FORMAT_NOTICE_FSET);
fset_string_var(FORMAT_NOTICE_GROUP_FSET, DEFAULT_FORMAT_NOTICE_GROUP_FSET);
fset_string_var(FORMAT_REL_FSET, DEFAULT_FORMAT_REL_FSET);
fset_string_var(FORMAT_RELN_FSET, DEFAULT_FORMAT_RELN_FSET);
fset_string_var(FORMAT_RELM_FSET, DEFAULT_FORMAT_RELM_FSET);