From 19157777c5f977fddbcfdc8cdad78e12bf0d6bbb Mon Sep 17 00:00:00 2001 From: w00t Date: Tue, 28 Aug 2007 13:48:28 +0000 Subject: Remove the last uses of localised fake clients. This removes a lot of allocations (and uses of UIDs), and cleans things up a bit git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7943 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/u_listmode.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/u_listmode.h b/include/u_listmode.h index 24fbc9a42..6b4fba889 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -186,22 +186,21 @@ class ListModeBase : public ModeHandler std::deque stackresult; const char* mode_junk[MAXMODES+2]; mode_junk[0] = channel->name; - userrec* n = new userrec(ServerInstance); - n->SetFd(FD_MAGIC_NUMBER); + for (modelist::iterator it = el->begin(); it != el->end(); it++) { modestack.Push(this->GetModeChar(), assign(it->mask)); } + while (modestack.GetStackedLine(stackresult)) { for (size_t j = 0; j < stackresult.size(); j++) { mode_junk[j+1] = stackresult[j].c_str(); } - ServerInstance->SendMode(mode_junk, stackresult.size() + 1, n); - } - delete n; + ServerInstance->SendMode(mode_junk, stackresult.size() + 1, ServerInstance->FakeClient); + } } } -- cgit v1.2.3