This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

change echo line

Help for those learning Tcl or writing their own scripts.
Post Reply
p
pipo
Voice
Posts: 16
Joined: Sat Nov 18, 2006 2:51 pm

change echo line

Post by pipo »

When a new upload is announce on my sitechannel, my bot is echo-ing it to my friends channel.

Now I want to change the line that the bot is echo-ing

Sitebot announce like this:

[NEW][SECTION] New Upload: releasename.group by user

I want to echo it like this:

[NEW] New Upload: releasename.group by user [SECTION]


The code I use:

Code: Select all

bind pubm - {#channel1 [NEW]*] echo 
proc echo {nick uhost handle channel text} { 
 if {($nick == "nick")} { 
   putserv "privmsg #channel2 :$text" 
 } 
}
Thanks
J
Justdabomb2
Voice
Posts: 37
Joined: Fri Sep 29, 2006 7:16 pm
Location: United States of America

Post by Justdabomb2 »

what is up with this?

bind pubm - {#channel1 [NEW]*] echo
Yeah!
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind pubm - {#channel1 [NEW]*} echo
proc echo {nick uhost handle channel text} {
 if {($nick == "nick")} {
   set text [regsub {^\[NEW\]} $text ""]
   set sect [lindex [split $text] 0]
   set text [join [lrange [split $text] 1 end]]
   putserv "privmsg #channel2 :\[NEW\] $text $sect"
 }
}
p
pipo
Voice
Posts: 16
Joined: Sat Nov 18, 2006 2:51 pm

Post by pipo »

Ok that works, thanks :)

Now is it possible to echo new uploads that starts for example with VA in the announce line to a second channel?

example sitebot announce:

[NEW][SECTION] New Upload: releasename.group by user

Gets echo-ed to #channel2 only


[NEW][SECTION] New Upload: VA.releasename.group by user

gets echo-ed to #channel2 and #channel3


Thanks
Post Reply