diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-28 13:48:28 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-28 13:48:28 +0000 |
commit | 19157777c5f977fddbcfdc8cdad78e12bf0d6bbb (patch) | |
tree | e3e860f214483978dbd01fa8526b3e1fdf4db053 /include/u_listmode.h | |
parent | de97b98a41109a517a8e677bf9b48400038f702d (diff) |
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
Diffstat (limited to 'include/u_listmode.h')
-rw-r--r-- | include/u_listmode.h | 9 |
1 files changed, 4 insertions, 5 deletions
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<std::string> 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); + } } } |