1
0
의 미러 https://github.com/minetest-mods/irc.git synced 2025-09-19 04:50:36 +02:00

Better method to avoid impersonation.

This commit is contained in:
Diego Martínez
2017-03-24 22:33:43 -03:00
부모 6bf4e111c2
커밋 1d4fd5a162

파일 보기

@@ -104,8 +104,9 @@ function irc.hooks.channelChat(msg)
irc:check_botcmd(msg) irc:check_botcmd(msg)
-- Don't let a user impersonate someone else by using the nick "IRC" -- Don't let a user impersonate someone else by using the nick "IRC"
if msg.user.nick == "IRC" then local fake = msg.user.nick:lower():match("^[il|]rc$")
irc.sendLocal("<IRC@IRC> "..text) if fake then
irc.sendLocal("<"..msg.user.nick.."@IRC> "..text)
return return
end end