Exemplo n.º 1
0
 def updateConfig(self):
     configchanged = False
     if not config.has_section("webserver"):
         config.add_section("webserver")
         configchanged = True
     options = {"enable": "On", "autostart": "Off", "port": "8080"}
     for option in options:
         if not config.has_option("webserver", option):
             config.set("webserver", option, options[option])
             configchanged = True
     if configchanged:
         WriteConfig()
Exemplo n.º 2
0
 def updateConfig(self):
     configchanged = False
     section_name = "rcon"
     if not config.has_section(section_name):
         config.add_section(section_name)
         configchanged = True
     options = {"enable": "Off", "password": ""}
     for option in options:
         if not config.has_option(section_name, option):
             config.set(section_name, option, options[option])
             configchanged = True
     if configchanged:
         WriteConfig()
Exemplo n.º 3
0
 def updateConfig(self):
     configchanged = False
     if not config.has_section("stats"):
         config.add_section("stats")
         configchanged = True
     options = {
         "enable":"On",
         "cachefilename":"stats.bin",
     }
     for option in options: 
         if not config.has_option("stats", option):
             config.set("stats", option, options[option])
             configchanged = True
     if configchanged:
         WriteConfig()
Exemplo n.º 4
0
 def updateConfig(self):
     configchanged = False
     if not config.has_section("stats"):
         config.add_section("stats")
         configchanged = True
     options = {
         "enable": "On",
         "cachefilename": "stats.bin",
     }
     for option in options:
         if not config.has_option("stats", option):
             config.set("stats", option, options[option])
             configchanged = True
     if configchanged:
         WriteConfig()
Exemplo n.º 5
0
	def updateConfig(self):
		configchanged = False
		if not config.has_section("playerinfos"):
			config.add_section("playerinfos")
			configchanged = True
		options = {
			"enable":"On",
			"idletime":"300",
		}
		for option in options: 
			if not config.has_option("playerinfos", option):
				config.set("playerinfos", option, options[option])
				configchanged = True
		if configchanged:
			WriteConfig()
Exemplo n.º 6
0
 def updateConfig(self):
     configchanged = False
     if not config.has_section("webserver"):
         config.add_section("webserver")
         configchanged = True
     options = {
         "enable":"On",
         "autostart":"Off",
         "port":"8080"
     }
     for option in options: 
         if not config.has_option("webserver", option):
             config.set("webserver", option, options[option])
             configchanged = True
     if configchanged:
         WriteConfig()
Exemplo n.º 7
0
 def updateConfig(self):
     configchanged = False
     if not config.has_section("timewarning"):
         config.add_section("timewarning")
         configchanged = True
     options = {
         "enable": "On",
         "starttimefile": "starttime.txt",
         "time_running": "604800",
         "warnings": "On",
         "warning_interval": "21600"
     }
     for option in options:
         if not config.has_option("timewarning", option):
             config.set("timewarning", option, options[option])
             configchanged = True
     if configchanged:
         WriteConfig()