onlineMods = onlineMods or {}
local cLogin = CreatureEvent("weON")
function cLogin.onLogin(player)
if player:getAccountType() >= ACCOUNT_TYPE_GAMEMASTER then
onlineMods[player:getName()] = true
else
local msg = ('%s has logged in.'):format(player:getName())
for name, _ in pairs(onlineMods) do
local p = Player(name)
if p then
p:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE,msg)
end
end
end
return true
end
cLogin:register()