diff --git a/plugins/adminhelp.sp b/plugins/adminhelp.sp index ebd6a0d6..518c5a63 100644 --- a/plugins/adminhelp.sp +++ b/plugins/adminhelp.sp @@ -86,17 +86,19 @@ public Action HelpCmd(int client, int args) char Name[64]; char Desc[255]; char NoDesc[128]; - int Flags; - Handle CmdIter = GetCommandIterator(); + CommandIterator CmdIter = new CommandIterator(); FormatEx(NoDesc, sizeof(NoDesc), "%T", "No description available", client); if (DoSearch) { int i = 1; - while (ReadCommandIterator(CmdIter, Name, sizeof(Name), Flags, Desc, sizeof(Desc))) + while (CmdIter.Next()) { - if ((StrContains(Name, arg, false) != -1) && CheckCommandAccess(client, Name, Flags)) + CmdIter.GetName(Name, sizeof(Name)); + CmdIter.GetDescription(Desc, sizeof(Desc)); + + if ((StrContains(Name, arg, false) != -1) && CheckCommandAccess(client, Name, CmdIter.Flags)) { PrintToConsole(client, "[%03d] %s - %s", i++, Name, (Desc[0] == '\0') ? NoDesc : Desc); } @@ -114,9 +116,11 @@ public Action HelpCmd(int client, int args) { int i; int EndCmd = (PageNum-1) * COMMANDS_PER_PAGE - 1; - for (i=0; ReadCommandIterator(CmdIter, Name, sizeof(Name), Flags, Desc, sizeof(Desc)) && i