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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
shixxor
Voice
Posts: 4 Joined: Fri Feb 26, 2010 5:40 pm
Post
by shixxor » Wed Jun 16, 2010 9:07 am
hi there,
i need a simple TCL script that just makes the bot repeat what 2 ppl said. for example
[shixxor]: lol
[peter]: lol
then
[eggdrop]: lol
would be cool if you could help me
tueb
Halfop
Posts: 76 Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:
Post
by tueb » Wed Jun 16, 2010 11:07 am
Code: Select all
bind pubm - * repeat_pubm
variable lastsaid
proc repeat_pubm {nick host handle channel text} {
global lastsaid
if {[string equal -nocase $text $lastsaid]} {
putserv "PRIVMSG $channel :$text"
set lastsaid $text
}
}
untested
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Wed Jun 16, 2010 11:17 am
tueb:
You'd probably like to have the "set lastsaid $text" line outside of the conditional, otherwize it would never be set in the first place.
Also, you'd better test that the variable exists before attempting to read it..
Code: Select all
bind pubm - * repeat_pubm
variable lastsaid
proc repeat_pubm {nick host handle channel text} {
global lastsaid
if {[info exists lastsaid] &&[string equal -nocase $text $lastsaid]} {
putserv "PRIVMSG $channel :$text"
}
set lastsaid $text
}
NML_375
tueb
Halfop
Posts: 76 Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:
Post
by tueb » Wed Jun 16, 2010 11:48 am
i agree
username
Op
Posts: 196 Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:
Post
by username » Wed Jun 16, 2010 12:06 pm
I've found this script
train.tcl somewhere in french eggdrop site.
shixxor
Voice
Posts: 4 Joined: Fri Feb 26, 2010 5:40 pm
Post
by shixxor » Wed Jun 16, 2010 12:26 pm
THANK YOU ALL SO MUCH
works perfectly. i <3 u
/closed