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

23 lines
424 B
Python
Raw Normal View History

2010-05-02 06:20:00 +02:00
from connection.xmpp import XMPPConnection
import signal, sys
2010-05-02 15:03:32 +02:00
from config import config
2010-05-02 06:20:00 +02:00
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)
2010-05-02 15:03:32 +02:00
connection = XMPPConnection(config)
2010-05-02 06:20:00 +02:00
connection.connect()
while run:
connection.stream.loop_iter(1)
connection.disconnect()