/currentmusic now tells you the IPID of the last music changer if you're a mod.
This commit is contained in:
		
							parent
							
								
									1add0108e8
								
							
						
					
					
						commit
						c22606b5a7
					
				@ -44,6 +44,7 @@ class AreaManager:
 | 
				
			|||||||
            self.judgelog = []
 | 
					            self.judgelog = []
 | 
				
			||||||
            self.current_music = ''
 | 
					            self.current_music = ''
 | 
				
			||||||
            self.current_music_player = ''
 | 
					            self.current_music_player = ''
 | 
				
			||||||
 | 
					            self.current_music_player_ipid = -1
 | 
				
			||||||
            self.evi_list = EvidenceList()
 | 
					            self.evi_list = EvidenceList()
 | 
				
			||||||
            self.is_recording = False
 | 
					            self.is_recording = False
 | 
				
			||||||
            self.recorded_messages = []
 | 
					            self.recorded_messages = []
 | 
				
			||||||
@ -167,10 +168,12 @@ class AreaManager:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        def add_music_playing(self, client, name):
 | 
					        def add_music_playing(self, client, name):
 | 
				
			||||||
            self.current_music_player = client.get_char_name()
 | 
					            self.current_music_player = client.get_char_name()
 | 
				
			||||||
 | 
					            self.current_music_player_ipid = client.ipid
 | 
				
			||||||
            self.current_music = name
 | 
					            self.current_music = name
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        def add_music_playing_shownamed(self, client, showname, name):
 | 
					        def add_music_playing_shownamed(self, client, showname, name):
 | 
				
			||||||
            self.current_music_player = showname + " (" + client.get_char_name() + ")"
 | 
					            self.current_music_player = showname + " (" + client.get_char_name() + ")"
 | 
				
			||||||
 | 
					            self.current_music_player_ipid = client.ipid
 | 
				
			||||||
            self.current_music = name
 | 
					            self.current_music = name
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        def get_evidence_list(self, client):
 | 
					        def get_evidence_list(self, client):
 | 
				
			||||||
 | 
				
			|||||||
@ -152,6 +152,10 @@ def ooc_cmd_currentmusic(client, arg):
 | 
				
			|||||||
        raise ArgumentError('This command has no arguments.')
 | 
					        raise ArgumentError('This command has no arguments.')
 | 
				
			||||||
    if client.area.current_music == '':
 | 
					    if client.area.current_music == '':
 | 
				
			||||||
        raise ClientError('There is no music currently playing.')
 | 
					        raise ClientError('There is no music currently playing.')
 | 
				
			||||||
 | 
					    if client.is_mod:
 | 
				
			||||||
 | 
					        client.send_host_message('The current music is {} and was played by {} ({}).'.format(client.area.current_music,
 | 
				
			||||||
 | 
					                                                                                    client.area.current_music_player, client.area.current_music_player_ipid))
 | 
				
			||||||
 | 
					    else:
 | 
				
			||||||
        client.send_host_message('The current music is {} and was played by {}.'.format(client.area.current_music,
 | 
					        client.send_host_message('The current music is {} and was played by {}.'.format(client.area.current_music,
 | 
				
			||||||
                                                                                    client.area.current_music_player))
 | 
					                                                                                    client.area.current_music_player))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user