94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
I'm doomed, but you are not. You can get out of here.
"""
def getServerOptions ():
xConfig = configparser.SafeConfigParser()
try:
xConfig.read("server_options._global.ini")
dOpt = xConfig._sections['options']
except:
echo("Options file [server_options._global.ini] not found or not readable")
exit()
return dOpt
def getConfigOptions (sLang):
xConfig = configparser.SafeConfigParser()
try:
xConfig.read("server_options." + sLang + ".ini")
except:
echo("Options file [server_options." + sLang + ".ini] not found or not readable")
exit()
try:
dGCOpt = { k: bool(int(v)) for k, v in xConfig._sections['gc_options'].items() }
except:
echo("Error in options file [server_options." + sLang + ".ini]. Dropped.")
traceback.print_exc()
exit()
return dGCOpt
def genUserId ():
i = 0
|
|
|
|
|
|
|
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
I'm doomed, but you are not. You can get out of here.
"""
def getServerOptions ():
xConfig = configparser.SafeConfigParser()
try:
xConfig.read("grammalecte-server-options._global.ini")
dOpt = xConfig._sections['options']
except:
echo("Options file [grammalecte-server-options._global.ini] not found or not readable")
exit()
return dOpt
def getConfigOptions (sLang):
xConfig = configparser.SafeConfigParser()
try:
xConfig.read("grammalecte-server-options." + sLang + ".ini")
except:
echo("Options file [grammalecte-server-options." + sLang + ".ini] not found or not readable")
exit()
try:
dGCOpt = { k: bool(int(v)) for k, v in xConfig._sections['gc_options'].items() }
except:
echo("Error in options file [grammalecte-server-options." + sLang + ".ini]. Dropped.")
traceback.print_exc()
exit()
return dGCOpt
def genUserId ():
i = 0
|