From babd3b0a6c4715bba573ffdf7bd07eac62b8cd0f Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Mon, 10 Feb 2020 20:06:25 -0500 Subject: Synthesize a QUIT message to handle on exit So that the end of a saved buffer contains the self quit. --- chat.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'chat.c') diff --git a/chat.c b/chat.c index 1ae7090..f854a33 100644 --- a/chat.c +++ b/chat.c @@ -247,5 +247,13 @@ int main(int argc, char *argv[]) { } else { ircFormat("QUIT\r\n"); } + struct Message msg = { + .nick = self.nick, + .user = self.user, + .cmd = "QUIT", + .params[0] = self.quit, + }; + handle(msg); + uiHide(); } -- cgit 1.4.1-2-gfad0