[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Erc-discuss] autoconnecting to servers
From: |
Andreas Schwab |
Subject: |
Re: [Erc-discuss] autoconnecting to servers |
Date: |
Sun, 17 Dec 2006 19:26:12 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.91 (gnu/linux) |
Andrea Russo <address@hidden> writes:
>> I would probably need to identify to services too, but at this point I
>> just want to get the basics down.
>
> To do that, I use this code snippet borrowed from Michael Olson (many
> thanks to him):
>
> ,----
> | (defun my-erc-after-connect-stuff (server nick)
> | "Authenticate to various NickServ's and the like upon
> | connecting to the server of their jurisdiction."
> | (interactive)
> | (cond
> | ((string-match "\\(localhost\\|onosendai\\)" server)
> | (erc-message "PRIVMSG"
> | (concat "&bitlbee identify " my-bitlbee-password)))
> | ((string-match "freenode\\.net" server)
> | (erc-message "PRIVMSG"
> | (concat "NickServ identify " my-freenode-password)))
> | ))
> |
> | (add-hook 'erc-after-connect 'my-erc-after-connect-stuff)
> `----
>
> Obviously, you need to adapt it to your needs.
ERC already knows how to automatically authenticate to various NickServs,
see erc-nickserv-alist and erc-services-mode.
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."