From b4d44860c237c05447f5641f83f19cece2ac9975 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 10 Mar 2026 03:30:13 -0400 Subject: really fix the brokenness with MyDOS (close E: device at startup). --- src/irc.c | 13 +++++++++++-- src/irc.h | 1 + src/main.c | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/irc.c b/src/irc.c index f8338b9..ab630d3 100644 --- a/src/irc.c +++ b/src/irc.c @@ -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(); diff --git a/src/irc.h b/src/irc.h index b0d414d..0d91d3f 100644 --- a/src/irc.h +++ b/src/irc.h @@ -48,6 +48,7 @@ extern char *msg_args[MAX_MSG_ARGS]; extern int msg_argcount; extern char irc_away; extern char bell_type; +extern char last_pm_nick[33]; /* call this once, right after TCP connection is established. */ void irc_register(void); diff --git a/src/main.c b/src/main.c index 56fab25..3bed456 100644 --- a/src/main.c +++ b/src/main.c @@ -142,6 +142,7 @@ int main(void) { hz = (GTIA_READ.pal & 0x0e) ? 60 : 50; + edbox_clear(); scr_init(); while(1) { -- cgit v1.2.3