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

Allow bot to utilize multiple destinations at one time #1525

Closed

Conversation

deathbybandaid
Copy link
Contributor

This adds the ability to send lists of recipients to bot. say/msg/reply/notice to send the same message to multiple destinations/recipients simultaneously.

@dgw
Copy link
Member

dgw commented Mar 28, 2019

Leaving this be for now, as @deathbybandaid recently learned about the fact that IRC already supports sending to multiple destinations at once. That might lead to a refactor.

@deathbybandaid
Copy link
Contributor Author

I think this is a pretty good step forward.
#1322 should probably be handled for this to be truly effective.

@deathbybandaid
Copy link
Contributor Author

I have a good idea of what I want to do to tackle issue #1322 . I think it might be better to build that off of this, and not in this commit.

@deathbybandaid
Copy link
Contributor Author

as per

<+dgw> you know it's probably safest to assume a default target limit of maybe 4, or even 2, if MAXTARGETS (or TARGMAX) isn't defined

I'm now going to build in a maxtargets value, and maybe by time
issue #1082 is handled, we can try to draw that value from the server capabilities

@Exirel
Copy link
Contributor

Exirel commented May 8, 2019

It looks like there has been some change that generate a conflict, and not an easy one.

The more I think about multi-recipients, the more I believe we should not handle these cases in methods like say and alike, but instead to add new methods, like multi_say.

  1. changing recipient to recipients is a breaking change, as there is no restriction on the argument to be a non-keyword one,
  2. having to resort to type-sniffing is doomed to fail, for example if someone provide a tuple instead of a list, or alike
  3. the most common use-case for say or reply is to reply to the sender of a trigger, and it is very unlikely that anyone want an implicit "send to multiple recipients"
  4. explicit is better than implicit

So in conclusion, if you are still interested in such feature, I suggest to close this PR, and to start from the latest revision from master, and to add new methods, instead of changing existing ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants