mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 15:12:11 +02:00
Add NO_ACT level
This patch adds a new NO_ACT level that can be used with /ignore to ignore activity notifications
This commit is contained in:
parent
b7c1fbd2b9
commit
7d87a02522
2 changed files with 47 additions and 7 deletions
|
|
@ -46,6 +46,7 @@ static const char *levels[] = {
|
|||
"HILIGHTS",
|
||||
|
||||
"NOHILIGHT",
|
||||
"NO_ACT",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -59,6 +60,9 @@ int level_get(const char *level)
|
|||
if (g_ascii_strcasecmp(level, "NEVER") == 0)
|
||||
return MSGLEVEL_NEVER;
|
||||
|
||||
if (g_ascii_strcasecmp(level, "NO_ACT") == 0)
|
||||
return MSGLEVEL_NO_ACT;
|
||||
|
||||
len = strlen(level);
|
||||
if (len == 0) return 0;
|
||||
|
||||
|
|
@ -139,6 +143,9 @@ char *bits2level(int bits)
|
|||
if (bits & MSGLEVEL_NEVER)
|
||||
g_string_append(str, "NEVER ");
|
||||
|
||||
if (bits & MSGLEVEL_NO_ACT)
|
||||
g_string_append(str, "NO_ACT ");
|
||||
|
||||
for (n = 0; levels[n] != NULL; n++) {
|
||||
if (bits & (1L << n))
|
||||
g_string_append_printf(str, "%s ", levels[n]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue