This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
curunir/curunir.py
2010-05-02 15:03:32 +02:00

22 lines
424 B
Python

from connection.xmpp import XMPPConnection
import signal, sys
from config import config
run = True
def exithandler(signum, frame):
global run
run = False
signal.signal(signal.SIGINT, exithandler)
signal.signal(signal.SIGTERM, exithandler)
signal.signal(signal.SIGQUIT, exithandler)
connection = XMPPConnection(config)
connection.connect()
while run:
connection.stream.loop_iter(1)
connection.disconnect()