From 4ae08d527280778daf991a38af80956c2b84693b Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 31 Oct 2007 17:22:02 +0000 Subject: Fixified some more git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8428 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/configreader.cpp | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'src/configreader.cpp') diff --git a/src/configreader.cpp b/src/configreader.cpp index e0d66d525..96f461162 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -1924,7 +1924,10 @@ bool DoZLine(ServerConfig* conf, const char* tag, char** entries, ValueList &val const char* reason = values[0].GetString(); const char* ipmask = values[1].GetString(); - conf->GetInstance()->XLines->AddZLine(0,"",reason,ipmask); + ZLine* zl = new ZLine(conf->GetInstance(), conf->GetInstance()->Time(), 0, "", reason, ipmask); + if (!conf->GetInstance()->XLines->AddLine(zl)) + delete zl; + return true; } @@ -1933,7 +1936,10 @@ bool DoQLine(ServerConfig* conf, const char* tag, char** entries, ValueList &val const char* reason = values[0].GetString(); const char* nick = values[1].GetString(); - conf->GetInstance()->XLines->AddQLine(0,"",reason,nick); + QLine* ql = new QLine(conf->GetInstance(), conf->GetInstance()->Time(), 0, "", reason, nick); + if (!conf->GetInstance()->XLines->AddLine(ql)) + delete ql; + return true; } @@ -1942,7 +1948,13 @@ bool DoKLine(ServerConfig* conf, const char* tag, char** entries, ValueList &val const char* reason = values[0].GetString(); const char* host = values[1].GetString(); - conf->GetInstance()->XLines->AddKLine(0,"",reason,host); + XLineManager* xlm = conf->GetInstance()->XLines; + + IdentHostPair ih = xlm->IdentSplit(host); + + KLine* kl = new KLine(conf->GetInstance(), conf->GetInstance()->Time(), 0, "", reason, ih.first.c_str(), ih.second.c_str()); + if (!xlm->AddLine(kl)) + delete kl; return true; } @@ -1951,7 +1963,13 @@ bool DoELine(ServerConfig* conf, const char* tag, char** entries, ValueList &val const char* reason = values[0].GetString(); const char* host = values[1].GetString(); - conf->GetInstance()->XLines->AddELine(0,"",reason,host); + XLineManager* xlm = conf->GetInstance()->XLines; + + IdentHostPair ih = xlm->IdentSplit(host); + + ELine* el = new ELine(conf->GetInstance(), conf->GetInstance()->Time(), 0, "", reason, ih.first.c_str(), ih.second.c_str()); + if (!xlm->AddLine(el)) + delete el; return true; } -- cgit v1.2.3