summaryrefslogtreecommitdiff
path: root/src/modules/m_httpd_stats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_httpd_stats.cpp')
-rw-r--r--src/modules/m_httpd_stats.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp
index eda5b6f66..fb5499c2d 100644
--- a/src/modules/m_httpd_stats.cpp
+++ b/src/modules/m_httpd_stats.cpp
@@ -212,16 +212,13 @@ class ModuleHttpStats : public Module
void OnUserQuit(userrec* user, const std::string &message)
{
- for (std::vector<ucrec*>::const_iterator v = user->chans.begin(); v != user->chans.end(); v++)
+ for (UCListIter v = user->chans.begin(); v != user->chans.end(); v++)
{
- if (((ucrec*)(*v))->channel)
+ chanrec* c = v->first;
+ StatsIter a = sh->find(c->name);
+ if (a != sh->end())
{
- chanrec* c = ((ucrec*)(*v))->channel;
- StatsIter a = sh->find(c->name);
- if (a != sh->end())
- {
- a->second--;
- }
+ a->second--;
}
}
this->changed = true;