1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 14:26:39 +02:00

Add filter with third argument of infolist_get for some infolists (bars, bar items, buffers, filters, plugins, irc_server, alias, script list)

This commit is contained in:
Sebastien Helleu
2009-04-24 18:59:22 +02:00
parent e3d2728571
commit 9303884613
13 changed files with 90 additions and 45 deletions
+8 -4
View File
@@ -210,14 +210,18 @@ irc_info_get_infolist_cb (void *data, const char *infolist_name,
}
else
{
/* build list with all servers */
/* build list with all servers matching arguments */
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
if (!irc_server_add_to_infolist (ptr_infolist, ptr_server))
if (!arguments || !arguments[0]
|| weechat_string_match (ptr_server->name, arguments, 0))
{
weechat_infolist_free (ptr_infolist);
return NULL;
if (!irc_server_add_to_infolist (ptr_infolist, ptr_server))
{
weechat_infolist_free (ptr_infolist);
return NULL;
}
}
}
return ptr_infolist;