View previous topic :: View next topic |
Author |
Message |
mvp1 Voice
Joined: 27 Jan 2022 Posts: 22
|
Posted: Thu Jul 07, 2022 1:19 am Post subject: Relay Chan1 & Chan2 to Chan3 on 1 eggdrop & 1 server |
|
|
Hi Guys,
I am after something very simple. I have an eggdrop on one server, e.g Dalnet, and I want it to join 3 channels, e.g #Chan1 , #Chan2 and #Chan3
And I want it to relay everything (chat,joins/parts etc etc) from #Chan1 and #Chan2 into #Chan3
Is there anything already available? Of if anyone can help with a simple TCL code please?
Many thanks in advance. |
|
Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1074 Location: France
|
Posted: Thu Jul 07, 2022 3:06 am Post subject: |
|
|
Here is a simple script (untested) for relaying pub, join and part, feel free to add others (kicks, quits, act, ...):
Code: | namespace eval spy {
variable src {"#chan1" "#chan2"}
variable dest "#chan3"
bind pubm - * ::spy::spub
proc spub {nick uhost handle chan text} {
if {[lsearch -nocase $::spy::src $chan]==-1} { return }
putserv "PRIVMSG $::spy::dest :${nick}${chan}> $text"
}
bind join - * ::spy::sjoin
proc sjoin {nick uhost handle chan} {
if {[lsearch -nocase $::spy::src $chan]==-1} { return }
putserv "PRIVMSG $::spy::dest :--> $nick joined $chan"
}
bind part - * ::spy::spart
proc spart {nick uhost handle chan reason} {
if {[lsearch -nocase $::spy::src $chan]==-1} { return }
putserv "PRIVMSG $::spy::dest :<-- $nick leaved $chan ($reason)"
}
} |
_________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
mabrook Halfop

Joined: 14 Jun 2021 Posts: 60
|
Posted: Sun Jul 24, 2022 3:19 am Post subject: |
|
|
This is working 99%, tested. |
|
Back to top |
|
 |
mabrook Halfop

Joined: 14 Jun 2021 Posts: 60
|
Posted: Mon Jul 25, 2022 7:52 am Post subject: |
|
|
@CrazyCat
can you please add on/off for the script.
chanset #channel -spy
chanset #channel +spy
thank you. |
|
Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1074 Location: France
|
Posted: Mon Jul 25, 2022 10:35 am Post subject: |
|
|
This changes a little bit the way the script will work:
Code: | namespace eval spy {
setudef flag spy
variable dest "#chan3"
bind pubm - * ::spy::spub
proc spub {nick uhost handle chan text} {
if {![channel get $chan spy]} { return }
putserv "PRIVMSG $::spy::dest :${nick}${chan}> $text"
}
bind join - * ::spy::sjoin
proc sjoin {nick uhost handle chan} {
if {![channel get $chan spy]} { return }
putserv "PRIVMSG $::spy::dest :--> $nick joined $chan"
}
bind part - * ::spy::spart
proc spart {nick uhost handle chan reason} {
if {![channel get $chan spy]} { return }
putserv "PRIVMSG $::spy::dest :<-- $nick leaved $chan ($reason)"
}
} |
Now, you can activate the spy on any channel you want, and deactivate it.
Think to never do a .chanset #chan3 +spy (when #chan3 is the destination channel) _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
mabrook Halfop

Joined: 14 Jun 2021 Posts: 60
|
Posted: Tue Jul 26, 2022 1:06 am Post subject: |
|
|
thank you.. it is working .. |
|
Back to top |
|
 |
|