Skip to content

Commit

Permalink
Try to support matterbridge color nicks
Browse files Browse the repository at this point in the history
  • Loading branch information
dolio committed Oct 27, 2023
1 parent cef581c commit 272ab01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Client/Hook/Matterbridge.hs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ remap nick chanfilter ircmsg =

remap' :: MbMsg -> UserInfo -> Identifier -> Text -> MessageResult
remap' mbmsg ui chan msg =
case msg =~ ("^<([^>]+)> (.*)$"::Text) of
[_,nick,msg']:_ -> RemapMessage (newmsg mbmsg (fakeUser nick ui) chan msg')
_ -> PassMessage
case msg =~ ("^(\ETX[0-9][0-9])?<([^>]+)> \SI?(.*)$"::Text) of
[_,_,nick,msg']:_ -> RemapMessage (newmsg mbmsg (fakeUser nick ui) chan msg')
_ -> PassMessage

newmsg :: MbMsg -> Source -> Identifier -> Text -> IrcMsg
newmsg Msg src chan msg = Privmsg src chan msg
Expand Down

0 comments on commit 272ab01

Please sign in to comment.