Use default localhost if no args are given

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@701 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2006-03-19 19:51:56 +00:00
parent 810369db4b
commit 7c8ac76889
+4 -4
View File
@@ -42,6 +42,7 @@ class CIMAPAuthMod : public CGlobalModule {
public:
GLOBALMODCONSTRUCTOR(CIMAPAuthMod) {
m_Cache.SetTTL(60000);
m_sServer = "localhost";
m_uPort = 143;
m_bSSL = false;
}
@@ -53,12 +54,11 @@ public:
}
virtual bool OnLoad(const CString& sArgs) {
m_sServer = sArgs.Token(0);
if (m_sServer.empty()) {
return false;
if (sArgs.Trim_n().empty()) {
return true; // use defaults
}
m_sServer = sArgs.Token(0);
CString sPort = sArgs.Token(1);
if (sPort.Left(1) == "+") {