Install PyICQt - ICQ Transport

This tutorial explains how you can install PyICQt. The official PyICQt documentation may be more complete and up to date.

  1. Install Python

    Make sure have installed Python 2.3 or newer (I have reports that some older versions work). Most distributions should handle this automatically for you.

    • Debian:
      apt-get install python2.3
    • Mandrake:
      urpmi python
    • MS Windows: Download and run the binary installer from http://www.python.org. When complete, add the directory that python.exe is in to your PATH (look in Windows help for details on doing this)
    • Others: Use your distribution's installation method, or download and compile the source from http://www.python.org
  2. Install Twisted

    Install Twisted:

    • Debian:
      apt-get install python-twisted python-crypto python-pyopenssl
    • MS Windows: Download and run the binary installers for Twisted, PyCrypto and PyOpenSSL from www.twistedmatrix.com.
    • Others: Use your distribution's installation method, or download (and compile when necessary) Twisted, PyCrypto and PyOpenSSL from www.twistedmatrix.com.
  3. Download PyICQt

    Download PyICQt and uncompress it.

  4. Configure PyICQt

    Copy config_example.xml to config.xml and edit it:

    • The 'jid' setting should be what ID you want the transport to take on the network. Example: icq.myserver.org
    • The 'mainServer' setting should be the IP address or DNS of the main Jabber server. Default: 127.0.0.1
    • The 'secret' setting should match the secret specified for component connections in your main Jabber server. It's a password that only the Jabber server and the transport must know. Default: secret
    • The 'port' setting is the port that the transport and ejabberd server agree to use to connect between them (more details on this below). Default: 5347
    • The 'name' setting should be what name you wish users to see in a service discovery request.
    • You can also turn on debugging options, and customise some of the text that is sent to the users in this file.
  5. Spool directory

    This directory must match some conditions, it must:

    • be writeable by whatever system user will be running PyICQt.
    • have the same name as the 'jid' value you specified above in config.xml.

    You must create the directory:

    • If you are starting a new installation, just create the directory.
    • If you are upgrading from the old C version of ICQ-t then copy your existing spool directory. Do not forget to rename it to the 'jid' value you specified on config.xml.
  6. Configure ejabberd

    Now you have to configure your Jabber server. This instructions assume you are running the transport on the same machine as your main Jabber server.

    1. Edit ejabberd.cfg.
    2. In the section that says: '{listen,' add those two lines:
          {5347, ejabberd_service, [{host, "icq.myserver.org",
                                     [{password, "secret"}]}]},
    3. Restart ejabberd and you are done.
  7. Start PyICQt

    Now you are ready to start PyICQt for the first time:

    python PyICQt.py

    It will connect to the Jabber server and serve the Discovery JID you specified. Note: PyICQt does not implement the old and deprecated 'Browse' capacity, only the newer 'Discovery'.

    On MS Windows you can run it by opening a DOS console in the PyICQt/src directory and running "python main.py".

Troubleshooting

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

PyICQt 0.8 may not work

PyICQt 0.8 may not work under windows
to resolve this problem comment (cut) this block in main.py:

# Find the best reactor
reactorchoices = ["epollreactor", "kqreactor", "cfreactor", "pollreactor", "selectreactor", "posixbase", "default"]
for choice in reactorchoices:
    try:
        exec("from twisted.internet import %s as bestreactor" % choice)
        if choice in ["selectreactor","default"]:
            print selectWarning
        break
    except:
        pass
try:
    bestreactor.install()
except:
    print "Unable to find a reactor.\nExiting..."
    sys.exit(1)

this solution taken here http://forum.ru-board.com/topic.cgi?forum=8&topic=10529&start=1573

pyICQ-t 0.8a works

change original code like this and you can see what happened

selectWarning = "selectWarning: need to be defined before using"

# Find the best reactor
reactorchoices = ["epollreactor", "kqreactor", "cfreactor", "pollreactor", "selectreactor", "posixbase", "default"]
for choice in reactorchoices:
	try:
		exec("from twisted.internet import %s as bestreactor" % choice)
		if choice in ["selectreactor", "default"]:
			print selectWarning
		break
	except exceptions.Exception, err:
		print err
try:
	bestreactor.install()
except:
	print "Unable to find a reactor %s.\nExiting..." % choice
	sys.exit(1)
Syndicate content