Skip to content

Instantly share code, notes, and snippets.

@equwal
Last active November 20, 2019 03:27
Show Gist options
  • Save equwal/df013be9b34163d3975d8751035717e0 to your computer and use it in GitHub Desktop.
Save equwal/df013be9b34163d3975d8751035717e0 to your computer and use it in GitHub Desktop.
Sort IRC logs (quick and dirty fish script). Run that thing from rcirc using the SHELL module.
;;;; Also see the command which this is calling: https://gist.github.com/equwal/92d3b6bb19c4045d54c74b36d294a4e6
(defun-rcirc-command hist (channel-name)
"Get a log history"
(interactive "Schannel: ")
;; Must use a script, since the line length is too short to send a meaningful REGEX.
(rcirc-cmd-msg (concat "*shell ~/logchan.fish "
(apply #'concat
(loop for x across channel-name
collect (if (string= (string x) "#")
"\\#"
(string x)))))
process target))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment