[wpdev-commits] wolfpack commands.cpp,1.207,1.208 commands.h,1.14,1.15
Brought to you by:
rip,
thiagocorrea
|
From: <thi...@us...> - 2004-01-07 05:01:33
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv28673
Modified Files:
commands.cpp commands.h
Log Message:
Fixed small bug where it would log/display in the console unexisting commands as if it were executed
Index: commands.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v
retrieving revision 1.207
retrieving revision 1.208
diff -C2 -d -r1.207 -r1.208
*** commands.cpp 1 Oct 2003 00:35:31 -0000 1.207
--- commands.cpp 7 Jan 2004 05:01:30 -0000 1.208
***************
*** 85,98 ****
// Dispatch the command
! socket->log( QString( "Used command '%1'.\n" ).arg( command ) );
! dispatch( socket, pCommand, pArgs );
}
// Selects the right command Stub
! void cCommands::dispatch( cUOSocket *socket, const QString &command, QStringList &arguments )
{
// Just in case we have been called directly
if( !socket || !socket->player() )
! return;
// Check for custom commands
--- 85,98 ----
// Dispatch the command
! if ( dispatch( socket, pCommand, pArgs ) )
! socket->log( QString( "Used command '%1'.\n" ).arg( command ) );
}
// Selects the right command Stub
! bool cCommands::dispatch( cUOSocket *socket, const QString &command, QStringList &arguments )
{
// Just in case we have been called directly
if( !socket || !socket->player() )
! return false;
// Check for custom commands
***************
*** 114,118 ****
Py_DECREF( args );
! return;
}
--- 114,118 ----
Py_DECREF( args );
! return true;
}
***************
*** 121,125 ****
{
(commands[index].command)( socket, command, arguments );
! return;
}
--- 121,125 ----
{
(commands[index].command)( socket, command, arguments );
! return true;
}
Index: commands.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/commands.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** commands.h 13 Sep 2003 13:08:40 -0000 1.14
--- commands.h 7 Jan 2004 05:01:30 -0000 1.15
***************
*** 67,71 ****
// Command processing system
void process( cUOSocket *socket, const QString &command );
! void 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, QStringList &arguments );
QMap< QString, cAcl* >::const_iterator aclbegin() const { return _acls.begin(); }
|