* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- * E-mail:
- * <brain@chatspike.net>
- * <Craig@chatspike.net>
- *
- * Written by Craig Edwards, Craig McLure, and others.
+ * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
* This program is free but copyrighted software; see
* the file COPYING for details.
*
* ---------------------------------------------------
*/
-using namespace std;
-
-// Message and notice filtering using glob patterns
-// a module based on the original work done by Craig Edwards in 2003
-// for the chatspike network.
-
#include <stdio.h>
#include <string>
#include "users.h"
ModuleFilter(InspIRCd* Me)
: FilterBase::FilterBase(Me, "m_filter.so")
{
- OnRehash("");
+ OnRehash(NULL,"");
}
virtual ~ModuleFilter()
}
}
- virtual void OnRehash(const std::string ¶meter)
+ virtual void OnRehash(userrec* user, const std::string ¶meter)
{
ConfigReader* MyConf = new ConfigReader(ServerInstance);
}
DELETE(MyConf);
}
+
+ virtual int OnStats(char symbol, userrec* user, string_list &results)
+ {
+ if (symbol == 's')
+ {
+ std::string sn = ServerInstance->Config->ServerName;
+ for (filter_t::iterator n = filters.begin(); n != filters.end(); n++)
+ {
+ results.push_back(sn+" 223 "+user->nick+" :GLOB:"+n->second->freeform+" "+n->second->action+" "+ConvToStr(n->second->gline_time)+" :"+n->second->reason);
+ }
+ }
+ return 0;
+ }
};
// stuff down here is the module-factory stuff. For basic modules you can ignore this.