Permalink
Browse files

Add details to network table in webadmin.

Fix #222
  • Loading branch information...
1 parent 0ed9286 commit c00cc7224252ff4aec0da56ab53d3da3b8b5f008 @DarthGandalf DarthGandalf committed Sep 6, 2012
Showing with 12 additions and 0 deletions.
  1. +6 −0 modules/data/webadmin/tmpl/add_edit_user.tmpl
  2. +6 −0 modules/webadmin.cpp
@@ -131,6 +131,9 @@
<td>[<a href="addnetwork?user=<? VAR Username ESC=URL ?>">Add</a>]</td>
<? IF NetworkLoop ?>
<td>Name</td>
+ <td>Clients</td>
+ <td>Current Server</td>
+ <td>IRC Nick</td>
<? ELSE ?>
<td>&lt;- Add a network (opens in same page)</td>
<? ENDIF ?>
@@ -145,6 +148,9 @@
[<a href="editnetwork?user=<? VAR Username ESC=URL ?>&amp;network=<? VAR Name ESC=URL ?>">Edit</a>] [<a href="delnetwork?user=<? VAR Username ESC=URL ?>&amp;name=<? VAR Name ESC=URL ?>">Del</a>]
</td>
<td><? VAR Name ?></td>
+ <td><? VAR Clients ?></td>
+ <td><? VAR Server DEFAULT="-N/A-" ?></td>
+ <td><? VAR IRCNick ?></td>
</tr>
<? ENDLOOP ?>
</tbody>
View
@@ -1034,6 +1034,12 @@ class CWebAdminMod : public CModule {
CTemplate& l = Tmpl.AddRow("NetworkLoop");
l["Name"] = vNetworks[a]->GetName();
l["Username"] = pUser->GetUserName();
+ l["Clients"] = CString(vNetworks[a]->GetClients().size());
+ l["IRCNick"] = vNetworks[a]->GetIRCNick().GetNick();
+ CServer* pServer = vNetworks[a]->GetCurrentServer();
+ if (pServer) {
+ l["Server"] = pServer->GetName();
+ }
}
const MCString& msCTCPReplies = pUser->GetCTCPReplies();

0 comments on commit c00cc72

Please sign in to comment.