2014-12-07 15:16:29 +00:00
|
|
|
#!/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
|
|
|
|
|
2018-05-31 14:53:09 +00:00
|
|
|
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
|
|
|
|
|
2014-04-21 15:24:30 +00:00
|
|
|
from syncplay.server import SyncFactory, ConfigurationGetter
|
2014-04-19 09:30:28 +00:00
|
|
|
|
2014-04-21 15:24:30 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
argsGetter = ConfigurationGetter()
|
|
|
|
args = argsGetter.getConfiguration()
|
2018-01-21 13:25:07 +00:00
|
|
|
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))
|
2014-04-21 15:24:30 +00:00
|
|
|
reactor.run()
|