summaryrefslogtreecommitdiff
path: root/src/cull_list.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-15 16:06:35 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-15 16:06:35 +0000
commitf059ceea21e2d8e421080e8a9f7dce7dbaa69da8 (patch)
tree8f2d6888ddb65be151c6114296a1e13f4b0ab842 /src/cull_list.cpp
parent2cd906702d67862591d5ba57a3da16ec22177b1d (diff)
CullList -> CullItem *
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8712 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cull_list.cpp')
-rw-r--r--src/cull_list.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cull_list.cpp b/src/cull_list.cpp
index 66fd9f2d9..12bd34003 100644
--- a/src/cull_list.cpp
+++ b/src/cull_list.cpp
@@ -85,7 +85,7 @@ void CullList::AddItem(User* user, const char* reason, const char* o_reason)
{
if (exempt.find(user) == exempt.end())
{
- CullItem item(user, reason, o_reason);
+ CullItem *item = new CullItem(user, reason, o_reason);
list.push_back(item);
exempt[user] = user;
}
@@ -93,11 +93,11 @@ void CullList::AddItem(User* user, const char* reason, const char* o_reason)
void CullList::MakeSilent(User* user)
{
- for (std::vector<CullItem>::iterator a = list.begin(); a != list.end(); ++a)
+ for (std::vector<CullItem *>::iterator a = list.begin(); a != list.end(); ++a)
{
- if (a->GetUser() == user)
+ if ((*a)->GetUser() == user)
{
- a->MakeSilent();
+ (*a)->MakeSilent();
break;
}
}
@@ -111,14 +111,14 @@ int CullList::Apply()
while (list.size() && i++ != 100)
{
- std::vector<CullItem>::iterator a = list.begin();
+ std::vector<CullItem *>::iterator a = list.begin();
- User *u = a->GetUser();
+ User *u = (*a)->GetUser();
user_hash::iterator iter = ServerInstance->clientlist->find(u->nick);
std::map<User*, User*>::iterator exemptiter = exempt.find(u);
const char* preset_reason = u->GetOperQuit();
- std::string reason = a->GetReason();
- std::string oper_reason = *preset_reason ? preset_reason : a->GetOperReason();
+ std::string reason = (*a)->GetReason();
+ std::string oper_reason = *preset_reason ? preset_reason : (*a)->GetOperReason();
if (reason.length() > MAXQUIT - 1)
reason.resize(MAXQUIT - 1);
@@ -170,14 +170,14 @@ int CullList::Apply()
{
if (IS_LOCAL(u))
{
- if (!a->IsSilent())
+ if (!(*a)->IsSilent())
{
ServerInstance->SNO->WriteToSnoMask('q',"Client exiting: %s!%s@%s [%s]",u->nick,u->ident,u->host,oper_reason.c_str());
}
}
else
{
- if ((!ServerInstance->SilentULine(u->server)) && (!a->IsSilent()))
+ if ((!ServerInstance->SilentULine(u->server)) && (!(*a)->IsSilent()))
{
ServerInstance->SNO->WriteToSnoMask('Q',"Client exiting on server %s: %s!%s@%s [%s]",u->server,u->nick,u->ident,u->host,oper_reason.c_str());
}