|
From: <alb...@us...> - 2009-09-27 11:14:49
|
Revision: 4975
http://openlierox.svn.sourceforge.net/openlierox/?rev=4975&view=rev
Author: albertzeyer
Date: 2009-09-27 11:14:37 +0000 (Sun, 27 Sep 2009)
Log Message:
-----------
fixed bad hack
Modified Paths:
--------------
src/client/DeprecatedGUI/Menu_Net_Host.cpp
src/server/CServer.cpp
Modified: src/client/DeprecatedGUI/Menu_Net_Host.cpp
===================================================================
--- src/client/DeprecatedGUI/Menu_Net_Host.cpp 2009-09-26 21:21:30 UTC (rev 4974)
+++ src/client/DeprecatedGUI/Menu_Net_Host.cpp 2009-09-27 11:14:37 UTC (rev 4975)
@@ -1878,13 +1878,13 @@
// Kick the player
case MNU_USER+0:
if( wormid > 0 )
- cServer->kickWorm( wormid, "" );
+ cServer->kickWorm( wormid, "kicked via GUI menu" );
break;
// Ban the player
case MNU_USER+1:
if ( wormid > 0 )
- cServer->banWorm( wormid, "" );
+ cServer->banWorm( wormid, "banned via GUI menu" );
break;
// Mute/unmute
Modified: src/server/CServer.cpp
===================================================================
--- src/server/CServer.cpp 2009-09-26 21:21:30 UTC (rev 4974)
+++ src/server/CServer.cpp 2009-09-27 11:14:37 UTC (rev 4975)
@@ -1825,11 +1825,14 @@
///////////////////
// Kick a worm out of the server
void GameServer::kickWorm(int wormID, const std::string& sReason)
-{
+{
if (!cWorms) {
errors << "kickWorm: worms not initialised" << endl;
return;
}
+
+ if(sReason == "")
+ warnings << "kickWorm: no reason given to kick worm " << wormID << endl;
if( wormID < 0 || wormID >= MAX_WORMS ) {
hints << "kickWorm: worm ID " << itoa(wormID) << " is invalid" << endl;
@@ -1968,9 +1971,14 @@
// Ban and kick the worm out of the server
void GameServer::banWorm(int wormID, const std::string& sReason)
{
- if (!cWorms)
+ if (!cWorms) {
+ errors << "banWorm: worms not initialised" << endl;
return;
-
+ }
+
+ if(sReason == "")
+ warnings << "banWorm: no reason given to ban worm " << wormID << endl;
+
if( wormID < 0 || wormID >= MAX_PLAYERS ) {
if (Con_IsVisible())
Con_AddText(CNC_NOTIFY, "Could not find worm with ID '" + itoa(wormID) + "'");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|