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:
commit
f7658640fb
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user