aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-04-20 23:32:00 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2016-04-21 22:09:35 +0200
commit29418e5e55dfcebee03c50a69064a432fb8e6197 (patch)
tree1b23a756c5a15f90d566d83270bce69cf5fa0fc2 /plugins
parent4665807d0963bb20fa6253df082847f0434f0b0d (diff)
downloadxK-29418e5e55dfcebee03c50a69064a432fb8e6197.tar.gz
xK-29418e5e55dfcebee03c50a69064a432fb8e6197.tar.xz
xK-29418e5e55dfcebee03c50a69064a432fb8e6197.zip
ping-timeout.lua: fix message parsing
Diffstat (limited to 'plugins')
-rw-r--r--plugins/degesch/ping-timeout.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/degesch/ping-timeout.lua b/plugins/degesch/ping-timeout.lua
index 12a5221..f871f42 100644
--- a/plugins/degesch/ping-timeout.lua
+++ b/plugins/degesch/ping-timeout.lua
@@ -1,7 +1,7 @@
--
-- ping-timeout.lua: ping timeout readability enhancement plugin
--
--- Copyright (c) 2015, Přemysl Janouch <p.janouch@gmail.com>
+-- Copyright (c) 2015 - 2016, Přemysl Janouch <p.janouch@gmail.com>
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
@@ -17,9 +17,9 @@
--
degesch.hook_irc (function (hook, server, line)
- local start, timeout =
- line:match ("^(:[^ ]* QUIT :Ping timeout:) (%d+) seconds$")
- if not start then
+ local msg = degesch.parse (line)
+ local start, timeout = line:match ("^(.* :Ping timeout:) (%d+) seconds$")
+ if msg.command ~= "QUIT" or not start then
return line
end