+bool ELine::Matches(const std::string &str)
+{
+ return ((match(str.c_str(), matchtext.c_str(), true)));
+}
+
+bool KLine::Matches(const std::string &str)
+{
+ return ((match(str.c_str(), matchtext.c_str(), true)));
+}
+
+bool GLine::Matches(const std::string &str)
+{
+ return ((match(str.c_str(), matchtext.c_str(), true)));
+}
+
+void ELine::OnAdd()
+{
+ /* When adding one eline, only check the one eline */
+ for (std::vector<User*>::const_iterator u2 = ServerInstance->Users->local_users.begin(); u2 != ServerInstance->Users->local_users.end(); u2++)
+ {
+ User* u = (User*)(*u2);
+ if (this->Matches(u))
+ u->exempt = true;
+ }
+}
+
+void ELine::DisplayExpiry()
+{
+ ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed E-Line %s@%s (set by %s %d seconds ago)",this->identmask,this->hostmask,this->source,this->duration);
+}
+
+void QLine::DisplayExpiry()
+{
+ ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed Q-Line %s (set by %s %d seconds ago)",this->nick,this->source,this->duration);
+}
+
+void ZLine::DisplayExpiry()
+{
+ ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed Z-Line %s (set by %s %d seconds ago)",this->ipaddr,this->source,this->duration);
+}
+
+void KLine::DisplayExpiry()
+{
+ ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed K-Line %s@%s (set by %s %d seconds ago)",this->identmask,this->hostmask,this->source,this->duration);
+}
+
+void GLine::DisplayExpiry()
+{
+ ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed G-Line %s@%s (set by %s %d seconds ago)",this->identmask,this->hostmask,this->source,this->duration);
+}
+
+const char* ELine::Displayable()
+{
+ return matchtext.c_str();
+}
+
+const char* KLine::Displayable()
+{
+ return matchtext.c_str();
+}
+
+const char* GLine::Displayable()
+{
+ return matchtext.c_str();
+}
+
+const char* ZLine::Displayable()
+{
+ return ipaddr;
+}
+
+const char* QLine::Displayable()
+{
+ return nick;
+}
+
+bool KLine::IsBurstable()
+{
+ return false;
+}
+
+bool XLineManager::RegisterFactory(XLineFactory* xlf)
+{
+ XLineFactMap::iterator n = line_factory.find(xlf->GetType());
+
+ if (n != line_factory.end())
+ return false;
+
+ line_factory[xlf->GetType()] = xlf;
+
+ return true;
+}
+
+bool XLineManager::UnregisterFactory(XLineFactory* xlf)
+{
+ XLineFactMap::iterator n = line_factory.find(xlf->GetType());
+
+ if (n == line_factory.end())
+ return false;
+
+ line_factory.erase(n);
+
+ return true;
+}
+
+XLineFactory* XLineManager::GetFactory(const std::string &type)
+{
+ XLineFactMap::iterator n = line_factory.find(type);
+
+ if (n == line_factory.end())
+ return NULL;
+
+ return n->second;
+}
+