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

@@ -215,3 +215,14 @@ function getRadioStationData(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!`);
}
// ===========================================================================