From ecc6558e3dabfe1ab047130e8b18371de7e00441 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Wed, 26 Feb 2014 14:44:17 -0500 Subject: [PATCH] Save the server's MOTD Conflicts: handlers.lua --- handlers.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/handlers.lua b/handlers.lua index 864926d..d56f2eb 100644 --- a/handlers.lua +++ b/handlers.lua @@ -102,6 +102,17 @@ handlers["005"] = function(o, user, nick, ...) end end +-- RPL_MOTDSTART +handlers["375"] = function(o, user, info) + o.motd = "" +end + +-- RPL_MOTD +handlers["372"] = function(o, user, nick, line) + -- MOTD lines have a "- " prefix, strip it. + o.motd = o.motd..line:sub(3)..'\n' +end + --NAMES list handlers["353"] = function(o, user, me, chanType, channel, names) if o.track_users then