- while(shuns.size() && shuns.begin()->length && ((shuns.begin()->set_on + shuns.begin()->length) <= Srv->Time()))
- {
- shunlist::iterator iter = shuns.begin();
-
- Srv->SNO->WriteToSnoMask('X', "*** %ld second shun on '%s' (%s) set by %s %ld seconds ago expired", iter->length, iter->banmask.c_str(), iter->reason.c_str(), iter->set_by.c_str(), Srv->Time() - iter->set_on);
- shuns.erase(iter);
- }
+ return matchtext.c_str();
+ }
+};
+
+/** An XLineFactory specialized to generate shun pointers
+ */
+class ShunFactory : public XLineFactory
+{
+ public:
+ ShunFactory(InspIRCd* Instance) : XLineFactory(Instance, "SHUN") { }
+
+ /** Generate a shun
+ */
+ XLine* Generate(time_t set_time, long duration, const char* source, const char* reason, const char* xline_specific_mask)
+ {
+ return new Shun(ServerInstance, set_time, duration, source, reason, xline_specific_mask);