diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-03-21 11:21:01 +0100 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-03-21 11:21:01 +0100 |
commit | f7658640fba5536e6dbfc2014b28523d8510e970 (patch) | |
tree | 9b625f33b764a2bed524adb9539144b70a6adac6 /src | |
parent | 2ab26367139ebc6173cc117334e3f5d19ee0f071 (diff) | |
parent | 857e27aef6d04edc1e47d52d74031ba279d2da1a (diff) | |
download | irssi-f7658640fba5536e6dbfc2014b28523d8510e970.zip |
Merge pull request #437 from vague666/glob_matching
Use glob matching for activity_hide_targets
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/fe-common-core.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/fe-common/core/fe-common-core.c b/src/fe-common/core/fe-common-core.c index ee7f9424..1b2ab1e2 100644 --- a/src/fe-common/core/fe-common-core.c +++ b/src/fe-common/core/fe-common-core.c @@ -459,15 +459,24 @@ gboolean strarray_find_dest(char **array, const TEXT_DEST_REC *dest) { g_return_val_if_fail(array != NULL, FALSE); + if (strarray_find(array, "*") != -1) + return TRUE; + if (strarray_find(array, dest->target) != -1) return TRUE; if (dest->server_tag != NULL) { - char *tagtarget = g_strdup_printf("%s/%s", dest->server_tag, dest->target); + char *tagtarget = g_strdup_printf("%s/%s", dest->server_tag, "*"); int ret = strarray_find(array, tagtarget); g_free(tagtarget); if (ret != -1) return TRUE; + + tagtarget = g_strdup_printf("%s/%s", dest->server_tag, dest->target); + ret = strarray_find(array, tagtarget); + g_free(tagtarget); + if (ret != -1) + return TRUE; } return FALSE; } |