diff --git a/hooks.lua b/hooks.lua
index 975c89cb273340332d81f01611c44b8d3558c386..6c8e24387877fe52b63092299901c112658d6a7c 100644
--- a/hooks.lua
+++ b/hooks.lua
@@ -104,6 +104,14 @@ end
 function irc.hooks.channelChat(msg)
 	local text = normalize(msg.args[2])
 
+	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)
+		return
+	end
+
 	-- Support multiple servers in a channel better by converting:
 	-- "<server@IRC> <player> message" into "<player@server> message"
 	-- "<server@IRC> *** player joined/left the game" into "*** player joined/left server"
@@ -117,8 +125,6 @@ function irc.hooks.channelChat(msg)
 	local foundaction, _, actionnick, actionmessage =
 		text:find("^%* ([^%s]+) (.*)$")
 
-	irc:check_botcmd(msg)
-
 	if text:sub(1, 5) == "[off]" then
 		return
 	elseif foundchat then