Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv31597
Modified Files:
accounts.cpp accounts.h commands.cpp console_win.cpp
Log Message:
Fixes for Accounts and the Server Thread (which did nothing for me)
Index: accounts.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/accounts.cpp,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -d -r1.72 -r1.73
*** accounts.cpp 9 Jan 2004 19:35:22 -0000 1.72
--- accounts.cpp 21 Jan 2004 22:14:07 -0000 1.73
***************
*** 475,476 ****
--- 475,484 ----
}
+ void cAccounts::clearAcls() {
+ iterator it = accounts.begin();
+
+ while (it != accounts.end()) {
+ it.data()->acl_ = 0;
+ ++it;
+ }
+ }
Index: accounts.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/accounts.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** accounts.h 12 Sep 2003 15:39:55 -0000 1.32
--- accounts.h 21 Jan 2004 22:14:07 -0000 1.33
***************
*** 142,145 ****
--- 142,146 ----
void reload();
void clear();
+ void clearAcls();
typedef QMap<QString, cAccount*>::const_iterator const_iterator;
Index: commands.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v
retrieving revision 1.211
retrieving revision 1.212
diff -C2 -d -r1.211 -r1.212
*** commands.cpp 11 Jan 2004 04:54:07 -0000 1.211
--- commands.cpp 21 Jan 2004 22:14:07 -0000 1.212
***************
*** 141,145 ****
{
Console::instance()->ChangeColor( WPC_RED );
! Console::instance()->send( tr("WARNING: No ACLs for players, counselors, gms and admins defined!\n") );
Console::instance()->ChangeColor( WPC_NORMAL );
return;
--- 141,145 ----
{
Console::instance()->ChangeColor( WPC_RED );
! Console::instance()->send("WARNING: No ACLs for players, counselors, gms and admins defined!\n");
Console::instance()->ChangeColor( WPC_NORMAL );
return;
***************
*** 193,196 ****
--- 193,199 ----
_acls.insert( ACLname, acl );
}
+
+ // Renew the ACL pointer for all loaded accounts
+ Accounts::instance()->clearAcls();
}
Index: console_win.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/console_win.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** console_win.cpp 21 Jan 2004 05:03:37 -0000 1.22
--- console_win.cpp 21 Jan 2004 22:14:07 -0000 1.23
***************
*** 446,452 ****
// Try to load riched20.dll
! HMODULE hRiched = LoadLibrary( "riched20.dll" );
! if( hRiched == 0 )
{
MessageBox( 0, "The riched20.dll library could not be found on your system.\nPlease install Microsoft Internet Explorer 4.0 or later.", "Missing DLL", MB_OK|MB_ICONERROR );
--- 446,452 ----
// Try to load riched20.dll
! HMODULE hRiched = LoadLibrary("riched20.dll");
! if (!hRiched)
{
MessageBox( 0, "The riched20.dll library could not be found on your system.\nPlease install Microsoft Internet Explorer 4.0 or later.", "Missing DLL", MB_OK|MB_ICONERROR );
***************
*** 468,474 ****
wpClass.style = CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW;
! if( !RegisterClass( &wpClass ) )
{
! MessageBox( 0, "Couldn't register Window Class.", "Window Class", MB_OK|MB_ICONERROR );
return 1;
}
--- 468,474 ----
wpClass.style = CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW;
! if (!RegisterClass(&wpClass))
{
! MessageBox(0, "Couldn't register Window Class.", "Window Class", MB_OK|MB_ICONERROR);
return 1;
}
***************
*** 487,491 ****
ShowWindow( mainWindow, SW_NORMAL );
! cServerThread serverThread( lpCmdLine );
MSG msg;
--- 487,492 ----
ShowWindow( mainWindow, SW_NORMAL );
! cServerThread serverThread(lpCmdLine);
! serverThread.start();
MSG msg;
|