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 

[SOLVED] Relay

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


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Mon Mar 05, 2012 5:20 pm    Post subject: [SOLVED] Relay Reply with quote

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
View user's profile Send private message MSN Messenger
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3645
Location: Mint Factory

PostPosted: Tue Mar 06, 2012 1:53 am    Post subject: Reply with quote

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
View user's profile Send private message
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Tue Mar 06, 2012 8:01 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3645
Location: Mint Factory

PostPosted: Tue Mar 06, 2012 10:33 am    Post subject: Reply with quote

No, send:* are procs that you should define. Smile 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
View user's profile Send private message
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Tue Mar 06, 2012 10:47 am    Post subject: Reply with quote

First post updated
_________________
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
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