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

Replace various 90% identical functions with some macro's instead.

This commit is contained in:
Bram Matthys
2019-06-22 17:29:03 +02:00
parent 19af2c6b5c
commit cf29aa8feb
6 changed files with 19 additions and 107 deletions
+3 -1
View File
@@ -71,8 +71,10 @@ int nonickchange_check (aClient *sptr, aChannel *chptr)
{
if (!IsOper(sptr) && !IsULine(sptr)
&& IsNoNickChange(chptr)
&& !is_chanownprotop(sptr, chptr))
&& !is_chan_op(sptr, chptr))
{
return HOOK_DENY;
}
return HOOK_ALLOW;
}
+1 -1
View File
@@ -132,7 +132,7 @@ CMD_FUNC(m_part)
continue;
}
if (!ValidatePermissionsForPath("channel:override:banpartmsg",sptr,NULL,chptr,NULL) && !is_chanownprotop(sptr, chptr)) {
if (!ValidatePermissionsForPath("channel:override:banpartmsg",sptr,NULL,chptr,NULL) && !is_chan_op(sptr, chptr)) {
/* Banned? No comment allowed ;) */
if (comment && is_banned(sptr, chptr, BANCHK_MSG, &comment, NULL))
comment = NULL;