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

	<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-04-23T15:27:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-04-23T15:27:28-04:00</updated>

		<published>2005-04-23T15:27:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48485#p48485</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48485#p48485"/>
		<title type="html"><![CDATA[Triggering dcc:tcl and dcc:tcl on bind pub]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48485#p48485"><![CDATA[
just use:<div class="codebox"><p>Code: </p><pre><code>set evaluate "set ::$text"eval $evaluate</code></pre></div>only change: :: added. as alternate you can change it to:<br>set evaluate "uplevel #0 set $text"<br>maybe the uplevel variant is better, when you want to change a variable within a namespace like: "set script::active 1". I am not sure if a custom namespace is always a subnamespace of the global namespace.<br><br>PS: using "uplevel #0 " for the !tcl trigger is an option as well.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sat Apr 23, 2005 3:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-04-23T14:58:59-04:00</updated>

		<published>2005-04-23T14:58:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48484#p48484</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48484#p48484"/>
		<title type="html"><![CDATA[Triggering dcc:tcl and dcc:tcl on bind pub]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48484#p48484"><![CDATA[
Then maybe:<br><div class="codebox"><p>Code: </p><pre><code>proc pub:set {nick uhost hand chan text} {  set evaluate1 "set [lindex $text 0] \"[lrange $text 1 end]\""  set evaluate2 "global [lindex $text 0]"  puthelp "PRIVMSG $chan :Set: [eval $evaluate1]"  eval $evaluate2  return 1}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Apr 23, 2005 2:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-04-23T13:53:33-04:00</updated>

		<published>2005-04-23T13:53:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48481#p48481</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48481#p48481"/>
		<title type="html"><![CDATA[Triggering dcc:tcl and dcc:tcl on bind pub]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48481#p48481"><![CDATA[
That's because the set variable is not global.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Apr 23, 2005 1:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-04-23T13:05:58-04:00</updated>

		<published>2005-04-23T13:05:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48479#p48479</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48479#p48479"/>
		<title type="html"><![CDATA[Triggering dcc:tcl and dcc:tcl on bind pub]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48479#p48479"><![CDATA[
.tcl works fine -- doesn't work for global vars, without the foreach atm, but .set isn't working.<br><br>&lt;awyeah-&gt; .set testvar 123<br>&lt;adapter&gt; Set: 123<br>&lt;awyeah-&gt; okay hmm<br>&lt;awyeah-&gt; .tcl putlog $testvar<br>&lt;adapter&gt; Tcl: can't read "testvar": no such variable<br><br><br>tcl is unable to display global vars:<br><br>&lt;awyeah-&gt; .tcl putlog $botnick<br>&lt;adapter&gt; Tcl: can't read "botnick": no such variable<br>&lt;awyeah-&gt; .tcl set errorInfo<br>&lt;adapter&gt; Tcl: can't read "errorInfo": no such variable<br><div class="codebox"><p>Code: </p><pre><code>proc pub:set {nick uhost hand chan text} {  set evaluate "set [lindex $text 0] \"[lrange $text 1 end]\""  puthelp "PRIVMSG $chan :Set: [eval $evaluate]"  return 1}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Apr 23, 2005 1:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-04-23T12:54:40-04:00</updated>

		<published>2005-04-23T12:54:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48478#p48478</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48478#p48478"/>
		<title type="html"><![CDATA[Triggering dcc:tcl and dcc:tcl on bind pub]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48478#p48478"><![CDATA[
btw. maybe you want to do:<div class="codebox"><p>Code: </p><pre><code>foreach line [split $output \n] {  puthelp "PRIVMSG $chan :$line"}</code></pre></div>otherwise the output would be cut off on first newline.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sat Apr 23, 2005 12:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-04-23T12:48:04-04:00</updated>

		<published>2005-04-23T12:48:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48475#p48475</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48475#p48475"/>
		<title type="html"><![CDATA[Triggering dcc:tcl and dcc:tcl on bind pub]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48475#p48475"><![CDATA[
Yes thanks, so the mask is "tcl", rest the same okay got that... nothing big I guess. Yes I am aware of the security issues, no one except me has access to my bot plus +mn <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Apr 23, 2005 12:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-04-23T12:55:23-04:00</updated>

		<published>2005-04-23T12:43:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48474#p48474</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48474#p48474"/>
		<title type="html"><![CDATA[Re: Triggering dcc:tcl and dcc:tcl on bind pub]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48474#p48474"><![CDATA[
you can use eval like this:<div class="codebox"><p>Code: </p><pre><code>bind pub n tcl pub:tclproc pub:tcl {nick uhost hand chan text} {   catch {eval $text} output   foreach line [split $output \n] {      puthelp "PRIVMSG $chan :$line"   }   return 1}</code></pre></div>however, I hope you are aware of the security issues of that <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<br><br>for set you will prabably have to use:<br>set evaluate "set $text"<br>eval $evaluate<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sat Apr 23, 2005 12:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-04-23T12:28:13-04:00</updated>

		<published>2005-04-23T12:28:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48473#p48473</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48473#p48473"/>
		<title type="html"><![CDATA[Triggering dcc:tcl and dcc:tcl on bind pub]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48473#p48473"><![CDATA[
Is there anyway I can enable .tcl and .set commands as 'pub' commands which can be say triggered on channels, or even bind msg, when the bot is messaged, instead of the partyline -- without modifying the source code?<br><div class="codebox"><p>Code: </p><pre><code>#unbind dcc n tcl *dcc:tcl#unbind dcc n set *dcc:set</code></pre></div>Also if I way to relay tcl error messages, in channels or private messages to users, I should just string match the tcl error output in partyline and relay it where ever I like I guess?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Apr 23, 2005 12:28 pm</p><hr />
]]></content>
	</entry>
	</feed>
