Change second argument to module in OnLoad() from sErrorMsg to sMessage.

This message is always displayed when the module returns (well, screw webadmin)
and this way a module can notify the user if it loaded but something unexpected
happened.

As you might guess, no one uses this ATM :)

Proposal comes from prozac


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@855 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2007-10-28 17:57:07 +00:00
parent 52534f2d1f
commit ee350ab744
18 changed files with 38 additions and 25 deletions
+3 -3
View File
@@ -121,7 +121,7 @@ public:
return true;
}
virtual bool OnLoad(const CString& sArgStr, CString& sErrorMsg) {
virtual bool OnLoad(const CString& sArgStr, CString& sMessage) {
bool bSSL = false;
bool bIPv6 = false;
CString sArgs(sArgStr);
@@ -137,7 +137,7 @@ public:
} else if (sOpt.CaseCmp("-IPV4") == 0) {
bIPv6 = false;
} else {
sErrorMsg = "Unknown option [" + sOpt + "] valid options are -ipv4 or -ipv6";
sMessage = "Unknown option [" + sOpt + "] valid options are -ipv4 or -ipv6";
return false;
}
}
@@ -171,7 +171,7 @@ public:
bool b = m_pManager->ListenHost(m_uPort, "WebAdmin::Listener", m_sListenHost, bSSL, SOMAXCONN, pListenSock, 0, bIPv6);
if (!b) {
sErrorMsg = "Could not bind to port " + CString(m_uPort) + ": " + CString(strerror(errno));
sMessage = "Could not bind to port " + CString(m_uPort) + ": " + CString(strerror(errno));
}
return b;
}