summaryrefslogtreecommitdiff
path: root/src/modes/cmode_h.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes/cmode_h.cpp')
-rw-r--r--src/modes/cmode_h.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modes/cmode_h.cpp b/src/modes/cmode_h.cpp
index ecee93388..831ec809c 100644
--- a/src/modes/cmode_h.cpp
+++ b/src/modes/cmode_h.cpp
@@ -50,21 +50,20 @@ void ModeChannelHalfOp::RemoveMode(chanrec* channel)
CUList* list = channel->GetHalfoppedUsers();
CUList copy;
char moderemove[MAXBUF];
- userrec* n = new userrec(ServerInstance);
- n->SetFd(FD_MAGIC_NUMBER);
for (CUList::iterator i = list->begin(); i != list->end(); i++)
{
userrec* n = i->first;
copy.insert(std::make_pair(n,n->nick));
}
+
for (CUList::iterator i = copy.begin(); i != copy.end(); i++)
{
sprintf(moderemove,"-%c",this->GetModeChar());
const char* parameters[] = { channel->name, moderemove, i->first->nick };
- ServerInstance->SendMode(parameters, 3, n);
+ ServerInstance->SendMode(parameters, 3, ServerInstance->FakeClient);
}
- delete n;
+
}
void ModeChannelHalfOp::RemoveMode(userrec* user)