diff options
Diffstat (limited to 'src/command.c')
-rw-r--r-- | src/command.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/command.c b/src/command.c index ae59e7b3..35e0968f 100644 --- a/src/command.c +++ b/src/command.c @@ -114,6 +114,7 @@ static gboolean _cmd_dnd(const char * const inp, struct cmd_help_t help); static gboolean _cmd_chat(const char * const inp, struct cmd_help_t help); static gboolean _cmd_xa(const char * const inp, struct cmd_help_t help); static gboolean _cmd_status(const char * const inp, struct cmd_help_t help); +static gboolean _cmd_wins(const char * const inp, struct cmd_help_t help); /* * The commands are broken down into three groups: @@ -219,6 +220,14 @@ static struct cmd_t main_commands[] = "Example : /join jdev@conference.jabber.org mynick", NULL } } }, + { "/wins", + _cmd_wins, + { "/wins", "List active windows.", + { "/wins", + "-----", + "List all currently active windows and information about them.", + NULL } } }, + { "/sub", _cmd_sub, { "/sub <add|del|req|show> [jid]", "Manage subscriptions.", @@ -688,7 +697,7 @@ cmd_execute_default(const char * const inp) char *recipient = win_get_recipient(); jabber_send_groupchat(inp, recipient); free(recipient); - } else if (win_in_chat()) { + } else if (win_in_chat() || win_in_private_chat()) { char *recipient = win_get_recipient(); jabber_send(inp, recipient); @@ -941,6 +950,13 @@ _cmd_quit(const char * const inp, struct cmd_help_t help) } static gboolean +_cmd_wins(const char * const inp, struct cmd_help_t help) +{ + win_show_wins(); + return TRUE; +} + +static gboolean _cmd_help(const char * const inp, struct cmd_help_t help) { if (strcmp(inp, "/help") == 0) { @@ -1316,7 +1332,7 @@ _cmd_close(const char * const inp, struct cmd_help_t help) char *room_jid = win_get_recipient(); jabber_leave_chat_room(room_jid); win_close_win(); - } else if (win_in_chat()) { + } else if (win_in_chat() || win_in_private_chat()) { if (prefs_get_states()) { char *recipient = win_get_recipient(); |