comparison start_server.py @ 111:0c936d98f9eb alpha

Traipse Alpha 'OpenRPG' {091008-01} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user. Update Summary: {091006} 00: Adds Bookmarks (Alpha) with cool Smiley Star and Plus Symbol images! 03: Changes made to the map for increased portability. SnowDog has changes planned in Core, though. Added an initial push to the BCG. Not much to see, just shows off how it is re-writing Main code. {091007} 00: New images added to Plugin Control Panel for Auto Start. 01: Attempting to fix Deprecation warning from Main. 02: Second attempt, problem in gsclient with "s. 03: Fail. {091008} 00: Fix to remote admin commands 01: Minor fix to texted based server, works in /System/ folder Some Core changes to gametree to correctly disply Pretty Print, thanks David!
author sirebral
date Thu, 08 Oct 2009 09:10:55 -0500
parents f24c6e431a15
children 37d26a98883f
comparison
equal deleted inserted replaced
110:910942d07574 111:0c936d98f9eb
4 import sys 4 import sys
5 import time 5 import time
6 import gc 6 import gc
7 import getopt 7 import getopt
8 import traceback 8 import traceback
9
9 10
10 # Simple usuage text for request via help or command line errors 11 # Simple usuage text for request via help or command line errors
11 def usage( retValue ): 12 def usage( retValue ):
12 print "\nUsage: \n[-d --directory directory] - Directory of where to load config files\n" + \ 13 print "\nUsage: \n[-d --directory directory] - Directory of where to load config files\n" + \
13 "[-n Server Name]\n" + \ 14 "[-n Server Name]\n" + \
19 "Where -p is used to request meta registration. If -p is given, the boot\n" + \ 20 "Where -p is used to request meta registration. If -p is given, the boot\n" + \
20 "password and server name MUST be provided. If no options are given, user\n" + \ 21 "password and server name MUST be provided. If no options are given, user\n" + \
21 "will be prompted for information.\n\n" 22 "will be prompted for information.\n\n"
22 sys.exit( retValue ) 23 sys.exit( retValue )
23 24
24 HG = os.environ["HG"]
25
26 import pyver
27 pyver.checkPyVersion()
28
29 os.system(HG + ' pull "http://hg.assembla.com/traipse"')
30 os.system(HG + ' update')
31 25
32 import orpg.networking.mplay_server 26 import orpg.networking.mplay_server
33 import orpg.networking.meta_server_lib 27 import orpg.networking.meta_server_lib
34 28
35 if __name__ == '__main__': 29 if __name__ == '__main__':
37 gc.enable() 31 gc.enable()
38 32
39 orpg_server = orpg.networking.mplay_server.mplay_server() 33 orpg_server = orpg.networking.mplay_server.mplay_server()
40 lobby_boot_pwd = orpg_server.boot_pwd 34 lobby_boot_pwd = orpg_server.boot_pwd
41 server_directory = orpg_server.userPath 35 server_directory = orpg_server.userPath
42 server_reg = orpg_server.reg 36 server_reg = orpg_server.be_registered
43 server_name = orpg_server.name 37 server_name = orpg_server.serverName
44 manualStart = False 38 manualStart = False
45 39
46 # See if we have command line arguments in need of processing 40 # See if we have command line arguments in need of processing
47 try: 41 try:
48 (opts, args) = getopt.getopt( sys.argv[1:], "n:phml:m:d:", ["help","manual","directory="] ) 42 (opts, args) = getopt.getopt( sys.argv[1:], "n:phml:m:d:", ["help","manual","directory="] )
73 print 67 print
74 usage( 1 ) 68 usage( 1 )
75 69
76 70
77 # start server! 71 # start server!
78 orpg_server.name = server_name 72 orpg_server.serverName = server_name
79 orpg_server.reg = server_reg 73 orpg_server.be_registered = server_reg
80 orpg_server.boot_pwd = lobby_boot_pwd 74 orpg_server.boot_pwd = lobby_boot_pwd
81 orpg_server.userPath = server_directory 75 orpg_server.userPath = server_directory
82 orpg_server.remoteadmin = 1 76 orpg_server.remoteadmin = 1
83 77
84 if not manualStart: 78 if not manualStart: