summaryrefslogtreecommitdiff
path: root/src/modules/m_securelist.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-10 15:18:49 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-10 15:18:49 +0000
commit50d65268f4af9caf5e990e6323607b30217d7c60 (patch)
tree247749606b0faa11ba13e6b11063de8ad888c499 /src/modules/m_securelist.cpp
parentd1f78ff1605f22ae2d0ead990b37424a3897e0bc (diff)
Make some stuff configurable that hasnt been and should be.
<securelist waittime="n">: number of seconds a user must wait before LIST <safelist throttle="n">: Number of seconds a user must wait between each LIST command git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6563 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_securelist.cpp')
-rw-r--r--src/modules/m_securelist.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp
index efa448290..bfed8f46e 100644
--- a/src/modules/m_securelist.cpp
+++ b/src/modules/m_securelist.cpp
@@ -24,6 +24,7 @@ class ModuleSecureList : public Module
{
private:
std::vector<std::string> allowlist;
+ unsigned int WaitTime;
public:
ModuleSecureList(InspIRCd* Me) : Module::Module(Me)
{
@@ -45,6 +46,7 @@ class ModuleSecureList : public Module
allowlist.clear();
for (int i = 0; i < MyConf->Enumerate("securelist"); i++)
allowlist.push_back(MyConf->ReadValue("securelist", "exception", i));
+ WaitTime = MyConf->ReadInteger("securelist", "waittime", "60", 0, true);
DELETE(MyConf);
}
@@ -63,7 +65,7 @@ class ModuleSecureList : public Module
if (!validated)
return 0;
- if ((command == "LIST") && (ServerInstance->Time() < (user->signon+60)) && (!*user->oper))
+ if ((command == "LIST") && (ServerInstance->Time() < (user->signon+WaitTime)) && (!*user->oper))
{
/* Normally wouldnt be allowed here, are they exempt? */
for (std::vector<std::string>::iterator x = allowlist.begin(); x != allowlist.end(); x++)
@@ -71,7 +73,7 @@ class ModuleSecureList : public Module
return 0;
/* Not exempt, BOOK EM DANNO! */
- user->WriteServ("NOTICE %s :*** You cannot list within the first minute of connecting. Please try again later.",user->nick);
+ user->WriteServ("NOTICE %s :*** You cannot list within the first %d seconds of connecting. Please try again later.",user->nick, WaitTime);
/* Some crap clients (read: 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.
*/