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.
Help for those learning Tcl or writing their own scripts.
Fire-Fox
Master
Posts: 299 Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null
Post
by Fire-Fox » Mon Mar 05, 2012 5:20 pm
All solved here is howto
BOT1 - Where the data goes
Code: Select all
bind bot -|- relay get:relay
proc get:relay {bot command text} {
set trigger [join [lrange [split $text] 0 0]]
set message [join [lrange [split $text] 1 end]]
putlog "recieved $trigger from $bot"
putnow "privmsg #CHAN :$trigger $message"
}
putlog "Reciever Relay.Tcl - Loaded By Fire-Fox"
BOT2 - Where you get your data from
Code: Select all
bind pubm - "*!trigger1*" send:relay
bind pubm - "*!trigger2*" send:relay
bind pubm - "*!trigger3*" send:relay
bind pubm - "*!trigger4*" send:relay
proc send:relay {nick host hand chan text} {
set trigger [join [lrange [split $text] 0 0]]
set message [join [lrange [split $text] 1 end]]
putlog "sent $text"
putbot "BOTNET-NICK" "relay $trigger $message"
}
putlog "Relay Source.Tcl - Loaded By Fire-Fox"
Last edited by
Fire-Fox on Tue Mar 06, 2012 5:36 pm, edited 2 times in total.
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Tue Mar 06, 2012 1:53 am
You set
send:text to all 4 binds, so you need to fix that before anything else. As for your question, you can change % with the actual channel name. For example:
Code: Select all
bind pubm - "#something !test*" send:something
bind pubm - "#another !test*" send:another
Once the game is over, the king and the pawn go back in the same box.
Fire-Fox
Master
Posts: 299 Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null
Post
by Fire-Fox » Tue Mar 06, 2012 8:01 am
So it also gives info on diffrent chans?
IE:
bind pubm - "#something !test*" send:something goes to #Chan1
and
bind pubm - "#another !test*" send:another goes to Chan2
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Tue Mar 06, 2012 10:33 am
No,
send:* are procs that you should define.
For example:
Code: Select all
proc send:something {nick host hand chan text} {
# do something
}
proc send:another {nick host hand chan text} {
# do something else
}
Once the game is over, the king and the pawn go back in the same box.
Fire-Fox
Master
Posts: 299 Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null
Post
by Fire-Fox » Tue Mar 06, 2012 10:47 am
First post updated