Multible 'groups' running on one server

These are old archives. They are kept for historic purposes only.
Post Reply
Tharo
Posts: 2
Joined: Thu Aug 26, 2004 8:06 pm
Contact:

Multible 'groups' running on one server

Post by Tharo » Thu Aug 26, 2004 8:09 pm

Hi all ....

I want, or cleaner: i have to write a module that can split up a chat into seperate pieches.
In other words: If a user from "sub1.domain.foo" joins #help he should be forwarded to "#sub1~help" without get any notice of it. a user from "sub1.domain.foo" should forwarded to "#sub2~help" and a user from "root.domain.foo" can join and list what ever he want to.

i looked to the doku but it dont seems that i can modify the "JOIN" or "PART" messages in a way, that the user will get delivered what i want. Another point that is missed to do something like that is a function to send a raw command to user x. This is needed to pass the forward command to the client... and maybe for alot of other stuff, too.

Here a shot sketch how i want to do it:

client server
1.) join #a > -
2.) - < go to #sub~a
3.) join #sub~a > -
4.) - < u joined #a


any clue how to manipulate it without hacking the whole source?

aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight » Thu Aug 26, 2004 8:14 pm

There is a way...

Set up 3 IRCds, each one under the domain that you want.

Then use deny channel { } blocks to redirect them.

For example:

Code: Select all

deny channel {
    mask "#help";
    reason "Redirecting to subdomain channel...";
    redirect "#sub1~help";
};
You would need one for every channel... I don't think you can redirect with a mask, etc.

See if this helps any.

*edit* Oh, alternatively you could configure services to do this, since they know which server a user connects to, they can SVSPART you #test and then SVSJOIN you #sub1~test. Completely transparent and obeys +bikl too! You could try finding a services module that will do this, or write one yourself :P . */edit*

Tharo
Posts: 2
Joined: Thu Aug 26, 2004 8:06 pm
Contact:

Post by Tharo » Thu Aug 26, 2004 8:25 pm

Hmm my trouble is that it have to run at one server because of msg compatiblity. And im Thinking about a channel flag that makes a channel for each groub "reachable" or not.

3 servers would be alot to easy :?

codemastr
Former UnrealIRCd head coder
Posts: 811
Joined: Sat Mar 06, 2004 8:47 pm
Location: United States
Contact:

Post by codemastr » Fri Aug 27, 2004 1:57 am

This could be done with a module, it'd be hard/complex, but it could be done.
-- codemastr

aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight » Fri Aug 27, 2004 2:23 am

Tharo wrote:Hmm my trouble is that it have to run at one server because of msg compatiblity.
You can still do that with 3 servers. It's called linking them together. Then you get to learn about the facts of IRC life - iow netsplits :P .

AngryWolf
Posts: 554
Joined: Sat Mar 06, 2004 10:53 am
Location: Hungary
Contact:

Post by AngryWolf » Fri Aug 27, 2004 6:30 pm

If I understand your problem correctly, you want real redirection, that is, if someone asks the server to join #a, he/she will actually join #sub1~a, and nothing else, right? Then my idea is:
  1. Override the JOIN command with your own function.
  2. In that function, if the JOIN request comes from a local client, and the user doesn't forget to specify one or more channel names in the first parameter, rename those of them which start with '#', in the way you described.
  3. Return with the value of the CallCmdoverride function.
That should do the trick. You don't have to modify anything else. By the way, sending raw commands to a user is a simple "sendto_one" function call.

Post Reply