forked from minetest-mods/irc
Fix message when a player on another server times out (#58)
This commit is contained in:
parent
1c23f8987b
commit
05ab5e9fbd
@ -120,6 +120,8 @@ function irc.hooks.channelChat(msg)
|
|||||||
text:find("^%*%*%* ([^%s]+) joined the game$")
|
text:find("^%*%*%* ([^%s]+) joined the game$")
|
||||||
local foundleave, _, leavenick =
|
local foundleave, _, leavenick =
|
||||||
text:find("^%*%*%* ([^%s]+) left the game$")
|
text:find("^%*%*%* ([^%s]+) left the game$")
|
||||||
|
local foundtimedout, _, timedoutnick =
|
||||||
|
text:find("^%*%*%* ([^%s]+) left the game %(Timed out%)$")
|
||||||
local foundaction, _, actionnick, actionmessage =
|
local foundaction, _, actionnick, actionmessage =
|
||||||
text:find("^%* ([^%s]+) (.*)$")
|
text:find("^%* ([^%s]+) (.*)$")
|
||||||
|
|
||||||
@ -134,6 +136,9 @@ function irc.hooks.channelChat(msg)
|
|||||||
elseif foundleave then
|
elseif foundleave then
|
||||||
irc.sendLocal(("*** %s left %s")
|
irc.sendLocal(("*** %s left %s")
|
||||||
:format(leavenick, msg.user.nick))
|
:format(leavenick, msg.user.nick))
|
||||||
|
elseif foundtimedout then
|
||||||
|
irc.sendLocal(("*** %s left %s (Timed out)")
|
||||||
|
:format(timedoutnick, msg.user.nick))
|
||||||
elseif foundaction then
|
elseif foundaction then
|
||||||
irc.sendLocal(("* %s@%s %s")
|
irc.sendLocal(("* %s@%s %s")
|
||||||
:format(actionnick, msg.user.nick, actionmessage))
|
:format(actionnick, msg.user.nick, actionmessage))
|
||||||
|
Loading…
Reference in New Issue
Block a user