mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 19:45:22 +09:00
Update From New Master Branch
This commit is contained in:
@@ -112,7 +112,7 @@ function Admin.ban(player,by_player,reason)
|
||||
local player = Game.get_player(player)
|
||||
local by_player_name = Game.get_player(by_player) and Game.get_player(by_player).name or '<server>'
|
||||
local reason = append_name(reason,by_player_name)
|
||||
discord_emit{
|
||||
Sync.emit_embeded{
|
||||
title='Player Ban',
|
||||
color=Color.to_hex(defines.text_color.crit),
|
||||
description='There was a player banned.',
|
||||
@@ -139,7 +139,7 @@ function Admin.kick(player,by_player,reason)
|
||||
local player = Game.get_player(player)
|
||||
local by_player_name = Game.get_player(by_player) and Game.get_player(by_player).name or '<server>'
|
||||
local reason = append_name(reason,by_player_name)
|
||||
discord_emit{
|
||||
Sync.emit_embeded{
|
||||
title='Player Kick',
|
||||
color=Color.to_hex(defines.text_color.high),
|
||||
description='There was a player kicked.',
|
||||
@@ -166,7 +166,7 @@ function Admin.jail(player,by_player,reason)
|
||||
local player = Game.get_player(player)
|
||||
local by_player_name = Game.get_player(by_player) and Game.get_player(by_player).name or '<server>'
|
||||
local reason = append_name(reason,by_player_name)
|
||||
discord_emit{
|
||||
Sync.emit_embeded{
|
||||
title='Player Jail',
|
||||
color=Color.to_hex(defines.text_color.med),
|
||||
description='There was a player jailed.',
|
||||
|
||||
@@ -28,7 +28,7 @@ Event.register(-1,function(event)
|
||||
end
|
||||
end
|
||||
end):on_event('error',function(self,err)
|
||||
discord_emit{
|
||||
Sync.emit_embeded{
|
||||
title='Auto Kick Error',
|
||||
color=Color.to_hex(defines.text_color.bg),
|
||||
description='Auto Kick Error - Closed Thread',
|
||||
|
||||
@@ -47,7 +47,7 @@ Event.register(-1,function(event)
|
||||
player_return({'chat-bot.message',message},nil,player)
|
||||
end
|
||||
end):on_event('error',function(self,err)
|
||||
discord_emit{
|
||||
Sync.emit_embeded{
|
||||
title='Auto Message Error',
|
||||
color=Color.to_hex(defines.text_color.bg),
|
||||
description='Auto Message Error - Closed Thread',
|
||||
|
||||
@@ -17,7 +17,7 @@ Event.register(defines.events.on_console_command,function(event)
|
||||
data.by = event.player_index and game.players[event.player_index].name or '<server>'
|
||||
if data.by == '<server>' then return end
|
||||
if command == 'config' or command == 'banlist' then
|
||||
discord_emit{
|
||||
Sync.emit_embeded{
|
||||
title='Edit To '..data.title,
|
||||
color=Color.to_hex(defines.text_color.bg),
|
||||
description='A player edited the '..command..'.',
|
||||
@@ -42,7 +42,7 @@ Event.register(defines.events.on_console_command,function(event)
|
||||
if not Game.get_player(data.username) then return end
|
||||
if string.sub(command,-1) == 'e' then data.command = command..'d' else data.command = command..'ed' end
|
||||
data.reason = data.reason and data.reason ~= '' and data.reason or 'No Reason Required'
|
||||
discord_emit{
|
||||
Sync.emit_embeded{
|
||||
title='Player '..data.title,
|
||||
color=data.colour,
|
||||
description='There was a player '..data.command..'.',
|
||||
|
||||
@@ -66,7 +66,7 @@ local function report_message(player,by_player,reason)
|
||||
if _reports().actions[player.name] == actions.report then return end
|
||||
Ranking.print(low_rank,{'reports.low-print',player.name,reason},defines.text_color.info,true)
|
||||
Ranking.print(high_rank,{'reports.high-print',player.name,by_player_name,reason},defines.text_color.med)
|
||||
discord_emit{
|
||||
Sync.emit_embeded{
|
||||
title='Player Report',
|
||||
color=Color.to_hex(defines.text_color.med),
|
||||
description='A player was reported.',
|
||||
@@ -174,7 +174,7 @@ function Admin.clear_warings(player,by_player,no_emit)
|
||||
if not player then return end
|
||||
_reports().warnings[player.name]=0
|
||||
if not no_emit then
|
||||
discord_emit{
|
||||
Sync.emit_embeded{
|
||||
title='Player Clear',
|
||||
color=Color.to_hex(defines.text_color.low),
|
||||
description='A player had there warnings cleared.',
|
||||
@@ -190,7 +190,7 @@ function Admin.clear_reports(player,by_player,no_emit)
|
||||
_reports().reports[player.name]={}
|
||||
_reports().varified[player.name]={}
|
||||
if not no_emit then
|
||||
discord_emit{
|
||||
Sync.emit_embeded{
|
||||
title='Player Clear',
|
||||
color=Color.to_hex(defines.text_color.low),
|
||||
description='A player had there reports cleared.',
|
||||
@@ -207,7 +207,7 @@ function Admin.clear_player(player,by_player)
|
||||
Admin.clear_reports(player,by_player,true)
|
||||
_reports().actions[player.name]=actions.none
|
||||
if Ranking.get_rank(player).group.name == 'Jail' then Server.interface(Ranking.revert,true,player,by_player) end
|
||||
discord_emit{
|
||||
Sync.emit_embeded{
|
||||
title='Player Clear',
|
||||
color=Color.to_hex(defines.text_color.low),
|
||||
description='A player had there reports and warnings cleared.',
|
||||
@@ -225,7 +225,7 @@ function Admin.temp_ban(player,by_player,reason)
|
||||
local player, by_player_name = valid_players(player,by_player)
|
||||
if not player or Admin.is_banned(player) then return end
|
||||
_reports().actions[player.name] = actions.temp
|
||||
discord_emit{
|
||||
Sync.emit_embeded{
|
||||
title='Player Temp-Ban',
|
||||
color=Color.to_hex(defines.text_color.high),
|
||||
description='A player was jailed.',
|
||||
|
||||
Reference in New Issue
Block a user