| View previous topic :: View next topic |
| Author |
Message |
Ace-T Halfop
Joined: 29 Aug 2006 Posts: 82
|
Posted: Tue May 22, 2007 8:03 pm Post subject: Relay |
|
|
hey, im wanting to relay text from one net to another, i have found a script but need it modifing and not sure how,
i want to remove the nick (from net) from it, so it will only show the text written,
here is part of the code
| Code: |
# proc used by all others for transmission
proc trans_bot { usercmd chan usernick text } {
global eggdrops chans botnick
set transmsg [concat $usercmd $usernick $text]
set me [lsearch $eggdrops $botnick]
if {$chan == [lindex $chans $me]} {
putallbots $transmsg
} else {
return 0
}
}
# proc transmission of pub (trans_pubm = y)
proc trans_pub {nick uhost hand chan text} {
trans_bot ">pub" $chan $nick $text
}
|
sems to be trans_bot doing this but if i remove nothing happens, thx |
|
| Back to top |
|
 |
YooHoo Owner

Joined: 13 Feb 2003 Posts: 939 Location: Redwood Coast
|
Posted: Tue May 22, 2007 8:36 pm Post subject: |
|
|
if i understand you correctly, you are trying to remove the speakers nick from public messages. You didn't post all the code, so there's no telling if this is the only proc that needs to be altered. With that being said, just remove the nick from the proc | Code: | # proc transmission of pub (trans_pubm = y)
proc trans_pub {nick uhost hand chan text} {
trans_bot ">pub" $chan $text
} |
_________________
Johoho's TCL for beginners
 |
|
| Back to top |
|
 |
Ace-T Halfop
Joined: 29 Aug 2006 Posts: 82
|
Posted: Tue May 22, 2007 8:43 pm Post subject: |
|
|
thats half
i also wanted to remove the net name to, so baiscally is just looks like the bots saying it as a normal convo,
atm its like this
nick2 (from EFNet)> hello
and i am wanting it like this
hello |
|
| Back to top |
|
 |
w00f Halfop
Joined: 04 Oct 2006 Posts: 49
|
Posted: Tue May 22, 2007 8:44 pm Post subject: |
|
|
| Code: |
proc trans_bot { usercmd chan text } {
global eggdrops chans botnick
set me [lsearch $eggdrops $botnick]
set transmsg [concat $usercmd $text]
if {$chan == [lindex $chans $me]} {
putallbots $transmsg
} else {
return 0
}
}
# proc transmission of pub (trans_pubm = y)
proc trans_pub {nick uhost hand chan text} {
trans_bot ">pub" $chan $text
}
|
You might want to change ">pub" to "whatever you want" and bind that in the bot that will receive the msg(you can change "putallbots" to "putbot botnick" if you want just to send to a specific bot instead of all bots in your botnet)
| Code: |
bind bot - "whatever you want" receive_botnet
proc receive_botnet { arg } {
blablabla
}
|
w00f
edit: lol take too long to reply ahah  |
|
| Back to top |
|
 |
Ace-T Halfop
Joined: 29 Aug 2006 Posts: 82
|
Posted: Tue May 22, 2007 8:58 pm Post subject: |
|
|
thx for help guys
all sorted |
|
| Back to top |
|
 |
|