Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to join multiple servers from one running instance #133

Open
ameygat opened this issue Oct 13, 2017 · 1 comment
Open

Ability to join multiple servers from one running instance #133

ameygat opened this issue Oct 13, 2017 · 1 comment

Comments

@ameygat
Copy link

ameygat commented Oct 13, 2017

If I run single instance of the program Can I use config something similar to :

config.json

{
    "nickname": "Cardinal321",
    "password": "",
    "network": "irc.spotchat.org",
    "server_password": "",
    "port": 6667,
    "ssl": false,
    "storage": "storage/",
    "channels": [
        "#test321","test4321"
    ]
},
{
    "nickname": "Cardinal321",
    "password": "",
    "network": "irc.freenode.net",
    "server_password": "",
    "port": 6667,
    "ssl": false,
    "storage": "storage/",
    "channels": [
        "#test3214"
    ]
}
@johnmaguire
Copy link
Owner

Unfortunately no, you must use multiple instances of Cardinal. You can create multiple configs and use the --config option to point Cardinal at a file other than config.json. I'd suggest running Cardinal under something like supervisord anyway. :)

I have this pipe dream task, #93 that may result in something more similar to what you are looking for, depending on if it ever gets completed, and what the final result looks like. The only real advantage I see to having Cardinal connect to multiple servers is to allow the bot to relay messages from one server to another however. Maybe that is worth it -- maybe it makes more sense to use something like Redis PUB/SUB to communicate between two instances and do it that way. I'm hesitant to make the config more complex than it already is. When tackling #93, I ran into a lot of weird edge cases while trying to flesh out the config system more.

@johnmaguire johnmaguire changed the title Can one instance of program join multiple servers and rooms ? Ability to join multiple servers from one running instance Apr 7, 2018
johnmaguire added a commit that referenced this issue Sep 2, 2019
This will parse multiple configs and join multiple servers, but there
are some issues:

- It's unclear how logging is configured with multiple config files
- Quitting one instance called `reactor.stop()` which this commit
  removes -- bu now when all instances are shutdown, the reactor is not
  stopped

I think we need some global Cardinal object that keeps track of multiple
CardinalBot instances -- it may be possible to use a single
CardinalBotFactory for this as well, depending on how things are
structured.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants