summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-22 20:22:15 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-22 20:22:15 +0000
commit2f0b2d4656eb1e0a5cfbda54631ebecbb16cfe4d (patch)
tree49f704059b55df8f747c543ee961e84ef1eedc71 /src/modules
parent47f84b162dfcdc39954a423a5176655da60950f3 (diff)
Fixes to server kick (i hope)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2835 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_messageflood.cpp14
-rw-r--r--src/modules/m_spanningtree.cpp14
2 files changed, 25 insertions, 3 deletions
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index bd1aa438d..c88c93577 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -35,7 +35,11 @@ class floodsettings
std::map<userrec*,int> counters;
floodsettings() : ban(0), secs(0), lines(0) {};
- floodsettings(bool a, int b, int c) : ban(a), secs(b), lines(c) { reset = time(NULL) + secs; };
+ floodsettings(bool a, int b, int c) : ban(a), secs(b), lines(c)
+ {
+ reset = time(NULL) + secs;
+ log(DEBUG,"Create new floodsettings: %lu %lu",time(NULL),reset);
+ };
void addmessage(userrec* who)
{
@@ -45,8 +49,14 @@ class floodsettings
iter->second++;
log(DEBUG,"Count for %s is now %d",who->nick,iter->second);
}
- if (reset > time(NULL))
+ else
+ {
+ counters[who] = 1;
+ log(DEBUG,"Count for %s is now *1*",who->nick);
+ }
+ if (time(NULL) > reset)
{
+ log(DEBUG,"floodsettings timer Resetting.");
counters.clear();
reset = time(NULL) + secs;
}
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 7204c2435..b15c1c1de 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -2035,7 +2035,19 @@ class TreeSocket : public InspSocket
userrec* who = Srv->FindNick(params[1]);
chanrec* where = Srv->FindChannel(params[0]);
server_kick_channel(who, where, (char*)params[2].c_str(), false);
- return true;
+ std::string sourceserv = this->myhost;
+ if (this->InboundServerName != "")
+ {
+ sourceserv = this->InboundServerName;
+ }
+ if (IsServer(prefix))
+ {
+ return DoOneToAllButSenderRaw(line,sourceserv,prefix,command,params);
+ }
+ else
+ {
+ return true;
+ }
}
else if (command == "REHASH")
{