Prevent error when command used in server console

To prevent an error occurrding when the "mod" command is used in the console, I prevented it from being used. This could be made better by writing an alternative PrintMessage method that instead of being an instance method, it would be a global that works in a way similar to the following;

    function ModPrint(ent, type, message)
        if (!IsValid(ent)) then
            print(message)
        else
            ent:PrintMessage(type, message)
    end