From: <kha...@us...> - 2008-04-02 11:16:07
|
Revision: 1303 http://planeshift.svn.sourceforge.net/planeshift/?rev=1303&view=rev Author: khakilord Date: 2008-04-02 04:16:12 -0700 (Wed, 02 Apr 2008) Log Message: ----------- Removed the requirement for the /admin command, patch by Steve Schwartfeger for #724. Modified Paths: -------------- trunk/docs/history.txt trunk/src/client/cmdadmin.cpp trunk/src/server/authentserver.cpp Modified: trunk/docs/history.txt =================================================================== --- trunk/docs/history.txt 2008-04-02 11:06:16 UTC (rev 1302) +++ trunk/docs/history.txt 2008-04-02 11:16:12 UTC (rev 1303) @@ -1,5 +1,7 @@ *** 2008-04-02 by Andrew Dai - Fixed #1372, patch by peeg. +- Removed the requirement for the /admin command, patch by Steve + Schwartfeger for #724. *** 2008-04-01 by Anders Reggestad - Another crash candidate fixed by Vornne Modified: trunk/src/client/cmdadmin.cpp =================================================================== --- trunk/src/client/cmdadmin.cpp 2008-04-02 11:06:16 UTC (rev 1302) +++ trunk/src/client/cmdadmin.cpp 2008-04-02 11:16:12 UTC (rev 1303) @@ -92,16 +92,24 @@ { psAdminCmdMessage msg(me); - if( !msg.cmd) + pawsChatWindow* chat = static_cast<pawsChatWindow*>(PawsManager::GetSingleton().FindWidget("ChatWindow")); + + if( !msg.cmd ) { - psSystemMessage sysMsg( 0, MSG_INFO, "You lack administrator access" ); - msgqueue->Publish( sysMsg.msg ); + if ( chat ) + { + psSystemMessage sysMsg( 0, MSG_INFO, "You lack administrator access" ); + msgqueue->Publish( sysMsg.msg ); + } + return; } - psSystemMessage sysMsg( 0, MSG_INFO, "You now have the following admin commands available:" ); - msgqueue->Publish( sysMsg.msg ); - + if ( chat ) + { + psSystemMessage sysMsg( 0, MSG_INFO, "You now have the following admin commands available:" ); + msgqueue->Publish( sysMsg.msg ); + } iDocumentSystem* xml = psengine->GetXMLParser (); csRef<iDocument> doc = xml->CreateDocument(); @@ -125,12 +133,14 @@ cmdsource->Subscribe( cmdString, this ); } - psSystemMessage commandMsg( 0, MSG_INFO, commands.GetData() ); - msgqueue->Publish( commandMsg.msg ); + if ( chat ) + { + psSystemMessage commandMsg( 0, MSG_INFO, commands.GetData() ); + msgqueue->Publish( commandMsg.msg ); - // Update the auto-complete list - pawsChatWindow* chat = static_cast<pawsChatWindow*>(PawsManager::GetSingleton().FindWidget("ChatWindow")); - chat->RefreshCommandList(); + // Update the auto-complete list + chat->RefreshCommandList(); + } } } } Modified: trunk/src/server/authentserver.cpp =================================================================== --- trunk/src/server/authentserver.cpp 2008-04-02 11:06:16 UTC (rev 1302) +++ trunk/src/server/authentserver.cpp 2008-04-02 11:16:12 UTC (rev 1303) @@ -526,6 +526,11 @@ client->SetAdvisorPoints(acctinfo->advisorPoints); client->SetSecurityLevel(acctinfo->securitylevel); + if (acctinfo->securitylevel >= GM_TESTER) + { + psserver->GetAdminManager()->Admin(client->GetPlayerID(), me->clientnum, client); + } + psserver->GetWeatherManager()->SendClientGameTime(me->clientnum); if(csGetTicks() - start > 500) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |