From 305799b441f0550a3f378af87254007e4b01525c Mon Sep 17 00:00:00 2001 From: Arron Vinyard Date: Tue, 3 May 2022 21:45:45 -0400 Subject: [PATCH] NPOTB: Use camel casing for variables in adminhelp.sp (#1750) This is a stylistic change to ensure more adhered-to consistency throughout base plugins --- plugins/adminhelp.sp | 68 ++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/plugins/adminhelp.sp b/plugins/adminhelp.sp index 518c5a63..b1707dd7 100644 --- a/plugins/adminhelp.sp +++ b/plugins/adminhelp.sp @@ -63,44 +63,44 @@ public Action HelpCmd(int client, int args) return Plugin_Handled; } - char arg[64], CmdName[20]; - int PageNum = 1; - bool DoSearch; + char arg[64], cmdName[20]; + int pageNum = 1; + bool doSearch; - GetCmdArg(0, CmdName, sizeof(CmdName)); + GetCmdArg(0, cmdName, sizeof(cmdName)); if (args >= 1) { GetCmdArg(1, arg, sizeof(arg)); - StringToIntEx(arg, PageNum); - PageNum = (PageNum <= 0) ? 1 : PageNum; + StringToIntEx(arg, pageNum); + pageNum = (pageNum <= 0) ? 1 : pageNum; } - DoSearch = (strcmp("sm_help", CmdName) == 0) ? false : true; + doSearch = (strcmp("sm_help", cmdName) == 0) ? false : true; if (GetCmdReplySource() == SM_REPLY_TO_CHAT) { ReplyToCommand(client, "[SM] %t", "See console for output"); } - char Name[64]; - char Desc[255]; - char NoDesc[128]; - CommandIterator CmdIter = new CommandIterator(); + char name[64]; + char desc[255]; + char noDesc[128]; + CommandIterator cmdIter = new CommandIterator(); - FormatEx(NoDesc, sizeof(NoDesc), "%T", "No description available", client); + FormatEx(noDesc, sizeof(noDesc), "%T", "No description available", client); - if (DoSearch) + if (doSearch) { int i = 1; - while (CmdIter.Next()) + while (cmdIter.Next()) { - CmdIter.GetName(Name, sizeof(Name)); - CmdIter.GetDescription(Desc, sizeof(Desc)); + cmdIter.GetName(name, sizeof(name)); + cmdIter.GetDescription(desc, sizeof(desc)); - if ((StrContains(Name, arg, false) != -1) && CheckCommandAccess(client, Name, CmdIter.Flags)) + if ((StrContains(name, arg, false) != -1) && CheckCommandAccess(client, name, cmdIter.Flags)) { - PrintToConsole(client, "[%03d] %s - %s", i++, Name, (Desc[0] == '\0') ? NoDesc : Desc); + PrintToConsole(client, "[%03d] %s - %s", i++, name, (desc[0] == '\0') ? noDesc : desc); } } @@ -112,15 +112,15 @@ public Action HelpCmd(int client, int args) PrintToConsole(client, "%t", "SM help commands"); /* Skip the first N commands if we need to */ - if (PageNum > 1) + if (pageNum > 1) { int i; - int EndCmd = (PageNum-1) * COMMANDS_PER_PAGE - 1; - for (i=0; CmdIter.Next() && i