- // XXX we really only need to check one line (the new one) - this is a bit wasteful!
- // we should really create a temporary var here and pass that instead.
- // hmm, perhaps we can merge this with line "application" somehow.. and just force a recheck on DelELine?
- /*this->CheckELines(lookup_lines['E']);
- return true;*/
-}
-
-/*bool XLineManager::AddZLine(long duration, const char* source, const char* reason, const char* ipaddr)
-{
- if (strchr(ipaddr,'@'))
- {
- while (*ipaddr != '@')
- ipaddr++;
- ipaddr++;
- }*/
-
-// deletes a g:line, returns true if the line existed and was removed
-
-bool XLineManager::DelLine(const char* hostmask, char type, bool simulate)
-{
- IdentHostPair ih = IdentSplit(hostmask);
- for (std::vector<XLine*>::iterator i = active_lines.begin(); i != active_lines.end(); i++)
- {
- if ((*i)->type == type)
- {
- if ((*i)->MatchesLiteral(hostmask))
- {
- if (!simulate)
- {
- (*i)->Unset();
- delete *i;
- active_lines.erase(i);
- if (lookup_lines.find(type) != lookup_lines.end())
- lookup_lines[type].erase(hostmask);
- /* XXX: Should erase from pending lines here */
- }
- return true;
- }
- }
- }