From 9883f7e40260b5bd5df981836b2ac719ba37e959 Mon Sep 17 00:00:00 2001 From: "Quinn \"heddwch\" Evans" Date: Mon, 10 Sep 2018 14:47:48 -0600 Subject: [PATCH] Sleep before sending each line to prevent excess flood. --- channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/channel.c b/channel.c index abbf5de..5a6a9f2 100644 --- a/channel.c +++ b/channel.c @@ -181,9 +181,11 @@ void CHANNEL__SEND(char *cobol_buffer, char *state) #ifdef DEBUG printf("Sending: %s\n", msg_buf); #endif + /* Let's quit getting WOPO kicked off Freenode */ + usleep(200000); while(sent < total) { int status = send(sockfd, msg_buf + sent, total - sent, 0); - if(status == -1) { + if(status == -1) { perror("send"); close(sockfd); channel_string_to_cobol(cobol_buffer, "Hung up");