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

	<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>2005-08-28T17:30:04-04:00</updated>

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

		<entry>
		<author><name><![CDATA[h3ctic]]></name></author>
		<updated>2005-08-28T17:30:04-04:00</updated>

		<published>2005-08-28T17:30:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54971#p54971</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54971#p54971"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54971#p54971"><![CDATA[
demond, I've used your script now since right after you posted that last fix, and so far no errors, works very nice<br><br>thanks!!!!<br><br><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=6614">h3ctic</a> — Sun Aug 28, 2005 5:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-24T02:37:23-04:00</updated>

		<published>2005-08-24T02:37:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54739#p54739</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54739#p54739"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54739#p54739"><![CDATA[
use this, let me know about any problems:<div class="codebox"><p>Code: </p><pre><code>bind pub - !game fooproc foo {n u h c t} {   if {$t == ""} {set t none}   dnslookup [lindex [split $u @] 1] [list bar $n $c $t]}proc bar {nick chan game ip host stat} {   regsub -all {\.} $host {} host   if {[string is digit $host] || $stat} {      if {$game != "none"} {         puthelp "privmsg $chan :$nick is hosting $game on $ip"      } {         puthelp "privmsg $chan :$nick's ip address is $ip"      }   } {      puthelp "privmsg $chan :error resolving $nick's ip"   }}</code></pre></div>can anyone take an educated guess why the previous version sometimes worked and sometimes didn't? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> [dnslookup] is trickier than [utimer], maybe I should comment on it in "Script security"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Aug 24, 2005 2:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[h3ctic]]></name></author>
		<updated>2005-08-23T16:59:16-04:00</updated>

		<published>2005-08-23T16:59:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54721#p54721</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54721#p54721"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54721#p54721"><![CDATA[
additional note:<br><br>hmm...this is weird..but it seems every now and then I get this in my log:<br><br>[22:53] Tcl error [bar]: can't read "game": no such variable<br><br>from channel:<br><br>[23.08 - 22:53] &lt;+me&gt; can u type "!game" then "!game test"<br>[23.08 - 22:53] &lt;user-1&gt; !game<br>[23.08 - 22:54] &lt;user-1&gt; !game test<br>[23.08 - 22:54] &lt;@bot&gt; user1 is hosting test game on 1.2.3.4<br>[23.08 - 22:54] &lt;me&gt; hmm...type !game again plz<br>[23.08 - 22:55] &lt;user-1&gt; !game<br>[23.08 - 22:55] &lt;@bot&gt; user1's ip address is 1.2.3.4<br>[23.08 - 22:55] &lt;me&gt; hmm<br><br>note that i've renamed stuff above, the user "user-1"'s nick included a - (minus sign)<br><br>the weird thing is that its not consistant...meaning the script will not give the error in log (mentioned above) every time...  ??<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6614">h3ctic</a> — Tue Aug 23, 2005 4:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-23T16:56:36-04:00</updated>

		<published>2005-08-23T16:56:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54720#p54720</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54720#p54720"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54720#p54720"><![CDATA[
well perhaps it would be a good excercise for you to try understand how the thing works <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> all you need is Tcl's manual page and <em class="text-italics">tcl-commands.doc</em><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Aug 23, 2005 4:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[h3ctic]]></name></author>
		<updated>2005-08-23T16:46:38-04:00</updated>

		<published>2005-08-23T16:46:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54718#p54718</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54718#p54718"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54718#p54718"><![CDATA[
Again...and again thanks demond seems to work perfectly now !!! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>(I try to forget the fact that this script now is totally jibberish to me - or what you call it) <br><br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6614">h3ctic</a> — Tue Aug 23, 2005 4:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-23T14:35:20-04:00</updated>

		<published>2005-08-23T14:35:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54716#p54716</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54716#p54716"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54716#p54716"><![CDATA[
nice observation h3ctic, and a good occasion to show how to avoid a security pitfall of [dnslookup] (see my article "Script security" in the FAQ section)<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !game fooproc foo {n u h c t} {   if {$t == ""} {set t none}   dnslookup [lindex [split $u @] 1] bar n c t}proc bar {ip host stat n c t} {   upvar $n nick; upvar $c chan; upvar $t game   regsub -all {\.} $host {} host   if {[string is digit $host] || $stat} {      if {$game != "none"} {         puthelp "privmsg $chan :$nick is hosting $game on $ip"      } {         puthelp "privmsg $chan :$nick's ip address is $ip"      }   } {      puthelp "privmsg $chan :error resolving $nick's ip"   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Aug 23, 2005 2:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[h3ctic]]></name></author>
		<updated>2005-08-23T13:09:36-04:00</updated>

		<published>2005-08-23T13:09:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54711#p54711</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54711#p54711"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54711#p54711"><![CDATA[
Thanks yet again demond, but...hmm...when I using nick <br><br>ghe[lix]<br><br>type<br><br>!game<br><br>I get:<br><br>[19:07] Tcl error [bar]: invalid command name "lix"<br><br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_question.gif" width="15" height="15" alt=":?:" title="Question"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6614">h3ctic</a> — Tue Aug 23, 2005 1:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-23T12:24:23-04:00</updated>

		<published>2005-08-23T12:24:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54709#p54709</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54709#p54709"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54709#p54709"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - !game fooproc foo {n u h c t} {   dnslookup [lindex [split $u @] 1] bar $n $c [expr {$t != ""? $t : "none"}]}proc bar {ip host stat nick chan game} {   if {$stat} {      if {$game != "none"} {         puthelp "privmsg $chan :$nick is hosting $game on $ip"      } {         puthelp "privmsg $chan :$nick's ip address is $ip"      }   } {      puthelp "privmsg $chan :error resolving $nick's ip"   }} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Aug 23, 2005 12:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[h3ctic]]></name></author>
		<updated>2005-08-23T06:34:32-04:00</updated>

		<published>2005-08-23T06:34:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54696#p54696</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54696#p54696"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54696#p54696"><![CDATA[
Thanks again demond for helping me!!! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><br>The last script however gives:<br><br>[12:33] Tcl error [bar]: no value given for parameter "game" to "bar"<br><br>when I try to type only !game (with no parameters)  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_question.gif" width="15" height="15" alt=":?:" title="Question"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6614">h3ctic</a> — Tue Aug 23, 2005 6:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-22T12:00:33-04:00</updated>

		<published>2005-08-22T12:00:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54665#p54665</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54665#p54665"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54665#p54665"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - !game fooproc foo {n u h c t} {   dnslookup [lindex [split $u @] 1] bar $n $c $t}proc bar {ip host stat nick chan game} {   if {$stat} {      if {$game != ""} {         puthelp "privmsg $chan :$nick is hosting $game on $ip"      } {         puthelp "privmsg $chan :$nick's ip address is $ip"      }   } {      puthelp "privmsg $chan :error resolving $nick's ip"   }} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Mon Aug 22, 2005 12:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[h3ctic]]></name></author>
		<updated>2005-08-22T04:31:08-04:00</updated>

		<published>2005-08-22T04:31:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54641#p54641</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54641#p54641"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54641#p54641"><![CDATA[
aaaaaaaaaaahhhhh  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> <br><br>Sorry about that, I didnt realize no....<br><br>One final thing:<br><br>is it possible to edit that last code you wrote to have it also respond only with the users ip adress to the trigger !game when theres no second parameter ?<br><br>like:<br><br>&lt;user&gt;!game FOO<br>&lt;bot&gt;user is hosting FOO on 1.2.3.4<br>&lt;user&gt;!game<br>&lt;bot&gt;user your ip is: 1.2.3.4<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6614">h3ctic</a> — Mon Aug 22, 2005 4:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-22T04:19:18-04:00</updated>

		<published>2005-08-22T04:19:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54640#p54640</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54640#p54640"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54640#p54640"><![CDATA[
don't you realize that if you type <span style="color:red">!game FOO</span> it will reply with <span style="color:blue">goober is hosting FOO on 1.2.3.4</span> and if you type <span style="color:red">!game BAR</span> it will reply with <span style="color:blue">goober is hosting BAR on 1.2.3.4</span>?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Mon Aug 22, 2005 4:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[h3ctic]]></name></author>
		<updated>2005-08-22T03:56:32-04:00</updated>

		<published>2005-08-22T03:56:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54638#p54638</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54638#p54638"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54638#p54638"><![CDATA[
I really appreciate your help, and the code you provided works 110% for that one !game trigger, the thing is that in the channel its possible to start different games and it would be nice to have the bot to advertise it, like:<br><br>&lt;user1&gt;!game cs<br>&lt;bot&gt;a game of cs starting at ip 1.2.3.4<br><br>&lt;user2&gt;!game ut<br>&lt;bot&gt;a game of ut forming at ip 1.2.3.4<br><br>etc<br><br>It seems problematic however to have triggers that includes spaces, so if its not possible I can simply do:<br><br>!gamecs<br>!gameut<br><br>but it would still be interesting to get confirmed if its possible with two-word-triggers (that includes spaces) <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=6614">h3ctic</a> — Mon Aug 22, 2005 3:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-22T03:48:28-04:00</updated>

		<published>2005-08-22T03:48:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54637#p54637</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54637#p54637"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54637#p54637"><![CDATA[
why several triggers when what you want is perfectly done with the code I gave you???<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Mon Aug 22, 2005 3:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[h3ctic]]></name></author>
		<updated>2005-08-22T03:15:58-04:00</updated>

		<published>2005-08-22T03:15:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54636#p54636</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54636#p54636"/>
		<title type="html"><![CDATA[Making my windrop-bot respond with the users IP adress]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54636#p54636"><![CDATA[
ah yes..nice demond !!<br><br>that way i see i can "bring the variable with me" into the proc...but what if I want several triggers that includes spaces...like<br><br>"!ip game1"<br>"!ip game2"<br>"!ip game3"<br><br>where the bot would respond:<br><br>&lt;user1&gt;!ip game1<br>&lt;bot&gt;user1 starting game1 at ip 123.123.123.123<br><br>&lt;user2&gt;!ip game2<br>&lt;bot&gt;user1 starting game2 at ip 123.123.123.123<br><br>etc<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6614">h3ctic</a> — Mon Aug 22, 2005 3:15 am</p><hr />
]]></content>
	</entry>
	</feed>
