Improved script setting change message
This commit is contained in:
		@@ -291,12 +291,11 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		$valString = ($newSetting[$setting]) ? 'true' : 'false';
 | 
							$valString = ($newSetting[$setting]) ? 'true' : 'false';
 | 
				
			||||||
		$chatMessage = '$FFF' . $setting . '$z$s$FF0 to $FFF' . $valString;
 | 
							$chatMessage = '$FFF' . preg_replace('/^S_/', '', $setting) . '$z$s$FF0 to $FFF' . $valString;
 | 
				
			||||||
		$chatMessage = str_replace("S_", "", $chatMessage);
 | 
					 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		$title = $this->maniaControl->authenticationManager->getAuthLevelName($player->authLevel);
 | 
							$title = $this->maniaControl->authenticationManager->getAuthLevelName($player->authLevel);
 | 
				
			||||||
		$this->maniaControl->chat->sendInformation(
 | 
							$this->maniaControl->chat->sendInformation(
 | 
				
			||||||
				'$ff0' . $title . ' $<' . $player->nickname . '$> set Scriptsetting $<' . $chatMessage . '$>!');
 | 
									'$ff0' . $title . ' $<' . $player->nickname . '$> set ScriptSetting $<' . $chatMessage . '$>!');
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		// log console message
 | 
							// log console message
 | 
				
			||||||
		$this->maniaControl->log(Formatter::stripCodes($title . ' ' . $player->nickname . ' set Scriptsetting ' . $chatMessage . '!'));
 | 
							$this->maniaControl->log(Formatter::stripCodes($title . ' ' . $player->nickname . ' set Scriptsetting ' . $chatMessage . '!'));
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user