1
0
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:
Diego Martínez 2017-03-24 22:33:43 -03:00
parent 6bf4e111c2
commit 1d4fd5a162

View File

@ -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