LOC-22 Allow server address to be specified on the commandline
LOC-22 Allow server address to be specified on the commandline

If the final argument to the client begins with 'ht' it'll be taken as a URL and used as the server address.

It _must_ be https as there's no handling for plain http within the client.

--- a/client/LocalChatClient.py
+++ b/client/LocalChatClient.py
@@ -18,18 +18,15 @@
 import ssl
 import string
 import random
-
+import sys
 import datetime as dt
 
 import gnupg
 
 
 
-# We'll get these from the commandline later
-USER='ben2'
+# This can be changed from the commandline
 SERVER='https://127.0.0.1:8090'
-ROOMNAME='BenTest'
-
 
 class msgHandler(object):
     
@@ -796,8 +793,21 @@
         
 
 
+def handle_cmdline_opts(argv):
+    ''' Process  any commandline options
+    '''
+    
+    if argv[-1][0:2] == 'ht':
+        SERVER=argv[-1]
+        
+    
+    
     
 if __name__=='__main__':
+    
+    
+    if len(sys.argv) > 1:
+        handle_cmdline_opts(sys.argv)
     
     
     msg = msgHandler()