mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
Patched using globalmods.patch by x-x
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@758 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+22
@@ -975,6 +975,28 @@ void CClient::UserCommand(const CString& sLine) {
|
||||
}
|
||||
} else if ((sCommand.CaseCmp("LISTMODS") == 0) || (sCommand.CaseCmp("LISTMODULES") == 0)) {
|
||||
#ifdef _MODULES
|
||||
if (m_pUser->IsAdmin()) {
|
||||
CModules& GModules = CZNC::Get().GetModules();
|
||||
if (!GModules.size()) {
|
||||
PutStatus("No global modules loaded.");
|
||||
} else {
|
||||
CTable GTable;
|
||||
GTable.AddColumn("Name");
|
||||
GTable.AddColumn("Description");
|
||||
|
||||
for (unsigned int b = 0; b < GModules.size(); b++) {
|
||||
GTable.AddRow();
|
||||
GTable.SetCell("Name", GModules[b]->GetModName());
|
||||
GTable.SetCell("Description", GModules[b]->GetDescription().Ellipsize(128));
|
||||
}
|
||||
|
||||
unsigned int uTableIdx = 0; CString sLine;
|
||||
while (GTable.GetLine(uTableIdx++, sLine)) {
|
||||
PutStatus(sLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pUser) {
|
||||
CModules& Modules = m_pUser->GetModules();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user