summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 14455ed9b..eed073a35 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -748,12 +748,26 @@ void WriteCommonExcept(userrec *u, char* text, ...)
split >> server_two;
if ((FindServerName(server_one)) && (FindServerName(server_two)))
{
- strlcpy(oper_quit,textbuffer,MAXBUF);
+ strlcpy(oper_quit,textbuffer,MAXQUIT);
strlcpy(check,"*.net *.split",MAXQUIT);
quit_munge = true;
}
}
}
+ if ((Config->HideBans) && (total > 13) && (!quit_munge))
+ {
+ char* check = textbuffer;
+ if ((*check++ == 'Q') && (*check++ == 'U') && (*check++ == 'I') && (*check++ == 'T') && (*check++ == ' ') && (*check++ == ':'))
+ {
+ check++;
+ if ((*check++ == '-') && (*check++ == 'L') && (*check++ == 'i') && (*check++ == 'n') && (*check++ == 'e') && (*check++ == 'd') && (*check++ == ':'))
+ {
+ strlcpy(oper_quit,textbuffer,MAXQUIT);
+ *(--check) = 0; // We don't need to strlcpy, we just chop it from the :
+ quit_munge = true;
+ }
+ }
+ }
memset(&already_sent,0,MAX_DESCRIPTORS);
@@ -774,14 +788,7 @@ void WriteCommonExcept(userrec *u, char* text, ...)
already_sent[otheruser->fd] = 1;
if (quit_munge)
{
- if (*otheruser->oper)
- {
- WriteFrom_NoFormat(otheruser->fd,u,oper_quit);
- }
- else
- {
- WriteFrom_NoFormat(otheruser->fd,u,textbuffer);
- }
+ WriteFrom_NoFormat(otheruser->fd,u,*otheruser->oper ? oper_quit : textbuffer);
}
else WriteFrom_NoFormat(otheruser->fd,u,textbuffer);
}