diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2010-11-17 03:52:54 +0100 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2010-11-17 03:52:54 +0100 |
| commit | c494741c09f03268d950b8da27952917518db446 (patch) | |
| tree | 1fbbd798240db8b996fe9aa5b015930a7dd00b7c /user.py | |
| parent | b8106bd66fad5bafdec50da344e6a23f2dc78c00 (diff) | |
| download | alias-c494741c09f03268d950b8da27952917518db446.tar.gz | |
Example of alias query handling.
The request must be of the form :
<iq to='xxx@object.alias.fr.nf'>
<query xmlns='alias:query' type='items'/>
</iq>
where xxx is the base64 encoding of the buddy's jabber id whom profile
you are requesting.
Also tried to make some files more pep8 compliant (coding style)
Diffstat (limited to 'user.py')
| -rw-r--r-- | user.py | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,6 +1,8 @@ import os import os.path import shutil +import object +import hashlib class UserHandler : def __init__(self,root): @@ -10,6 +12,8 @@ class UserHandler : userDir = self.root+'/'+name if not os.path.exists(userDir) : os.mkdir(userDir) + handler = object.ObjectHandler(name) + handler.createHomeNode() def registered(self,name): return os.path.exists(self.root+'/'+name) @@ -18,4 +22,10 @@ class UserHandler : shutil.rmtree(self.root+'/'+name) def getUserList(self): - return os.listdir(self.root)
\ No newline at end of file + return os.listdir(self.root) + +class User : + def __init__(self, name) : + self.name = name + self.rootObject = hashlib.sha1( name ).hexdigest() +
\ No newline at end of file |
