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

	<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>2007-03-22T19:49:40-04:00</updated>

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

		<entry>
		<author><name><![CDATA[JAFO]]></name></author>
		<updated>2007-03-22T19:49:40-04:00</updated>

		<published>2007-03-22T19:49:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71496#p71496</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71496#p71496"/>
		<title type="html"><![CDATA[Relay / Write]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71496#p71496"><![CDATA[
I tried the basic write script , but still nada <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>It's all mumbojumbo to me, so if anyone could help me out much appreciated. That way i'll get more insight on further tcl probs, since i will learn how the script reacts to what i want.<br><br>Hope anyone will help me out here ....<br><br>TIA<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6850">JAFO</a> — Thu Mar 22, 2007 7:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JAFO]]></name></author>
		<updated>2007-03-21T06:09:23-04:00</updated>

		<published>2007-03-21T06:09:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71441#p71441</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71441#p71441"/>
		<title type="html"><![CDATA[Relay / Write]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71441#p71441"><![CDATA[
maybe this will help.<br><br>I have this script that echoes to another channel.<br>I'd like to have it rewritten so it writes to a file. This script works like a charm, so maybe it be better if ya could help me rewrite this one <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><div class="codebox"><p>Code: </p><pre><code>#what nicks are allowed to trigger the relay# you can use wildcards, separate each nick with a spaceset rl_nicks "NFOrce"#source chan to relay from (only put one chan here)#no wildcards allowed hereset rl_source "#NEWS"#chans to relay to, separate each chan with a space#no wildcards allowed hereset rl_dest "#chan1"#text to watch for in the source chan#(only put one text string here)set rl_text "*(NEWS)*"#DON'T EDIT BELOW HEREbind pubm - "$rl_text" rl:goproc rl:go { n u h c t } {  global rl_dest  if {[rl:auth $n $c]} {    set rl_dest [string tolower $rl_dest]    foreach dest $rl_dest {      if {[botonchan $dest]} {        puthelp "PRIVMSG $dest :$t"      }    }  }}proc rl:auth { n c } {  global rl_nicks rl_source  set rl_nicks [string tolower $rl_nicks]  set rl_source [string tolower $rl_source]  set n [string tolower $n]  set c [string tolower $c]  foreach m $rl_nicks {    if {[string match "$m" $n] &amp;&amp; $c == $rl_source} {      return 1    }  }  return 0}   </code></pre></div><br>But here it says <br><div class="codebox"><p>Code: </p><pre><code>#text to watch for in the source chan#(only put one text string here)set rl_text "*(NEWS)*"</code></pre></div>only put one text <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>i'd like to add several.<br><br>TIA <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=6850">JAFO</a> — Wed Mar 21, 2007 6:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[w00f]]></name></author>
		<updated>2007-03-17T22:54:54-04:00</updated>

		<published>2007-03-17T22:54:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71333#p71333</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71333#p71333"/>
		<title type="html"><![CDATA[Relay / Write]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71333#p71333"><![CDATA[
You can specify what you want to add by , binding what you want instead of *(with * the bot will put into data file everything that X says in one of the #chans that you specify), regexp $text first in a way to get what you want.<br>All depends what you want to add to that file, and certainly that I don't know what you want.<br><br>for the example you gave, you can bind (NEWS).<br><br>bind pub - (NEWS) relay:pubm<br><br>this will work for that kind of NFOrce announce.<br>Like i said you can also add/remove from the $text what you want, but you need to tell what you want in spite of setting up the script.<br><br>or i completely misunderstood what you want (hard night here lol)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8264">w00f</a> — Sat Mar 17, 2007 10:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JAFO]]></name></author>
		<updated>2007-03-17T19:46:37-04:00</updated>

		<published>2007-03-17T19:46:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71326#p71326</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71326#p71326"/>
		<title type="html"><![CDATA[Relay / Write]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71326#p71326"><![CDATA[
thx for ya help w00f <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>But i dont wanna use the .bak.txt.<br><br>Also i'd like to specify the word(s) in the line on which it should write to file.<br><br>Further help would be much appreciated <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=6850">JAFO</a> — Sat Mar 17, 2007 7:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[w00f]]></name></author>
		<updated>2007-03-17T18:30:07-04:00</updated>

		<published>2007-03-17T18:30:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71324#p71324</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71324#p71324"/>
		<title type="html"><![CDATA[Relay / Write]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71324#p71324"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set relay(chans) "[list #chan1 #chan2 #etc]"set relay(who) "[list nick1 nick2 nick3 etc]"set relay(db) "NFOrce/nforce.txt"set relay(db_bak) "NFOrce/nforce.bak.txt"bind pubm - {*} relay:pubmproc relay:pubm {nick uhost hand chan text} {    global relay    if {[lsearch -exact "$relay(chans)" $chan] == -1} { return }    if {[lsearch -exact "$relay(who)" $nick] == -1} { return }if {![file exist $relay(db)]} {putlog "creating db file ..."create_db}file rename -force $relay(db) $relay(db_bak)set i 0set fp [open $relay(db) w]set bak [open $relay(db_bak) r]while {![eof $bak]} {gets $bak lineif {$i == 1} {puts $fp "$text"} if {$line != ""} {puts $fp $line}incr i}close $fpclose $bak}proc create_db {} {global relayset fp [open $relay(db) a]puts $fp "nforce info"close $fp}putlog "crapy tcl loaded"</code></pre></div><br>this code is untested, but i thinks that will work fine.<br><br>w00f<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8264">w00f</a> — Sat Mar 17, 2007 6:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JAFO]]></name></author>
		<updated>2007-03-17T05:24:50-04:00</updated>

		<published>2007-03-17T05:24:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71303#p71303</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71303#p71303"/>
		<title type="html"><![CDATA[Relay / Write]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71303#p71303"><![CDATA[
Hi all , <br><br>I would like to get some help on a script.<br>Searched the forum , found some bits and pieces of the script i'd like to have.<br>TCL aint my strongest side <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>This is what i found :<br><div class="codebox"><p>Code: </p><pre><code>set relay(chans) "[list #chan1 #chan2 #etc]"; # put the channels within this list of which you want to relay messages fromset relay(who) "[list nick1 nick2 nick3 etc]"; # put here the nicknames of who you want to relay messages fromset relay(to) "#relay-to-this-channel"bind pubm - {*} relay:pubmproc relay:pubm {nick uhost hand chan text} {    global relay    if {[lsearch -exact "$relay(chans)" $chan] == -1} { return }    if {[lsearch -exact "$relay(who)" $nick] == -1} { return }    if {[validchan $relay(to)] &amp;&amp; [botonchan $relay(to)]} {        puthelp "PRIVMSG $relay(to) :\[[clock format [clock seconds] -format %H:%M:%S]\] &lt;$nick&gt; $text"    }}</code></pre></div><br>But instead of relaying to a channel / network , i'd like the bot to write to a file.<br><br>IE.<br><br>My bot says:<br><br>&lt;NFOrce&gt; (NEWS) : blablabla <a href="http://blabla" class="postlink">http://blabla</a><br><br>then i wanna put "(NEWS) : blablabla <a href="http://blabla" class="postlink">http://blabla</a>" into a file in /home/NFOrce/data.txt ( or any other word i want to echo later )<br><br>Also like to know if it's possible if the bot can write his own txt into the file or do i need a new eggdrop for that ??<br><br>TIA <br><br>JAFO<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6850">JAFO</a> — Sat Mar 17, 2007 5:24 am</p><hr />
]]></content>
	</entry>
	</feed>
