mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Added some debuglogs for hostcontroller
This commit is contained in:
		@@ -230,10 +230,12 @@ function setup_playlist_listener(){
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function setup_host_initialization(){
 | 
			
		||||
    Helper.log("Setting up host initialization listener");
 | 
			
		||||
    socket.on("id", Hostcontroller.host_listener);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function setup_host_listener(id){
 | 
			
		||||
    Helper.log("Setting up host action listener");
 | 
			
		||||
    socket.on(id, Hostcontroller.host_on_action);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,8 @@ var Hostcontroller = {
 | 
			
		||||
    old_id: null,
 | 
			
		||||
 | 
			
		||||
    host_listener: function(id) {
 | 
			
		||||
        Helper.log("Host-listener triggered");
 | 
			
		||||
        Helper.log("Host-listener id:", id);
 | 
			
		||||
        if(Hostcontroller.old_id === null) Hostcontroller.old_id = id;
 | 
			
		||||
        else {
 | 
			
		||||
            socket.removeAllListeners(id);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user