LOC-2 Removed room password from submission and from input format of /room create
LOC-2 Removed room password from submission and from input format of /room create

New syntax is

/room create [roomname] [owner]

The client will then generate _client side_ a password to use as the room password. It's perfectly fine to use a different value, so long as all other users in the room are using the same one.

What _will_ need to happen when creating a room, though, is for us to submit a password hash for the owning user so that they can actually enter the room to invite others.

--- a/client/LocalChatClient.py
+++ b/client/LocalChatClient.py
@@ -16,6 +16,8 @@
 import json
 import urllib2
 import ssl
+import string
+import random
 
 import datetime as dt
 
@@ -194,7 +196,7 @@
                 
 
 
-    def createRoom(self,room,passw,user=False):
+    def createRoom(self,room,user=False):
         ''' Create a new room
         '''
         
@@ -203,14 +205,9 @@
         
         if not user:
             user = self.user
-        
-        # Room passwords may well go way at some point, but honour the
-        # api structure for now
-        passhash = self.hashpw(passw)
-        
+                
         payload = {"roomName": room, 
-                   "owner": user,
-                   "passhash": passhash
+                   "owner": user
                    }
         
         request = {"action":"createRoom",
@@ -344,6 +341,13 @@
         ''' Placeholder
         '''
         return passw
+
+
+    def genpassw(self,N=16):
+        ''' Generate a random string of chars to act as a password
+        '''
+        
+        return ''.join(random.SystemRandom().choice(string.ascii_uppercase + string.digits) for _ in range(N))
 
 
 
@@ -439,19 +443,22 @@
                     return
                 
                 
-                # /room create [roomname] [roompass] [[user]]
+                # /room create [roomname] [[user]]
                 if args[0] == "create":
                     
-                    if len(args) < 4:
-                        args[3] = False
+                    if len(args) < 3:
+                        args[2] = False
                     
-                    n = msg.createRoom(args[1],args[2],args[3])
+                    n = msg.createRoom(args[1],args[2])
                     if not n:
                         raise UnableTo('create room',line)
                         return
                     
                     global c
+                    p = msg.genpassw()
                     c.output('Created Room %s' %(n))
+                    c.output('Use "%s" as the Room password' %(p))
+                    c.output('To join the room, do /join %s %s %s' %(args[1],p,args[2]))
                     return
                 
                 elif args[0] == "invite":