Skip to content

Commit

Permalink
Dont queue msg if its a WHOIS msg already queued as last msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ortmann committed Oct 13, 2023
1 parent 322bddb commit b22c46a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/mod/server.mod/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,14 @@ static void queue_server(int which, char *msg, int len)
}

if (h->tot < maxqmsg) {
/* Don't queue msg if it's a WHOIS msg already queued as last msg */
if (DP_SERVER && tempq.last &&
!strncasecmp(tempq.last->msg, "WHOIS", 5) &&
!strcasecmp(tempq.last->msg, buf)) {
debug1("WHOIS Message already queued as last message; skipping: %s",
buf);
return;
}
/* Don't queue msg if it's already queued? */
if (!doublemsg) {
for (tq = tempq.head; tq; tq = tqq) {
Expand Down

0 comments on commit b22c46a

Please sign in to comment.