Add reload radio stations cmd

This commit is contained in:
Vortrex
2021-11-28 22:49:15 -06:00
parent 2f1ac56812
commit 91f36de2a8

View File

@@ -214,4 +214,15 @@ function getRadioStationData(radioStationId) {
return getServerData().radioStations[radioStationId]; return getServerData().radioStations[radioStationId];
} }
// ===========================================================================
function reloadAllRadioStationsCommand(command, params, client) {
stopRadioStreamForPlayer(null);
getServerData().radioStations.splice(0, getServerData().radioStations.length-1);
getServerData().radioStations = loadRadioStationsFromDatabase();
setRadioStationIndexes();
messageAdminAction(`All radio stations have been reloaded by an admin!`);
}
// =========================================================================== // ===========================================================================