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:
@@ -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__ */
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user