Added the ability to invite users into room.
Added the ability to invite users into room.

/room invite [roomname] [roompass] [[user]]

There's a known issue here where the backend will allow anyone to invite anyone into a room, even if the original user *isn't* actually invited into the room themselves.

That should be considered a big TODO

--- a/client/LocalChatClient.py
+++ b/client/LocalChatClient.py
@@ -216,6 +216,27 @@
         return resp['name']
     
 
+
+    def inviteUser(self,room,passw,user):
+        ''' Invite a user into a room
+        
+        #TODO - Authentication
+        '''
+        
+        payload = {"roomName": room, 
+                   "user": user,
+                   }
+        
+        request = {"action":"inviteUser",
+                   "payload": json.dumps(payload)
+                   }    
+        
+        resp = self.sendRequest(request)
+
+        if resp == "BROKENLINK" or resp['status'] != "ok":
+            return False
+        
+        return True
 
 
     def sendRequest(self,data):
@@ -321,6 +342,19 @@
                     global c
                     c.output('Created Room %s' %(n))
                     return
+                
+                elif args[0] == "invite":
+                    if len(args) < 4:
+                        raise InvalidCommand(line)
+                    
+                    n = msg.inviteUser(args[1],args[2],args[3])
+                    if not n:
+                        raise UnableTo('invite user',line)
+                        return
+                    
+                    global c
+                    c.output('User %s may now join room %s' %(args[1],args[3]))
+                    return                                        
                     
 
         if cmd in self._quit_cmd: