Skip to content
Snippets Groups Projects
Commit 1d4fd5a1 authored by Diego Martínez's avatar Diego Martínez
Browse files

Better method to avoid impersonation.

parent 6bf4e111
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment