- if (DelLine(hostmask, 'G', true))
- return false;
-
- GLine* item = new GLine(ServerInstance, ServerInstance->Time(), duration, source, reason, ih.first.c_str(), ih.second.c_str());
-
- active_lines.push_back(item);
- sort(active_lines.begin(), active_lines.end(),XLineManager::XSortComparison);
- pending_lines.push_back(item);
- lookup_lines['G'][hostmask] = item;
-
- return true;
-}
-
-// adds an e:line (exception to bans)
-
-bool XLineManager::AddELine(long duration, const char* source, const char* reason, const char* hostmask)
-{
- IdentHostPair ih = IdentSplit(hostmask);
-
- if (DelLine(hostmask, 'E', true))
- return false;
-
- ELine* item = new ELine(ServerInstance, ServerInstance->Time(), duration, source, reason, ih.first.c_str(), ih.second.c_str());
-
- active_lines.push_back(item);
- sort(active_lines.begin(), active_lines.end(),XLineManager::XSortComparison);
- lookup_lines['E'][hostmask] = item;
-
- // XXX we really only need to check one line (the new one) - this is a bit wasteful!
- CheckELines(ServerInstance, lookup_lines['E']);
-
- return true;
-}