Used LOC-16 verb to assign colours to different system messages
Used LOC-16 verb to assign colours to different system messages

System will set one of the following verbs along with it's messages, resulting in a different colour in the client

- sysinfo - magenta (as before)
- syswarn - Cyan
- sysalert - High contract reversed colours (grey background, black font)

--- a/client/LocalChatClient.py
+++ b/client/LocalChatClient.py
@@ -93,6 +93,10 @@
             
             elif upstruser == "SYSTEM":
                 color = "magenta"
+                if msgbody['verb'] == "sysalert":
+                    color = 'reversed'
+                elif msgbody['verb'] == 'syswarn':
+                    color = 'cyan'
                 
             
             ts = dt.datetime.utcfromtimestamp(i[2]).strftime("[%H:%M:%S]")
@@ -647,6 +651,7 @@
               ('blue', urwid.LIGHT_BLUE, urwid.BLACK),
               ('magenta', urwid.DARK_MAGENTA, urwid.BLACK), 
               ('yellow', urwid.YELLOW, urwid.BLACK), 
+              ('cyan', urwid.LIGHT_CYAN, urwid.BLACK), 
               ]
     
     

--- a/server/LocalChat.py
+++ b/server/LocalChat.py
@@ -250,7 +250,7 @@
             return 403
         
 
-        self.pushSystemMsg("Room has been closed. Buh-Bye",room)
+        self.pushSystemMsg("Room has been closed. Buh-Bye",room,'syswarn')
                 
         self.cursor.execute("DELETE FROM users where room=?",(room,))
         self.cursor.execute("DELETE FROM rooms where id=?",(room,))
@@ -284,7 +284,7 @@
         
         if reqjson['payload']['invite'] == "SYSTEM":
             # Push a notification into the group
-            self.pushSystemMsg("ALERT: User %s tried to invite SYSTEM" % (reqjson['payload']['user']),room)
+            self.pushSystemMsg("ALERT: User %s tried to invite SYSTEM" % (reqjson['payload']['user']),room,'sysalert')
             return 403
        
         
@@ -332,12 +332,12 @@
         # Delete their session
         self.cursor.execute("DELETE FROM sessions where username=? and sesskey like ?", (reqjson['payload']['kick'],reqjson['payload']["roomName"] + '-%'))
         
-        self.pushSystemMsg("User %s kicked %s from the room" % (reqjson['payload']['user'],reqjson['payload']['kick']),room)
+        self.pushSystemMsg("User %s kicked %s from the room" % (reqjson['payload']['user'],reqjson['payload']['kick']),room,'syswarn')
         
         if ban:
             # If we're banning them, also need to disinvite them
             self.cursor.execute("DELETE from users where room=? and username=?",(room,reqjson["payload"]["kick"]))
-            self.pushSystemMsg("User %s banned %s from the room" % (reqjson['payload']['user'],reqjson['payload']['kick']),room)
+            self.pushSystemMsg("User %s banned %s from the room" % (reqjson['payload']['user'],reqjson['payload']['kick']),room,'syswarn')
             
         return { "status" : "ok" }