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

	<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-02-14T06:53:20-04:00</updated>

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

		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-02-14T06:53:20-04:00</updated>

		<published>2003-02-14T06:53:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16585#p16585</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16585#p16585"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16585#p16585"><![CDATA[
thank you guys - from all that I've finally been able to make it work...<br><br>many thanks for your persistance!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Fri Feb 14, 2003 6:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-02-14T05:34:25-04:00</updated>

		<published>2003-02-14T05:34:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16576#p16576</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16576#p16576"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16576#p16576"><![CDATA[
Admitadly, I can't remember why the subst is there.<br><br>However, when looking at it, I do share the concerns.<br><br>In the original post, there was an issue, where we didn't have the full code. Rather than ask for the information, i tried somthing new, that would collect the information on it's own.<br><br>It's not fast, it's not ideal but it worked for him.<br><br>However, staring at it a few hundred times, reminded me why I used the subst command.<br><br>Take the following two examples.<br><div class="codebox"><p>Code: </p><pre><code>set test "Hello to all"set list "hello test all"puts stdout "1: $[lindex $list 1]"puts stdout "2: [subst $[lindex $list 1]]"</code></pre></div>This will output<br>[quote]<br>1: $test<br>2: Hello to all<br>[/code]<br><br>"$[lindex $list 1]" ins't a valid variable name. However, once "[lindex $list 1]" is evaluated, it is.<br><br>The subst just forces the evaluation of the new name.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri Feb 14, 2003 5:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-02-14T05:12:12-04:00</updated>

		<published>2003-02-14T05:12:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16574#p16574</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16574#p16574"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16574#p16574"><![CDATA[
Lol nevermind I'm stupid. I should have tested... it looks like a vulnerability but it's not.<br><br>Anyway, I put in the bit of code I showed you. And cleaned up some stuff. Give this a try.<br><div class="codebox"><p>Code: </p><pre><code>proc pub:quote { nick uhost handle channel arg } {  global IGwords  set arg [string trimleft $arg !]  set cmd [lindex [split $arg] 0]  foreach _IG $IGwords {    if {[string equal -nocase $_IG $cmd]} { return }  }  if {[llength $arg]==0} {    putserv "NOTICE $nick : 0,2 please type \002!news\002 for options "    return  }  set stock [string toupper [lindex $arg 0]]  set query "http://finance.yahoo.com/d/quotes.csv?s=$stock&amp;f=st5l9c6p4mv&amp;e=.csv"  set token [http::geturl $query]  set all [http::data $token]  regsub -all \" $all "" all  set all [split $all ","]  # rounding code here  set num [lindex $all 3]  set num [expr round(100*$num)/100.0]  if {$num &gt;= 0} {    set num "+$num"  }  set test [string map [list + \00309+ - \00304-] $num]  set test2 [string map [list + \00309+ - \00304-] [lindex $all 4]]  if {[lindex $all 2]!="0.00"} {    putserv "PRIVMSG $channel :\0037» [lindex $all 0]:\003 [lindex $all 2] $test ($test2)\003 [lindex $all 1] USET \0037 Low-High:\003 [lindex $all 5] \0037 Volume:\003 [lindex $all 6]"  } else {    putserv "PRIVMSG $channel :\002 [lindex $all 0]\002 symbol not found"  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Fri Feb 14, 2003 5:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-02-14T05:08:58-04:00</updated>

		<published>2003-02-14T05:08:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16572#p16572</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16572#p16572"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16572#p16572"><![CDATA[
I did not say you should use it, I gave you a possible solution <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>and as stdragon said, all the given lines of code works. Either something is wrong with your eggdrop/tcl or you are using it the wrong way.<br><br>as for the backdoor.. I'm sure ppslim never meant it to be a backdoor.. look at his signature <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> ... he was probably just deep into the tequilabottle :p<br><br>...anyway.. you could use the <em class="text-italics">switch</em> command instead of the subst<div class="codebox"><p>Code: </p><pre><code>switch -exact -- [lindex [info args pub:quote] 4] {  "trigger1" {do this}  "trigger2" {do this}  ....etc}</code></pre></div>something like this<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Fri Feb 14, 2003 5:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-02-14T03:19:07-04:00</updated>

		<published>2003-02-14T03:19:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16565#p16565</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16565#p16565"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16565#p16565"><![CDATA[
hi st - thanks for the help and tips. if there are any 'backdoors' in the script, they are there because the bits I've added on are from help I've recieved in here...the bit you refer to was from:<br><br><a href="http://forum.egghelp.org/viewtopic.php?t=3406" class="postlink">http://forum.egghelp.org/viewtopic.php?t=3406</a><br><br>and that was provided by: ppslim - are you suggesting ppslim is trying to set me up/make me vulnerable to attack or something?<br><br>I appreciate the help I get on this forum, it's been invaluable, but I'm still learning and yes I feel dumb when I have to come back and say it's not working - will keep trying...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Fri Feb 14, 2003 3:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-02-14T01:09:00-04:00</updated>

		<published>2003-02-14T01:09:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16563#p16563</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16563#p16563"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16563#p16563"><![CDATA[
NewzBoy, I hate to sound harsh, but all of the things we've suggested work. You're probably just doing it wrong. Also, I dunno where you got that script but it's pretty horrible. Do you see the first line? That allows anybody to run code on your bot heh.<br><br>set [lindex [info args pub:quote] 4] [string trimleft [subst $[lindex [info args pub:quote] 4]] !]<br><br>"info args pub:quote" returns the argument list for that proc, e.g. "nick uhost handle channel arg".<br><br>lindex 4, returns the 5th arg, which is arg.<br><br>Now, do you know what subst does? Subst evaluates whatever you give it.<br><br>So this part of that line, [subst $[lindex [info args pub:quote] 4]], is taking the variable $arg and evaluating it.<br><br>It's just disguised so it doesn't immediately look like a backdoor.<br><br>Anyway if you want to test it, try !q [die] and see what happens.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Fri Feb 14, 2003 1:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-02-13T20:50:25-04:00</updated>

		<published>2003-02-13T20:50:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16561#p16561</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16561#p16561"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16561#p16561"><![CDATA[
hi guys, none of the lines of script mentioned above work for me - by the way, no point saying 'I don't see why you're doing it like this..' etc because I'm just doing what is suggested to me on this forum by ppl helping me!<br><br>I guess it's just not possible to do what I want to do in TCL...<br><br>thanks anyway.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Thu Feb 13, 2003 8:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-02-13T18:20:08-04:00</updated>

		<published>2003-02-13T18:20:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16559#p16559</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16559#p16559"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16559#p16559"><![CDATA[
it was the script that Papillon suggested I use...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Thu Feb 13, 2003 6:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-02-13T17:57:05-04:00</updated>

		<published>2003-02-13T17:57:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16556#p16556</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16556#p16556"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16556#p16556"><![CDATA[
I don't see why you all are using these string functions. There is a round command in tcl. It's quite simple really.<br><br>You want to round [lindex $all 3], so<br><div class="codebox"><p>Code: </p><pre><code>set num [lindex $all 3]set num [expr round(100*$num)/100.0]if {$num &gt;= 0} {  set num "+$num"}</code></pre></div>That's about it.<br><br>ps. just a stylistic note, it's usually a lot clearer to break things onto multiple lines than have one line with 4 levels of nested brackets hehe.<br><br>pps. place this code before your "string map" command and then use $num instead of [lindex $all 3]. Also, "string map" is a strange way to do it. It's better to say if $num &lt; 0, set num "&lt;colorcode&gt;$num" and the other color in the else.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Feb 13, 2003 5:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-02-13T16:12:43-04:00</updated>

		<published>2003-02-13T16:12:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16555#p16555</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16555#p16555"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16555#p16555"><![CDATA[
yes I've rehashed and this is still the result:<br><br>[09:07:57] &lt;NewzBoy&gt; !q AOL<br>[09:08:00] &lt;News24&gt; » AOL: 10.139 -0.131000519 (-1.28%) 3:07pm USET Low-High: 9.90 - 10.38 Volume: 13903500<br><br>I placed one of those lines of script you gave me just after the 'set test' lines - is that ok?<br><br>thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Thu Feb 13, 2003 4:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-02-13T05:55:06-04:00</updated>

		<published>2003-02-13T05:55:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16525#p16525</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16525#p16525"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16525#p16525"><![CDATA[
hmm are you sure you rehashed after updating the script?... cause I just tested it on one of my eggdrops and it worked like a dream..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Thu Feb 13, 2003 5:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-02-12T05:39:49-04:00</updated>

		<published>2003-02-12T05:39:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16476#p16476</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16476#p16476"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16476#p16476"><![CDATA[
hi - sorry but neither of those are working - is still displaying same as before...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Wed Feb 12, 2003 5:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-02-12T04:16:33-04:00</updated>

		<published>2003-02-12T04:16:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16474#p16474</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16474#p16474"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16474#p16474"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set round [join [list [lindex [split $test .] 0] [string range [lindex [split $test .] 1] 0 1]] .]</code></pre></div>just a little list command missing<br>or you can do:<div class="codebox"><p>Code: </p><pre><code>set round [join "[lindex [split $test .] 0] [string range [lindex [split $test .] 1] 0 1]" .]</code></pre></div>both will work<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Wed Feb 12, 2003 4:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-02-11T20:36:01-04:00</updated>

		<published>2003-02-11T20:36:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16465#p16465</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16465#p16465"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16465#p16465"><![CDATA[
yep I put it in one line in this part of the script:<br><br>set test [string map [list + \00309+ - \00304-] [lindex $all 3]]<br>set round [join [lindex [split $test .] 0] [string range [lindex [split $test .] 1] 0 1] .]<br><br><br>still same error<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Tue Feb 11, 2003 8:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-02-11T20:17:43-04:00</updated>

		<published>2003-02-11T20:17:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16464#p16464</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16464#p16464"/>
		<title type="html"><![CDATA[.000000 overload!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16464#p16464"><![CDATA[
Make sure that is one line.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Feb 11, 2003 8:17 pm</p><hr />
]]></content>
	</entry>
	</feed>
