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
|
|
|
|
|
2014-06-19 18:31:49 +00:00
|
|
|
try:
|
2014-07-02 22:20:31 +00:00
|
|
|
if (sys.version_info.major != 2) or (sys.version_info.minor < 7):
|
2014-06-19 18:35:51 +00:00
|
|
|
raise Exception("You must run Syncplay with Python 2.7!")
|
2014-06-19 18:31:49 +00:00
|
|
|
except AttributeError:
|
2014-06-19 18:35:51 +00:00
|
|
|
import warnings
|
|
|
|
warnings.warn("You must run Syncplay with Python 2.7!")
|
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()
|
2016-07-03 23:09:36 +00:00
|
|
|
reactor.listenTCP(int(args.port), SyncFactory(args.password, args.motd_file, args.isolate_rooms, args.salt, args.disable_ready,args.disable_chat))
|
2014-04-21 15:24:30 +00:00
|
|
|
reactor.run()
|