<?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/19404" />

	<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>2013-04-25T14:18:41-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2013-04-25T14:18:41-04:00</updated>

		<published>2013-04-25T14:18:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101448#p101448</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101448#p101448"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101448#p101448"><![CDATA[
I've been busy lately and didn't have a eggdrop to test on, but will return tomorrow hopefully with my version. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Apr 25, 2013 2:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2013-04-20T08:56:11-04:00</updated>

		<published>2013-04-20T08:56:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101424#p101424</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101424#p101424"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101424#p101424"><![CDATA[
<blockquote class="uncited"><div>If you insist in keeping things into a plain text file, </div></blockquote>You forgot to clarify who the "you" is that you are speaking to.<br><br>If  it is me: I don't "insist" on anything.   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">   <br>I replied to his request.<br><br>I suspect that using a database, as you mentioned, would be "better". Especially for larger numbers of pairs.  I am not studied in it, so it is just a gut feeling for me.<br><br>I was hoping that you would follow through and produce another version, using a database, and explain why it is better too.<br><br><blockquote class="uncited"><div>then at least choose a better approach like reading line by line,</div></blockquote>You forgot to say WHY it is better.<br><blockquote class="uncited"><div> rather than reading the entire file into buffer:<div class="codebox"><p>Code: </p><pre><code>set fh [open "file" r]while {[gets $fh line] &gt;= 0} {# work with $line here}close $fh</code></pre></div>What's even worse is that since there's no flood protection into this, </div></blockquote>Perhaps you overlooked it.  This is still under discussion.   See my post containing a question, above.<br><blockquote class="uncited"><div>so the execution of the code multiple times in a short period of time will just make the script crash the bot with core dump as the buffer is overflowed.</div></blockquote>Why will the buffer overflow?<br><blockquote class="uncited"><div>Our dear <strong class="text-strong"><a href="http://forum.egghelp.org/privmsg.php?mode=post&amp;u=2878" class="postlink">user</a></strong> (a valuable member and moderator of this forum) created a simple <a href="http://forum.egghelp.org/viewtopic.php?t=9009#45537" class="postlink">throttled</a> function that can be used quite easy without much fuss.</div></blockquote>Thanks for the info and the link.<br><br>Feel free to show the original poster - here - how to modify/add it to the code above.   I don't mind at all.    It could be useful learning for him, or for anybody else that ever comes along and finds this thread.   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Sat Apr 20, 2013 8:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2013-04-20T07:43:29-04:00</updated>

		<published>2013-04-20T07:43:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101423#p101423</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101423#p101423"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101423#p101423"><![CDATA[
If you insist in keeping things into a plain text file, then at least choose a better approach like reading line by line, rather than reading the entire file into buffer:<div class="codebox"><p>Code: </p><pre><code>set fh [open "file" r]while {[gets $fh line] &gt;= 0} {# work with $line here}close $fh</code></pre></div>What's even worse is that since there's no flood protection into this, so the execution of the code multiple times in a short period of time will just make the script crash the bot with core dump as the buffer is overflowed.<br><br>Our dear <strong class="text-strong"><a href="http://forum.egghelp.org/privmsg.php?mode=post&amp;u=2878" class="postlink">user</a></strong> (a valuable member and moderator of this forum) created a simple <a href="http://forum.egghelp.org/viewtopic.php?t=9009#45537" class="postlink">throttled</a> function that can be used quite easy without much fuss.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Apr 20, 2013 7:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ViciousPiranha]]></name></author>
		<updated>2013-04-20T05:59:28-04:00</updated>

		<published>2013-04-20T05:59:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101422#p101422</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101422#p101422"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101422#p101422"><![CDATA[
thank you willyw, its perfect, I love you!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12161">ViciousPiranha</a> — Sat Apr 20, 2013 5:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2013-04-19T13:30:08-04:00</updated>

		<published>2013-04-19T13:30:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101419#p101419</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101419#p101419"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101419#p101419"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># April 19, 2013# http://forum.egghelp.org/viewtopic.php?p=101413#101413########################### set path/filename of user nick/level file hereset userlevelfile "scripts/added/forum_requests/userlevelfile.txt"bind pub - "!level" say_levelproc say_level {nick uhost handle chan text} {global userlevelfile        if {![file exists $userlevelfile]} {                putserv "privmsg $chan :$nick: Sorry,  $userlevelfile not found"                return 0            }#reference    http://forum.egghelp.org/viewtopic.php?t=6885        set fname $userlevelfile        set fp [open $fname "r"]        set data [read -nonewline $fp]        close $fp        set lines [split $data "\n"]        if {![llength [split $text]]} {                if {[lsearch -nocase -index 0 $lines $nick] == -1} {                        putserv "privmsg $chan :Sorry, $nick is not in list"                        return 0                   }                #putserv "privmsg $chan :Hey $nick, your level is: [lindex $lines [lsearch -nocase -index 0 $lines $nick] 1]"                putserv "privmsg $chan :Hey $nick, your level is: [lrange [lsearch -nocase -inline -index 0 $lines $nick] 1 end]"           } else {                if {[lsearch -nocase -index 0 $lines [lindex [split $text] 0] ] == -1} {                        putserv "privmsg $chan :Sorry, [lindex [split $text] 0] is not in list"                        return 0                   }               ###putserv "privmsg $chan :User: [lindex $lines [lsearch -nocase -index 0 $lines [lindex [split $text] 0] ] 0]  Level: [lindex $lines [lsearch -nocase -index 0 $lines [lindex [split $text] 0] ] 1] "                putserv "privmsg $chan :User: [lindex $lines [lsearch -nocase -index 0 $lines [lindex [split $text] 0] ] 0]  Level:  [lrange [lsearch -nocase -inline -index 0 $lines [lindex [split $text] 0]] 1 end] "## Again, beware of line wrapping when copy-n-pasting             }}</code></pre></div><br><div class="codebox"><p>Code: </p><pre><code>Aaron VIP one something whateverTony StrangerLoKii voiceMoran whateverBill nobodyTom regular yak yak blah blahJohn VIPGeorge voiceJim OpJeff bannedCharles novicejaCK_test bozoherman 2boo 0foo 1</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Fri Apr 19, 2013 1:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2013-04-19T12:42:49-04:00</updated>

		<published>2013-04-19T12:42:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101418#p101418</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101418#p101418"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101418#p101418"><![CDATA[
<blockquote class="uncited"><div>hey willyw,<br><br>Thanks for that - that is almost perfect.. the only problem is if the users 'level' is more than a single word.. in that case it truncates it..</div></blockquote>Exactly.<br><br>Isn't that what you showed in your examples above?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Fri Apr 19, 2013 12:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ViciousPiranha]]></name></author>
		<updated>2013-04-19T12:29:44-04:00</updated>

		<published>2013-04-19T12:29:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101417#p101417</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101417#p101417"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101417#p101417"><![CDATA[
hey willyw,<br><br>Thanks for that - that is almost perfect.. the only problem is if the users 'level' is more than a single word.. in that case it truncates it..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12161">ViciousPiranha</a> — Fri Apr 19, 2013 12:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2013-04-19T11:00:21-04:00</updated>

		<published>2013-04-19T11:00:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101416#p101416</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101416#p101416"/>
		<title type="html"><![CDATA[Re: Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101416#p101416"><![CDATA[
<blockquote class="uncited"><div>...<br> and also make sure they dont flood the bot with too many requests (only 1 for each 10 seconds)<br>...</div></blockquote><br>Can this be handled satisfactorily by Eggdrop's built in flood protection?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Fri Apr 19, 2013 11:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2013-04-19T11:02:27-04:00</updated>

		<published>2013-04-19T10:59:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101415#p101415</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101415#p101415"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101415#p101415"><![CDATA[
<blockquote class="uncited"><div>Honestly I do not mind how the file would look like as long as it would be easy to set for each user his 'level' and the bot will will be able to retrieve it too<br>...</div></blockquote><div class="codebox"><p>Code: </p><pre><code># April 19, 2013# http://forum.egghelp.org/viewtopic.php?p=101413#101413# Usage:# !level# or # !level &lt;name&gt;########################### set path/filename of user nick/level file hereset userlevelfile "scripts/added/forum_requests/userlevelfile.txt"bind pub - "!level" say_levelproc say_level {nick uhost handle chan text} {global userlevelfile        if {![file exists $userlevelfile]} {                putserv "privmsg $chan :$nick: Sorry,  $userlevelfile not found"                return 0            }#reference    http://forum.egghelp.org/viewtopic.php?t=6885        set fname $userlevelfile        set fp [open $fname "r"]        set data [read -nonewline $fp]        close $fp        set lines [split $data "\n"]       if {![llength [split $text]]} {                if {[lsearch -nocase -index 0 $lines $nick] == -1} {                        putserv "privmsg $chan :Sorry, $nick is not in list"                        return 0                   }                putserv "privmsg $chan :Hey $nick, your level is: [lindex $lines [lsearch -nocase -index 0 $lines $nick] 1]"           } else {                if {[lsearch -nocase -index 0 $lines [lindex [split $text] 0] ] == -1} {                        putserv "privmsg $chan :Sorry, [lindex [split $text] 0] is not in list"                        return 0                   }                putserv "privmsg $chan :User: [lindex $lines [lsearch -nocase -index 0 $lines [lindex [split $text] 0] ] 0] Level: [lindex $lines [lsearch -nocase -index 0 $lines [lindex [split $text] 0] ] 1] "# Beware of line wrapping when copy-n-pasting. The immediate above is all on one line.             }}</code></pre></div><br>Experiment with the above. (I have tested it, but only briefly)<br>I have no idea how well it will handle a list with 800+ pairs.<br>Perhaps you will need someone else to help with a database, as mentioned by caesar.<br><br><br>Here is an example of the corresponding userlevelfile.txt:<div class="codebox"><p>Code: </p><pre><code>Aaron VIPTony StrangerLoKii voiceMoran whateverBill nobodyTom regularJohn VIPGeorge voiceJim OpJeff bannedCharles novicejaCK_test bozoherman 2boo 0foo 1</code></pre></div><br>I hope this helps.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Fri Apr 19, 2013 10:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2013-04-19T09:38:30-04:00</updated>

		<published>2013-04-19T09:38:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101414#p101414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101414#p101414"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101414#p101414"><![CDATA[
Why not using a sqlite database? It's by far easier to manage whatever you wish rather than a flat file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Apr 19, 2013 9:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ViciousPiranha]]></name></author>
		<updated>2013-04-19T08:41:28-04:00</updated>

		<published>2013-04-19T08:41:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101413#p101413</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101413#p101413"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101413#p101413"><![CDATA[
Honestly I do not mind how the file would look like as long as it would be easy to set for each user his 'level' and the bot will will be able to retrieve it too<br><br>Posted: Fri Apr 19, 2013 8:32 am    Post subject:<br>Vicious Piranha wrote:<br><br>... <br>I meant for a file in the form as I provided or in any similiar form, such as: <br><br>[Friends] <br>Aaron <br>Tony <br><br>[Strangers] <br>LoKii <br>Morgan <br>... <br><br><br>Would you be willing to organize and label your users not by sections in a text file, but with an identifying number in your text file? <br><br>Aaron 1 <br>Tony 1 <br>LoKii 2 <br>Moran 2 <br>Bill 3 <br>Tom 3 <br>John 4 <br>George 4 <br>Jim 5 <br>Jeff 5 <br>Charles 5 <br><br><br>I'm not promising to work on it yet. I'm just thinking about how I would do it.   <br><blockquote class="uncited"><div>Edit: <br>How many names to you expect to be ever be in your file? ... just curious.<br></div></blockquote>No more than 1,000, more like 800<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12161">ViciousPiranha</a> — Fri Apr 19, 2013 8:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2013-04-19T08:32:46-04:00</updated>

		<published>2013-04-19T08:32:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101412#p101412</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101412#p101412"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101412#p101412"><![CDATA[
Would you be willing to organize and label your users not by sections in a text file, but with an identifying number in your text file?<br><br>Aaron 1<br>Tony 1<br>LoKii 2<br>Moran 2<br>Bill 3<br>Tom 3<br>John 4<br>George 4<br>Jim 5<br>Jeff 5<br>Charles 5<br><br><br>I'm not promising to work on it yet.   I'm just thinking about how I would do it.    <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br><br>Edit:<br>How many names to you expect to be ever be in your file?   ... just curious.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Fri Apr 19, 2013 8:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ViciousPiranha]]></name></author>
		<updated>2013-04-19T05:36:34-04:00</updated>

		<published>2013-04-19T05:36:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101411#p101411</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101411#p101411"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101411#p101411"><![CDATA[
Hello LoKii -- thank you for the reply<br><br>I think I confused you a bit with my request, although I talked about users' level I did not mean levels on the eggdrop..<br><br>I meant for a file in the form as I provided or in any similiar form, such as:<br><br>[Friends]<br>Aaron<br>Tony<br><br>[Strangers]<br>LoKii<br>Morgan<br><br>So that if Morgan types !level it will return Strangers<br><br>If Aaron types !level it will return Friends<br><br>if Aaron types: !level LoKii it will return 'Strangers'<br><br>So those are actually topics I can define in a file and add/remove users from it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12161">ViciousPiranha</a> — Fri Apr 19, 2013 5:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[LoKii]]></name></author>
		<updated>2013-04-19T04:14:54-04:00</updated>

		<published>2013-04-19T04:14:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101410#p101410</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101410#p101410"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101410#p101410"><![CDATA[
I made something similar for my bot some time ago.<br><br>While it does work as intented, im sure that there may be a more sufficient way of doing this, however it does get the job done.<br><br>The bot takes the user levels based on flags.<br><br><br><strong class="text-strong">This one is if a user asks about himself (!whoami):</strong><div class="codebox"><p>Code: </p><pre><code>bind pub - !whoami proc_whoami##proc proc_whoami {nick host hand channel text} {    global botnick    if {[matchattr $nick +n]} {        putserv "NOTICE $nick :$nick, you are my Lord. How may I serve you?"        return 1    }    if {[matchattr $nick +qd]} {        putserv "NOTICE $nick :$nick, you are on a Global Blacklist for either NO-OPs, NO-VOICE, or both for any channel that I am on!"        putserv "NOTICE $nick :If you think that this is a mistake, please contact my owner."        return 1    }    if {[matchattr $nick |+qd $channel]} {        putserv "NOTICE $nick :$nick, you are on my Blacklist for either NO-OPs, NO-VOICE, or both for channel $channel!"        putserv "NOTICE $nick :If you think that this is a mistake, please contact the channel owner."        return 1    }    if {[matchattr $nick |+n $channel]} {        putserv "NOTICE $nick :$nick, you are a channel OWNER on $channel."        return 1    }    if {[matchattr $nick |+m $channel]} {        putserv "NOTICE $nick :$nick, you are a channel MASTER on $channel."        return 1    }    if {[matchattr $nick |+o $channel]} {        putserv "NOTICE $nick :$nick, you are a channel OPs on $channel."        return 1    }    if {[matchattr $nick |+l $channel]} {        putserv "NOTICE $nick :$nick, you are a channel HALFOPs on $channel."        return 1    }    if {[matchattr $nick |+f $channel]} {        putserv "NOTICE $nick :$nick, you are a channel FRIEND on $channel."        return 1    }    if {[matchattr $nick |+v $channel]} {        putserv "NOTICE $nick :$nick, you are a channel VOICE-USER on $channel."        return 1    } else {        putserv "NOTICE $nick :$nick, you are \002NOT\002 on my Channel-List for channel $channel."        putserv "NOTICE $nick :If you think that this is an error and that I should recognize you, then please \002/msg $botnick ident &lt;your-password&gt;\002."        putserv "NOTICE $nick :In case you are using a nickname other than the one I normally recognize you under, then please \002/msg $botnick &lt;your-password&gt; &lt;your-normal-nickname&gt;\002."        putserv "NOTICE $nick :If non of the above solutions worked for you, then please contact the channel admin for $channel."        return 1    }}</code></pre></div><strong class="text-strong">This one is if you want to check a user based on his handle (!checkuser &lt;name&gt;):</strong><div class="codebox"><p>Code: </p><pre><code>bind pub n|m !checkuser proc_checkuser##proc proc_checkuser {nick host hand channel text} {    global botnick    set who [lindex [split $text] 0]    if {($who == $botnick)} {        putserv "NOTICE $nick :I am a \002bot\002 $nick."        return 1    }    if {$who == ""} {        putserv "NOTICE $nick :Usage: !checkuser &lt;nick&gt;"        return 1    }    if {![onchan $who $channel]} {        putserv "NOTICE $nick :I dont see $who on $channel"        putserv "NOTICE $nick :The user you wish to check \002must\002 be in $channel when issuing the command."        return 1    }    if {[matchattr $who +n]} {        putserv "NOTICE $nick :$nick, $who is my OWNER."        return 1    }    if {[matchattr $who +qd]} {        putserv "NOTICE $nick :$nick, the user \002$who\002 is for some reason \002NOT\002 allowed to get OPs or VOICE on \002ANY\002 channel where I am on!"        putserv "NOTICE $nick :This action has been issued due to either an abuse towards the bot, or as a security pre-caution."        putserv "NOTICE $nick :If you think that this is an error, please contact my owner."        return 1    }    if {[matchattr $who |+qd $channel]} {        putserv "NOTICE $nick :$nick, the user \002$who\002 is for some reason \002NOT\002 allowed to get OPS or VOICE on channel $channel!"        putserv "NOTICE $nick :This action has been issued due to either an abuse towards the bot, or as a security pre-caution."        putserv "NOTICE $nick :If you think that this is an error, please contact the owner of channel $channel."        return 1    }    if {[matchattr $who |+n $channel]} {        putserv "NOTICE $nick :$who is a channel OWNER on $channel."        return 1    }    if {[matchattr $who |+m $channel]} {        putserv "NOTICE $nick :$who is a channel MASTER on $channel."        return 1    }    if {[matchattr $who |+o $channel]} {        putserv "NOTICE $nick :$who is a channel OPs on $channel."        return 1    }    if {[matchattr $who |+l $channel]} {        putserv "NOTICE $nick :$who is a channel HALFOPs on $channel."        return 1    }    if {[matchattr $who |+f $channel]} {        putserv "NOTICE $nick :$who is a channel FRIEND on $channel."        return 1    }    if {[matchattr $who |+v $channel]} {        putserv "NOTICE $nick :$who is a channel VOICE-USER on $channel."        return 1    } else {        putserv "NOTICE $nick :$who is \002NOT\002 on my Channel-List for $channel $nick."        return 1    }}</code></pre></div>Let us know if it is what you needed.<br><br>As you can see, most of the 'levels' are channel based, with the exception of the blacklisted levels and the global owner. It shouldn't be hard to add any other global levels in to this script if you need them. In my case, i just added the levels that are available for requests by normal users. I do have some other scripts with more detailed info for global owners, where i can search users in the botlist based on different criteria, but i believe that the ones posted are more what you are looking for.<br><br>Cheers.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10917">LoKii</a> — Fri Apr 19, 2013 4:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ViciousPiranha]]></name></author>
		<updated>2013-04-16T06:07:31-04:00</updated>

		<published>2013-04-16T06:07:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101400#p101400</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101400#p101400"/>
		<title type="html"><![CDATA[Return User's Level]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101400#p101400"><![CDATA[
I have a text file with all the users' levels.. it looks like this<br><br>[VIP]<br>Manga<br>splattoy<br>rammingor<br><br>[Voice]<br>Alex<br>Ronny<br>Battlefield3<br><br><br>and so on..<br><br>I really want that a user can check for his level by using a public or private command and also make sure they dont flood the bot with too many requests (only 1 for each 10 seconds)<br><br>command would:<br><br>!level <br><br>this will return this nickname's level:<br><br>BOT: Hey &lt;nickname&gt;, your level is: level-here<br><br>or !level &lt;nickname&gt; <br><br>will return that nickname's level<br><br>please help<br>thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12161">ViciousPiranha</a> — Tue Apr 16, 2013 6:07 am</p><hr />
]]></content>
	</entry>
	</feed>
