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

	<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-11-09T08:00:34-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-11-09T07:57:54-04:00</updated>

		<published>2003-11-09T07:57:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29749#p29749</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29749#p29749"/>
		<title type="html"><![CDATA[Need Help With A PM Relay Script!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29749#p29749"><![CDATA[
<blockquote class="uncited"><div>### see bottom of script for commands ###<br><br>bind msgm - "*" echo:msg<br>bind ctcp - ACTION echo:act<br>bind pub n !pmon proc:on<br>bind pub n !pmoff proc:off<br>bind pub o !pm proc:smsg<br>bind pub o !apm proc:sact<br><br>### Specify the PM relay channel ###<br>set chan "#ChannelName"<br><br>proc proc:on {nick chan uhost hand arg} {<br>global status<br>set status 1<br>puthelp "notice $nick :PM Relay Enabled!"<br>}<br><br>proc proc:off {nick chan uhost hand arg} {<br>global status<br>set status 0<br>puthelp "notice $nick :PM Relay Disabled!"<br>}<br><br>proc proc:smsg {nick chan uhost hand text} {<br>global status<br>if {$status == 1} {<br>set pmnick [lindex [split $text] 0]<br>set message [join [lrange [split $text] 1 end]]<br>putserv "PRIVMSG $pmnick :$message"<br>if {$message == ""} {<br>puthelp "notice $nick :To correctly use this feature type: !pm &lt;nick&gt; message."<br>}<br>}<br>if {$status == 0} {<br>puthelp "notice $nick :The PM Relay Function Is Currently Disabled."<br>}<br>}<br><br>proc echo:msg {nick uhost hand text} {<br>global chan status<br>if {$status == 1} {<br>set line [string trim $text]<br>putserv "PRIVMSG $chan :\002&lt;$nick&gt;\002 $line"<br>}<br>}<br><br>proc echo:act {nick uhost hand dest key arg} {<br>global chan status<br>if {$status == 1} {<br>if {$dest == $::botnick} {<br>set line [split $arg]<br>putserv "PRIVMSG $chan :\002* $nick\002 $line"<br>}<br>}<br>}<br><br>proc proc:sact {nick chan uhost hand text} {<br>global status<br>if {$status == 1} {<br>set pmnick [lindex [split $text] 0]<br>set message [join [lrange [split $text] 1 end]]<br>putserv "PRIVMSG $pmnick :\001ACTION $message\001"<br>if {$message == ""} {<br>puthelp "notice $nick :To correctly use this feature type: !apm &lt;nick&gt; action."<br>}<br>}<br>if {$status == 0} {<br>puthelp "notice $nick :The PM Relay Function Is Currently Disabled."<br>}<br>}<br><br>putlog "PM EcHo By DiStUrBeD LoaDeD!"<br><br>##############################<br>#          Commands          #<br>##############################<br>#                            #<br>#    !pm &lt;nick&gt; message      #<br>#   sends the given message  #<br>#  to the specified nickname #<br>#                            #<br>#    !apm &lt;nick&gt; action      #<br>#   sends the given action   #<br>#  to the specified nickname #<br>#                            #<br>#  !pmon turns the pm relay  #<br>#         function on        #<br>#                            #<br>#  !pmoff turns the pm relay #<br>#         function off       #<br>#                            #<br>##############################</div></blockquote>That's the final version of the script i'm using.<br>Thanks Sir_Fz for all your help.<p>Statistics: Posted by Guest — Sun Nov 09, 2003 7:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-11-09T07:51:10-04:00</updated>

		<published>2003-11-09T07:51:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29748#p29748</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29748#p29748"/>
		<title type="html"><![CDATA[Need Help With A PM Relay Script!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29748#p29748"><![CDATA[
Thanks for that, i couldn't seem to find how to use the sample piece of code you provided...but i did manage to get it working correctly after looking at what you supplied, thanks.<p>Statistics: Posted by Guest — Sun Nov 09, 2003 7:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-11-09T06:29:13-04:00</updated>

		<published>2003-11-09T06:29:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29745#p29745</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29745#p29745"/>
		<title type="html"><![CDATA[Need Help With A PM Relay Script!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29745#p29745"><![CDATA[
add this to your code, so it will only relay when the messages are in priv.<div class="codebox"><p>Code: </p><pre><code>if {"[string tolower $dest] == "[string tolower $::botnick]"} {## relay.. </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Nov 09, 2003 6:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-11-08T15:47:47-04:00</updated>

		<published>2003-11-08T15:47:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29730#p29730</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29730#p29730"/>
		<title type="html"><![CDATA[Need Help With A PM Relay Script!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29730#p29730"><![CDATA[
I just want it to relay actions done to the bot in PM (private message) and not those in the channel.<br><br>Please help me with this small complication because i am so close to finishing this (my first tcl script) and would happily release the whole code for other to use.<br><br>Thanks in advanced.<br>Dave<br><br>p.s. thanks for the advice: "[lindex [split $text]...] and [join [lrange [split $text].....]" i used this instead of my original code and it now doesn't have strange results when special characters are used.<p>Statistics: Posted by Guest — Sat Nov 08, 2003 3:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-11-08T13:50:46-04:00</updated>

		<published>2003-11-08T13:50:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29727#p29727</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29727#p29727"/>
		<title type="html"><![CDATA[Cheers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29727#p29727"><![CDATA[
Thanks for the reply...<br><br>The above piece of script works great... but it relays actions done in the same channel as the bot as well as in PM.<br><br>Do you know how i can reslove this?<br><br>Thanks in advanced.<br>Dave<p>Statistics: Posted by Guest — Sat Nov 08, 2003 1:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-11-08T06:11:56-04:00</updated>

		<published>2003-11-08T06:11:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29713#p29713</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29713#p29713"/>
		<title type="html"><![CDATA[Need Help With A PM Relay Script!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29713#p29713"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind ctcp - ACTION echo:actproc echo:act {nick uhost hand dest key arg} {global chan qwerty if {$qwerty == 1} { set line [split $arg] putserv "PRIVMSG $chan :\002&lt;$nick&gt;\002 $line"  } }</code></pre></div>this will relay actions.<br><br>Just for advise: use [lindex <strong class="text-strong">[split $text]</strong>...] and <strong class="text-strong">[join</strong> [lrange <strong class="text-strong">[split $text]</strong>.....] to me more secure, and remove the "return 0" at the end of the script, it has no use.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Nov 08, 2003 6:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-11-09T08:00:34-04:00</updated>

		<published>2003-11-07T10:24:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29698#p29698</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29698#p29698"/>
		<title type="html"><![CDATA[Need Help With A PM Relay Script!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29698#p29698"><![CDATA[
<blockquote class="uncited"><div>bind msgm - "*" proc:echo<br>bind pub n !pmon proc:on<br>bind pub n !pmoff proc:off<br>bind pub o !pm proc:send<br><br>proc proc:on {nick chan uhost hand arg} {<br>global qwerty<br>set qwerty 1<br>puthelp "notice $nick :PM Relay Enabled!"<br>}<br><br>proc proc:off {nick chan uhost hand arg} {<br>global qwerty<br>set qwerty 0<br>puthelp "notice $nick :PM Relay Disabled!"<br>}<br><br>proc proc:send {nick chan uhost hand text} {<br>global qwerty<br>if {$qwerty == 1} {<br>set pmnick [lindex $text 0]<br>set message [lrange $text 1 end]<br>if {$message == ""} {<br>puthelp "notice $nick :To correctly use this feature type: !pm &lt;nick&gt; message."<br>}<br>putserv "PRIVMSG $pmnick :$message"<br>}<br>}<br><br>set chan "#Chan"<br>proc proc:echo {nick uhost hand text} {<br>global chan qwerty<br>if {$qwerty == 1} {<br>set line [string trim $text]<br>putserv "PRIVMSG $chan :\002&lt;$nick&gt;\002 $line"<br>}<br>}<br>return 0<br>putlog "pm echo loaded"</div></blockquote>This is my first attempt at a PM relay script, i only got my eggdrop a few days ago and am still new to all this tcl scripting, i've done the best i can (which is probably sloppy scripting) and the above seems to work perfectly but i have been trying to implement a process that will relay a persons ACTIONS to channel, but fail miserably everytime.<br><br>Please help me.<br>Thanks in advance.<br>Dave.<p>Statistics: Posted by Guest — Fri Nov 07, 2003 10:24 am</p><hr />
]]></content>
	</entry>
	</feed>
