diff options
Diffstat (limited to 'jakob.org')
| -rw-r--r-- | jakob.org | 30 |
1 files changed, 29 insertions, 1 deletions
@@ -255,6 +255,27 @@ Convenience functions for connecting to and authenticating with my IRC bouncer. (rename-buffer server))))) #+END_SRC +Convenience functions for connecting to and authenticating with an instance of +Bitlbee. + +#+BEGIN_SRC elisp +(defun bitlbee-connect () + "Start bitlbee as an inferior process and connect to it." + (bitlbee-start) + (erc :server "localhost" :port 6667) + (erc-with-buffer ((get-buffer "localhost:6667") + (rename-buffer "bitlbee")))) + +(defun bitlbee-identify () + "If we're on the bitlbee server, send the identify command to the + &bitlbee channel." + (when (and (string= "localhost" erc-session-server) + (string= "&bitlbee" (buffer-name))) + (erc-message "PRIVMSG" (format "%s identify %s" + (erc-default-target) + (read-bouncer-password))))) +#+END_SRC + Interactive function for automatically connecting to a local Bitlbee instance and all of the networks I have my bouncer connected to. @@ -267,7 +288,7 @@ and all of the networks I have my bouncer connected to. (interactive) (dolist (network irc-autoconnect-networks) (if (string= network "bitlbee") - (bitlbee-start) + (bitlbee-connect) (connect-bouncer network)))) (defun irc-quit () @@ -1292,6 +1313,13 @@ Let =erc-fill= handle filling. (erc-mode . (lambda () (auto-fill-mode 0))) #+END_SRC +Hook for automatically identifying with [[IRC][Bitlbee]]. + +#+BEGIN_SRC elisp + :hook + (erc-join . bitlbee-identify) +#+END_SRC + Sadly =:bind= is limited when it comes to defining keystrokes with prefixes, so I've done it manually here. These are the more frequently used of the functions in [[IRC]]. |