I have previously written about BitlBee & HipChat, and this article is an addendum to that piece.
I found BitlBee "accounts" to be kind of a confusing feature to BitlBee, but by my own admission the whole thing is pretty well documented, so maybe it's just a reading comprehension problem on my part. I'm going to explain it all in my own words.
First of all, if you have any problems at all look at the official commands documentation which really does explain everything clearly, although you will be really confused if you skip around as I did.
/save command in BitlBee. You can also have it set up to autosave
(which is I believe the default). Regardless, when you type
/save in the
BitlBee buffer, all of your stuff will be saved assuming that the config files
have sufficient permissions and whatnot. By all of your stuff being saved, I
mean your account information, account passwords, what channels you're in, what
buffers they map to, and so on will be saved. It appears to me that the
account/password data is encrypted somehow (presumably using your
password`), although I wasn't fully able to reverse engineer this and is
something I want to follow up on. Anyway, you'll find that your account
passwords are not stored anywhere obvious in plaintext.
Completely separate from your notion of your "HipChat" account or your "Twitter" account or your "AIM" account or whatever you're using BitlBee account for, BitlBee has its own system for managing user accounts. If you just use BitlBee to connect to a single service (as I do) this abstraction layer is a bit confusing, but it totally makes sense if you have multiple accounts managed by BitlBee. The idea is that as a user I can authenticate once to BitlBee, and then BitlBee will reauth to all of the N other services I bridge to.
In my experience, here's how you should do it:
- Get all your accounts set up using
account add ...and the associated commands.
- If it's your first time using BitlBee, use
register <password>and all of the accounts you have set up at that moment will be tied to the password you just set up.
- When in doubt, you can always
/saveand you should see in the main command buffer that a bunch of various
*.conffiles are being successfully saved. If you get any errors, check the permissions bits on those files/directories.
- In the future when you connect to a brand new BitlBee instance (e.g. let's say
you had to restart the actual
bitlbeebinary), after you connect use
identify <password>and all of your stuff will be restored`
- You should find that you autojoin all of the rooms you had set up to autojoin, that the window list order will be the same, etc., and that there's no finicking you need to do to get things right.
When I have to restart Bitlbee/WeeChat (which isn't often), I need exactly two commands to get my whole chat thing set up:
/connect bitlbee # connects to my local bitlbee from weechat
identify <MYPASSWORD> # logs into all my bitlbee accounts
That should be everything you need to do.
Totally incidentally, I run my BitlBee instance bound to 127.0.0.1 on a remote server and then connect to it via a WeeChat client connected over the loopback interface. There are a bunch of other great CLI IRC clients out there (irssi) comes to mind, but the important thing is that if you have BitlBee bound on 127.0.0.1 rather than 0.0.0.0 you've vastly improved the security of the whole thing by requiring SSH authentication to the server in question to log into your chat accounts.