syncplay/syncplayServer.py

24 lines
735 B
Python
Raw Normal View History

#!/usr/bin/env python2
2012-10-12 16:37:12 +00:00
#coding:utf8
2014-06-19 18:31:49 +00:00
import site, sys
2013-12-18 06:33:39 +00:00
# libpath
try:
if (sys.version_info.major != 3) or (sys.version_info.minor < 5):
raise Exception("You must run Syncplay with Python 3.5 or newer!")
except AttributeError:
import warnings
warnings.warn("You must run Syncplay with Python 3.5 or newer!")
2014-06-19 18:31:49 +00:00
2012-10-12 16:37:12 +00:00
from twisted.internet import reactor
from syncplay.server import SyncFactory, ConfigurationGetter
if __name__ == '__main__':
argsGetter = ConfigurationGetter()
args = argsGetter.getConfiguration()
reactor.listenTCP(int(args.port), SyncFactory(args.password, args.motd_file, args.isolate_rooms, args.salt, args.disable_ready,args.disable_chat, args.max_chat_message_length))
reactor.run()