Skip to content

Commit

Permalink
Properly queue/log QUIT message
Browse files Browse the repository at this point in the history
Patch by: michaelortmann

Messages from eggdrop to irc server are logged when raw-log is set. depending on the queue the message was put in, it gets logged like for example [m->] or [s->] The Quit message was sent to server directly without using those queues and thus was not logged.
  • Loading branch information
michaelortmann authored Jan 3, 2024
1 parent 6bc6560 commit a41e1ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mod/server.mod/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2094,9 +2094,13 @@ static void server_postrehash()

static void server_die()
{
char msg[MSGMAX];
cycle_time = 100;
if (server_online) {
dprintf(-serv, "QUIT :%s\n", quit_msg[0] ? quit_msg : "");
snprintf(msg, sizeof msg, "QUIT :%s", quit_msg);
dprintf(-serv, "%s\n", msg);
if (raw_log)
putlog(LOG_SRVOUT, "*", "[->] %s", msg);
sleep(3); /* Give the server time to understand */
}
nuke_server(NULL);
Expand Down

0 comments on commit a41e1ba

Please sign in to comment.