aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--kirc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kirc.c b/kirc.c
index da12ffc..8429375 100644
--- a/kirc.c
+++ b/kirc.c
@@ -182,7 +182,6 @@ handle_server_message(void) {
}
}
if (message_end == MSG_MAX) {
- /* The buffer is full and doesn't contain \r\n */
message_end = 0;
}
}
@@ -206,9 +205,9 @@ handle_user_input(void) {
}
} else {
size_t msg_len = strlen(usrin);
- /* Remove the trailing newline to add a carriage return */
- if (usrin[msg_len - 1] == '\n')
+ if (usrin[msg_len - 1] == '\n') {
usrin[msg_len - 1] = '\0';
+ }
raw("privmsg #%s :%s\r\n", chan, usrin);
}
}