| 773 | } |
| 774 | |
| 775 | void CConsole::PrintCommandList(EAccessLevel MinAccessLevel, int ExcludeFlagMask) |
| 776 | { |
| 777 | char aBuf[240] = ""; |
| 778 | int Used = 0; |
| 779 | |
| 780 | for(CCommand *pCommand = m_pFirstCommand; pCommand; pCommand = pCommand->Next()) |
| 781 | { |
| 782 | if((pCommand->m_Flags & m_FlagMask) && |
| 783 | !(pCommand->m_Flags & ExcludeFlagMask) && |
| 784 | pCommand->GetAccessLevel() >= MinAccessLevel) |
| 785 | { |
| 786 | int Length = str_length(pCommand->m_pName); |
| 787 | if(Used + Length + 2 < (int)(sizeof(aBuf))) |
| 788 | { |
| 789 | if(Used > 0) |
| 790 | { |
| 791 | Used += 2; |
| 792 | str_append(aBuf, ", "); |
| 793 | } |
| 794 | str_append(aBuf, pCommand->m_pName); |
| 795 | Used += Length; |
| 796 | } |
| 797 | else |
| 798 | { |
| 799 | Print(OUTPUT_LEVEL_STANDARD, "chatresp", aBuf); |
| 800 | str_copy(aBuf, pCommand->m_pName); |
| 801 | Used = Length; |
| 802 | } |
| 803 | } |
| 804 | } |
| 805 | if(Used > 0) |
| 806 | Print(OUTPUT_LEVEL_STANDARD, "chatresp", aBuf); |
| 807 | } |
| 808 | |
| 809 | void CConsole::ConCommandStatus(IResult *pResult, void *pUser) |
| 810 | { |
no test coverage detected