Created
September 11, 2015 13:05
-
-
Save jorgenschaefer/90aa993c2dc12834ccb5 to your computer and use it in GitHub Desktop.
Display slack users in Circe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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