mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-12 10:04:40 +02:00
Changed trigger to #, preventing discord mentions
This commit is contained in:
parent
948ed4ab1f
commit
7a0a945da8
@ -121,14 +121,14 @@ local function hodor(event)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Gives a sound notification to a mentioned player using @[player-name]
|
-- Gives a sound notification to a mentioned player using #[player-name]
|
||||||
if global.mention_enabled then
|
if global.mention_enabled then
|
||||||
local missing_player_string
|
local missing_player_string
|
||||||
local not_found = 0
|
local not_found = 0
|
||||||
for word in event.message:gmatch('@%S+') do
|
for word in event.message:gmatch('#%S+') do
|
||||||
local cannot_mention = {}
|
local cannot_mention = {}
|
||||||
for _, p in ipairs(game.connected_players) do
|
for _, p in ipairs(game.connected_players) do
|
||||||
if '@'..p.name == word then
|
if '#'..p.name == word then
|
||||||
if p.name == player.name then
|
if p.name == player.name then
|
||||||
player.print(prefix..'Can\'t mention yourself!', {r = 1, g = 0, b = 0, a = 1})
|
player.print(prefix..'Can\'t mention yourself!', {r = 1, g = 0, b = 0, a = 1})
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user