Skip to content

Instantly share code, notes, and snippets.

@jorgenschaefer
Created September 11, 2015 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jorgenschaefer/90aa993c2dc12834ccb5 to your computer and use it in GitHub Desktop.
Save jorgenschaefer/90aa993c2dc12834ccb5 to your computer and use it in GitHub Desktop.
Display slack users in Circe
(circe-set-display-handler "irc.message" 'my/display-PRIVMSG)
(defun my/display-PRIVMSG (nick userhost command target text)
(if (not (equal nick "slack-irc-bot"))
(circe-display-PRIVMSG nick userhost command target text)
(let ((circe-format-say "[{nick}] {body}"))
(when (string-match "^<\\([^>]*\\)> \\(.*\\)" text)
(setq nick (match-string 1 text)
text (match-string 2 text)))
(circe-display-PRIVMSG nick userhost command target text))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment