| View previous topic :: View next topic |
| Author |
Message |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Mon Mar 05, 2012 5:20 pm Post subject: [SOLVED] Relay |
|
|
All solved here is howto
BOT1 - Where the data goes
| Code: | 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: | 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" |
_________________ GreatZ
Fire-Fox | Denmark
Scripts: Relay | Store Text | TvMaze
Last edited by Fire-Fox on Tue Mar 06, 2012 5:36 pm; edited 2 times in total |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Tue Mar 06, 2012 1:53 am Post subject: |
|
|
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: |
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. |
|
| Back to top |
|
 |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Tue Mar 06, 2012 8:01 am Post subject: |
|
|
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 _________________ GreatZ
Fire-Fox | Denmark
Scripts: Relay | Store Text | TvMaze |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Tue Mar 06, 2012 10:33 am Post subject: |
|
|
No, send:* are procs that you should define. For example:
| Code: |
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. |
|
| Back to top |
|
 |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Tue Mar 06, 2012 10:47 am Post subject: |
|
|
First post updated _________________ GreatZ
Fire-Fox | Denmark
Scripts: Relay | Store Text | TvMaze |
|
| Back to top |
|
 |
|