core/smn_console.cpp
changeset 2800 74c32429908e
parent 2684 a802f5cebe28
child 2806 686c283b08fc
     1.1 --- a/core/smn_console.cpp	Wed Sep 16 13:38:04 2009 +1200
     1.2 +++ b/core/smn_console.cpp	Wed Sep 16 22:37:20 2009 -0700
     1.3 @@ -665,6 +665,12 @@
     1.4  	IPluginFunction *pFunction;
     1.5  
     1.6  	pContext->LocalToString(params[1], &name);
     1.7 +
     1.8 +	if (strcasecmp(name, "sm") == 0)
     1.9 +	{
    1.10 +		return pContext->ThrowNativeError("Cannot override \"sm\" command");
    1.11 +	}
    1.12 +
    1.13  	pContext->LocalToString(params[3], &help);
    1.14  	pFunction = pContext->GetFunctionById(params[2]);
    1.15  
    1.16 @@ -687,6 +693,12 @@
    1.17  	IPluginFunction *pFunction;
    1.18  
    1.19  	pContext->LocalToString(params[1], &name);
    1.20 +
    1.21 +	if (strcasecmp(name, "sm") == 0)
    1.22 +	{
    1.23 +		return pContext->ThrowNativeError("Cannot override \"sm\" command");
    1.24 +	}
    1.25 +
    1.26  	pContext->LocalToString(params[3], &help);
    1.27  	pFunction = pContext->GetFunctionById(params[2]);
    1.28  
    1.29 @@ -712,6 +724,12 @@
    1.30  	int cmdflags = params[6];
    1.31  
    1.32  	pContext->LocalToString(params[1], &name);
    1.33 +
    1.34 +	if (strcasecmp(name, "sm") == 0)
    1.35 +	{
    1.36 +		return pContext->ThrowNativeError("Cannot override \"sm\" command");
    1.37 +	}
    1.38 +
    1.39  	pContext->LocalToString(params[4], &help);
    1.40  	pContext->LocalToString(params[5], (char **)&group);
    1.41  	pFunction = pContext->GetFunctionById(params[2]);