1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-01 03:16:38 +02:00

- Added feature that if the chan is +m AND +u (so both!) and you ban IRC!*@* then ops

will no longer see the "relayed" message from IRC.
This commit is contained in:
Bram Matthys
2003-02-26 22:07:11 +00:00
parent 60b77d4485
commit b9ec2de0cb
2 changed files with 26 additions and 3 deletions
+2
View File
@@ -1943,3 +1943,5 @@ seen. gmtime warning still there
- Removed/updated some NS stuff
- Added EventMarkDel which marks an event for deletion for the (next) DoEvents() call.
- Fixed /rehash stall caused by delayed unloading of the scan module (deadlock).
- Added feature that if the chan is +m AND +u (so both!) and you ban IRC!*@* then ops
will no longer see the "relayed" message from IRC.
+24 -3
View File
@@ -569,6 +569,27 @@ extern Ban *is_banned(aClient *cptr, aClient *sptr, aChannel *chptr)
return (tmp);
}
/*
* Checks if the "user" IRC is banned, used by +mu.
*/
static int is_irc_banned(aChannel *chptr)
{
Ban *tmp;
/* Check for this user, ident/host are "illegal" on purpose */
const char *check = "IRC!\001@\001";
for (tmp = chptr->banlist; tmp; tmp = tmp->next)
if (match(tmp->banstr, check) == 0)
{
/* Ban found, now check for +e */
for (tmp = chptr->exlist; tmp; tmp = tmp->next)
if (match(tmp->banstr, check) == 0)
return 0; /* In exception list */
return 1;
}
return 0;
}
/*
* adds a user to a channel by adding another link to the channels member
* chain.
@@ -753,9 +774,9 @@ int can_send(aClient *cptr, aChannel *chptr, char *msgtext)
return (CANNOT_SEND_MODERATED);
}
{
sendto_chanops_butone(cptr, chptr, ":IRC PRIVMSG %s :%s: %s",
chptr->chname, cptr->name,
msgtext);
if (!is_irc_banned(chptr))
sendto_chanops_butone(cptr, chptr, ":IRC PRIVMSG %s :%s: %s",
chptr->chname, cptr->name, msgtext);
return (CANNOT_SEND_MODERATED);
}
}