slack-irc icon indicating copy to clipboard operation
slack-irc copied to clipboard

Stop bot from displaying username of user from Slack

Open stonecoldpat opened this issue 8 years ago • 3 comments

Hi,

I've been playing with the bot, and when I send a message from Slack to IRC it looks like:

[19:01] <stonecoldpat> <stonecoldpat> ok

<stonecoldpat> is my username in slack (and also irc).

is there a way to stop the slack name being sent to IRC? It would also be great to add this to the README.md for others if it is possible (which is why I made the issue). I couldn't find the documentation on how to do this anywhere.

stonecoldpat avatar May 02 '17 18:05 stonecoldpat

Is the reason you want to hide the Slack username that you're trying to use Slack as an IRC client? If so there's a section in the README about that, with a corresponding recommendation: https://github.com/ekmartin/slack-irc#personal-irc-client

ekmartin avatar May 02 '17 18:05 ekmartin

It is mostly for our team to sit on an IRC channel and receive messages from it. But it would be good to hide who is sending messages from slack to IRC. So on IRC it could come up [10:03] < teamname > hello

stonecoldpat avatar May 02 '17 18:05 stonecoldpat

Ah, I see - you want to make the contact from your team's side anonymous. I'd be open to adding an ircMessageFormat configuration option that would default to <$username> $message. The implementation would probably look similar to https://github.com/ekmartin/slack-irc/pull/171/files. If you just want to change this in your own fork the lines you'd have to change would be these: https://github.com/ekmartin/slack-irc/blob/master/lib/bot.js#L209-L217.

If we added an ircMessageFormat option we'd probably have to add ircActionFormat, ircFileFormat and so on too though, could probably put it under a format object.

ekmartin avatar May 03 '17 21:05 ekmartin