Update plugins for new syntax.

This commit is contained in:
David Anderson 2014-11-30 18:57:38 -08:00
parent 157549e119
commit cb4fdf1aa9
11 changed files with 16 additions and 16 deletions

View File

@ -197,7 +197,7 @@ static InitializeGroupParser()
{ {
if (!g_hGroupParser) if (!g_hGroupParser)
{ {
g_hGroupParser = SMCParser(); g_hGroupParser = new SMCParser();
g_hGroupParser.OnEnterSection = ReadGroups_NewSection; g_hGroupParser.OnEnterSection = ReadGroups_NewSection;
g_hGroupParser.OnKeyValue = ReadGroups_KeyValue; g_hGroupParser.OnKeyValue = ReadGroups_KeyValue;
g_hGroupParser.OnLeaveSection = ReadGroups_EndSection; g_hGroupParser.OnLeaveSection = ReadGroups_EndSection;

View File

@ -165,7 +165,7 @@ static InitializeOverrideParsers()
{ {
if (!g_hOldOverrideParser) if (!g_hOldOverrideParser)
{ {
g_hOldOverrideParser = SMCParser(); g_hOldOverrideParser = new SMCParser();
g_hOldOverrideParser.OnEnterSection = ReadOldOverrides_NewSection; g_hOldOverrideParser.OnEnterSection = ReadOldOverrides_NewSection;
g_hOldOverrideParser.OnKeyValue = ReadOverrides_KeyValue; g_hOldOverrideParser.OnKeyValue = ReadOverrides_KeyValue;
g_hOldOverrideParser.OnLeaveSection = ReadOldOverrides_EndSection; g_hOldOverrideParser.OnLeaveSection = ReadOldOverrides_EndSection;
@ -173,7 +173,7 @@ static InitializeOverrideParsers()
} }
if (!g_hNewOverrideParser) if (!g_hNewOverrideParser)
{ {
g_hNewOverrideParser = SMCParser(); g_hNewOverrideParser = new SMCParser();
g_hNewOverrideParser.OnEnterSection = ReadNewOverrides_NewSection; g_hNewOverrideParser.OnEnterSection = ReadNewOverrides_NewSection;
g_hNewOverrideParser.OnKeyValue = ReadOverrides_KeyValue; g_hNewOverrideParser.OnKeyValue = ReadOverrides_KeyValue;
g_hNewOverrideParser.OnLeaveSection = ReadNewOverrides_EndSection; g_hNewOverrideParser.OnLeaveSection = ReadNewOverrides_EndSection;

View File

@ -212,7 +212,7 @@ static InitializeUserParser()
{ {
if (!g_hUserParser) if (!g_hUserParser)
{ {
g_hUserParser = SMCParser(); g_hUserParser = new SMCParser();
g_hUserParser.OnEnterSection = ReadUsers_NewSection; g_hUserParser.OnEnterSection = ReadUsers_NewSection;
g_hUserParser.OnKeyValue = ReadUsers_KeyValue; g_hUserParser.OnKeyValue = ReadUsers_KeyValue;
g_hUserParser.OnLeaveSection = ReadUsers_EndSection; g_hUserParser.OnLeaveSection = ReadUsers_EndSection;

View File

@ -100,7 +100,7 @@ public OnMapStart()
public OnAllPluginsLoaded() public OnAllPluginsLoaded()
{ {
hAdminMenu = TopMenu(DefaultCategoryHandler); hAdminMenu = new TopMenu(DefaultCategoryHandler);
obj_playercmds = hAdminMenu.AddCategory("PlayerCommands", DefaultCategoryHandler); obj_playercmds = hAdminMenu.AddCategory("PlayerCommands", DefaultCategoryHandler);
obj_servercmds = hAdminMenu.AddCategory("ServerCommands", DefaultCategoryHandler); obj_servercmds = hAdminMenu.AddCategory("ServerCommands", DefaultCategoryHandler);

View File

@ -79,7 +79,7 @@ BuildDynamicMenu()
char executeBuffer[32]; char executeBuffer[32];
KeyValues kvMenu = KeyValues("Commands"); KeyValues kvMenu = new KeyValues("Commands");
kvMenu.SetEscapeSequences(true); kvMenu.SetEscapeSequences(true);
char file[256]; char file[256];
@ -325,7 +325,7 @@ BuildDynamicMenu()
ParseConfigs() ParseConfigs()
{ {
if (!g_configParser) if (!g_configParser)
g_configParser = SMCParser(); g_configParser = new SMCParser();
g_configParser.OnEnterSection = NewSection; g_configParser.OnEnterSection = NewSection;
g_configParser.OnKeyValue = KeyValue; g_configParser.OnKeyValue = KeyValue;

View File

@ -99,7 +99,7 @@ LoadBanReasons()
{ {
delete g_hKvBanReasons; delete g_hKvBanReasons;
g_hKvBanReasons = KeyValues("banreasons"); g_hKvBanReasons = new KeyValues("banreasons");
if (g_hKvBanReasons.ImportFromFile(g_BanReasonsPath)) if (g_hKvBanReasons.ImportFromFile(g_BanReasonsPath))
{ {

View File

@ -368,7 +368,7 @@ SendDialogToOne(client, color, const String:text[], any:...)
new String:message[100]; new String:message[100];
VFormat(message, sizeof(message), text, 4); VFormat(message, sizeof(message), text, 4);
KeyValues kv = KeyValues("Stuff", "title", message); KeyValues kv = new KeyValues("Stuff", "title", message);
kv.SetColor("color", g_Colors[color][0], g_Colors[color][1], g_Colors[color][2], 255); kv.SetColor("color", g_Colors[color][0], g_Colors[color][1], g_Colors[color][2], 255);
kv.SetNum("level", 1); kv.SetNum("level", 1);
kv.SetNum("time", 10); kv.SetNum("time", 10);

View File

@ -110,7 +110,7 @@ SMCParser config_parser;
ParseConfigs() ParseConfigs()
{ {
if (!config_parser) if (!config_parser)
config_parser = SMCParser(); config_parser = new SMCParser();
config_parser.OnEnterSection = NewSection; config_parser.OnEnterSection = NewSection;
config_parser.OnLeaveSection = EndSection; config_parser.OnLeaveSection = EndSection;

View File

@ -571,7 +571,7 @@ stock ShowMOTDPanel(client, const String:title[], const String:msg[], type=MOTDP
char num[3]; char num[3];
IntToString(type, num, sizeof(num)); IntToString(type, num, sizeof(num));
KeyValues kv = KeyValues("data"); KeyValues kv = new KeyValues("data");
kv.SetString("title", title); kv.SetString("title", title);
kv.SetString("type", num); kv.SetString("type", num);
kv.SetString("msg", msg); kv.SetString("msg", msg);
@ -593,7 +593,7 @@ stock DisplayAskConnectBox(client, Float:time, const String:ip[], const String:p
char destination[288]; char destination[288];
FormatEx(destination, sizeof(destination), "%s/%s", ip, password); FormatEx(destination, sizeof(destination), "%s/%s", ip, password);
KeyValues kv = KeyValues("data"); KeyValues kv = new KeyValues("data");
kv.SetFloat("time", time); kv.SetFloat("time", time);
kv.SetString("title", destination); kv.SetString("title", destination);
CreateDialog(client, kv, DialogType_AskConnect); CreateDialog(client, kv, DialogType_AskConnect);

View File

@ -76,7 +76,7 @@ public void OnPluginStart()
RegAdminCmd("sm_nominate_addmap", Command_Addmap, ADMFLAG_CHANGEMAP, "sm_nominate_addmap <mapname> - Forces a map to be on the next mapvote."); RegAdminCmd("sm_nominate_addmap", Command_Addmap, ADMFLAG_CHANGEMAP, "sm_nominate_addmap <mapname> - Forces a map to be on the next mapvote.");
g_mapTrie = StringMap(); g_mapTrie = new StringMap();
} }
public void OnConfigsExecuted() public void OnConfigsExecuted()
@ -255,7 +255,7 @@ void BuildMapMenu()
g_mapTrie.Clear(); g_mapTrie.Clear();
g_MapMenu = Menu(Handler_MapSelectMenu, MENU_ACTIONS_DEFAULT|MenuAction_DrawItem|MenuAction_DisplayItem); g_MapMenu = new Menu(Handler_MapSelectMenu, MENU_ACTIONS_DEFAULT|MenuAction_DrawItem|MenuAction_DisplayItem);
char map[64]; char map[64];
@ -264,7 +264,7 @@ void BuildMapMenu()
if (g_Cvar_ExcludeOld.BoolValue) if (g_Cvar_ExcludeOld.BoolValue)
{ {
excludeMaps = ArrayList(ByteCountToCells(33)); excludeMaps = new ArrayList(ByteCountToCells(33));
GetExcludeMapList(excludeMaps); GetExcludeMapList(excludeMaps);
} }

View File

@ -17,7 +17,7 @@ public OnPluginStart()
public Action:RunTests(argc) public Action:RunTests(argc)
{ {
StringMap map = StringMap(); StringMap map = new StringMap();
for (new i = 0; i < 64; i++) { for (new i = 0; i < 64; i++) {
char buffer[24]; char buffer[24];