diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-04-02 04:09:45 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-04-02 04:09:58 -0400 |
| commit | e9d64eaacaa4e2a71489b24b2b45ac26fbaead3c (patch) | |
| tree | 45777ba39223777b4bf7907c4f8c6c738a8c3e18 /src/irc.c | |
| parent | ab278aca29eebc23eb6538fb5060f51afb8dca86 (diff) | |
| download | fujinet-chat-e9d64eaacaa4e2a71489b24b2b45ac26fbaead3c.tar.gz | |
Replace conf->blah with config.blah (see the definition of "OS" in <atari.h>). 6075 bytes free.
Diffstat (limited to 'src/irc.c')
| -rw-r--r-- | src/irc.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -56,7 +56,7 @@ static void join_channel(void) { */ static void send_nick(void) { - txbuf_set_str2("NICK ", conf->nick); + txbuf_set_str2("NICK ", config.nick); txbuf_send(); } @@ -224,7 +224,7 @@ static void do_ctcp(char is_notice) { static void do_privmsg(void) { /* TODO: this shouldn't be case-sensitive */ - if(strstr(msg_text, conf->nick)) + if(strstr(msg_text, config.nick)) hilite = 1; else hilite = 0; @@ -260,7 +260,7 @@ static void do_notice(void) { static void do_join(void) { ind_act_join(); - if(streq_i(conf->nick, msg_src)) { + if(streq_i(config.nick, msg_src)) { scr_print_active("You"); } else { scr_print_active("\x02=\x02"); @@ -272,10 +272,10 @@ static void do_join(void) { } static void do_nick(void) { - /* Do not overwrite conf->nick with bogus data! sometimes when + /* Do not overwrite config.nick with bogus data! sometimes when we get disconnected, upon reconnect we get a partial message. if it's a NICK, missing its destination argument, we end up - blowing away conf->nick, and subsequent reconnect attempts + blowing away config.nick, and subsequent reconnect attempts fail with "USER: not enough parameters". This is purely a band-aid; a proper solution involves rewriting parse_msg() so it knows how many args each msg type needs, and refuses to @@ -284,9 +284,9 @@ static void do_nick(void) { return; // ind_act_none(); - if(streq_i(conf->nick, msg_src)) { + if(streq_i(config.nick, msg_src)) { scr_print_active("You are "); - strncpy(conf->nick, msg_dest, 32); + strncpy(config.nick, msg_dest, 32); } else { scr_print_active(msg_src); scr_print_active(" is "); @@ -386,7 +386,7 @@ static void do_numeric(void) { /* use the server's idea of what our nick is, in case it got truncated. */ case RPL_WELCOME: - strcpy(conf->nick, msg_args[0]); + strcpy(config.nick, msg_args[0]); regged = 1; do_catchall(1); break; @@ -757,8 +757,8 @@ void irc_register(void) { /* 2nd arg: local (UNIX) username, just use the nick */ /* 3rd arg: "real" name */ - txbuf_set_str3("USER ", conf->nick, " 0 * :"); - txbuf_append_str(conf->real_name); + txbuf_set_str3("USER ", config.nick, " 0 * :"); + txbuf_append_str(config.real_name); txbuf_send(); send_nick(); @@ -1027,14 +1027,14 @@ static void poll_keyboard(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; + hide_motd = config.hide_motd; msgbuf[0] = msgbuf_len = regged = irc_away = minutes = 0; need_rejoin = 1; start_minute_timer(); while(1) { ind_check_timer(); - if(conf->atract_away) { + if(config.atract_away) { if(!irc_away && (OS.atract & 0x80)) { irc_away = 1; txbuf_send_str("AWAY :ATRACT mode"); |
