Exemplo n.º 1
0
	def saveNotifications(self, use_twitter=None, twitter_notify_on_levelup=None, twitter_notify_on_raretask=None):

		#twitter
		dwarfBeard.USE_TWITTER = use_twitter == 'on'
		dwarfBeard.TWITTER_NOTIFY_ON_LEVELUP = twitter_notify_on_levelup == 'on'
		dwarfBeard.TWITTER_NOTIFY_ON_RARETASK = twitter_notify_on_raretask == 'on'

		dwarfBeard.save_config()	
		
		print 'Configuration Saved'

		redirect("/config/")
Exemplo n.º 2
0
	def saveGeneral(self, log_dir=None, web_port=8083, web_log=0, web_ipv6=0,
					launch_browser=True, web_username=None, web_password=None, version_notify=None,
					ff_profile_path=None, nw_user_name=None, nw_password=None, nw_account_name=None,
					blackout_en=False, blackout_start_hour=22, blackout_end_hour=7):
					
		if launch_browser == "on":
			launch_browser = 1
		else:
			launch_browser = 0
			
		if version_notify == "on":
			version_notify = 1
		else:
			version_notify = 0
			
		dwarfBeard.LAUNCH_BROWSER = launch_browser

		dwarfBeard.WEB_PORT = int(web_port)
		dwarfBeard.WEB_IPV6 = web_ipv6
		dwarfBeard.WEB_USERNAME = web_username
		dwarfBeard.WEB_PASSWORD = web_password
		
		dwarfBeard.FF_PROFILE_PATH = ff_profile_path
		dwarfBeard.NW_USER_NAME = nw_user_name
		dwarfBeard.NW_PASSWORD = nw_password
		dwarfBeard.NW_ACCOUNT_NAME = nw_account_name
		
		if blackout_en == "on":
			blackout_en = 1
		else:
			blackout_en = 0
			
		dwarfBeard.BLACKOUT_EN = blackout_en
		dwarfBeard.BLACKOUT_START_HOUR = blackout_start_hour
		dwarfBeard.BLACKOUT_END_HOUR = blackout_end_hour
		
		dwarfBeard.save_config()
		
		redirect("/config/")