summaryrefslogtreecommitdiff
path: root/src/plugins/alias
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-04-24 18:59:22 +0200
committerSebastien Helleu <flashcode@flashtux.org>2009-04-24 18:59:22 +0200
commit93038846139cbadfb22f9a3a0da8fed2ee55e057 (patch)
tree36b9b3217a742436d147b50fdbcb3a7687c1e115 /src/plugins/alias
parente3d2728571be0b56dc67253137366d96e3e7282a (diff)
downloadweechat-93038846139cbadfb22f9a3a0da8fed2ee55e057.zip
Add filter with third argument of infolist_get for some infolists (bars, bar items, buffers, filters, plugins, irc_server, alias, script list)
Diffstat (limited to 'src/plugins/alias')
-rw-r--r--src/plugins/alias/alias-info.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/alias/alias-info.c b/src/plugins/alias/alias-info.c
index e7033df3e..956322506 100644
--- a/src/plugins/alias/alias-info.c
+++ b/src/plugins/alias/alias-info.c
@@ -63,14 +63,18 @@ alias_info_get_infolist_cb (void *data, const char *infolist_name,
}
else
{
- /* build list with all aliases */
+ /* build list with all aliases matching arguments */
for (ptr_alias = alias_list; ptr_alias;
ptr_alias = ptr_alias->next_alias)
{
- if (!alias_add_to_infolist (ptr_infolist, ptr_alias))
+ if (!arguments || !arguments[0]
+ || weechat_string_match (ptr_alias->name, arguments, 0))
{
- weechat_infolist_free (ptr_infolist);
- return NULL;
+ if (!alias_add_to_infolist (ptr_infolist, ptr_alias))
+ {
+ weechat_infolist_free (ptr_infolist);
+ return NULL;
+ }
}
}
return ptr_infolist;