mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-20 12:19:10 +00:00
Build 918
This commit is contained in:
@ -1,76 +0,0 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// CCR Console Commands and Groups //
|
||||
// These console commands are meant for use by customer care reps. //
|
||||
// Eventually the functionality defined here will be accessed through a GUI//
|
||||
// //
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
// Only calls to the CCRMgr interface are allowed here
|
||||
// See me if you need to include any other files...
|
||||
//
|
||||
#include "pfConsoleCmd.h"
|
||||
#include "pfConsole.h"
|
||||
#include "../pfCCR/plCCRMgr.h"
|
||||
#include "../plNetClient/plNetClientMgr.h"
|
||||
|
||||
//// This is here so Microsoft VC won't decide to "optimize" this file out
|
||||
// YOU ALSO NEED TO CALL THIS FXN
|
||||
void pfConsoleCmdGroup::DummyCCR( void )
|
||||
{
|
||||
}
|
||||
|
||||
void PrintStringF(void pfun(const char *),const char * fmt, ...);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Please see pfConsoleCommands.cpp for detailed instructions on
|
||||
// how to add console commands.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
#define PF_SANITY_CHECK( cond, msg ) { if( !( cond ) ) { PrintString( msg ); return; } }
|
@ -752,7 +752,7 @@ public:
|
||||
|
||||
if(strncmp("SampleCmd",c->GetName(), 9) != 0)
|
||||
{
|
||||
fprintf(fFile, "<P><I>%s </I><BR>%s </P>\n",c->GetSignature(),
|
||||
fprintf(fFile, "<p><em>%s </em><br />%s </p>\n",c->GetSignature(),
|
||||
c->GetHelp());
|
||||
}
|
||||
}
|
||||
@ -760,10 +760,11 @@ public:
|
||||
{
|
||||
// if(g->GetFirstCommand() != nil)
|
||||
{
|
||||
fprintf(fFile, "<P><B><H%s>Command %sGroup %s </B></H2></P>\n",
|
||||
fprintf(fFile, "<p><strong><h%s>Command %sGroup %s </strong></h%s></p>\n",
|
||||
(depth > 0) ? "3" : "2",
|
||||
(depth > 0) ? "Sub" :"" ,
|
||||
g->GetName());
|
||||
g->GetName(),
|
||||
(depth > 0) ? "3" : "2");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -781,7 +782,7 @@ public:
|
||||
|
||||
if(strncmp("SampleCmd",c->GetName(), 9) != 0)
|
||||
{
|
||||
fprintf(fFile, "<I>%s.%s </I> - %s <BR>\n",fGrpName,c->GetSignature(),
|
||||
fprintf(fFile, "<em>%s.%s </em> - %s <br />\n",fGrpName,c->GetSignature(),
|
||||
c->GetHelp());
|
||||
}
|
||||
}
|
||||
@ -789,11 +790,14 @@ public:
|
||||
{
|
||||
// if(g->GetFirstCommand() != nil)
|
||||
{
|
||||
fprintf(fFile, "<BR>\n");
|
||||
fprintf(fFile, "<br />\n");
|
||||
if(depth <1)
|
||||
strcpy(fGrpName, g->GetName());
|
||||
else
|
||||
{
|
||||
pfConsoleCmdGroup *parentGrp;
|
||||
parentGrp = g->GetParent();
|
||||
strcpy(fGrpName, parentGrp->GetName());
|
||||
strcat(fGrpName,".");
|
||||
strcat(fGrpName,g->GetName());
|
||||
}
|
||||
@ -822,7 +826,7 @@ PF_CONSOLE_CMD( Console, CreateDocumentation, "string fileName",
|
||||
}
|
||||
|
||||
|
||||
fprintf(f, "<CENTER> <H2> Console Commands for Plasma 2.0 Client </H2> <I>Built %s on %s.</I></CENTER><BR>",
|
||||
fprintf(f, "<h2 style=\"text-align: center;\"> Console Commands for Plasma 2.0 Client </h2> <em style=\"display: block; text-align: center;\">Built %s on %s.</em><br />",
|
||||
pnBuildDates::fBuildTime, pnBuildDates::fBuildDate );
|
||||
|
||||
DocGenIterator iter(f);
|
||||
@ -852,7 +856,7 @@ PF_CONSOLE_CMD( Console, CreateBriefDocumentation, "string fileName",
|
||||
return;
|
||||
}
|
||||
|
||||
fprintf(f, "<CENTER> <H3> Console Commands for Plasma 2.0 Client </H3> <I>Built %s on %s.</I></CENTER><BR>",
|
||||
fprintf(f, "<h2 style=\"text-align: center;\"> Console Commands for Plasma 2.0 Client </h2> <em style=\"display: block; text-align: center;\">Built %s on %s.</em><br />",
|
||||
pnBuildDates::fBuildTime, pnBuildDates::fBuildDate );
|
||||
BriefDocGenIterator iter(f);
|
||||
group = pfConsoleCmdGroup::GetBaseGroup();
|
||||
@ -6997,38 +7001,6 @@ PF_CONSOLE_CMD( KI, // Group name
|
||||
|
||||
PF_CONSOLE_GROUP( Python ) // Defines a main command group
|
||||
|
||||
PF_CONSOLE_CMD( Python, // Group name
|
||||
RunFile, // Function name
|
||||
"string filename", // Params
|
||||
"Run the specified Python file program" ) // Help string
|
||||
{
|
||||
// now evaluate this mess they made
|
||||
PyObject* mymod = PythonInterface::FindModule("__main__");
|
||||
// make sure the filename doesn't have the .py extension (import doesn't need it)
|
||||
char importname[200];
|
||||
int i;
|
||||
for (i=0; i<199; i++ )
|
||||
{
|
||||
char ch = ((const char*)params[0])[i];
|
||||
// if we are at the end of the string or at a dot, truncate here
|
||||
if ( ch == '.' || ch == 0 )
|
||||
break;
|
||||
else
|
||||
importname[i] = ((const char*)params[0])[i];
|
||||
}
|
||||
importname[i] = 0;
|
||||
|
||||
// create the line to execute the file
|
||||
char runline[256];
|
||||
sprintf(runline,"import %s", importname);
|
||||
PythonInterface::RunString(runline,mymod);
|
||||
std::string output;
|
||||
// get the messages
|
||||
PythonInterface::getOutputAndReset(&output);
|
||||
PrintString(output.c_str());
|
||||
}
|
||||
|
||||
|
||||
#include "../pfPython/cyMisc.h"
|
||||
|
||||
PF_CONSOLE_CMD( Python, // Group name
|
||||
@ -7070,16 +7042,18 @@ PF_CONSOLE_CMD( Python,
|
||||
"string functions, ...", // Params
|
||||
"Run a cheat command" )
|
||||
{
|
||||
const char* extraParms = "";
|
||||
std::string extraParms;
|
||||
if (numParams > 1)
|
||||
extraParms = params[1];
|
||||
// now evaluate this mess they made
|
||||
PyObject* mymod = PythonInterface::FindModule("__main__");
|
||||
{
|
||||
extraParms = "(";
|
||||
extraParms.append(params[1]);
|
||||
extraParms.append(",)");
|
||||
}
|
||||
else
|
||||
extraParms = "()";
|
||||
|
||||
PythonInterface::RunFunctionSafe("xCheat", params[0], extraParms.c_str());
|
||||
|
||||
// create the line to execute the file
|
||||
char runline[256];
|
||||
sprintf(runline,"import xCheat;xCheat.%s('%s')", (const char*)params[0],extraParms);
|
||||
PythonInterface::RunString(runline,mymod);
|
||||
std::string output;
|
||||
// get the messages
|
||||
PythonInterface::getOutputAndReset(&output);
|
||||
|
Reference in New Issue
Block a user