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

	<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-03-15T10:17:46-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-03-15T10:17:46-04:00</updated>

		<published>2005-03-15T10:17:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47695#p47695</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47695#p47695"/>
		<title type="html"><![CDATA[ch-relay1.101 error.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47695#p47695"><![CDATA[
Check your logfiles for error messages or type ".set errorInfo" in your bot's partyline to see if there are any errors generated by this script. And make sure the script is on all of your bots.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Mar 15, 2005 10:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2005-03-15T09:36:54-04:00</updated>

		<published>2005-03-15T09:36:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47694#p47694</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47694#p47694"/>
		<title type="html"><![CDATA[ch-relay1.101 error.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47694#p47694"><![CDATA[
Hi has anyone of you ever worked on this TCL ?.. ch-relay1.01 it's not working with me ...<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><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Tue Mar 15, 2005 9:36 am</p><hr />
]]></content>
	</entry>
	</feed>
