Remove the current assistant if they leave the room

Fri, 16 Apr 2010 18:44:53 +0100

author
matthew@heavyhorse.vm.bytemark.co.uk
date
Fri, 16 Apr 2010 18:44:53 +0100
changeset 58
c775513a5d78
parent 57
42f5669be677
child 59
603d9caeb6d5

Remove the current assistant if they leave the room

support-chat/js/supportchat.js file | annotate | diff | comparison | revisions
--- a/support-chat/js/supportchat.js	Fri Apr 16 18:43:48 2010 +0100
+++ b/support-chat/js/supportchat.js	Fri Apr 16 18:44:53 2010 +0100
@@ -131,6 +131,13 @@
 			}
 		},
 		
+		// Someone left the question MUC
+		left: function (stanza, muc, occupant)
+		{
+			if(occupant.nick == current_assistant)
+				set_assistant(null);
+		},
+		
 		// Handle incoming messages
 		message: function (stanza, muc, nick, message)
 		{

mercurial