#include "inspircd.h"
-/* $ModDesc: A module overriding /list, and making it safe - stop those sendq problems. */
+/* $ModDesc: Disallows /LIST for recently connected clients to hinder spam bots */
class ModuleSecureList : public Module
{
std::vector<std::string> allowlist;
time_t WaitTime;
public:
- ModuleSecureList() {
+ void init()
+ {
OnRehash(NULL);
Implementation eventlist[] = { I_OnRehash, I_OnPreCommand, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleSecureList()
virtual Version GetVersion()
{
- return Version("A module overriding /list, and making it safe - stop those sendq problems.",VF_VENDOR);
+ return Version("Disallows /LIST for recently connected clients to hinder spam bots", VF_VENDOR);
}
void OnRehash(User* user)
/* Not exempt, BOOK EM DANNO! */
user->WriteServ("NOTICE %s :*** You cannot list within the first %lu seconds of connecting. Please try again later.",user->nick.c_str(), (unsigned long) WaitTime);
- /* Some crap clients (read: mIRC, various java chat applets) muck up if they don't
+ /* Some clients (e.g. mIRC, various java chat applets) muck up if they don't
* receive these numerics whenever they send LIST, so give them an empty LIST to mull over.
*/
user->WriteNumeric(321, "%s Channel :Users Name",user->nick.c_str());