42wim / matterbridge

bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API (mattermost not required!)
Apache License 2.0
6.56k stars 617 forks source link

irc NOPINGNICK messes up with names containing utf-8 or so #193

Closed NikkyAI closed 7 years ago

NikkyAI commented 7 years ago

Please answer the following questions.

Which version of matterbridge are you using?

run matterbridge -version version 0.13.1-dev

Please describe the expected behavior.

nicknames containing utf-8 or emoticons should be handled like ascii only nicknames Λi -> <Λ​i>

Please describe the actual behavior.

Λi -> <Îâ ı>

Any steps to reproduce the behavior?

use a nickname containing utf-8

Please add your configuration file

(be sure to exclude or anonymize private data (tokens/passwords))


[irc]
    [irc.esper]
    Server="irc.esper.net:6697"
    Nick="botname"

    UseTLS=true

    #Enable SASL (PLAIN) authentication. (freenode requires this from eg AWS hosts)
    #It uses NickServNick and NickServPassword as login and password
    #OPTIONAL (default false)
    UseSASL=true

    #If you registered your bot with a service like Nickserv on freenode. 
    #Also being used when UseSASL=true
    #OPTIONAL
    NickServNick="---------"
    NickServPassword="----------"

    #Nicks you want to ignore. 
    #Messages from those users will not be sent to other bridges.
    #OPTIONAL
    IgnoreNicks="cord spammer"

    #RemoteNickFormat defines how remote users appear on this bridge 
    #The string "{NICK}" (case sensitive) will be replaced by the actual nick / username.
    #The string "{BRIDGE}" (case sensitive) will be replaced by the sending bridge
    #The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
    #The string "{NOPINGNICK}" (case sensitive) will be replaced by the actual nick / username, but with a ZWSP inside the nick, so the irc user with the same nick won't get pinged. See https://github.com/42wim/matterbridge/issues/175 for more information
    #OPTIONAL (default empty)
    RemoteNickFormat="<{NOPINGNICK}> "

    ShowJoinPart=false

[discord]
    [discord.obsidian]
    #Token to connect with Discord API
    #You can get your token by following the instructions on 
    #https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token
    #If you want roles/groups mentions to be shown with names instead of ID, you'll need to give your bot the "Manage Roles" permission.
    #REQUIRED
    Token="---------------------------------------"

    #REQUIRED
    Server="discord server name"

    #Disable sending of edits to other bridges
    #OPTIONAL (default false)
    EditDisable=true

    #Message to be appended to every edited message
    #OPTIONAL (default empty)
    EditSuffix=" (edited)"

    #Nicks you want to ignore. 
    #Messages from those users will not be sent to other bridges.
    #OPTIONAL
    IgnoreNicks="[cord] ircspammer2"

    #Enable to show users joins/parts from other bridges 
    #Only works hiding/show messages from irc and mattermost bridge for now
    #OPTIONAL (default false)
    ShowJoinPart=false

    RemoteNickFormat="<**{NICK}**>"

###################################################################
#API
###################################################################
[api]
#You can configure multiple API hooks
#In this example we use [api.local]
#REQUIRED

    [api.local]
    #Address to listen on for API
    #REQUIRED 
    BindAddress="127.0.0.1:4242"

    #Bearer token used for authentication
    #curl -H "Authorization: Bearer token" http://localhost:4242/api/messages
    #OPTIONAL (no authorization if token is empty)
    Token="xxxxxxxxxxxxxxxxxx"

    #Amount of messages to keep in memory
    Buffer=1000

    #RemoteNickFormat defines how remote users appear on this bridge 
    #The string "{NICK}" (case sensitive) will be replaced by the actual nick / username.
    #The string "{BRIDGE}" (case sensitive) will be replaced by the sending bridge
    #The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
    #OPTIONAL (default empty)
    RemoteNickFormat="{NICK}"

[[gateway]]
name="channel"
enable=true
    [[gateway.inout]]
    account="irc.esper"
    channel="#channel"

    [[gateway.inout]]
    account="discord.obsidian"
    channel="channel"

    [[gateway.inout]]
    account="api.local"
    channel="channel"
42wim commented 7 years ago

Could you build/test from master, if not fixed reopen.

NikkyAI commented 7 years ago

it is indeed fixed for my testcases, thanks :+1: