summaryrefslogtreecommitdiff
path: root/src/xline.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-02-25 17:02:03 +0100
committerAttila Molnar <attilamolnar@hush.com>2016-02-25 17:02:03 +0100
commit304b6dbbf56710b1310fce8c5cf71b73334c060a (patch)
tree002d219057b5b4fda5c49595eada3eb7e1e8d525 /src/xline.cpp
parentdbe5a1fc6f9e18765863f332a3e79d7c918d3e65 (diff)
Introduce Stats::Context, pass it to the OnStats hook and switch all code to it
Diffstat (limited to 'src/xline.cpp')
-rw-r--r--src/xline.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xline.cpp b/src/xline.cpp
index 003d77e80..30a1d7c9c 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -447,7 +447,7 @@ void XLineManager::ApplyLines()
pending_lines.clear();
}
-void XLineManager::InvokeStats(const std::string &type, int numeric, User* user, string_list &results)
+void XLineManager::InvokeStats(const std::string& type, unsigned int numeric, Stats::Context& stats)
{
ContainerIter n = lookup_lines.find(type);
@@ -468,7 +468,7 @@ void XLineManager::InvokeStats(const std::string &type, int numeric, User* user,
ExpireLine(n, i);
}
else
- results.push_back(ConvToStr(numeric)+" "+user->nick+" :"+i->second->Displayable()+" "+
+ stats.AddRow(numeric, i->second->Displayable()+" "+
ConvToStr(i->second->set_time)+" "+ConvToStr(i->second->duration)+" "+i->second->source+" :"+i->second->reason);
i = safei;
}