1
0
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:
Travis McArthur
2014-06-07 21:09:49 -07:00
parent d18f9ecfa1
commit 8169c34a64
3 changed files with 10 additions and 7 deletions
+4 -1
View File
@@ -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;
}
+2 -5
View File
@@ -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);
}
+4 -1
View File
@@ -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;
}