comparison orpg/tools/passtool.py @ 66:c54768cffbd4 ornery-dev

Traipse Dev 'OpenRPG' {090818-00} 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: *Unstable* This is the first wave of Code Refinement updates. Includes new material from Core Beta; new debugger material (partially implemented), beginnings of switch to etree, TerminalWriter, and a little more. open_rpg has been renamed to component; functioning now as component.get(), component.add(), component.delete(). This version has known bugs, specifically with the gametree and nodes. I think the XML files where not removed during testing of Core and switching back.
author sirebral
date Tue, 18 Aug 2009 06:33:37 -0500
parents 4385a7d0efd1
children bd6ca89e4cbb dcf4fbe09b70
comparison
equal deleted inserted replaced
65:4840657c23c5 66:c54768cffbd4
25 # 25 #
26 # Description: password helper. remembers passwords so user 26 # Description: password helper. remembers passwords so user
27 # doesn't have to type passwords over and over 27 # doesn't have to type passwords over and over
28 28
29 import orpg.orpg_windows 29 import orpg.orpg_windows
30 from orpg.orpgCore import open_rpg 30 from orpg.orpgCore import component
31 import traceback 31 import traceback
32 #from orpg.tools.settings import settings
32 33
33 ##################### 34 #####################
34 ## Password Assistant 35 ## Password Assistant
35 ##################### 36 #####################
36 class PassSet: 37 class PassSet:
40 self.admin = None 41 self.admin = None
41 42
42 #room password 43 #room password
43 self.room = None 44 self.room = None
44 45
45
46
47 class PassTool: 46 class PassTool:
48 "Password Management System" 47 "Password Management System"
49 def __init__(self): 48 def __init__(self):
50 self.settings = open_rpg.get_component("settings") 49 self.settings = component.get("settings")
51 #server admin password 50 #server admin password
52 self.server = None 51 self.server = None
53 self.groups = {} 52 self.groups = {}
54 if self.settings.get_setting('PWMannager') == 'On': 53 if self.settings.get_setting('PWMannager') == 'On': self.enabled = 1
55 self.enabled = 1 54 else: self.enabled = 0
56 else:
57 self.enabled = 0
58 55
59 56
60 def DumpPasswords(self): 57 def DumpPasswords(self):
61 "Debugging Routine" 58 "Debugging Routine"
62 print("Password Manager Dump\nServer: \""+self.server+"\"") 59 print("Password Manager Dump\nServer: \""+self.server+"\"")
177 self.ClearPassword( type, groupid ) 174 self.ClearPassword( type, groupid )
178 return self.RoomPass() 175 return self.RoomPass()
179 elif type == "server": 176 elif type == "server":
180 self.ClearPassword( type, groupid ) 177 self.ClearPassword( type, groupid )
181 return self.ServerPass() 178 return self.ServerPass()
179
180 #PassTool = PassTool()
181 component.add('password_manager', PassTool())