Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20437
Modified Files:
ChangeLog accounts.cpp multi.cpp server.cpp wolfpack.pro
Log Message:
- Human_Stablemaster inherits from Human_vendors now
- Added wolfpack.tr to public Python API
- Some additional user visible strings from the core are tr()'ed
Index: accounts.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/accounts.cpp,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -d -r1.105 -r1.106
*** accounts.cpp 19 Sep 2004 16:25:35 -0000 1.105
--- accounts.cpp 25 Sep 2004 22:57:08 -0000 1.106
***************
*** 344,348 ****
if ( !PersistentBroker::instance()->openDriver( Config::instance()->accountsDriver() ) )
{
! Console::instance()->log( LOG_ERROR, QString( "Unknown Account Database Driver '%1', check your wolfpack.xml" ).arg( Config::instance()->accountsDriver() ) );
return;
}
--- 344,348 ----
if ( !PersistentBroker::instance()->openDriver( Config::instance()->accountsDriver() ) )
{
! Console::instance()->log( LOG_ERROR, tr( "Unknown Account Database Driver '%1', check your wolfpack.xml" ).arg( Config::instance()->accountsDriver() ) );
return;
}
***************
*** 357,365 ****
if ( !PersistentBroker::instance()->tableExists( "accounts" ) )
{
! Console::instance()->send( "Accounts database didn't exist! Creating one\n" );
PersistentBroker::instance()->executeQuery( createSql );
cAccount* account = createAccount( "admin", "admin" );
account->setAcl( "admin" );
! Console::instance()->send( "Created default admin account: Login = admin, Password = admin\n" );
}
--- 357,365 ----
if ( !PersistentBroker::instance()->tableExists( "accounts" ) )
{
! Console::instance()->send( tr("Accounts database didn't exist! Creating one\n") );
PersistentBroker::instance()->executeQuery( createSql );
cAccount* account = createAccount( "admin", "admin" );
account->setAcl( "admin" );
! Console::instance()->send( tr("Created default admin account: Login = admin, Password = admin\n") );
}
***************
*** 395,399 ****
if ( connected )
PersistentBroker::instance()->executeQuery( "ROLLBACK;" );
! Console::instance()->log( LOG_ERROR, QString( "Error while saving Accounts: %1." ).arg( error ) );
}
catch ( ... )
--- 395,399 ----
if ( connected )
PersistentBroker::instance()->executeQuery( "ROLLBACK;" );
! Console::instance()->log( LOG_ERROR, tr( "Error while saving Accounts: %1." ).arg( error ) );
}
catch ( ... )
***************
*** 401,405 ****
if ( connected )
PersistentBroker::instance()->executeQuery( "ROLLBACK;" );
! Console::instance()->log( LOG_ERROR, "Unknown error while saving Accounts." );
}
}
--- 401,405 ----
if ( connected )
PersistentBroker::instance()->executeQuery( "ROLLBACK;" );
! Console::instance()->log( LOG_ERROR, tr("Unknown error while saving Accounts.") );
}
}
***************
*** 410,414 ****
if ( !PersistentBroker::instance()->openDriver( Config::instance()->accountsDriver() ) )
{
! throw wpException( QString( "Unknown Account Database Driver '%1', check your wolfpack.xml" ).arg( Config::instance()->accountsDriver() ) );
}
--- 410,414 ----
if ( !PersistentBroker::instance()->openDriver( Config::instance()->accountsDriver() ) )
{
! throw wpException( tr( "Unknown Account Database Driver '%1', check your wolfpack.xml" ).arg( Config::instance()->accountsDriver() ) );
}
***************
*** 420,428 ****
if ( !PersistentBroker::instance()->tableExists( "accounts" ) )
{
! Console::instance()->send( "Accounts database didn't exist! Creating one\n" );
PersistentBroker::instance()->executeQuery( createSql );
cAccount* account = createAccount( "admin", "admin" );
account->setAcl( "admin" );
! Console::instance()->send( "Created default admin account: Login = admin, Password = admin\n" );
}
--- 420,428 ----
if ( !PersistentBroker::instance()->tableExists( "accounts" ) )
{
! Console::instance()->send( tr("Accounts database didn't exist! Creating one\n") );
PersistentBroker::instance()->executeQuery( createSql );
cAccount* account = createAccount( "admin", "admin" );
account->setAcl( "admin" );
! Console::instance()->send( tr("Created default admin account: Login = admin, Password = admin\n") );
}
***************
*** 457,465 ****
{
account->password_ = cMd5::fastDigest( account->password_ );
! Console::instance()->log( LOG_NOTICE, QString( "Hashed account password for '%1'.\n" ).arg( account->login_ ) );
}
else
{
! Console::instance()->log( LOG_NOTICE, QString( "Account '%1' has an unhashed password.\n" ).arg( account->login_ ) );
}
}
--- 457,465 ----
{
account->password_ = cMd5::fastDigest( account->password_ );
! Console::instance()->log( LOG_NOTICE, tr( "Hashed account password for '%1'.\n" ).arg( account->login_ ) );
}
else
{
! Console::instance()->log( LOG_NOTICE, tr( "Account '%1' has an unhashed password.\n" ).arg( account->login_ ) );
}
}
***************
*** 473,481 ****
catch ( QString& error )
{
! throw wpException( QString( "Error while loading Accounts: %1" ).arg( error ) );
}
catch ( ... )
{
! throw wpException( "Unknown error while loading Accounts" );
}
--- 473,481 ----
catch ( QString& error )
{
! throw wpException( tr( "Error while loading Accounts: %1" ).arg( error ) );
}
catch ( ... )
{
! throw wpException( tr("Unknown error while loading Accounts") );
}
Index: multi.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/multi.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** multi.cpp 15 Sep 2004 02:15:28 -0000 1.15
--- multi.cpp 25 Sep 2004 22:57:09 -0000 1.16
***************
*** 103,107 ****
else
{
! Console::instance()->log( LOG_ERROR, QString( "Unable to create unscripted item: %1\n" ).arg( id ) );
}
--- 103,107 ----
else
{
! Console::instance()->log( LOG_ERROR, tr( "Unable to create unscripted item: %1\n" ).arg( id ) );
}
Index: wolfpack.pro
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v
retrieving revision 1.212
retrieving revision 1.213
diff -C2 -d -r1.212 -r1.213
*** wolfpack.pro 24 Sep 2004 04:47:38 -0000 1.212
--- wolfpack.pro 25 Sep 2004 22:57:09 -0000 1.213
***************
*** 199,200 ****
--- 199,205 ----
LICENSE.GPL
+ # used by tools/translationupdate, our own version of lupdate
+ # WPDEFINITIONS is the folder where xml definitons are.
+ # WPSCRIPTS is the folder where Python scripts are.
+ WPDEFINITIONS = ../definitions
+ WPSCRIPTS = ../scripts
Index: server.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/server.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** server.cpp 25 Sep 2004 02:03:20 -0000 1.28
--- server.cpp 25 Sep 2004 22:57:09 -0000 1.29
***************
*** 209,233 ****
// Register Components
! registerComponent( Config::instance(), "configuration", true, false );
// We want to start this independently
//registerComponent(PythonEngine::instance(), "python", false, true, "configuration");
! registerComponent( Definitions::instance(), "definitions", true, false, "configuration" );
! registerComponent( ScriptManager::instance(), "scripts", true, false, "definitions" );
! registerComponent( ContextMenus::instance(), "contextmenus", true, false, "scripts" );
! registerComponent( SpawnRegions::instance(), "spawnregions", true, false, "definitions" );
! registerComponent( Territories::instance(), "territories", true, false, "definitions" );
! registerComponent( Maps::instance(), "maps", true, false, "configuration" );
! registerComponent( SectorMaps::instance(), "sectormaps", false, true, "maps" );
! registerComponent( TileCache::instance(), "tiledata", true, false, "configuration" );
! registerComponent( MultiCache::instance(), "multis", true, false, "configuration" );
// Accounts come before world
! registerComponent( Accounts::instance(), "accounts", true, false );
! registerComponent( World::instance(), "world", false, true );
! registerComponent( Network::instance(), "network", true, false );
}
--- 209,233 ----
// Register Components
! registerComponent( Config::instance(), QT_TR_NOOP("configuration"), true, false );
// We want to start this independently
//registerComponent(PythonEngine::instance(), "python", false, true, "configuration");
! registerComponent( Definitions::instance(), QT_TR_NOOP("definitions"), true, false, "configuration" );
! registerComponent( ScriptManager::instance(), QT_TR_NOOP("scripts"), true, false, "definitions" );
! registerComponent( ContextMenus::instance(), QT_TR_NOOP("contextmenus"), true, false, "scripts" );
! registerComponent( SpawnRegions::instance(), QT_TR_NOOP("spawnregions"), true, false, "definitions" );
! registerComponent( Territories::instance(), QT_TR_NOOP("territories"), true, false, "definitions" );
! registerComponent( Maps::instance(), QT_TR_NOOP("maps"), true, false, "configuration" );
! registerComponent( SectorMaps::instance(), QT_TR_NOOP("sectormaps"), false, true, "maps" );
! registerComponent( TileCache::instance(), QT_TR_NOOP("tiledata"), true, false, "configuration" );
! registerComponent( MultiCache::instance(), QT_TR_NOOP("multis"), true, false, "configuration" );
// Accounts come before world
! registerComponent( Accounts::instance(), QT_TR_NOOP("accounts"), true, false );
! registerComponent( World::instance(), QT_TR_NOOP("world"), false, true );
! registerComponent( Network::instance(), QT_TR_NOOP("network"), true, false );
}
***************
*** 274,286 ****
}
- // Start Python
- PythonEngine::instance()->load();
-
- // Parse the parameters.
- Getopts::instance()->parse_options( argc, argv );
-
- // Print a header and useful version informations
- setupConsole();
-
#if !defined( QT_NO_TRANSLATION )
// Start the QT translator
--- 274,277 ----
***************
*** 301,304 ****
--- 292,304 ----
#endif
+ // Start Python
+ PythonEngine::instance()->load();
+
+ // Parse the parameters.
+ Getopts::instance()->parse_options( argc, argv );
+
+ // Print a header and useful version informations
+ setupConsole();
+
// Load all subcomponents
try
***************
*** 623,627 ****
if ( !component->isSilent() )
{
! Console::instance()->sendProgress( tr( "Reloading %1" ).arg( component->getName() ) );
}
--- 623,627 ----
if ( !component->isSilent() )
{
! Console::instance()->sendProgress( tr( "Reloading %1" ).arg( tr(component->getName()) ) );
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v
retrieving revision 1.78
retrieving revision 1.79
diff -C2 -d -r1.78 -r1.79
*** ChangeLog 25 Sep 2004 21:15:46 -0000 1.78
--- ChangeLog 25 Sep 2004 22:57:08 -0000 1.79
***************
*** 56,59 ****
--- 56,61 ----
- Fixed a gump response vulnerability.
- Fixed console bugs.
+ - Added translation support to Python scripts.
+ - Fixed stablemaster speech handling ( Stablemasters are also vendors )
Wolfpack 12.9.10 Beta (10. September 2004)
|