Page 1 of 1

preventing kick module request

Posted: Tue Nov 15, 2005 10:27 am
by TheCrowX
well i don t know if it s possible but what about a module that prevent users to kick a user that have more access than u even if that user have modes -qao ( for example an op tries to kick the chanowner but when the chanowner isn t oppped and doesn t have any modes in his chan ) well when you try to kick the chanowner when he have the mode +qo on you get a message in the status window that says "KICK nick is a channel owner" "KICK nick is a channel admin" but when he hoesn t have the modes +qo u can kick him
well that module will verify the access using services b4 kickig and if it find that the users who tried to kick the other user that have more access but doesn t have any modes in the channel ( -oqha ) the ircd won t allow the kick the same thing goes for the ban
Thanx in advance

Posted: Tue Nov 15, 2005 10:58 pm
by w00t
Not possible. To the ircd, if a user is -q, they aren't channel owner - that simple :p. You could prevent ChanServ kicks in this manner, but the ircd just does what it's told.

Posted: Wed Nov 16, 2005 1:10 am
by TheCrowX
a user without q mode (-~) could be a chanowner even if he doesn t have his (~ ) lol but i mean a chanowner using service such as anope not only unreal

Posted: Wed Nov 16, 2005 1:25 am
by Stealth
This is impossible all together... The only way this could be possible is if every server on your network had services integrated into the IRCd, which will NEVER happen.

There is no way for Unreal to check with services at all. Even if there were a way, Unreal would also need access to view access lists on the services, it would need to be able to parse and read all the replies from services, and it would need to know what services you use. Since there are so many services, each with slightly different commands, Unreal will never know what to ask the services. Also, what happens when the services go down or lag? This makes people unkickable, because Unreal wouldn't know if the services are gone or lagging, and it can't kick without a reply.

This goes along with what w00t said about the IRCd just doing what it is told. This is also why channel ops need to learn CS commands to override things like bans, invite-only, and keys.

Posted: Wed Nov 16, 2005 1:29 am
by TheCrowX
Thanx to both for the answers i also had doubts it it was possible :) lol
ok now i know this can t happen :) :) :)
Thanx again

Posted: Wed Nov 16, 2005 4:31 am
by aquanight
For most services:

/cs set #channel mlock +Q<whateverelse>

BAM. No one can kick except through ChanServ. And if services go down, ops can just /mode -Q and kick normally until ChanServ comes back (which you'll want if ChanServ's down and can't be asked to kick!).

Posted: Wed Nov 16, 2005 4:44 pm
by Syzop
You should know that is not a foolproof solution, it's a race condition ;p.

Posted: Wed Nov 16, 2005 5:55 pm
by aquanight
True, but for the most part, it works.

Posted: Wed Nov 16, 2005 7:08 pm
by Syzop
Well, a security measure that "works like 80% of the time" (semi-random) is worthless and misleading IMHO

Posted: Wed Nov 16, 2005 7:17 pm
by aquanight
Well, yeah... the only better solution I can think of (short of just give chanops only to those you trust - anyone else can be given halfop or something, since they can't mess with Q :P ) would be something ircd side that restricts mode fiddling but...

I do recall someone once suggested to angrywolf to make an ircd-side mlock mode (eg, +q only + when set no other channel modes can be fiddled with). Maybe if I ever get enough free time I might try to do that out of boredom or something... who knows.