Fix message when a player on another server times out (#58)

This commit is contained in:
rdococ 2019-09-21 14:22:41 +01:00 committed by SmallJoker
parent 1c23f8987b
commit 05ab5e9fbd
1 changed files with 5 additions and 0 deletions

View File

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