diff tools/memory.py @ 62:93cb45a7420f

SàT multi-profile: connection using profiles - /!\ plugins are temporarly deactivated
author Goffi <goffi@goffi.org>
date Fri, 29 Jan 2010 13:55:41 +1100
parents 58d49fc19639
children 0db25931b60d
line wrap: on
line diff
--- a/tools/memory.py	Thu Jan 28 12:38:12 2010 +1100
+++ b/tools/memory.py	Fri Jan 29 13:55:41 2010 +1100
@@ -364,8 +364,6 @@
         self.params=Param(host)
         self.history={}  #used to store chat history (key: short jid)
         self.private={}  #used to store private value
-        self.disco={}  #XXX: maybe best in a separate class
-        self.features={}
         host.set_const('savefile_history', SAVEFILE_HISTORY)
         host.set_const('savefile_private', SAVEFILE_PRIVATE)
         self.load()
@@ -442,6 +440,13 @@
     def getProfilesList(self):
         return self.params.getProfilesList()
 
+
+    def getProfileName(self, profile_key):
+        """Return name of profile from keyword
+        @param profile_key: can be the profile name or a keywork (like @DEFAULT@)
+        @return: profile name or None if it doesn't exist"""
+        return self.params.getProfileName(profile_key)
+
     def createProfile(self, name, default=False):
         """Create a new profile
         @param name: Profile name