Close private chats with bare /query
This commit is contained in:
parent
61822435f4
commit
fd74e04fb1
2 changed files with 4 additions and 3 deletions
|
|
@ -132,7 +132,7 @@ instead.
|
|||
| `/nick newnick` | change nickname |
|
||||
| `/msg nick text` | send a private message |
|
||||
| `/notice target text` | send a notice |
|
||||
| `/query nick` | open or focus a private-message window |
|
||||
| `/query [nick]` | open or focus a private-message window, or close the current private chat with no nick |
|
||||
| `/whois nick` | show server information about a nick |
|
||||
| `/who [mask]` | request a user list |
|
||||
| `/me text` | send a CTCP ACTION |
|
||||
|
|
|
|||
5
irc9.c
5
irc9.c
|
|
@ -1834,8 +1834,9 @@ static void do_command(char *line)
|
|||
appendf(w, "-%s- %s", curwin->srv->nick, q);
|
||||
} else if (strcasecmp(cmd, "query") == 0) {
|
||||
char *nick = next_word(&q);
|
||||
if (!nick || !curwin) return;
|
||||
focus_window(window_get(curwin->srv, nick, W_QUERY));
|
||||
if (!curwin) return;
|
||||
if (nick) focus_window(window_get(curwin->srv, nick, W_QUERY));
|
||||
else if (curwin->type == W_QUERY) window_close(curwin->srv, curwin);
|
||||
} else if (strcasecmp(cmd, "who") == 0) {
|
||||
if (!curwin) return;
|
||||
curwin->srv->reply_win = curwin;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue