2012-12-29 11:47:02 +00:00
|
|
|
#!/usr/bin/env python
|
2012-10-12 16:37:12 +00:00
|
|
|
#coding:utf8
|
|
|
|
|
2013-12-18 06:33:39 +00:00
|
|
|
import site
|
|
|
|
|
|
|
|
# libpath
|
|
|
|
|
2012-10-12 16:37:12 +00:00
|
|
|
from twisted.internet import reactor
|
|
|
|
|
2013-03-06 21:05:34 +00:00
|
|
|
from syncplay.server import SyncFactory, SyncIsolatedFactory, ConfigurationGetter
|
2014-04-19 09:30:28 +00:00
|
|
|
|
2013-03-06 21:05:34 +00:00
|
|
|
argsGetter = ConfigurationGetter()
|
2012-10-12 16:37:12 +00:00
|
|
|
args = argsGetter.getConfiguration()
|
2013-03-06 21:05:34 +00:00
|
|
|
|
2012-12-13 21:51:31 +00:00
|
|
|
if(not args.isolate_rooms):
|
2014-04-19 09:39:17 +00:00
|
|
|
reactor.listenTCP(int(args.port), SyncFactory(args.password, args.motd_file))
|
2012-12-13 21:51:31 +00:00
|
|
|
else:
|
2014-04-19 09:39:17 +00:00
|
|
|
reactor.listenTCP(int(args.port), SyncIsolatedFactory(args.password, args.motd_file))
|
2012-10-12 16:37:12 +00:00
|
|
|
reactor.run()
|