#83 Make the config support specifying multiple IRC connections

Open
opened 6 years ago by fr33domlover · 2 comments

The bot should just connect to one server for now (take the first network on the list, ignore the rest), the support for actual multiple connections will come later.

The bot should just connect to one server for now (take the first network on the list, ignore the rest), the support for actual multiple connections will come later.

I don't think a213923790 is what you were imagining, but technically it satisfies the requirements ;)

I don't think https://notabug.org/smichel17/funbot/commit/a213923790f63b54ce274b43537205fa6c73e344 is what you were imagining, but technically it satisfies the requirements ;)
fr33domlover commented 6 years ago
Owner

Haha it's in the right direction but yeah it's not what I meant ^_^

Here's what I suggest:

  • The configuration value should stay as a single value, there's no need for more than one
  • What I'd like to be switched for a list is the connection details i.e. the cfgConnection field's type should change from ConnConfig to [ConnConfig] in whatever place that needs to be changed
  • Find the place in the code that uses this value, and change it to take the first item from the list and ignore the rest, and throw an error if the list is found to be empty (head throws an error on empty lists to you can just use that)
  • If there is more than one place, we'll see what to do about that

If this requires touching the irc-fun-client library which is a total mess right now and I haven't gotten to fixing it yet, let's leave this task for later after that library gets fixed.

Haha it's in the right direction but yeah it's not what I meant ^_^ Here's what I suggest: - The `configuration` value should stay as a single value, there's no need for more than one - What I'd like to be switched for a list is the *connection details* i.e. the `cfgConnection` field's type should change from `ConnConfig` to `[ConnConfig]` in whatever place that needs to be changed - Find the place in the code that uses this value, and change it to take the first item from the list and ignore the rest, and throw an error if the list is found to be empty (`head` throws an error on empty lists to you can just use that) - If there is more than one place, we'll see what to do about that If this requires touching the `irc-fun-client` library which is a total mess right now and I haven't gotten to fixing it yet, let's leave this task for later after that library gets fixed.
Sign in to join this conversation.
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.