From 910e8b48f11889f0a171e734835baf351e87e211 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sun, 1 Apr 2018 13:13:40 +0100 Subject: [PATCH] Update From New Master Branch --- Addons/Admin/admin.lua | 6 +++--- Addons/Admin/afk-kick.lua | 2 +- Addons/Admin/auto-message.lua | 2 +- Addons/Admin/discord.lua | 4 ++-- Addons/Admin/reports.lua | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Addons/Admin/admin.lua b/Addons/Admin/admin.lua index 34e9bfbb..e5a05e3c 100644 --- a/Addons/Admin/admin.lua +++ b/Addons/Admin/admin.lua @@ -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 '' 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 '' 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 '' 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.', diff --git a/Addons/Admin/afk-kick.lua b/Addons/Admin/afk-kick.lua index f4f078f3..caf72077 100644 --- a/Addons/Admin/afk-kick.lua +++ b/Addons/Admin/afk-kick.lua @@ -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', diff --git a/Addons/Admin/auto-message.lua b/Addons/Admin/auto-message.lua index 49f1974f..1780885e 100644 --- a/Addons/Admin/auto-message.lua +++ b/Addons/Admin/auto-message.lua @@ -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', diff --git a/Addons/Admin/discord.lua b/Addons/Admin/discord.lua index 87652f70..9ec03be5 100644 --- a/Addons/Admin/discord.lua +++ b/Addons/Admin/discord.lua @@ -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 '' if data.by == '' 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..'.', diff --git a/Addons/Admin/reports.lua b/Addons/Admin/reports.lua index a8460d9f..8f384a1a 100644 --- a/Addons/Admin/reports.lua +++ b/Addons/Admin/reports.lua @@ -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.',