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

	<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>2007-05-25T15:26:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2007-05-25T15:26:12-04:00</updated>

		<published>2007-05-25T15:26:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73002#p73002</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73002#p73002"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73002#p73002"><![CDATA[
It was just a basebone..<br>A working version would be:<br><div class="codebox"><p>Code: </p><pre><code>set chanvoice(channel) "#channel"set chanvoice(file) "chanvoice.txt"bind join -|- {*} chanvoice:joinbind raw -|- {354} chanvoice:rawproc chanvoice:join {nick host hand chan} {  global chanvoice  if {![string equal -nocase $chanvoice(channel) $chan]} { return }  puthelp "WHO $nick n%at,88"}proc chanvoice:raw {from raw arg} {  global chanvoice  set tag [lindex [split $arg] 1]  if {$tag != "88"} { return }  set nick [lindex [split $arg] 2]  set auth [lindex [split $arg] 3]  if {$auth == "" || $auth == "0"} { return }  set data [read -nonewline [set file [open "$chanvoice(file)" r]]]  close $file  foreach x [split $data \n] {    if {$x == ""} { return }    if {[string equal -nocase $auth $x]} {        pushmode $chanvoice(channel) +v $nick        break    }  }}</code></pre></div>Not tested, but should work...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Fri May 25, 2007 3:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[paps]]></name></author>
		<updated>2007-05-25T14:53:00-04:00</updated>

		<published>2007-05-25T14:53:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72998#p72998</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72998#p72998"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72998#p72998"><![CDATA[
So, what would be the bindings ?<br><br>I dont understand anything in TCL <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9019">paps</a> — Fri May 25, 2007 2:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-25T14:47:23-04:00</updated>

		<published>2007-05-25T14:47:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72996#p72996</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72996#p72996"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72996#p72996"><![CDATA[
You'd still need some bindings I suppose... and [lindex ... 2#3] ?  :p<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri May 25, 2007 2:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2007-05-25T14:45:00-04:00</updated>

		<published>2007-05-25T14:45:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72995#p72995</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72995#p72995"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72995#p72995"><![CDATA[
the t option can be added.<br><br>A fixed version with the t paramater:<br><div class="codebox"><p>Code: </p><pre><code>set chanvoice(channel) "#channel"set chanvoice(file) "chanvoice.txt"proc chanvoice:join {nick host hand chan} {  global chanvoice  if {![string equal -nocase $chanvoice(channel) $chan]} { return }  puthelp "WHO $nick n%at,88"}proc chanvoice:raw {from raw arg} {  global chanvoice  set tag [lindex [split $arg] 1]  if {$tag != "88"} { return }  set nick [lindex [split $arg] 2]  set auth [lindex [split $arg] 2#3]  if {$auth == "" || $auth == "0"} { return }  set data [read -nonewline [set file [open "$chanvoice(file)" r]]]  close $file  foreach x [split $data \n] {    if {$x == ""} { return }    if {[string equal -nocase $auth $x]} {        pushmode $chanvoice(channel) +v $nick        break    }  }}</code></pre></div>The tag in this example is 88.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Fri May 25, 2007 2:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-25T14:36:13-04:00</updated>

		<published>2007-05-25T14:36:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72994#p72994</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72994#p72994"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72994#p72994"><![CDATA[
Interresting, I suppose this could be extended to create a database of auth'd nicks (and their accuntname) by extending the WHO-query to the speciffic channel when the bot joins.<br>Should also be trivial to modify the raw 354 "handler" to update a list of nick/auths-pairs to cache this information in order to further reduce traffic.<br><br>Might almost be worth writing a module..<br><br><em class="text-italics">Edit:</em><br>Just found this page that provided some nice information: <a href="http://www.mircscripts.org/showdoc.php?type=tutorial&amp;id=2412" class="postlink">http://www.mircscripts.org/showdoc.php? ... al&amp;id=2412</a><br>Might be a good idea to tag the query in case any other scripts would use these extended /WHO-queries.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri May 25, 2007 2:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2007-05-25T14:01:50-04:00</updated>

		<published>2007-05-25T14:01:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72990#p72990</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72990#p72990"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72990#p72990"><![CDATA[
You can use a /who reply for this (raw 354 reply)<div class="codebox"><p>Code: </p><pre><code>set chanvoice(channel) "#channel"set chanvoice(file) "chanvoice.txt"proc chanvoice:join {nick host hand chan} {  global chanvoice  if {![string equal -nocase $chanvoice(channel) $chan]} { return }  puthelp "WHO $nick n%a"}proc chanvoice:raw {from raw arg} {  global chanvoice  set nick [lindex [split $arg] 1]  set auth [lindex [split $arg] 2]  if {$auth == "" || $auth == "0"} { return }  set data [read -nonewline [set file [open "$chanvoice(file)" r]]]  close $file  foreach x [split $data \n] {    if {$x == ""} { return }    if {[string equal -nocase $auth $x]} {        pushmode $chanvoice(channel) +v $nick        break    }  }}</code></pre></div>Not tested, but can be used as a basebone...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Fri May 25, 2007 2:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-25T13:30:17-04:00</updated>

		<published>2007-05-25T13:30:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72987#p72987</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72987#p72987"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72987#p72987"><![CDATA[
I'll try to explain my query alittle better then;<br>Each response-line from a whois-query (such as the examples you posted) is preceeded with a numeric responsecode (three digits). These are used to allow the client to know what kind of information the server is sending.<br><br>Taking the second example you posted, what is actually sent from the server is this:<blockquote class="uncited"><div>311 nick ~<a href="mailto:xxxxx@xxx-xx-xxx-x-xxx.xxx.host.net">xxxxx@xxx-xx-xxx-x-xxx.xxx.host.net</a> * :Real Name<br>319 nick :#channel<br>312 nick *.quakenet.org :QuakeNet IRC Server<br>318 nick :End of /WHOIS list.</div></blockquote>What we need is the number for the "nick is authed as xxxx" line. Unfortunately, this is not a "rfc 1459" message, but a QuakeNet feature (yes, some other networks use it aswell, I know...)<br><br>Also worth noting, implementing this would require your bot to send a whois-query whenever someone joins the channel. On highly trafficed channels this might cause some performace degradations.. just so you know.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri May 25, 2007 1:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[paps]]></name></author>
		<updated>2007-05-25T13:02:17-04:00</updated>

		<published>2007-05-25T13:02:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72985#p72985</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72985#p72985"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72985#p72985"><![CDATA[
Well, I dont think i really understand the question, but:<br><br>When you type /whois nick on quakenet you get something like this if the guy is authed :<blockquote class="uncited"><div>nick is <a href="mailto:xxxx@xxxx.users.quakenet.org">xxxx@xxxx.users.quakenet.org</a> * Real Name<br>nick on +#channel #channel2 @#channel3 <br>nick using port80b.se.quakenet.org Located at Port80, Sweden<br><strong class="text-strong">nick is authed as xxxx</strong><br>nick End of /WHOIS list.</div></blockquote>When you do a /whois on someone that is not authed, this is what you get :<blockquote class="uncited"><div>nick is ~<a href="mailto:xxxxx@xxx-xx-xxx-x-xxx.xxx.host.net">xxxxx@xxx-xx-xxx-x-xxx.xxx.host.net</a> * Real Name<br>nick on #channel<br>nick using *.quakenet.org QuakeNet IRC Server<br>nick End of /WHOIS list.</div></blockquote>Is this enough to make a script work ?<br><br>thx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9019">paps</a> — Fri May 25, 2007 1:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-25T12:32:09-04:00</updated>

		<published>2007-05-25T12:32:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72984#p72984</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72984#p72984"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72984#p72984"><![CDATA[
@paps:<br>As I am not familiar with Quakenet, which respose-code would be used to indicate the Q auth from a whois reply?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri May 25, 2007 12:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[paps]]></name></author>
		<updated>2007-05-25T12:26:58-04:00</updated>

		<published>2007-05-25T12:26:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72983#p72983</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72983#p72983"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72983#p72983"><![CDATA[
thx xU, but as far as i can see your script is based on hosts, right ? I'd like a script that voices based on the "Authed as Account-Name" (which appears on the /whois of Quakenet).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9019">paps</a> — Fri May 25, 2007 12:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-25T12:29:52-04:00</updated>

		<published>2007-05-25T12:18:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72982#p72982</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72982#p72982"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72982#p72982"><![CDATA[
@xU:<br>What good would using a foreach-loop on a filehandle do?<br>Were'nt you thinking of actually reading the content of the file?<br>Also, you forget to close it afterwards, leaving uneccesary filehandles open...<br>Furthermore, your braces {} are unbalanced, and using lsearch on a plain string is not advisable (actually, in some rare conditions it's really bad).<br><br><em class="text-italics">edit:</em><br>Might aswell include a piece of code that is working:<br>Assumes one hostmask per line within the voice.txt file<br><div class="codebox"><p>Code: </p><pre><code>set voicefile "voice.txt"setudef flag filevoicebind join - * join:checkvoiceproc join:checkvoice {nick host hand chan} { if {[channel get $chan chanvoice] &amp;&amp; ![isbotnick $nick] &amp;&amp; [botisop $chan]} {  set _t [split [read [set fid [open $::voicefile "RDONLY"]]] "\n"]  close $fid  foreach h $_t {   if {[string match -nocase $h $host]} {    pushmode $chan +v $nick    return   }  } }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri May 25, 2007 12:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[xU]]></name></author>
		<updated>2007-05-25T11:33:29-04:00</updated>

		<published>2007-05-25T11:33:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72980#p72980</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72980#p72980"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72980#p72980"><![CDATA[
## set(s) ## <br>############ <br><br>## channels <br>set chanvoice "#xU #qadsia" <br><br><br>## filename<br>set filehost "hosts.txl"<br><br>## bind ## <br>########## <br><br>bind join - * proc:join <br><br>## proc ## <br>########## <br>proc proc:join { nick host hand chan } { <br>global chanvoice txtfile<br>if {([isbotnick $nick]) || (![botisop $chan]) || (![lsearch -exact [string tolower $chanvoice] [string tolower $chan]] == "-1")} {return 0} <br>set ropen [open $filehost r]<br>foreach hostv $ropen { <br>if {([string match -nocase "$hostv" $host])} {putquick "mode $chan +v $nick;break} <br>}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9018">xU</a> — Fri May 25, 2007 11:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[paps]]></name></author>
		<updated>2007-05-25T09:16:59-04:00</updated>

		<published>2007-05-25T09:16:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72978#p72978</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72978#p72978"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72978#p72978"><![CDATA[
Thanks xU and Sir_Fz. It will help me a lot <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>And now what about a script that voices only people that are authed on Quakenet with a certain account ?<br>The bot should voice anyone that is authed (Q account) with one of the account-name listed on a text file or something...<br><br>Is this possible ? (My bot is on quakenet)<br><br>Thanks :]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9019">paps</a> — Fri May 25, 2007 9:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-05-24T18:48:02-04:00</updated>

		<published>2007-05-24T18:48:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72970#p72970</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72970#p72970"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72970#p72970"><![CDATA[
Add these hosts to a specific handle and give it the +v flag. Set your channel to +autovoice and they'll be autovoiced on join.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu May 24, 2007 6:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[xU]]></name></author>
		<updated>2007-05-24T17:02:01-04:00</updated>

		<published>2007-05-24T17:02:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72963#p72963</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72963#p72963"/>
		<title type="html"><![CDATA[Vip Script Based on Hosts ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72963#p72963"><![CDATA[
hi paps,<br><br>you can use script without read from file:<br><div class="codebox"><p>Code: </p><pre><code>## set(s) ################ channelsset chanvoice "#xU #qadsia"## host voiceser hosts { "*@*.qualitynet.net""*xU@*.WeArab.Knights""*@qadsia.com"}## bind ############bind join - * proc:join## proc ############proc proc:join { nick host hand chan } {global chanvoice hostsif {([isbotnick $nick]) || (![botisop $chan]) || (![lsearch -exact [string tolower $chanvoice] [string tolower $chan]] == "-1")} {return 0}foreach hostv $hosts {if {([string match -nocase "$hostv" $host])} {putquick "mode $chan +v $nick;break}}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9018">xU</a> — Thu May 24, 2007 5:02 pm</p><hr />
]]></content>
	</entry>
	</feed>
