<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/3491" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2003-01-21T05:48:03-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/3491</id>

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-21T05:48:03-04:00</updated>

		<published>2003-01-21T05:48:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15601#p15601</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15601#p15601"/>
		<title type="html"><![CDATA[User Level checking]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15601#p15601"><![CDATA[
This seems a little tricky to do.<br><br>You can use XTRA fields, and store yur number, then do checking that way, however, it's another set of permissions to monitor. What if you drop a master down to voice, but foeget the permissions. Bad move.<br><br>You can tyr this, though there is certainly no gurentee it will work. You pass it the handle of the person attmepting the kick (available from the arguemnts passed), the vistims handle (Use hand2nick) and the channel this is happening on. I did it this way, because I can't be bothered with conversions myself.<br><div class="codebox"><p>Code: </p><pre><code>proc checklevel {hand victim chan} {  if {($hand == "*") &amp;&amp; ($victim == "*")} { return 0 }  if {($hand == "*") &amp;&amp; ($victim != "*")} { return -1 }  if {($hand != "*") &amp;&amp; ($victim == "*")} { return 1 }  set v "0"  set h "0"  if {[matchattr $victim "n"]} { incr v 20000 }  if {[matchattr $victim "|n" $chan]} { incr v 10000 }  if {[matchattr $victm "m"]} { incr v 2000 }  if {[matchattr $victim "|m" $chan]} { incr v 1000}  if {[matchattr $victim "o"]} { incr v 200 }  if {[matchattr $victim "|o" $chan]} { incr v 100 }  if {[matchattr $victim "v"]} { incr v 2 }  if {[matchattr $victim "|v" $chan]} { incr v 1 }  if {[matchattr $hand "n"]} { incr h 20000 }  if {[matchattr $hand "|n" $chan]} { incr h 10000 }  if {[matchattr $hand "m"]} { incr h 2000 }  if {[matchattr $hand "|m" $chan]} { incr h 1000}  if {[matchattr $hand "o"]} { incr h 200 }  if {[matchattr $hand "|o" $chan]} { incr h 100 }  if {[matchattr $hand "v"]} { incr h 2 }  if {[matchattr $hand "|v" $chan]} { incr h 1 }  return [expr $h - $v]}</code></pre></div>Note, this is not very complex, but the thought is.It would need lailoring to the way you use permissions.<br><br>IE, is a global voice, higher than a channel OP. In my channels, no, bu many would consider it<br><br>It will return a number, based on who has what. If the number is negative, the victim has more permissions that the kicker. If it's possative, the kicker has more permissions. If it is 0, then they are equal.<br><br>People that are not added to the bot, are considered as having  no permissions. Thus, even if they are added, but have no flags, they are considered as having at least some permission. If neither are added to the bot, they are considered equal. If only one of the 2 has a record, but no flags, they are considered as having more permission.<br><br>Note, the number space between OP and Voices. This will allow you add "Helper" based permissions too. I don't know the flag, and can't be bothered.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Jan 21, 2003 5:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spock]]></name></author>
		<updated>2003-01-20T21:35:45-04:00</updated>

		<published>2003-01-20T21:35:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15584#p15584</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15584#p15584"/>
		<title type="html"><![CDATA[User Level checking]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15584#p15584"><![CDATA[
just use a few if statements and 'matchattr'<br>no point in re-inventing the wheel<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2369">spock</a> — Mon Jan 20, 2003 9:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Weirdo]]></name></author>
		<updated>2003-01-20T20:42:40-04:00</updated>

		<published>2003-01-20T20:42:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15581#p15581</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15581#p15581"/>
		<title type="html"><![CDATA[User Level checking]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15581#p15581"><![CDATA[
I have a public, random insult, kick script to be used for Rule Breaches. Problem is, registered users that are +o, can kick masters and owners, and voices can do that when i set the pub bind to listen to them<br><br>Is there a way that i can do the sort of checking to prevent people from nuking other people that have higher access than them?<br><br>Was thinking of setting user level with a number, and using:<br><br><br>If user is Greater than your user level, than you cant kick. If they are lower or equal to you, itll kick<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1195">Weirdo</a> — Mon Jan 20, 2003 8:42 pm</p><hr />
]]></content>
	</entry>
	</feed>
