aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/irc.c b/src/irc.c
index e0bf3b1..5035ace 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -19,6 +19,8 @@ char *msg_src, *msg_cmd, *msg_dest, *msg_text;
char *msg_args[MAX_MSG_ARGS];
int msg_argcount;
+char irc_away = 0;
+
static char msgbuf[MAX_MSG] = { 0 };
static char *msg; /* with source removed */
static int msgbuf_len = 0, msg_len = 0;
@@ -644,6 +646,10 @@ static void start_keystroke(void) {
static void keystroke(void) {
if(OS.ch == 0xff) return;
+ if(irc_away) {
+ txbuf_send_str("AWAY");
+ irc_away = 0;
+ }
if(GTIA_READ.consol == 6) { /* start pressed */
start_keystroke();
} else {
@@ -654,6 +660,10 @@ static void keystroke(void) {
/* only exits on error (e.g. connection closed, which might be via /QUIT). */
void irc_loop(void) {
while(1) {
+ if(!irc_away && (OS.atract & 0x80)) {
+ irc_away = 1;
+ txbuf_send_str("AWAY :ATRACT mode");
+ }
if(!irc_read()) return;
keystroke();
}