From c00cc7224252ff4aec0da56ab53d3da3b8b5f008 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Thu, 6 Sep 2012 23:41:44 +0700 Subject: [PATCH] Add details to network table in webadmin. Fix #222 --- modules/data/webadmin/tmpl/add_edit_user.tmpl | 6 ++++++ modules/webadmin.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/modules/data/webadmin/tmpl/add_edit_user.tmpl b/modules/data/webadmin/tmpl/add_edit_user.tmpl index d9588d0f..5fe9c988 100644 --- a/modules/data/webadmin/tmpl/add_edit_user.tmpl +++ b/modules/data/webadmin/tmpl/add_edit_user.tmpl @@ -131,6 +131,9 @@ [Add] Name + Clients + Current Server + IRC Nick <- Add a network (opens in same page) @@ -145,6 +148,9 @@ [Edit] [Del] + + + diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp index 52797ad3..3a47f593 100644 --- a/modules/webadmin.cpp +++ b/modules/webadmin.cpp @@ -1034,6 +1034,12 @@ public: 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();