<s> """<STR_LIT>""" <EOL> import Config <EOL> import xmppserver <EOL> import rosters <EOL> import xmpp <EOL> import xmppauth <EOL> import UCache <EOL> import Utmp <EOL> import commondata <EOL> from Log import Log <EOL> from pwd import getpwnam <EOL> import os <EOL> import sys <EOL> import sasl <EOL> import bbsauth <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> try : <EOL> userinfo = getpwnam ( '<STR_LIT>' ) <EOL> os . setuid ( userinfo [ <NUM_LIT:2> ] ) <EOL> except : <EOL> Log . error ( "<STR_LIT>" ) <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> Config . Config . LoadConfig ( ) ; <EOL> UCache . UCache . Init ( ) <EOL> Utmp . Utmp . Init ( ) <EOL> commondata . CommonData . Init ( ) <EOL> hostname = Config . Config . GetString ( "<STR_LIT>" , '<STR_LIT:localhost>' ) <EOL> server = xmpp . Server ( { <EOL> '<STR_LIT>' : [ ( xmppserver . XMPPServer , { '<STR_LIT>' : rosters . Rosters ( ) , '<STR_LIT:host>' : hostname } ) ] , <EOL> '<STR_LIT>' : xmppauth . XMPPAuth ( '<STR_LIT>' , hostname , '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( sasl . Plain , bbsauth . BBSAuth ) , <EOL> '<STR_LIT>' : Config . BBS_XMPP_CERT_FILE , <EOL> '<STR_LIT>' : Config . BBS_XMPP_KEY_FILE , <EOL> } ) <EOL> SP = xmpp . TCPServer ( server ) . bind ( '<STR_LIT>' , <NUM_LIT> ) <EOL> xmpp . start ( [ SP ] ) </s>
