diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-03-12 03:50:10 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-03-12 03:50:10 -0400 |
| commit | d299047dd73b9ac2f78081844cf750d4a2a4ba5a (patch) | |
| tree | 748a121ca4fd5cbbc6f153ee6f37aaee4c3293bb /src | |
| parent | cd79ea697da5d0024b93e9a29d46e629b828c9f8 (diff) | |
| download | fujinet-chat-d299047dd73b9ac2f78081844cf750d4a2a4ba5a.tar.gz | |
Autojoin channels listed in config file.
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -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; } |
