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.

Channel to Channel local network relay script

Old posts that have not been replied to for several years.
Locked
R
Ryan

Channel to Channel local network relay script

Post by Ryan »

Hello, I know that this would be quite simple to do, but I can't seem to understand how. What I am looking to do is create a script for the bot - it will be in two rooms, say #room1 and #room2 - when someone says something in #room1 or someone joins/parts, it is mirriored by the bot into #room2.

e.g

#room1

<Ryan> hello

#room2

<bot> <Ryan> hello

Thank's for any help you can offer :)
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

you can find some scripts like this here.
«A fantastic spaghetti is a spaghetti that does not exist»
R
Ryan

Post by Ryan »

Hi, thanks - correct me if I'm wrong, as I already did look, but arent those all for multi networks? I just one it for one, channel to channel :)
R
Ryan

Post by Ryan »

Not sure if it helps any, but it could easily be done in mIRC, just don't know how to do it on here :oops:

i.e

on *:TEXT:*:#chan1:/msg #chan2 $nick $1-

Above probably would work, but thats the basics of what I'm looking for, only in eggdrop ;)
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

to paste what people say from one to another channel you can use pubm bind, then for joins the join bind and for parts and quits their binds.
here is an example with the pubm bind:

Code: Select all

bind pubm - "*" relay_pubm

proc relay_pubm {nick host handle channel args} {
set otherchan "#gloox"
PRIVMSG $otherchan :($channel) $nick: $args
}
I think it works but I haven't tested it.
«A fantastic spaghetti is a spaghetti that does not exist»
R
Ryan

Post by Ryan »

Hello, I really appriciate your help, two things ;)

1. After rehash, for each line I type:

[04:31] Tcl error [relay_pubm]: invalid command name "PRIVMSG"
[04:31] Tcl error [relay_pubm]: invalid command name "PRIVMSG"

2. Where would I specify the channel to pick up the messages from, then relay to?

Again, thanks for your help :)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Use this code, was fixed for the first and has the second request:

Code: Select all

set mainchan "#main"
set relaychan "#relay"

bind pubm - "*" relay_pubm 

proc relay_pubm {nick host handle channel args} { 
if {[strlwr $channel] != [strlwr $::mainchan]} {
return
}
putserv "PRIVMSG $::relaychan :($channel) $nick: $args"
}
Once the game is over, the king and the pawn go back in the same box.
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

oops sorry... I forgot the putserv
hehe :P
«A fantastic spaghetti is a spaghetti that does not exist»
R
Ryan

Post by Ryan »

Thanks again ;) Works great 8)
Locked