From 92cb940d45aafd4675d6dbabeb636bce830416bc Mon Sep 17 00:00:00 2001 From: "." <.@.> Date: Sat, 7 May 2016 18:50:04 +1200 Subject: [PATCH] convert /me messages for nmdc (needs reverse tracking to avoid reposting in irc client) --HG-- branch : nmdc-ircfrontend --- server.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server.go b/server.go index 886a358..92260e3 100644 --- a/server.go +++ b/server.go @@ -358,6 +358,11 @@ func (s *Server) handleRegisteredCommand(command string, args []string) { message := strings.Join(args[1:], " ")[1:] // strip leading colon + if strings.HasPrefix(message, "\x01ACTION ") { + message = "/me " + message[8:] + message = message[:len(message)-1] + } + // IRC is case-insensitive case-preserving. We can respect that for the // channel name, but not really for user nicks