mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
.
This commit is contained in:
@@ -59,17 +59,21 @@ Event.add(defines.events.on_research_finished, function(event)
|
||||
end)
|
||||
|
||||
Event.add(defines.events.on_player_joined_game, function(event)
|
||||
if event and event.player_index then
|
||||
add_log("[JOIN] " .. game.players[event.player_index].name .. " joined the game")
|
||||
if not event or not event.player_index then
|
||||
return
|
||||
end
|
||||
|
||||
add_log("[JOIN] " .. game.players[event.player_index].name .. " joined the game")
|
||||
end)
|
||||
|
||||
Event.add(defines.events.on_player_left_game, function(event)
|
||||
if event and event.player_index then
|
||||
if event.reason then
|
||||
add_log("[LEAVE] " .. game.players[event.player_index].name .. config.disconnect_reason[event.reason])
|
||||
else
|
||||
add_log("[LEAVE] " .. game.players[event.player_index].name .. config.disconnect_reason[defines.disconnect_reason.quit])
|
||||
end
|
||||
if not event or not event.player_index then
|
||||
return
|
||||
end
|
||||
|
||||
if event.reason then
|
||||
add_log("[LEAVE] " .. game.players[event.player_index].name .. config.disconnect_reason[event.reason])
|
||||
else
|
||||
add_log("[LEAVE] " .. game.players[event.player_index].name .. config.disconnect_reason[defines.disconnect_reason.quit])
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user