mirror of
https://github.com/minetest-mods/irc.git
synced 2024-12-26 17:00:17 +01:00
Better method to avoid impersonation.
This commit is contained in:
parent
6bf4e111c2
commit
1d4fd5a162
@ -104,8 +104,9 @@ function irc.hooks.channelChat(msg)
|
||||
irc:check_botcmd(msg)
|
||||
|
||||
-- Don't let a user impersonate someone else by using the nick "IRC"
|
||||
if msg.user.nick == "IRC" then
|
||||
irc.sendLocal("<IRC@IRC> "..text)
|
||||
local fake = msg.user.nick:lower():match("^[il|]rc$")
|
||||
if fake then
|
||||
irc.sendLocal("<"..msg.user.nick.."@IRC> "..text)
|
||||
return
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user