qaisjp / go-discord-irc

The Discord and IRC bridge with puppets! An IRC user is created for each Discord user, messages from IRC seamlessly appear on Discord, and Discord mentions are automagically converted to and from IRC.
MIT License
113 stars 32 forks source link

Capital letters in channel name problem #115

Closed BCC-BGChatCommunity closed 3 years ago

BCC-BGChatCommunity commented 3 years ago

I have channels with first capital letter in the name. Like #Test . When i add it in config all puppets join in the channel when i write from discord to irc everything is like a charm. But the problem is in other side when i try to send message from irc to discord ... Houston, we have a problem.... messages not send it to discord channel and in debug we have "WARN[0028] Ignoring message sent from an unhandled IRC channel." My conf raw is : "#Test": Discord Channel iD the Irc channel is #Test again with the capital first letter. When i have many users to that channel i need to ban everyone to change the name of the channel with only small letters. Please help to solve this problem.

Rapman4 commented 3 years ago

Hi I have resolved the problem in the bridge.go file line 372

mapping, ok := b.GetMappingByIRC(strings.ToLower(msg.IRCChannel))

qaisjp commented 3 years ago

I applied a variant of Rapman4's fix. Please try the latest master and tell me if it fixes the problem

BCC-BGChatCommunity commented 3 years ago

I applied a variant of Rapman4's fix. Please try the latest master and tell me if it fixes the problem

With the channel problem now everything is fine. Good job!

qaisjp commented 3 years ago

thanks! credits to rapman4