Add "Loaded" flag to the network page.

This commit is contained in:
Vasily Fomin
2014-05-29 17:37:25 +02:00
parent 4bdaa3cc22
commit 78f7897dfc
2 changed files with 19 additions and 1 deletions
@@ -162,6 +162,8 @@
<td>Name</td>
<td>Arguments</td>
<td>Description</td>
<td>Loaded globally</td>
<td>Loaded by user</td>
</tr>
</thead>
<tbody>
@@ -181,6 +183,16 @@
<? ENDIF ?>
</td>
<td class="mod_descr"><? VAR Description ?></td>
<td align="center">
<? IF LoadedGlobally ?>
<input type="checkbox" name="loaded_globally" id="loaded_globally_<? VAR Name ?>" checked="checked" disabled="disabled"/>
<? ENDIF ?>
</td>
<td align="center">
<? IF LoadedByUser ?>
<input type="checkbox" name="loaded_by_user" id="loaded_by_user_<? VAR Name ?>" checked="checked" disabled="disabled"/>
<? ENDIF ?>
</td>
</tr>
<? ENDLOOP ?>
+7 -1
View File
@@ -749,9 +749,15 @@ public:
if (pModule) {
l["Checked"] = "true";
l["Args"] = pModule->GetArgs();
}
}
}
// Check if module is loaded globally
l["LoadedGlobally"] = CString(CZNC::Get().GetModules().FindModule(Info.GetName()) != NULL);
// Check if module is loaded by user
l["LoadedByUser"] = CString(pUser->GetModules().FindModule(Info.GetName()) != NULL);
if (!spSession->IsAdmin() && pUser->DenyLoadMod()) {
l["Disabled"] = "true";
}