From 6bdbe9d2c986a33d24e91358e592c355810fbbf1 Mon Sep 17 00:00:00 2001 From: prozacx Date: Mon, 18 Apr 2005 05:41:43 +0000 Subject: [PATCH] Added OnLoad() and print modname in error msg git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@148 726aef4b-f618-498e-8847-2d620e286838 --- modules/away.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/away.cpp b/modules/away.cpp index c8d1baba..4f8982fb 100644 --- a/modules/away.cpp +++ b/modules/away.cpp @@ -20,6 +20,9 @@ * * * $Log$ + * Revision 1.7 2005/04/18 05:41:43 prozacx + * Added OnLoad() and print modname in error msg + * * Revision 1.6 2005/04/18 04:44:40 imaginos * fixed bug where attempting to set a bad pass trashes existing buffer * @@ -71,6 +74,16 @@ public: SaveBufferToDisk(); } + virtual bool OnLoad(const string& sArgs) + { + if (!sArgs.empty()) + { + m_sPassword = CBlowfish::MD5( sArgs ); + } + + return true; + } + virtual bool OnBoot() { if ( m_sPassword.empty() ) @@ -115,7 +128,7 @@ public: } } else { - CUtils::PrintError("Failed to Decrypt Messages"); + CUtils::PrintError("[" + GetModName() + ".so] Failed to Decrypt Messages"); return( false ); }