mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-08 13:43:13 +02:00
Change error messages for bad access in modes
This commit is contained in:
@@ -120,9 +120,12 @@ DLLFUNC int adminonly_topic_allow (aClient *sptr, aChannel *chptr)
|
||||
|
||||
DLLFUNC int adminonly_require_admin(aClient *cptr, aChannel *chptr, char mode, char *para, int checkt, int what)
|
||||
{
|
||||
if (!MyClient(cptr) || (IsSkoAdmin(cptr) && is_chan_op(cptr, chptr)))
|
||||
if (!MyClient(cptr) || IsSkoAdmin(cptr))
|
||||
return EX_ALLOW;
|
||||
|
||||
|
||||
sendto_one(cptr, err_str(ERR_CANNOTCHANGECHANMODE),
|
||||
me.name, cptr->name, 'A', "You are not an Admin");
|
||||
return EX_DENY;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,16 +117,13 @@ DLLFUNC int noknock_mode_del (aChannel *chptr, int modeChar)
|
||||
DLLFUNC int noknock_mode_allow(aClient *cptr, aChannel *chptr, char mode, char *para, int checkt, int what)
|
||||
{
|
||||
|
||||
if (MyClient(cptr) && !is_chanop(cptr,chptr))
|
||||
return EX_DENY;
|
||||
|
||||
if ((mode & EXTCMODE_NOKNOCK) && !(chptr->mode.mode & MODE_INVITEONLY))
|
||||
if (!(chptr->mode.mode & MODE_INVITEONLY))
|
||||
{
|
||||
sendto_one(cptr, err_str(ERR_CANNOTCHANGECHANMODE),
|
||||
me.name, cptr->name, 'K', "+i must be set");
|
||||
return EX_DENY;
|
||||
}
|
||||
|
||||
return EX_ALLOW;
|
||||
return extcmode_default_requirechop(cptr,chptr,mode,para,checkt,what);
|
||||
}
|
||||
|
||||
|
||||
@@ -119,9 +119,12 @@ DLLFUNC int operonly_topic_allow (aClient *sptr, aChannel *chptr)
|
||||
|
||||
DLLFUNC int operonly_require_oper(aClient *cptr, aChannel *chptr, char mode, char *para, int checkt, int what)
|
||||
{
|
||||
if (!MyClient(cptr) || (IsAnOper(cptr) && is_chan_op(cptr, chptr)))
|
||||
if (!MyClient(cptr) || IsAnOper(cptr))
|
||||
return EX_ALLOW;
|
||||
|
||||
|
||||
sendto_one(cptr, err_str(ERR_CANNOTCHANGECHANMODE),
|
||||
me.name, cptr->name, 'O', "You are not an IRC operator");
|
||||
return EX_DENY;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user