From 05ab5e9fbd20276da802b047209149f97d606da9 Mon Sep 17 00:00:00 2001 From: rdococ Date: Sat, 21 Sep 2019 14:22:41 +0100 Subject: [PATCH] Fix message when a player on another server times out (#58) --- hooks.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hooks.lua b/hooks.lua index 0ac3597..19a85ae 100644 --- a/hooks.lua +++ b/hooks.lua @@ -120,6 +120,8 @@ function irc.hooks.channelChat(msg) text:find("^%*%*%* ([^%s]+) joined the game$") local foundleave, _, leavenick = text:find("^%*%*%* ([^%s]+) left the game$") + local foundtimedout, _, timedoutnick = + text:find("^%*%*%* ([^%s]+) left the game %(Timed out%)$") local foundaction, _, actionnick, actionmessage = text:find("^%* ([^%s]+) (.*)$") @@ -134,6 +136,9 @@ function irc.hooks.channelChat(msg) elseif foundleave then irc.sendLocal(("*** %s left %s") :format(leavenick, msg.user.nick)) + elseif foundtimedout then + irc.sendLocal(("*** %s left %s (Timed out)") + :format(timedoutnick, msg.user.nick)) elseif foundaction then irc.sendLocal(("* %s@%s %s") :format(actionnick, msg.user.nick, actionmessage))