summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-22 20:57:45 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-22 20:57:45 +0000
commit537c7d617b9f840c66bef9a9f68b510bc312f997 (patch)
tree7ae89dc84cd081c14d2c74c15d460b25001273bd /src
parent2874b130a4015927c61614dd72c66842e2e2448a (diff)
Put some stuff back that was NEEDED.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2838 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_messageflood.cpp1
-rw-r--r--src/modules/m_spanningtree.cpp32
2 files changed, 31 insertions, 2 deletions
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index 1f07e8155..660c2128b 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -67,6 +67,7 @@ class floodsettings
std::map<userrec*,int>::iterator iter = counters.find(who);
if (iter != counters.end())
{
+ log(DEBUG,"should kick? %d, %d",iter->second,this->lines);
return (iter->second >= this->lines);
}
else return false;
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 6a28e2140..bc60fa82f 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -2029,6 +2029,26 @@ class TreeSocket : public InspSocket
{
return this->ForceTopic(prefix,params);
}
+ else if ((command == "KICK") && (!Srv->FindNick(prefix)))
+ {
+ /* Server kick */
+ userrec* who = Srv->FindNick(params[1]);
+ chanrec* where = Srv->FindChannel(params[0]);
+ server_kick_channel(who, where, (char*)params[2].c_str(), false);
+ 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")
{
return this->RemoteRehash(prefix,params);
@@ -3054,8 +3074,16 @@ class ModuleSpanningTree : public Module
virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, std::string reason)
{
- /* No need to handle server kicks here */
- if ((source) && (source->fd > -1))
+ if (!source)
+ {
+ /* Server kick (ugh) */
+ std::deque<std::string> params;
+ params.push_back(chan->name);
+ params.push_back(user->nick);
+ params.push_back(":"+reason);
+ DoOneToMany(Srv->GetServerName(),"KICK",params);
+ }
+ else if (source->fd > -1)
{
std::deque<std::string> params;
params.push_back(chan->name);