diff options
Diffstat (limited to 'blabouncer.c')
-rw-r--r-- | blabouncer.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/blabouncer.c b/blabouncer.c index f4b084e..2e569a1 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -842,6 +842,19 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) { continue; } + // STDIN: Quit blabouncer + if (strncmp(outgoingmsg, "quit", strlen("quit")) == 0) { + printf("STDIN command starting: quit\n"); + debugprint(DEBUG_SOME, "dochat(): stdin: STDIN command starting: quit\n"); + + cleanexit(server_ssl, clients, 0, &ircdstate, settings, ""); + + debugprint(DEBUG_SOME, "dochat(): stdin: STDIN command complete: quit\n"); + printf("STDIN command complete: quit\n"); + + continue; + } + debugprint(DEBUG_FULL, "dochat(): stdin: '%s' not processed as a command, sending to server.\n", outgoingmsg); printf("'%s' not processed as a command, sending to server.\n", outgoingmsg); // sourcefd = 0 as this is a trusted message |