;;; erc-config.el --- ;; Copyright (C) 2004 Free Software Foundation, Inc. ;; Author: Yann Hodique ;; Keywords: ;; This file is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This file is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Commentary: ;; ;;; Code: (provide 'erc-config) ;;; erc-config.el ends here (require 'erc) (require 'erc-auto) (require 'erc-nicklist) (add-hook 'erc-after-connect '(lambda (SERVER NICK) (cond ((string-match "freenode\\.net" SERVER) (erc-message (concat "PRIVMSG" "NickServ identify " public-passwd))) ))) (require 'erc-autojoin) (erc-autojoin-mode 1) (setq erc-autojoin-channels-alist '(("freenode.net" "#emacsfr"))) (require 'erc-match) (setq erc-keywords '("sigma")) (erc-match-mode) (require 'erc-track) (erc-track-mode t) (add-hook 'erc-mode-hook '(lambda () (require 'erc-pcomplete) (pcomplete-erc-setup) (erc-completion-mode 1))) (require 'erc-fill) (erc-fill-mode t) (require 'erc-ring) (erc-ring-mode t) (require 'erc-netsplit) (erc-netsplit-mode t) (erc-timestamp-mode t) (setq erc-timestamp-format "[%R-%m/%d]") (erc-button-mode nil) ;slow (setq erc-user-full-name "Yann Hodique") (setq erc-email-userid "y_hodique@yahoo.fr") ;; logging: (setq erc-log-insert-log-on-open nil) (setq erc-log-channels t) (setq erc-log-channels-directory "~/.irclogs/") (setq erc-save-buffer-on-part t) (setq erc-hide-timestamps nil) (add-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs) (add-hook 'erc-mode-hook '(lambda () (when (not (featurep 'xemacs)) (set (make-variable-buffer-local 'coding-system-for-write) 'emacs-mule)))) ;; end logging ;; Truncate buffers so they don't hog core. (setq erc-max-buffer-size 20000) (defvar erc-insert-post-hook) (add-hook 'erc-insert-post-hook 'erc-truncate-buffer) (setq erc-truncate-buffer-on-save t) ;; Clears out annoying erc-track-mode stuff for when we don't care. ;; Useful for when ChanServ restarts :P (defun reset-erc-track-mode () (interactive) (setq erc-modified-channels-alist nil) (erc-modified-channels-update)) (global-set-key (kbd "C-c r") 'reset-erc-track-mode) ;;; Finally, connect to the networks. (defun irc () (interactive) (erc "irc.freenode.net" 6667 "Sigma[Mtp]" "Yann Hodique" t ""))