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

	<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-08-16T00:08:33-04:00</updated>

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

		<entry>
		<author><name><![CDATA[johne]]></name></author>
		<updated>2005-08-16T00:08:33-04:00</updated>

		<published>2005-08-16T00:08:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54324#p54324</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54324#p54324"/>
		<title type="html"><![CDATA[relay text on keyword]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54324#p54324"><![CDATA[
sorry i was a fool...it works <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=6497">johne</a> — Tue Aug 16, 2005 12:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-13T07:35:48-04:00</updated>

		<published>2005-08-13T07:35:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54185#p54185</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54185#p54185"/>
		<title type="html"><![CDATA[relay text on keyword]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54185#p54185"><![CDATA[
what's your configuration? i.e. the <em class="text-italics">cr(sets)</em> array<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sat Aug 13, 2005 7:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[johne]]></name></author>
		<updated>2005-08-13T02:41:29-04:00</updated>

		<published>2005-08-13T02:41:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54162#p54162</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54162#p54162"/>
		<title type="html"><![CDATA[relay text on keyword]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54162#p54162"><![CDATA[
<img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> lol...and again nothing ever works for me...<br><br>and none of it is relaying now with the script change<br><br>does it matter that my keyword is like !news<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6497">johne</a> — Sat Aug 13, 2005 2:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[johne]]></name></author>
		<updated>2005-08-13T02:24:12-04:00</updated>

		<published>2005-08-13T02:24:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54160#p54160</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54160#p54160"/>
		<title type="html"><![CDATA[relay text on keyword]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54160#p54160"><![CDATA[
<img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> k im off to test it, once again, you are the man!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6497">johne</a> — Sat Aug 13, 2005 2:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-13T02:21:22-04:00</updated>

		<published>2005-08-13T02:21:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54159#p54159</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54159#p54159"/>
		<title type="html"><![CDATA[relay text on keyword]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54159#p54159"><![CDATA[
replace proc cr_send with my code<br><br>the conf part becomes:<div class="codebox"><p>Code: </p><pre><code>set cr(sets) {  "dnr #distributed cN {dctievent} duron #distributed - {} foo"  "dnr #distributed cN {dctievent} chasm #distributed - {} bar"  "dnr #distributed cN {dctievent} chasm #dnet.ru - {} *"  "dnr #distributed cN {dctievent} Cluster #distributed - {} *"  "chasm #nnm.ru A {*} duron #noname uc {shred} *"  "ZED #qw.ru A {*} duron #qw.ru ucjn1 {shred} *"  "Cluster #atom a {*} duron #tyumen u {shred} *"  "dnr #qq A {*} duron #eggdrop A {*} *"} </code></pre></div>first two lines will match and send only lines containing "foo" or "bar" (case-insensitive); the rest match and send any text ("*")<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sat Aug 13, 2005 2:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[johne]]></name></author>
		<updated>2005-08-13T02:14:41-04:00</updated>

		<published>2005-08-13T02:14:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54158#p54158</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54158#p54158"/>
		<title type="html"><![CDATA[relay text on keyword]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54158#p54158"><![CDATA[
also, is there a way to make this into one of the variables, like say adding a z to the configuration? and should i replace this part of the script with the new code, or add it later<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6497">johne</a> — Sat Aug 13, 2005 2:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[johne]]></name></author>
		<updated>2005-08-13T02:12:11-04:00</updated>

		<published>2005-08-13T02:12:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54157#p54157</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54157#p54157"/>
		<title type="html"><![CDATA[relay text on keyword]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54157#p54157"><![CDATA[
damn, you are the man, i still could never get that damned rss script to work *sigh*<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6497">johne</a> — Sat Aug 13, 2005 2:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-13T02:14:06-04:00</updated>

		<published>2005-08-13T02:09:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54156#p54156</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54156#p54156"/>
		<title type="html"><![CDATA[relay text on keyword]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54156#p54156"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc cr_send {cmd chan nick text} {  global botnick cr  regsub -all ï $text Ÿ text  foreach i $cr(sets) {    if {[llength $i] != 9} {continue}    set b1name   [xindex $i 0]    set b1chan   [xindex $i 1]    set b1modes   [xindex $i 2]    set b1users   [xindex $i 3]    set b2name   [xindex $i 4]    set b2chan   [xindex $i 5]    set b2modes   [xindex $i 6]    set b2users   [xindex $i 7]    set filter [xindex $i 8]    if {$b1name == $botnick &amp;&amp; $b1chan == $chan} {      if ![string match -noc *${filter}* $text] {continue}      cr_send2 "$b1name $b1chan $b1modes $b1users" "$b2name $b2chan $b2modes $b2users" $cmd $nick $text    } elseif {$b2name == $botnick &amp;&amp; $b2chan == $chan} {      if ![string match -noc *${filter}* $text] {continue}      cr_send2 "$b2name $b2chan $b2modes $b2users" "$b1name $b1chan $b1modes $b1users" $cmd $nick $text    }  } } </code></pre></div>use the usual Tcl string matching rules ("*" matches any word)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sat Aug 13, 2005 2:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[johne]]></name></author>
		<updated>2005-08-13T01:45:32-04:00</updated>

		<published>2005-08-13T01:45:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54154#p54154</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54154#p54154"/>
		<title type="html"><![CDATA[relay text on keyword]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54154#p54154"><![CDATA[
ive been using this script and it works great, id just like to make a modification, heres the script.<br><div class="codebox"><p>Code: </p><pre><code># chan-relay v1.01 by shred, 2001 &lt;shreder@tsu.tmn.ru&gt;# &lt;vars&gt;set cr(version) "1.01"# format: "bot1 #bot1chan flags1 {users1} bot2 #bot2chan flags2 {users2}"# bot1                         &lt;---  #bot2chan, flags2, {users2}# #bot1chan, flags1, {users1}  ---&gt;  bot2# users: # {}- no users# {*}- all users# {nick1 nick2}- selected users (only nick1 and nick2)# flags (what to send):# -- NOTHING# c- chan msgs, actions# C- chan msgs, actions with @/+ prefix# j- join, part, quit msgs# m- mode change msgs# k- kick msgs# n- nick change# N- send with out nick (message only)# t- topic change# u- request user list (from another side)# T- t + synchronize# 1|2|3- output priority (default is 3, 1 is NOT recommended)# a= cjmnkt# A= CjmknT# !! incorrect lines are ignored !!### *** THIS IS WORKING EXAMPLE: set cr(sets) {  "dnr #distributed cN {dctievent} duron #distributed - {}"  "dnr #distributed cN {dctievent} chasm #distributed - {}"  "dnr #distributed cN {dctievent} chasm #dnet.ru - {}"  "dnr #distributed cN {dctievent} Cluster #distributed - {}"  "chasm #nnm.ru A {*} duron #noname uc {shred}"  "ZED #qw.ru A {*} duron #qw.ru ucjn1 {shred}"  "Cluster #atom a {*} duron #tyumen u {shred}"  "dnr #qq A {*} duron #eggdrop A {*}"}# list of bots with this script on board (authorized bots)# also needed for dcc command "cr_rehash" (rehash all selected bots)### *** THIS IS WORKING EXAMPLE: set cr(netbots) "Cluster ZED Fiber BadBlock def chasm duron dnr"# &lt;/vars&gt;# &lt;procs&gt;proc xindex {xarg xarg1} {return [join [lrange [split $xarg] $xarg1 $xarg1]]}proc xrange {xarg xarg1 xarg2} {return [join [lrange [split $xarg] $xarg1 $xarg2]]}proc b {} { return \002 }proc cr_modep {nick chan cmd} {  if {$cmd == "cr_pubm" || $cmd == "cr_act"} {    if {[isop $nick $chan]} {return "\@$nick"}    if {[isvoice $nick $chan]} {return "\+$nick"}  }  return $nick}proc cr_cansend {cmd modes} {  if {$modes == "-"} {return 0}  regsub "a" $modes "cjmnkt" modes  regsub "A" $modes "CjmnkT" modes  if {[lsearch "cr_report cr_ulist" $cmd] != -1} {return 1}  switch $cmd {    cr_pubm {if {[string match "*\[cC\]*" $modes]} {return 1}}    cr_act {if {[string match "*\[cC\]*" $modes]} {return 1}}    cr_join {if {[string match "*j*" $modes]} {return 1}}    cr_part {if {[string match "*j*" $modes]} {return 1}}    cr_sign {if {[string match "*j*" $modes]} {return 1}}    cr_mode {if {[string match "*m*" $modes]} {return 1}}    cr_nick {if {[string match "*n*" $modes]} {return 1}}    cr_topc {if {[string match "*\[tT\]*" $modes]} {return 1}}    cr_ulistreq {if {[string match "*u*" $modes]} {return 1}}  }  return 0}proc cr_getpri {modes} {  if {[string match "*1*" $modes]} {return 1}  if {[string match "*2*" $modes]} {return 2}  return 3}proc cr_send2 {b1d b2d cmd nick text} {  set b1name[xindex $b1d 0]  set b1chan[xindex $b1d 1]  set b1modes[xindex $b1d 2]  set b1users[xindex $b1d 3]  set b1pri[cr_getpri $b1modes]  set b2name[xindex $b2d 0]  set b2chan[xindex $b2d 1]  set b2modes[xindex $b2d 2]  set b2users[xindex $b2d 3]  set b2pri[cr_getpri $b2modes]  if {![cr_cansend $cmd $b1modes]} {return}  if {$b1name == $b2name} {    if {[string match "*\[CA\]*" $b1modes]} {set nick [cr_modep $nick $b1chan $cmd]}    cr_brecive $b1name $cmd [concat $b2chan $nick $text]  } else {    if {[string match "*\[CA\]*" $b1modes]} {set nick [cr_modep $nick $b1chan $cmd]}    foreach x $b1users {      if {$x == $nick || $x == "\*"} {        if {$cmd == "cr_topc" &amp;&amp; $nick == $b1name} {continue}        if {($cmd == "cr_topc") &amp;&amp; [string match "*\[AT\]*" $b1modes]} {append cmd "s"}        if {($cmd == "cr_pubm" || $cmd == "cr_act") &amp;&amp; [string match "*N*" $b1modes]} {set nick "\*"}        if {[catch {putbot $b2name "$cmd $b1pri $b2chan $nick $text"} err]} {putlog "$x bot error: $err"}      }    }  }}proc cr_send {cmd chan nick text} {  global botnick cr  regsub -all ï $text Ÿ text  foreach i $cr(sets) {    if {[llength $i] != 8} {continue}    set b1name[xindex $i 0]    set b1chan[xindex $i 1]    set b1modes[xindex $i 2]    set b1users[xindex $i 3]    set b2name[xindex $i 4]    set b2chan[xindex $i 5]    set b2modes[xindex $i 6]    set b2users[xindex $i 7]    if {$b1name == $botnick &amp;&amp; $b1chan == $chan} {      cr_send2 "$b1name $b1chan $b1modes $b1users" "$b2name $b2chan $b2modes $b2users" $cmd $nick $text    } elseif {$b2name == $botnick &amp;&amp; $b2chan == $chan} {      cr_send2 "$b2name $b2chan $b2modes $b2users" "$b1name $b1chan $b1modes $b1users" $cmd $nick $text    }  }  }proc cr_pubm {nick uhost hand chan text} {cr_send cr_pubm $chan $nick $text}proc cr_act {nick uhost hand chan keyw text} {cr_send cr_act $chan $nick $text}proc cr_nick {nick uhost hand chan newnick} {cr_send cr_nick $chan $nick $newnick}proc cr_mode {nick uhost hand chan mc victim} {  if {$nick == "" &amp;&amp; $hand == "\*"} {    cr_send cr_mode $chan $uhost "$chan $mc $victim"  } else {    cr_send cr_mode $chan $nick "$chan $mc $victim"  }}proc cr_join {nick uhost hand chan} {  cr_send cr_join $chan $nick "$chan $uhost"  cr_send cr_ulistreq $chan $nick "$chan"}proc cr_part {nick uhost hand chan msg} {cr_send cr_part $chan $nick "$chan $uhost"}proc cr_sign {nick uhost hand chan reason} {cr_send cr_sign $chan $nick "$uhost $reason"}proc cr_topc {nick uhost hand chan topic} {if {$nick == "\*"} {return}; cr_send cr_topc $chan $nick "$chan $topic"}proc cr_kick {nick uhost hand chan target reason} {cr_send cr_kick $chan $nick "$target $reason"}proc cr_putx {pri text} {  switch $pri {    1 {putquick $text}    2 {putserv $text}    3 {puthelp $text}    default {putlog "ERROR: Wrong priority ($pri) for message '$text'"}  }}proc cr_brecive {frombot cmd arg} {  global cr server  if {$server == ""} {return}  if {[lsearch $cr(netbots) $frombot] == -1} {return}  set pri  [xindex $arg 0]  set chan [xindex $arg 1]  set nick [xindex $arg 2]  set text [xrange $arg 3 end]  switch $cmd {    cr_pubm {if {$nick == "*"} {cr_putx $pri "PRIVMSG $chan :$text"} else {cr_putx $pri "PRIVMSG $chan :\&lt;$nick\&gt; $text"}}    cr_act {if {$nick == "*"} {putact $chan $text} else {cr_putx $pri "PRIVMSG $chan :\* $nick $text"}}    cr_nick {cr_putx $pri "PRIVMSG $chan :\*\*\* $nick is now known as $text"}    cr_mode {cr_putx $pri "PRIVMSG $chan :\*\*\* $nick sets [xindex $text 0] mode: [xrange $text 1 end]"}    cr_sign {cr_putx $pri "PRIVMSG $chan :\*\*\* $nick ([xindex $text 0]) Quit ([xrange $text 1 end])"}    cr_join {cr_putx $pri "PRIVMSG $chan :\*\*\* $nick ([xindex $text 1]) has joined [xindex $text 0]"}    cr_part {cr_putx $pri "PRIVMSG $chan :\*\*\* $nick ([xindex $text 1]) has left [xindex $text 0]"}    cr_topc {cr_putx $pri "PRIVMSG $chan :\*\*\* $nick changes [xindex $text 0] topic to '[xrange $text 1 end]'"}    cr_topcs {cr_putx $pri "PRIVMSG $chan :\*\*\* $nick changes [xindex $text 0] topic to '[xrange $text 1 end]'"; if {[botisop $chan]} {putserv "TOPIC $chan :[xrange $text 1 end] ($nick)"}}    cr_kick {cr_putx $pri "PRIVMSG $chan :\*\*\* [xindex $text 0] was kicked from $chan by $nick ([xrange $text 1 end])"}    cr_dorehash {putbot $frombot cr_rehashing; putlog "REHASH request from $frombot"; rehash}    cr_rehashing {putlog "  $frombot: rehashing..."}    cr_report {cr_putx $pri "PRIVMSG $chan :\! Relay bot (${frombot}) reporting: $text"}    cr_ulistreq {putbot $frombot "cr_ulist 3 $text $nick [b][llength [chanlist $chan]][b] users on [b]$chan[b]: [join [lsort [chanlist $chan]] {, }]"}    cr_ulist {cr_putx $pri "NOTICE $nick :\[$chan\] $text"}  }}proc cr_sendrehash {hand idx arg} {  global cr botnick  putlog "Sending REHASH request to [llength $cr(netbots)] bots..."  foreach x $cr(netbots) {    if {$x == $botnick} {continue}    if {![islinked $x]} {putlog "$x bot is not currently linked"; continue}    if {[catch {putbot $x "cr_dorehash"} err]} {putlog "$x bot error: $err"}  }  putlog "Send completed. Rehashing myself..."; rehash}proc cr_need {chan type} {  if {$type == "unban"} {cr_send cr_report $chan - "need unban on $chan"}}# &lt;/procs&gt;# &lt;binds&gt;bind dcc n cr_rehash cr_sendrehashbind need - * cr_needbind pubm - * cr_pubmbind ctcp - ACTION cr_actbind nick - * cr_nickbind mode - * cr_modebind join - * cr_joinbind part - * cr_partbind sign - * cr_signbind topc - * cr_topcbind kick - * cr_kickbind bot - cr_pubm cr_brecivebind bot - cr_act cr_brecivebind bot - cr_nick cr_brecivebind bot - cr_mode cr_brecivebind bot - cr_join cr_brecivebind bot - cr_part cr_brecivebind bot - cr_sign cr_brecivebind bot - cr_topc cr_brecivebind bot - cr_topcs cr_brecivebind bot - cr_kick cr_brecivebind bot - cr_dorehash cr_brecivebind bot - cr_rehashing cr_brecivebind bot - cr_report cr_brecivebind bot - cr_ulistreq cr_brecivebind bot - cr_ulist cr_brecive# &lt;/binds&gt;# &lt;c&gt;putlog "  chan-relay v$cr(version) by shred, 2001 &lt;shreder@tsu.tmn.ru&gt;"# &lt;/c&gt;</code></pre></div>and what im wanting to add, is another variable to the list @ the top for a keyword and whenever that word is said in a channel, it relays only that line of text on the recieving channel.<br><br>thanks in advance if you can help me out.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6497">johne</a> — Sat Aug 13, 2005 1:45 am</p><hr />
]]></content>
	</entry>
	</feed>
