1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 04:23:12 +02:00

Make usermode +T block channel CTCP's as well.

This commit is contained in:
i
2019-07-14 19:01:31 +03:00
parent d9bd18c483
commit d22a2a20f0
3 changed files with 7 additions and 0 deletions
+1
View File
@@ -1940,6 +1940,7 @@ struct _configitem_badword {
#define SEND_REMOTE 0x2
#define SEND_ALL (SEND_LOCAL|SEND_REMOTE)
#define SKIP_DEAF 0x4
#define SKIP_CTCP 0x8
#endif /* __struct_include__ */
+3
View File
@@ -344,6 +344,9 @@ int m_message(aClient *cptr, aClient *sptr, MessageTag *recv_mtags, int parc, ch
if (!strchr(CHANCMDPFX,parv[2][0]))
sendflags |= SKIP_DEAF;
if ((*parv[2] == '\001') && strncmp(&parv[2][1], "ACTION ", 7))
sendflags |= SKIP_CTCP;
text = parv[2];
if (MyClient(sptr))
+3
View File
@@ -375,6 +375,9 @@ void sendto_channel(aChannel *chptr, aClient *from, aClient *skip,
/* Don't send to deaf clients (unless 'senddeaf' is set) */
if (IsDeaf(acptr) && (sendflags & SKIP_DEAF))
continue;
/* Don't send to NOCTCP clients */
if (has_user_mode(acptr, 'T') && (sendflags & SKIP_CTCP))
continue;
/* Now deal with 'prefix' (if non-zero) */
if (!prefix)
goto good;