I am wondering if its possible to to open a port listen for a connection, if a connection is made authenticate it, and if it passes the authentication then an event is fired? Is it maybe possible to do this with XMPP?
Thanks for your help!
A quick search suggested Twisted Words might be a good candidate. Twisted is an event-driven Python networking library, and Twisted Words is their chat component.