diff options
Diffstat (limited to 'src/irc.c')
| -rw-r--r-- | src/irc.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -33,6 +33,8 @@ static char scr_prev = SCR_PRIV; char numbuf[10]; +char last_pm_nick[33]; + /* static void join_channel(void) { txbuf_set_str2("JOIN ", channel); @@ -444,10 +446,12 @@ void select_screen(void) { } else { s = scr_getbyname(msg_src); if(!s) { - if(streq_i(msg_cmd, "PRIVMSG")) /* or maybe NOTICE? */ + if(streq_i(msg_cmd, "PRIVMSG")) { /* or maybe NOTICE? */ + strncpy(last_pm_nick, msg_src, 32); s = SCR_PRIV; - else + } else { s = SCR_SERVER; + } } } scr_activate(s); @@ -734,6 +738,11 @@ static void start_keystroke(void) { scr_display(scr_prev); scr_prev = i; return; + case 'q': + case 'Q': + if(*last_pm_nick) + scr_create(last_pm_nick, 1); + return; case 'a': case 'A': switch_to_active(); |
