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

	<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-02-05T20:52:55-04:00</updated>

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

		<entry>
		<author><name><![CDATA[dossi]]></name></author>
		<updated>2005-02-05T20:52:55-04:00</updated>

		<published>2005-02-05T20:52:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46308#p46308</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46308#p46308"/>
		<title type="html"><![CDATA[chan relay script mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46308#p46308"><![CDATA[
Ok, that works -- Thanks for the help so far, but I have a few more errors<br><br>When I try to !spychan, it doesn't join the channel and start spying on it (it seems it can't re-write $spy(chan))<br><br>Then, when I try !spypeek, I get the error Tcl error [set:spypeek]: invalid channel "" -- (In the original script, I have $spy(chan) "" &lt;--set to that, but I have tried setting it to others, then !spychan and !spypeek, and it says the same error Tcl error [set:spypeek]: invalid channel "#testomg"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5819">dossi</a> — Sat Feb 05, 2005 8:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-02-05T20:37:30-04:00</updated>

		<published>2005-02-05T20:37:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46307#p46307</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46307#p46307"/>
		<title type="html"><![CDATA[chan relay script mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46307#p46307"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>Hmm, I'm getting a few errors --<br><br>[17:35] Tcl error [set:spypeek]: can't read "spy(chan)": no such variable<br>(When trying to !spypeek and the others)</div></blockquote>Remove the $ in the "global" line in each proc.<br>e.g. change <div class="codebox"><p>Code: </p><pre><code>global $spy(chan)</code></pre></div> to <div class="codebox"><p>Code: </p><pre><code>global spy(chan) </code></pre></div></div></blockquote>or <div class="codebox"><p>Code: </p><pre><code>global spy</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Feb 05, 2005 8:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2005-02-05T20:33:48-04:00</updated>

		<published>2005-02-05T20:33:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46306#p46306</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46306#p46306"/>
		<title type="html"><![CDATA[chan relay script mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46306#p46306"><![CDATA[
actually, 'spy'  is is an array, so it should be just <div class="codebox"><p>Code: </p><pre><code>global spy</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Sat Feb 05, 2005 8:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[avilon]]></name></author>
		<updated>2005-02-05T19:46:05-04:00</updated>

		<published>2005-02-05T19:46:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46303#p46303</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46303#p46303"/>
		<title type="html"><![CDATA[chan relay script mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46303#p46303"><![CDATA[
<blockquote class="uncited"><div>Hmm, I'm getting a few errors --<br><br>[17:35] Tcl error [set:spypeek]: can't read "spy(chan)": no such variable<br>(When trying to !spypeek and the others)</div></blockquote>Remove the $ in the "global" line in each proc.<br>e.g. change <div class="codebox"><p>Code: </p><pre><code>global $spy(chan)</code></pre></div> to <div class="codebox"><p>Code: </p><pre><code>global spy(chan) </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5191">avilon</a> — Sat Feb 05, 2005 7:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dossi]]></name></author>
		<updated>2005-02-05T19:36:42-04:00</updated>

		<published>2005-02-05T19:36:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46302#p46302</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46302#p46302"/>
		<title type="html"><![CDATA[chan relay script mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46302#p46302"><![CDATA[
Hmm, I'm getting a few errors --<br><br>[17:35] Tcl error [set:spypeek]: can't read "spy(chan)": no such variable<br>(When trying to !spypeek and the others)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5819">dossi</a> — Sat Feb 05, 2005 7:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-02-05T08:46:46-04:00</updated>

		<published>2005-02-05T08:46:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46276#p46276</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46276#p46276"/>
		<title type="html"><![CDATA[Re: chan relay script mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46276#p46276"><![CDATA[
<blockquote class="uncited"><div>I found a script that relays what's happening in one channel, to another but I was wondering if someone could make public commands for it -- ex.  <br> <br>?spychan &lt;chan&gt; (bot joins channel and sets the variable $spy(chan) to &lt;chan&gt;  <br> <br>?spyoff (bot leaves channel and turns spying off [sets $spy(chan) to ""])  <br> <br>?spypeek (shows all names in spy channel, ops: voice: normalSmiley  <br> <br>?spyrelay &lt;chan&gt; (sets the $spy(home) to &lt;chan&gt;Wink<br> <br>Here is the script: <div class="codebox"><p>Code: </p><pre><code> # Info# Author : MeTroiD - #v1per on Quakenet# Version: 1.2set spy(author)  "MeTroiD"set spy(version) "1.2" # Description # This script will relay anything said on one channel to the other channel you configure# I recommend you don't run this script on a bot that already has to do alot# If the channel you're spying on has alot of users with alot of talking your bot could excess flood # Configuration # The channel it reports everything toset spy(home) "#home" # The channel it gets all the data from and then reports it to the homechannelset spy(chan) "#chan"  bind PUBM   -|- *      spychan:chatbind CTCP   -|- "ACTION"    spychan:actionbind SIGN   -|- "$spy(chan) *"   spychan:signbind JOIN   -|- "$spy(chan) *"   spychan:joinbind PART   -|- "$spy(chan) *"   spychan:partbind SPLT   -|- "$spy(chan) *"   spychan:splitbind KICK   -|- "$spy(chan) *"   spychan:kickbind RAW     *  "MODE"      spychan:mode  proc spychan:part { nickname hostname handle channel reason } { global spy if {[string equal -nocase $channel $spy(chan)]} { putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname ($hostname) has left $spy(chan)" }  }  proc spychan:join { nickname hostname handle channel } { global spy if {[string equal -nocase $channel $spy(chan)]} { putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname ($hostname) has joined $spy(chan)" }  } proc spychan:kick { nickname hostname handle channel target reason } { global spy if {[string equal -nocase $channel $spy(chan)]} { putserv "PRIVMSG $spy(home) :\[$channel\] * $target was kicked from $spy(chan) by $nickname ($reason)" }  } proc spychan:mode { from key arguments } { global spy set channel [string trim [lindex [split $arguments] 0]]   set modechange [string trim [lindex [split $arguments] 1]]   set victims [string trim [join [lrange [split $arguments] 2 end]]]    set nickname [string trim [lindex [split $from "!"] 0]]   set hostname [string trim [lindex [split $from "!"] 1]] if {[string equal -nocase $channel $spy(chan)]} { putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname sets mode: $modechange $victims" }  } proc spychan:sign { nickname hostname handle channel reason } { global spy if {[string equal -nocase $channel $spy(chan)]} { putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname ($hostname) has quit IRC ($reason)" }  } proc spychan:split { nickname hostname handle channel arguments } { global spy if {[string equal -nocase $channel $spy(chan)]} { putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname has split from the network" }  } proc spychan:chat { nickname hostname handle channel arguments } { global spy if {[string equal -nocase $channel $spy(chan)]} {   putserv "PRIVMSG $spy(home) :\[$channel\] &lt;$nickname&gt; $arguments"   }  } proc spychan:action { nickname hostname handle channel keyword arguments } { global spy if {[string equal -nocase $channel $spy(chan)]} {   putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname $arguments"   }  }  putlog "spy $spy(version) loaded" </code></pre></div>Any help/guidance is appriciated.</div></blockquote>Here are the small binds and procs you requested. Try to combine them into your script now:<br><div class="codebox"><p>Code: </p><pre><code>bind pub - "!spychan" set:spychanproc set:spychan {nick uhost hand chan text} { global $spy(chan) if {[string index $text 0] == "#"} { set $spy(chan) [lindex $text 0] }}bind pub - "!spyoff" set:spyoffproc set:spyoff {nick uhost hand chan text} { global $spy(chan) channel remove $spy(chan) set $spy(chan) "" }}bind pub - "!spypeek" set:spypeekproc set:spypeek {nick uhost hand chan text} { global $spy(chan) putserv "PRIVMSG $chan :Status for $spy(chan): [chanlist $spy(chan)]"}bind pub - "!spyrelay" set:spyrelayproc set:spyrelay {nick uhost hand chan text} { global $spy(home) if {[string index $text 0] == "#"} { set $spy(home) [lindex $text 0] }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Feb 05, 2005 8:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dossi]]></name></author>
		<updated>2005-02-05T19:19:04-04:00</updated>

		<published>2005-02-04T23:48:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46272#p46272</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46272#p46272"/>
		<title type="html"><![CDATA[chan relay script mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46272#p46272"><![CDATA[
I found a script that relays what's happening in one channel, to another but I was wondering if someone could make public commands for it -- ex.  <br> <br>?spychan &lt;chan&gt; (bot joins channel and sets the variable $spy(chan) to &lt;chan&gt;  <br> <br>?spyoff (bot leaves channel and turns spying off [sets $spy(chan) to ""])  <br> <br>?spypeek (shows all names in spy channel, ops: voice: normal)<br> <br>?spyrelay &lt;chan&gt; (sets the $spy(home) to &lt;chan&gt;<br> <br>Here is the script: <div class="codebox"><p>Code: </p><pre><code> # Info# Author : MeTroiD - #v1per on Quakenet# Version: 1.2set spy(author)  "MeTroiD"set spy(version) "1.2" # Description # This script will relay anything said on one channel to the other channel you configure# I recommend you don't run this script on a bot that already has to do alot# If the channel you're spying on has alot of users with alot of talking your bot could excess flood # Configuration # The channel it reports everything toset spy(home) "#home" # The channel it gets all the data from and then reports it to the homechannelset spy(chan) "#chan"  bind PUBM   -|- *      spychan:chatbind CTCP   -|- "ACTION"    spychan:actionbind SIGN   -|- "$spy(chan) *"   spychan:signbind JOIN   -|- "$spy(chan) *"   spychan:joinbind PART   -|- "$spy(chan) *"   spychan:partbind SPLT   -|- "$spy(chan) *"   spychan:splitbind KICK   -|- "$spy(chan) *"   spychan:kickbind RAW     *  "MODE"      spychan:mode  proc spychan:part { nickname hostname handle channel reason } { global spy if {[string equal -nocase $channel $spy(chan)]} { putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname ($hostname) has left $spy(chan)" }  }  proc spychan:join { nickname hostname handle channel } { global spy if {[string equal -nocase $channel $spy(chan)]} { putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname ($hostname) has joined $spy(chan)" }  } proc spychan:kick { nickname hostname handle channel target reason } { global spy if {[string equal -nocase $channel $spy(chan)]} { putserv "PRIVMSG $spy(home) :\[$channel\] * $target was kicked from $spy(chan) by $nickname ($reason)" }  } proc spychan:mode { from key arguments } { global spy set channel [string trim [lindex [split $arguments] 0]]   set modechange [string trim [lindex [split $arguments] 1]]   set victims [string trim [join [lrange [split $arguments] 2 end]]]    set nickname [string trim [lindex [split $from "!"] 0]]   set hostname [string trim [lindex [split $from "!"] 1]] if {[string equal -nocase $channel $spy(chan)]} { putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname sets mode: $modechange $victims" }  } proc spychan:sign { nickname hostname handle channel reason } { global spy if {[string equal -nocase $channel $spy(chan)]} { putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname ($hostname) has quit IRC ($reason)" }  } proc spychan:split { nickname hostname handle channel arguments } { global spy if {[string equal -nocase $channel $spy(chan)]} { putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname has split from the network" }  } proc spychan:chat { nickname hostname handle channel arguments } { global spy if {[string equal -nocase $channel $spy(chan)]} {   putserv "PRIVMSG $spy(home) :\[$channel\] &lt;$nickname&gt; $arguments"   }  } proc spychan:action { nickname hostname handle channel keyword arguments } { global spy if {[string equal -nocase $channel $spy(chan)]} {   putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname $arguments"   }  }  putlog "spy $spy(version) loaded" </code></pre></div>Any help/guidance is appriciated.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5819">dossi</a> — Fri Feb 04, 2005 11:48 pm</p><hr />
]]></content>
	</entry>
	</feed>
