~armagetronad-ap/armagetronad/php_server_framework

« back to all changes in this revision

Viewing changes to src/tools/setting.php

  • Committer: zodiacsohma1 at gmail
  • Date: 2013-11-01 11:36:35 UTC
  • Revision ID: zodiacsohma1@gmail.com-20131101113635-hrjzlu3l572r8e31
Updated outdated engine and game code.
Made adjustments so common.php will hold the settings to load from main.php.
base.php will remain as the container for the settings for each script setting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        {
54
54
            if (!is_null($setting) && $setting instanceof Setting)
55
55
            {
56
 
                if (strtolower($setting->name) == strtolower(trim($name)))
 
56
                if (Filter($setting->name) == Filter($name))
57
57
                    return true;
58
58
            }
59
59
        }
72
72
        {
73
73
            if (!is_null($setting) && $setting instanceof Setting)
74
74
            {
75
 
                if (strtolower($setting->name) == strtolower(trim($name)))
 
75
                if (Filter($setting->name) == Filter($name))
76
76
                    return $setting;
77
77
            }
78
78
        }
85
85
function parseAdminCommands(Player $player, $line, $pieces)
86
86
{
87
87
    global $BASE;
 
88
    $command = trim(@$pieces[5], false);
 
89
    $commandStr = "";
 
90
    for($i = 5; $i < count($pieces); $i++)
 
91
    {
 
92
        if (($i + 1) == count($pieces))
 
93
            $commandStr .= $pieces[$i];
 
94
        else
 
95
            $commandStr .= $pieces[$i]." ";
 
96
    }
88
97
    
89
 
    $command = trim(@$pieces[5]);
 
98
    pm($player, "0xff0000Script admin command 0xffffffby 0xffff7f".$player->log.": 0x7f7fff".$commandStr);
90
99
    if ($command !== "")
91
100
    {
92
101
        //  checking whether