1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-08 22:03:13 +02:00

- Made it so halfops can -h themselves, and chanadmins can -a themselves, reported

by fez (#0001503).
This commit is contained in:
Bram Matthys
2005-02-28 19:50:19 +00:00
parent dc704bd1c0
commit afcfabe8f6
2 changed files with 28 additions and 16 deletions
+2
View File
@@ -727,3 +727,5 @@
system can now be used to properly block words with accents and things like that, just
the way you block English words. Bug reported by MJ12Helios (#0002311).
- Fixed 'russian-w1251', was not working ok at all.
- Made it so halfops can -h themselves, and chanadmins can -a themselves, reported
by fez (#0001503).
+26 -16
View File
@@ -727,26 +727,34 @@ int do_mode_char(aChannel *chptr, long modetype, char modechar, char *param,
if (is_half_op(cptr, chptr) && !is_chan_op(cptr, chptr) && !IsULine(cptr)
&& !op_can_override(cptr) && !samode_in_progress)
{
/* Ugly halfop hack --sts
- this allows halfops to do +b +e +v and so on */
/* (Syzop/20040413: Allow remote halfop modes */
if ((Halfop_mode(modetype) == FALSE) && MyClient(cptr))
if (MyClient(cptr) && (modetype == MODE_HALFOP) && (what == MODE_DEL) &&
param && (find_client(param, NULL) == cptr))
{
int eaten = 0;
while (tab->mode != 0x0)
/* halfop -h'ing him/herself */
/* ALLOW */
} else
{
/* Ugly halfop hack --sts
- this allows halfops to do +b +e +v and so on */
/* (Syzop/20040413: Allow remote halfop modes */
if ((Halfop_mode(modetype) == FALSE) && MyClient(cptr))
{
if (tab->mode == modetype)
int eaten = 0;
while (tab->mode != 0x0)
{
sendto_one(cptr,
err_str(ERR_NOTFORHALFOPS), me.name,
cptr->name, tab->flag);
eaten = tab->parameters;
break;
if (tab->mode == modetype)
{
sendto_one(cptr,
err_str(ERR_NOTFORHALFOPS), me.name,
cptr->name, tab->flag);
eaten = tab->parameters;
break;
}
tab++;
}
tab++;
return eaten;
}
return eaten;
}
} /* not -h self */
}
switch (modetype)
{
@@ -915,7 +923,9 @@ int do_mode_char(aChannel *chptr, long modetype, char modechar, char *param,
}
case MODE_CHANPROT:
REQUIRE_PARAMETER()
if (!IsULine(cptr) && !IsServer(cptr) && !is_chanowner(cptr, chptr) && !samode_in_progress)
/* not uline, not server, not chanowner, not an samode, not -a'ing yourself... */
if (!IsULine(cptr) && !IsServer(cptr) && !is_chanowner(cptr, chptr) && !samode_in_progress &&
!(param && (what == MODE_DEL) && (find_client(param, NULL) == cptr)))
{
if (MyClient(cptr) && !op_can_override(cptr))
{