From d299047dd73b9ac2f78081844cf750d4a2a4ba5a Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 12 Mar 2026 03:50:10 -0400 Subject: Autojoin channels listed in config file. --- src/main.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 094d1ef..fa70df5 100644 --- a/src/main.c +++ b/src/main.c @@ -112,7 +112,18 @@ void fn_disconnect(void) { PIA.pactl |= old_enabled; } -int main(void) { +void init_channels(void) { + char i; + + for(i = 0; i < MAX_SCREENS - 2; i++) { + if(conf->channels[i][0]) { + scr_status[i + 2] = SCR_INACTIVE; + strcpy(scr_names[i + 2], conf->channels[i]); + } + } +} + +void main(void) { bell_type = conf->alert_type; /* TODO: have bell.s read staight from the struct */ OS.shflok = 0; // turn off shift-lock. OS.soundr = 0; // Turn off SIO beeping sound @@ -123,6 +134,7 @@ int main(void) { edbox_clear(); scr_init(); + init_channels(); while(1) { edbox_callback = cmd_execute; @@ -132,7 +144,4 @@ int main(void) { fn_disconnect(); } } - - OS.soundr = 3; // Restore SIO beeping sound - return 0; } -- cgit v1.2.3