Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv30342
Modified Files:
commands.cpp commands.h makemenus.cpp
Log Message:
Small code clean up, makes gcc happier.
Index: commands.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v
retrieving revision 1.210
retrieving revision 1.211
diff -C2 -d -r1.210 -r1.211
*** commands.cpp 8 Jan 2004 23:43:57 -0000 1.210
--- commands.cpp 11 Jan 2004 04:54:07 -0000 1.211
***************
*** 90,94 ****
// Selects the right command Stub
! bool cCommands::dispatch( cUOSocket *socket, const QString &command, QStringList &arguments )
{
// Just in case we have been called directly
--- 90,94 ----
// Selects the right command Stub
! bool cCommands::dispatch( cUOSocket *socket, const QString &command, const QStringList &arguments )
{
// Just in case we have been called directly
***************
*** 117,121 ****
}
! for( UINT32 index = 0; commands[index].command; ++index )
if( command == commands[index].name )
{
--- 117,121 ----
}
! for( uint index = 0; commands[index].command; ++index )
if( command == commands[index].name )
{
***************
*** 200,204 ****
// .go x,y,z,[map] >> Go to those coordinates
// .go placename >> Go to that specific place
! void commandGo( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 200,204 ----
// .go x,y,z,[map] >> Go to those coordinates
// .go placename >> Go to that specific place
! void commandGo( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 253,257 ****
}
! void commandResurrect( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(args);
--- 253,257 ----
}
! void commandResurrect( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(args);
***************
*** 261,265 ****
}
! void commandKill( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(args);
--- 261,265 ----
}
! void commandKill( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(args);
***************
*** 269,273 ****
}
! void commandFix( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(args);
--- 269,273 ----
}
! void commandFix( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(args);
***************
*** 277,281 ****
}
! void commandAddItem( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 277,281 ----
}
! void commandAddItem( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 293,297 ****
}
! void commandAddNpc( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 293,297 ----
}
! void commandAddNpc( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 309,313 ****
}
! void commandAdd( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 309,313 ----
}
! void commandAdd( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 341,345 ****
}
! void commandSet( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 341,345 ----
}
! void commandSet( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 351,356 ****
QString key = args[0];
- args.erase( args.begin() );
QString value = args.join( " " );
socket->sysMessage( tr( "Please select a target to 'set %1 %2' " ).arg( key ).arg( value ) );
--- 351,356 ----
QString key = args[0];
QString value = args.join( " " );
+ value = value.right( value.length() - key.length() - 1); // -1 because of the join() separator character
socket->sysMessage( tr( "Please select a target to 'set %1 %2' " ).arg( key ).arg( value ) );
***************
*** 358,362 ****
}
! void commandResend( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(args);
--- 358,362 ----
}
! void commandResend( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(args);
***************
*** 367,371 ****
! void commandRemove( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(socket);
--- 367,371 ----
! void commandRemove( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(socket);
***************
*** 375,379 ****
}
! void commandAccount( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 375,379 ----
}
! void commandAccount( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 563,567 ****
! void commandTele( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(socket);
--- 563,567 ----
! void commandTele( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(socket);
***************
*** 571,575 ****
}
! void commandSave( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(args);
--- 571,575 ----
}
! void commandSave( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(args);
***************
*** 579,583 ****
}
! void commandServerTime( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(args);
--- 579,583 ----
}
! void commandServerTime( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(args);
***************
*** 586,590 ****
}
! void commandShow( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 586,590 ----
}
! void commandShow( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 593,597 ****
}
! void commandSpawnRegion( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 593,597 ----
}
! void commandSpawnRegion( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 738,742 ****
}
! void commandTags( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 738,742 ----
}
! void commandTags( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 804,808 ****
}
! void commandWho( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(args);
--- 804,808 ----
}
! void commandWho( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(args);
***************
*** 813,817 ****
}
! void commandPages( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(args);
--- 813,817 ----
}
! void commandPages( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(args);
***************
*** 832,836 ****
}
! void commandShutDown( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(socket);
--- 832,836 ----
}
! void commandShutDown( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(socket);
***************
*** 842,846 ****
}
! void commandStaff( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 842,846 ----
}
! void commandStaff( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 857,861 ****
}
! void commandReload( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 857,861 ----
}
! void commandReload( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 947,951 ****
}
! void commandMakeMenu( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 947,951 ----
}
! void commandMakeMenu( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 961,965 ****
}
! void commandAddEvent( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 961,965 ----
}
! void commandAddEvent( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 983,987 ****
}
! void commandRemoveEvent( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 983,987 ----
}
! void commandRemoveEvent( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 998,1002 ****
}
! void commandMove( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 998,1002 ----
}
! void commandMove( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 1030,1034 ****
}
! void commandTile( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 1030,1034 ----
}
! void commandTile( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 1056,1060 ****
}
! void commandAllShow( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 1056,1060 ----
}
! void commandAllShow( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 1077,1081 ****
}
! void commandAllMove( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 1077,1081 ----
}
! void commandAllMove( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 1091,1097 ****
if( socket->player()->account()->isAllMove() )
! socket->sysMessage( tr( "AllMove = '1'" ) );
else
! socket->sysMessage( tr( "AllMove = '0'" ) );
// Resend the world to us
--- 1091,1097 ----
if( socket->player()->account()->isAllMove() )
! socket->sysMessage( tr( "AllMove is [enabled]" ) );
else
! socket->sysMessage( tr( "AllMove is [disabled]" ) );
// Resend the world to us
***************
*** 1099,1103 ****
}
! void commandShowSerials( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 1099,1103 ----
}
! void commandShowSerials( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 1118,1122 ****
}
! void commandRestock( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(args);
--- 1118,1122 ----
}
! void commandRestock( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(args);
***************
*** 1126,1130 ****
}
! void commandAllSkills( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 1126,1130 ----
}
! void commandAllSkills( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 1151,1155 ****
}
! void commandBroadcast( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(socket);
--- 1151,1155 ----
}
! void commandBroadcast( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(socket);
***************
*** 1158,1162 ****
}
! void commandInvis( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 1158,1162 ----
}
! void commandInvis( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 1177,1181 ****
}
! void commandPageNotify( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 1177,1181 ----
}
! void commandPageNotify( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 1193,1197 ****
// Change password for current account
! void commandPassword( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 1193,1197 ----
// Change password for current account
! void commandPassword( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
***************
*** 1213,1217 ****
}
! void commandGmtalk( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
Q_UNUSED(command);
--- 1213,1217 ----
}
! void commandGmtalk( cUOSocket *socket, const QString &command, const QStringList &args ) throw()
{
Q_UNUSED(command);
Index: commands.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/commands.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** commands.h 7 Jan 2004 05:01:30 -0000 1.15
--- commands.h 11 Jan 2004 04:54:07 -0000 1.16
***************
*** 46,50 ****
{
const char *name;
! void (*command)( cUOSocket*, const QString&, QStringList& );
};
--- 46,50 ----
{
const char *name;
! void (*command)( cUOSocket*, const QString&, const QStringList& );
};
***************
*** 67,71 ****
// Command processing system
void process( cUOSocket *socket, const QString &command );
! bool dispatch( cUOSocket *socket, const QString &command, QStringList &arguments );
QMap< QString, cAcl* >::const_iterator aclbegin() const { return _acls.begin(); }
--- 67,71 ----
// Command processing system
void process( cUOSocket *socket, const QString &command );
! bool dispatch( cUOSocket *socket, const QString &command, const QStringList &arguments );
QMap< QString, cAcl* >::const_iterator aclbegin() const { return _acls.begin(); }
Index: makemenus.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/makemenus.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** makemenus.cpp 8 Jan 2004 23:43:57 -0000 1.61
--- makemenus.cpp 11 Jan 2004 04:54:07 -0000 1.62
***************
*** 785,789 ****
else if ( name_ == "go" )
{
! void commandGo( cUOSocket *socket, const QString &command, QStringList &args ) throw();
commandGo( socket, "go", QStringList::split(" ", params) );
}
--- 785,789 ----
else if ( name_ == "go" )
{
! void commandGo( cUOSocket *socket, const QString &command, const QStringList &args ) throw();
commandGo( socket, "go", QStringList::split(" ", params) );
}
|