diff options
author | James Booth <boothj5@gmail.com> | 2018-02-04 21:59:33 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2018-02-04 21:59:33 +0000 |
commit | 8db2389df6e1d0bdfda97bee5d2e9b29b87e438d (patch) | |
tree | 2a412412d402a5ebe8d01d6ad6a5b3f1a6001a79 /src/command | |
parent | a04b02c928baa5d525b879f72cd1acec93d1286a (diff) | |
download | profani-tty-8db2389df6e1d0bdfda97bee5d2e9b29b87e438d.tar.gz |
Filter rooms by simple case insensitive text
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/cmd_defs.c | 12 | ||||
-rw-r--r-- | src/command/cmd_funcs.c | 6 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c index 6d4a6ab9..1bad76cf 100644 --- a/src/command/cmd_defs.c +++ b/src/command/cmd_defs.c @@ -795,21 +795,21 @@ static struct cmd_t command_defs[] = CMD_TAG_GROUPCHAT) CMD_SYN( "/rooms", - "/rooms filter <glob>", + "/rooms filter <text>", "/rooms service <service>", - "/rooms service <service> filter <glob>") + "/rooms service <service> filter <text>") CMD_DESC( "List the chat rooms available at the specified conference service. " "If no argument is supplied, the account preference 'muc.service' is used, 'conference.<domain-part>' by default. " - "The filter argument accepts a glob (including * and ?) and filters the results.") + "The filter argument only shows rooms that contain the provided text, case insensitive.") CMD_ARGS( { "service <service>", "The conference service to query." }, - { "filter <glob>", "The glob to filter results by."}) + { "filter <text>", "The text to filter results by."}) CMD_EXAMPLES( "/rooms", - "/rooms filter *development*", + "/rooms filter development", "/rooms service conference.jabber.org", - "/rooms service conference.jabber.org filter *xsf*") + "/rooms service conference.jabber.org filter \"News Room\"") }, { "/bookmark", diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 65ac7344..bde86835 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -4458,6 +4458,12 @@ cmd_rooms(ProfWin *window, const char *const command, gchar **args) } } + cons_show(""); + if (filter) { + cons_show("Room list request sent: %s, filter: '%s'", service, filter); + } else { + cons_show("Room list request sent: %s", service); + } iq_room_list_request(service, filter); g_free(service); |