aboutsummaryrefslogtreecommitdiffstats
path: root/user.py
diff options
context:
space:
mode:
Diffstat (limited to 'user.py')
-rw-r--r--user.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/user.py b/user.py
index 184a880..1cf0ec8 100644
--- a/user.py
+++ b/user.py
@@ -1,14 +1,16 @@
import os
import os.path
-class User :
- def __init__(self,jid):
- self.jid = jid
+class UserHandler :
+ def __init__(self,root):
+ self.root = root
- @staticmethod
- def createDirectory(jid):
- os.mkdir(jid)
-
- @staticmethod
- def subscribed(name):
- return os.path.exists(name) \ No newline at end of file
+ def register(self,name):
+ if not os.path.exists(name) :
+ os.mkdir(self.root+'/'+name)
+
+ def registered(self,name):
+ return os.path.exists(self.root+'/'+name)
+
+ def getUserList(self):
+ return os.listdir(self.root) \ No newline at end of file