diff --git a/src/fe-common/core/module-formats.c b/src/fe-common/core/module-formats.c index fd4dea8d..fef4e588 100644 --- a/src/fe-common/core/module-formats.c +++ b/src/fe-common/core/module-formats.c @@ -34,6 +34,7 @@ FORMAT_REC fecommon_core_formats[] = { { "daychange", "Day changed to $[-2.0]{0} $3 $2", 4, { 1, 1, 1, 0 } }, { "talking_with", "You are now talking with {nick $0}", 1, { 0 } }, { "refnum_too_low", "Window number must be greater than 1", 0 }, + { "window_level", "Window level is now $0", 1, { 0 } }, { "windowlist_header", "Ref Name Active item Server Level", 0 }, { "windowlist_line", "$[3]0 %|$[20]1 $[15]2 $[15]3 $4", 5, { 1, 0, 0, 0, 0 } }, { "windowlist_footer", "", 0 }, diff --git a/src/fe-common/core/module-formats.h b/src/fe-common/core/module-formats.h index 785693d7..0ead5f9b 100644 --- a/src/fe-common/core/module-formats.h +++ b/src/fe-common/core/module-formats.h @@ -12,6 +12,7 @@ enum { TXT_DAYCHANGE, TXT_TALKING_WITH, TXT_REFNUM_TOO_LOW, + TXT_WINDOW_LEVEL, TXT_WINDOWLIST_HEADER, TXT_WINDOWLIST_LINE, TXT_WINDOWLIST_FOOTER, diff --git a/src/fe-common/core/window-commands.c b/src/fe-common/core/window-commands.c index a9d21710..b4e9ff68 100644 --- a/src/fe-common/core/window-commands.c +++ b/src/fe-common/core/window-commands.c @@ -173,8 +173,8 @@ static void cmd_window_level(const char *data) level = active_win->level == 0 ? g_strdup("NONE") : bits2level(active_win->level); - printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE, - "Window level is now %s", level); + printformat_window(active_win, MSGLEVEL_CLIENTNOTICE, + TXT_WINDOW_LEVEL, level); g_free(level); } @@ -186,12 +186,16 @@ static void cmd_window_server(const char *data) g_return_if_fail(data != NULL); server = server_find_tag(data); - if (server == NULL) - printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_UNKNOWN_SERVER_TAG, data); - else if (active_win->active == NULL) { + if (server == NULL) { + printformat_window(active_win, MSGLEVEL_CLIENTNOTICE, + TXT_UNKNOWN_SERVER_TAG, data); + } else if (active_win->active == NULL) { window_change_server(active_win, server); - printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_SERVER_CHANGED, server->tag, server->connrec->address, - server->connrec->chatnet == NULL ? "" : server->connrec->chatnet); + printformat_window(active_win, MSGLEVEL_CLIENTNOTICE, + TXT_SERVER_CHANGED, + server->tag, server->connrec->address, + server->connrec->chatnet == NULL ? "" : + server->connrec->chatnet); } } @@ -257,8 +261,8 @@ static void cmd_window_number(const char *data) num = atoi(refnum); if (num < 1) { - printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, - TXT_REFNUM_TOO_LOW); + printformat_window(active_win, MSGLEVEL_CLIENTNOTICE, + TXT_REFNUM_TOO_LOW); } else { window_set_refnum(active_win, num); active_win->sticky_refnum = @@ -400,11 +404,11 @@ static void cmd_window_theme(const char *data) active_win->theme = theme_load(data); if (active_win->theme != NULL) { - printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, - TXT_WINDOW_THEME_CHANGED, data); + printformat_window(active_win, MSGLEVEL_CLIENTNOTICE, + TXT_WINDOW_THEME_CHANGED, data); } else { - printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, - TXT_THEME_NOT_FOUND, data); + printformat_window(active_win, MSGLEVEL_CLIENTNOTICE, + TXT_THEME_NOT_FOUND, data); } }