Skip to content

Conversation

@llmII
Copy link
Contributor

@llmII llmII commented Feb 14, 2021

This depends on #75 and #76.

Integrates support for PM's with the formatting options so that way they can have a way of being formatted as well.

Figure that all single-sourced messages (JOIN/PART/QUIT (NICK via #72 and formatting for NICK via #79)) relayed towards Discord should have a way to format it.

Still pending figuring out best way to document this in README.md.

@llmII llmII force-pushed the add-format-options-support-pm-fx branch 2 times, most recently from 96f6b27 to f8f7e3c Compare February 14, 2021 17:22
This commit introduces the ability to private message in such a way as
to be considered "stable". Each bot get its own discriminator and this
makes it where if you were to connect 2 bots to the same Discord
identity but 2 different IRC networks when you send a private message
since the discriminator is required it will not accidentally be sent to
both IRC networks wherein both networks have a client with the same
nick. This also enhances privacy since it isn't guaranteed the same
person has the same nick on both networks.

Pending: log a fatal and exit if Discriminator == "".
@llmII llmII force-pushed the add-format-options-support-pm-fx branch from f8f7e3c to 93d2a70 Compare February 14, 2021 18:43
Allows for the user to define how messages are formatted back and forth
between Discord and IRC.
@llmII
Copy link
Contributor Author

llmII commented Feb 15, 2021

Need to check for msg == "" with whitespace stripping and send introduction after this check has passed. Will allow to disable the msg type (PM in this case) by setting it to " " in the config. Actually, at the end of each formatting function strip the message (vs having stripping at each call site to it!).

Done in c7dc222

This change lets us have our cake and eat it too. If the configuration
for a format is `" "` then it will just not send that message type.
Previously this worked but it would send an empty message which Discord
just really doesn't like!
Merge branch 'formatting-options-feature' into
  add-format-options-support-pm-fx
Allow for an empty format of `" "` to basically drop PMs (no
introduction sent either).
@llmII llmII changed the title Add format options support pm fx Add format options support pm fix Feb 15, 2021
@llmII
Copy link
Contributor Author

llmII commented Feb 15, 2021

See #76 comment.

I'd also like to propose a default PM format of:

"**${NICK}@${DISCRIMINATOR}**: ${CONTENT}"

which would yield something like:

**llmII@ircnetwork**: wrote a PM

llmII@ircnetwork: wrote a PM

Which gives the Discord user enough information to know how to PM back and who to PM back but omits information such as what server the Discord relay is connected to and/or hostmasks.

That said, I think it would be best to discuss the default formats but commit this as is and handle all formatting options for all merged formatting related things in another PR.

llmII and others added 4 commits February 16, 2021 08:08
No, we shouldn't warn.

Co-authored-by: Qais Patankar <[email protected]>
When it is first load, if an invalid key is present in `discord_format`
we inform the user of a fatal error and exit.
If it's on reload we don't apply the new format and inform the user such
was not done and that there is an error with an invalid key being
present in the `discord_format` setting.
When it is first load, if an invalid key is present in `discord_format`
we inform the user of a fatal error and exit.
If it's on reload we don't apply the new format and inform the user such
was not done and that there is an error with an invalid key being
present in the `discord_format` setting.
@llmII llmII closed this Feb 19, 2021
@llmII llmII deleted the add-format-options-support-pm-fx branch February 19, 2021 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant