= Skype plugin for BitlBee Miklos Vajna == Status One day I browsed the BitlBee bugtracker and found http://bugs.bitlbee.org/bitlbee/ticket/82[this] ticket. Then after a while I returned and saw that it was still open. So I wrote it. Not a big deal, I wrote it in two days or so (and not because I'm a genius or anything ;-) ). I think it's pretty stable, but it needs wider testing. Also see the 'Known bugs' section, I really hope those random hangups will be fixed soon by Skype. Oh, before I forget. I'm not a wizard, the Skype API documentation is https://developer.skype.com/Docs/ApiDoc[here] if you're interested. NOTE: You will see that this implementation of the Skype plug-in still requires a Skype instance to be running. This is because I'm not motivated to reverse engineer Skype's http://en.wikipedia.org/wiki/Skype_Protocol#Obfuscation_Layer[obfuscation layer]. (Not mentioning that you should ask your lawyer about if it is legal or not..) == Requirements * Skype >= 1.4.0.99. (1.4.0.74 did not work for me, 1.4.0.118 seems to be OK.) * bitlbee-dev >= rev264. (This is the latest version I've tested, probably newer versions probably will work, too.) * Skype4Py >= 0.9.28.1. Previous versions uses `DBus` by default. The latest version I've tested is 0.9.28.3. * Python 2.5. Skype4Py does not work with 2.4. * pygobject `bitlbee-skype` has been tested under Linux and Windows. Skype is available under OSX, too, so it probably works, but this has not been tested. == How to set it up Before you start. The setup is the following: BitlBee can't connect directly to Skype servers (the company's ones). It needs a running Skype client to do so. In fact BitlBee will connect to `skyped` (a tcp server, provided in this package) and `skyped` will connect to to your Skype client. NOTE: The order is important. First you have to start Skype. Then `skyped` can connect to it, finally BitlBee can connect to `skyped`. (In fact `skyped` automatically reconnect if you restart Skype.) - If you happen to be a happy Frugalware user, you can install the `bitlbee` and `bitlbee-skype` packages from http://ftp.frugalware.org/pub/other/people/vmiklos/bmf/[my repo]. - You need the BitlBee bzr branch: ---- bzr branch http://code.bitlbee.org/bitlbee/ ---- NOTE: You no longer need additional patches, as of revision 264. - Now compile and install it: ---- ./configure make make install install-dev ---- - Get the plugin code: ---- git clone git://vmiklos.hu/~vmiklos/pyrssi ---- (Or you can use the tarballs below, see the Changelog about what features/bugfixes will you miss in this case). - Compile and install it: ---- make prepare ./configure make make install ---- - Install http://skype4py.sourceforge.net/[Skype4Py]. (You may remember that previous versions of `skyped` did not require this package. This because it now uses the X11 interface of Skype (because the previously used `DBus` interface had http://forum.skype.com/index.php?s=&showtopic=94545&view=findpost&p=431710[known problems]), but I wanted to prevent a large code duplication from that project. In addition it then no longer requires the `dbus-python` package, just `pygobject`.) - Start Skype and `skyped` (the tcp server): ---- skype skyped ---- NOTE: It's important to start `skyped` on the same machine and using the same user! - Start your `IRC` client, connect to BitlBee and add your account: ---- account add skype account set 0/server localhost ---- IMPORTANT: should be your Skype account name. This way you won't see yourself joining to `&bitlbee`. NOTE: the option is not used currently. == Setting up Skype in a VNC server (optional) Optionally, if you want to run Skype on a server, you might want to setup up a `VNC` server as well. I used `tightvnc` but probably other `VNC` servers will work, too. First run ---- vncpasswd ~/.vnc/passwd ---- and create a password. You will need it at least once. Now create `~/.vnc/xstartup` with the following contents: ---- #!/bin/sh sleep 1 skype & sleep 5 skyped ---- Adjust the permissions: ---- chmod +x ~/.vnc/xstartup ---- Then start the server: ---- vncserver ---- Then connect to it, and set up Skype (username, password, enable auto-login, and allow the `SkypeApiPythonShell` client when Skype asks about it). Please be aware about that Skype has serious memory leak issues. After running with for a few weeks it may eat >300 MB of memory. Just don't forget to restart your VNC server regularly. (How ugly.) == What works - Download nicks and away statuses from Skype - Noticing joins / parts while we're connected - Sending messages - Receiving messages - Receiving away status changes - `skyped` (the tcp daemon that is a gateway between Skype and tcp) - Error handling when `skyped` is not running and when it exits - Marking received messages as seen so that Skype won't say there are unread messages - Adding / removing contacts - Set away state when you do a `/away`. - When you `account off`, Skype will set status to `Offline` - When you `account on`, Skype will set status to `Online` - Detect when somebody wants to add you and ask for confirmation - Detect when somebody wants to transfer a file - Group chat support: * Detect if we're invited * Send / receive group chat messages * Invite others (using `/invite `) * Part from group chats * Starting a group chat (using `/j #nick`) - Topic changes in group chats: * Show the current topic (if any) on join * Notice when someone changes the topic * Support changing the topic using `/topic` == What needs to be done (aka. TODO) - Add a question callback for calls. - Notice if foo invites bar. Currently you can see only that bar joined. - Public chats. See link:http://forum.skype.com/index.php?showtopic=98872[this forum thread], it is still unclear how could it be done for you to be able to `/join` to a public chat.. == I would like to have support for ... If something does not work and it's not in the TODO section, then please contact me! Please also try the git version before reporting a bug, your problem may be already fixed there. In fact, of course, I wrote this documentation after figured out how to do this setup, so maybe I left out some steps. If you needed 'any' additional tricks, then it would be nice to include them here. == Known bugs - When you join start a group chat, a warning is shown saying creating the group chat is failed. Indeed it is created. I should improve the API to be able to suppress that warning. == Screenshots You can reach some screenshots link:shot[here]. == Additional resources You can reach the Changelog link:Changelog[here], and a gitweb interface link:http://git.frugalware.org/gitweb/gitweb.cgi?p=bitlbee-skype.git;a=summary[here]. == Thanks for the following people: * Wilmer van der Gaast, for answering questions about the bitlbee plugin interface * Arkadiusz Wahlig, author of skype4py, for making suggestions to skyped * Gabor Adam TOTH, for usable bugreports // vim: ft=asciidoc