From 58dfd5043a0f9cb95d7a972e2d2695d3a1a74d47 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 --- handlers.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/handlers.lua b/handlers.lua index cbd1c9e..942a7cf 100644 --- a/handlers.lua +++ b/handlers.lua @@ -90,6 +90,17 @@ handlers["432"] = needNewNick -- ERR_NICKNAMEINUSE handlers["433"] = needNewNick +-- RPL_MOTDSTART +handlers["375"] = function(o, prefix, info) + o.motd = "" +end + +-- RPL_MOTD +handlers["372"] = function(o, prefix, nick, line) + -- MOTD lines have a "- " prefix, strip it. + o.motd = o.motd..line:sub(3)..'\n' +end + --NAMES list handlers["353"] = function(o, prefix, me, chanType, channel, names) if o.track_users then