From aceeb3f4c917076138b9efd8696afa94d00f6832 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Sun, 29 Jan 2017 20:56:27 +0100
Subject: Make Lua code great again
---
plugins/mpd.lua | 8 ++++----
plugins/socks.lua | 12 ++++++------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/plugins/mpd.lua b/plugins/mpd.lua
index 4735e66..27ad6b4 100644
--- a/plugins/mpd.lua
+++ b/plugins/mpd.lua
@@ -27,9 +27,9 @@ end
function MPD:on_data (data)
self.buf = self.buf .. data
- local line = string.match (self.buf, "([^\n]*)\n")
+ local line = self.buf:match ("([^\n]*)\n")
if line then
- local version = string.match (line, "OK MPD (.*)")
+ local version = line:match ("OK MPD (.*)")
if version then
self.unit:add_info ("version " .. version)
self.unit:set_success (true)
@@ -38,8 +38,8 @@ function MPD:on_data (data)
end
end
-ponymap.register_service ({
+ponymap.register_service {
name = "MPD",
flags = 0,
new_scan = MPD.new
-})
+}
diff --git a/plugins/socks.lua b/plugins/socks.lua
index ed07eff..acf90ff 100644
--- a/plugins/socks.lua
+++ b/plugins/socks.lua
@@ -81,21 +81,21 @@ end
-- Register everything
-ponymap.register_service ({
+ponymap.register_service {
name = "SOCKS4",
flags = 0,
new_scan = Socks4.new
-})
+}
-- At the moment this is nearly useless
--- ponymap.register_service ({
+-- ponymap.register_service {
-- name = "SOCKS4A",
-- flags = 0,
-- new_scan = Socks4A.new
--- })
+-- }
-ponymap.register_service ({
+ponymap.register_service {
name = "SOCKS5",
flags = 0,
new_scan = Socks5.new
-})
+}
--
cgit v1.2.3-70-g09d2