aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-18 19:53:01 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-18 19:53:01 -0400
commit2fd12eafe45c2c5dc11f2288808489f320fdf22b (patch)
treea85ca06a581a7d6c9c69ce343dccb433905f28e3 /src/irc.c
parentc08f3f3c0615d74c56c45cc4f5cc51b0ca7e65f4 (diff)
downloadfujinet-chat-2fd12eafe45c2c5dc11f2288808489f320fdf22b.tar.gz
Clear message buffer on reconnect.
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/irc.c b/src/irc.c
index 6f6b2f0..ad3d214 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -730,7 +730,6 @@ int irc_read(void) {
if(err != 1) {
scr_display(SCR_SERVER);
- regged = irc_away = 0;
ind_net_down();
if(err == 136) {
scr_print_current("Disconnected");
@@ -1023,9 +1022,12 @@ static void keystroke(void) {
/* only exits on error (e.g. connection closed, which might be via /QUIT). */
void irc_loop(void) {
+ /* this stuff happens on every connect. */
hide_motd = conf->hide_motd;
minutes = 0;
start_minute_timer();
+ msgbuf[0] = msgbuf_len = regged = irc_away = 0;
+
while(1) {
ind_check_timer();
if(conf->atract_away) {
@@ -1035,7 +1037,6 @@ void irc_loop(void) {
}
}
if(!irc_read() || !service_minute_timer()) {
- regged = 0;
return;
}
keystroke();