From cb4fdf1aa93ae4b96f88be1ab93ec4d1453d2cf3 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 30 Nov 2014 18:57:38 -0800 Subject: [PATCH] Update plugins for new syntax. --- plugins/admin-flatfile/admin-groups.sp | 2 +- plugins/admin-flatfile/admin-overrides.sp | 4 ++-- plugins/admin-flatfile/admin-users.sp | 2 +- plugins/adminmenu.sp | 2 +- plugins/adminmenu/dynamicmenu.sp | 4 ++-- plugins/basebans.sp | 2 +- plugins/basechat.sp | 2 +- plugins/basecommands/execcfg.sp | 2 +- plugins/include/halflife.inc | 4 ++-- plugins/nominations.sp | 6 +++--- plugins/testsuite/tries.sp | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/plugins/admin-flatfile/admin-groups.sp b/plugins/admin-flatfile/admin-groups.sp index 4e5f1ee6..95277578 100644 --- a/plugins/admin-flatfile/admin-groups.sp +++ b/plugins/admin-flatfile/admin-groups.sp @@ -197,7 +197,7 @@ static InitializeGroupParser() { if (!g_hGroupParser) { - g_hGroupParser = SMCParser(); + g_hGroupParser = new SMCParser(); g_hGroupParser.OnEnterSection = ReadGroups_NewSection; g_hGroupParser.OnKeyValue = ReadGroups_KeyValue; g_hGroupParser.OnLeaveSection = ReadGroups_EndSection; diff --git a/plugins/admin-flatfile/admin-overrides.sp b/plugins/admin-flatfile/admin-overrides.sp index b02ad058..000f1008 100644 --- a/plugins/admin-flatfile/admin-overrides.sp +++ b/plugins/admin-flatfile/admin-overrides.sp @@ -165,7 +165,7 @@ static InitializeOverrideParsers() { if (!g_hOldOverrideParser) { - g_hOldOverrideParser = SMCParser(); + g_hOldOverrideParser = new SMCParser(); g_hOldOverrideParser.OnEnterSection = ReadOldOverrides_NewSection; g_hOldOverrideParser.OnKeyValue = ReadOverrides_KeyValue; g_hOldOverrideParser.OnLeaveSection = ReadOldOverrides_EndSection; @@ -173,7 +173,7 @@ static InitializeOverrideParsers() } if (!g_hNewOverrideParser) { - g_hNewOverrideParser = SMCParser(); + g_hNewOverrideParser = new SMCParser(); g_hNewOverrideParser.OnEnterSection = ReadNewOverrides_NewSection; g_hNewOverrideParser.OnKeyValue = ReadOverrides_KeyValue; g_hNewOverrideParser.OnLeaveSection = ReadNewOverrides_EndSection; diff --git a/plugins/admin-flatfile/admin-users.sp b/plugins/admin-flatfile/admin-users.sp index a47f2eb7..bd802198 100644 --- a/plugins/admin-flatfile/admin-users.sp +++ b/plugins/admin-flatfile/admin-users.sp @@ -212,7 +212,7 @@ static InitializeUserParser() { if (!g_hUserParser) { - g_hUserParser = SMCParser(); + g_hUserParser = new SMCParser(); g_hUserParser.OnEnterSection = ReadUsers_NewSection; g_hUserParser.OnKeyValue = ReadUsers_KeyValue; g_hUserParser.OnLeaveSection = ReadUsers_EndSection; diff --git a/plugins/adminmenu.sp b/plugins/adminmenu.sp index beb79b25..0d4212e6 100644 --- a/plugins/adminmenu.sp +++ b/plugins/adminmenu.sp @@ -100,7 +100,7 @@ public OnMapStart() public OnAllPluginsLoaded() { - hAdminMenu = TopMenu(DefaultCategoryHandler); + hAdminMenu = new TopMenu(DefaultCategoryHandler); obj_playercmds = hAdminMenu.AddCategory("PlayerCommands", DefaultCategoryHandler); obj_servercmds = hAdminMenu.AddCategory("ServerCommands", DefaultCategoryHandler); diff --git a/plugins/adminmenu/dynamicmenu.sp b/plugins/adminmenu/dynamicmenu.sp index 6f1de956..f1178b8c 100644 --- a/plugins/adminmenu/dynamicmenu.sp +++ b/plugins/adminmenu/dynamicmenu.sp @@ -79,7 +79,7 @@ BuildDynamicMenu() char executeBuffer[32]; - KeyValues kvMenu = KeyValues("Commands"); + KeyValues kvMenu = new KeyValues("Commands"); kvMenu.SetEscapeSequences(true); char file[256]; @@ -325,7 +325,7 @@ BuildDynamicMenu() ParseConfigs() { if (!g_configParser) - g_configParser = SMCParser(); + g_configParser = new SMCParser(); g_configParser.OnEnterSection = NewSection; g_configParser.OnKeyValue = KeyValue; diff --git a/plugins/basebans.sp b/plugins/basebans.sp index 38d354d4..0ecb2bd0 100644 --- a/plugins/basebans.sp +++ b/plugins/basebans.sp @@ -99,7 +99,7 @@ LoadBanReasons() { delete g_hKvBanReasons; - g_hKvBanReasons = KeyValues("banreasons"); + g_hKvBanReasons = new KeyValues("banreasons"); if (g_hKvBanReasons.ImportFromFile(g_BanReasonsPath)) { diff --git a/plugins/basechat.sp b/plugins/basechat.sp index cb9aa1bf..b05cc613 100644 --- a/plugins/basechat.sp +++ b/plugins/basechat.sp @@ -368,7 +368,7 @@ SendDialogToOne(client, color, const String:text[], any:...) new String:message[100]; 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.SetNum("level", 1); kv.SetNum("time", 10); diff --git a/plugins/basecommands/execcfg.sp b/plugins/basecommands/execcfg.sp index afec934a..a1bcbee7 100644 --- a/plugins/basecommands/execcfg.sp +++ b/plugins/basecommands/execcfg.sp @@ -110,7 +110,7 @@ SMCParser config_parser; ParseConfigs() { if (!config_parser) - config_parser = SMCParser(); + config_parser = new SMCParser(); config_parser.OnEnterSection = NewSection; config_parser.OnLeaveSection = EndSection; diff --git a/plugins/include/halflife.inc b/plugins/include/halflife.inc index 6df545df..22cc9d30 100644 --- a/plugins/include/halflife.inc +++ b/plugins/include/halflife.inc @@ -571,7 +571,7 @@ stock ShowMOTDPanel(client, const String:title[], const String:msg[], type=MOTDP char num[3]; IntToString(type, num, sizeof(num)); - KeyValues kv = KeyValues("data"); + KeyValues kv = new KeyValues("data"); kv.SetString("title", title); kv.SetString("type", num); kv.SetString("msg", msg); @@ -593,7 +593,7 @@ stock DisplayAskConnectBox(client, Float:time, const String:ip[], const String:p char destination[288]; FormatEx(destination, sizeof(destination), "%s/%s", ip, password); - KeyValues kv = KeyValues("data"); + KeyValues kv = new KeyValues("data"); kv.SetFloat("time", time); kv.SetString("title", destination); CreateDialog(client, kv, DialogType_AskConnect); diff --git a/plugins/nominations.sp b/plugins/nominations.sp index 8384a251..0790fe22 100644 --- a/plugins/nominations.sp +++ b/plugins/nominations.sp @@ -76,7 +76,7 @@ public void OnPluginStart() RegAdminCmd("sm_nominate_addmap", Command_Addmap, ADMFLAG_CHANGEMAP, "sm_nominate_addmap - Forces a map to be on the next mapvote."); - g_mapTrie = StringMap(); + g_mapTrie = new StringMap(); } public void OnConfigsExecuted() @@ -255,7 +255,7 @@ void BuildMapMenu() 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]; @@ -264,7 +264,7 @@ void BuildMapMenu() if (g_Cvar_ExcludeOld.BoolValue) { - excludeMaps = ArrayList(ByteCountToCells(33)); + excludeMaps = new ArrayList(ByteCountToCells(33)); GetExcludeMapList(excludeMaps); } diff --git a/plugins/testsuite/tries.sp b/plugins/testsuite/tries.sp index c4173230..05a914f0 100644 --- a/plugins/testsuite/tries.sp +++ b/plugins/testsuite/tries.sp @@ -17,7 +17,7 @@ public OnPluginStart() public Action:RunTests(argc) { - StringMap map = StringMap(); + StringMap map = new StringMap(); for (new i = 0; i < 64; i++) { char buffer[24];