egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

change echo line

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
pipo
Voice


Joined: 18 Nov 2006
Posts: 16

PostPosted: Sat Nov 18, 2006 3:04 pm    Post subject: change echo line Reply with quote

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:

bind pubm - {#channel1 [NEW]*] echo
proc echo {nick uhost handle channel text} {
 if {($nick == "nick")} {
   putserv "privmsg #channel2 :$text"
 }
}


Thanks
Back to top
View user's profile Send private message
Justdabomb2
Voice


Joined: 29 Sep 2006
Posts: 37
Location: United States of America

PostPosted: Sun Nov 19, 2006 9:47 pm    Post subject: Reply with quote

what is up with this?

bind pubm - {#channel1 [NEW]*] echo
_________________
Yeah!
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Nov 19, 2006 10:59 pm    Post subject: Reply with quote

Code:
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"
 }
}

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
pipo
Voice


Joined: 18 Nov 2006
Posts: 16

PostPosted: Mon Dec 25, 2006 10:37 am    Post subject: Reply with quote

Ok that works, thanks Smile

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber