1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Merge pull request #437 from vague666/glob_matching

Use glob matching for activity_hide_targets
This commit is contained in:
ailin-nemui 2016-03-21 11:21:01 +01:00
commit f7658640fb

View File

@ -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;
}