mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
fixed bug where attempting to set a bad pass trashes existing buffer
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@146 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+11
-1
@@ -20,6 +20,9 @@
|
||||
*
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.6 2005/04/18 04:44:40 imaginos
|
||||
* fixed bug where attempting to set a bad pass trashes existing buffer
|
||||
*
|
||||
* Revision 1.5 2005/04/18 00:18:46 prozacx
|
||||
* Upgraded output msgs and changed path of file
|
||||
*
|
||||
@@ -59,11 +62,13 @@ public:
|
||||
{
|
||||
Ping();
|
||||
m_bIsAway = false;
|
||||
m_bBootError = false;
|
||||
AddTimer( new CAwayJob( this, 60, 0, "AwayJob", "Checks for idle and saves messages every 1 minute" ) );
|
||||
}
|
||||
virtual ~CAway()
|
||||
{
|
||||
SaveBufferToDisk();
|
||||
if ( !m_bBootError )
|
||||
SaveBufferToDisk();
|
||||
}
|
||||
|
||||
virtual bool OnBoot()
|
||||
@@ -79,7 +84,11 @@ public:
|
||||
}
|
||||
|
||||
if ( !BootStrap() )
|
||||
{
|
||||
m_sPassword = "";
|
||||
m_bBootError = true;
|
||||
return( false );
|
||||
}
|
||||
|
||||
return( true );
|
||||
}
|
||||
@@ -343,6 +352,7 @@ public:
|
||||
|
||||
private:
|
||||
string m_sPassword;
|
||||
bool m_bBootError;
|
||||
bool DecryptMessages( string & sBuffer )
|
||||
{
|
||||
string sMessages = GetPath();
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
* better solution then plain text.
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.6 2005/04/18 04:44:40 imaginos
|
||||
* fixed bug where attempting to set a bad pass trashes existing buffer
|
||||
*
|
||||
* Revision 1.5 2005/04/17 23:58:26 prozacx
|
||||
* Added OnLoad() for setting pass from config
|
||||
*
|
||||
@@ -113,6 +116,7 @@ public:
|
||||
if ( !BootStrap( vChans[a] ) )
|
||||
{
|
||||
m_bBootError = true;
|
||||
m_sPassword = "";
|
||||
return( false );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user