Skip to content

Commit 05ab5e9

Browse files
rdococSmallJoker
authored andcommitted
Fix message when a player on another server times out (#58)
1 parent 1c23f89 commit 05ab5e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hooks.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ function irc.hooks.channelChat(msg)
120120
text:find("^%*%*%* ([^%s]+) joined the game$")
121121
local foundleave, _, leavenick =
122122
text:find("^%*%*%* ([^%s]+) left the game$")
123+
local foundtimedout, _, timedoutnick =
124+
text:find("^%*%*%* ([^%s]+) left the game %(Timed out%)$")
123125
local foundaction, _, actionnick, actionmessage =
124126
text:find("^%* ([^%s]+) (.*)$")
125127

@@ -134,6 +136,9 @@ function irc.hooks.channelChat(msg)
134136
elseif foundleave then
135137
irc.sendLocal(("*** %s left %s")
136138
:format(leavenick, msg.user.nick))
139+
elseif foundtimedout then
140+
irc.sendLocal(("*** %s left %s (Timed out)")
141+
:format(timedoutnick, msg.user.nick))
137142
elseif foundaction then
138143
irc.sendLocal(("* %s@%s %s")
139144
:format(actionnick, msg.user.nick, actionmessage))

0 commit comments

Comments
 (0)