summaryrefslogtreecommitdiff
path: root/src/modules/m_messageflood.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-20 22:25:56 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-20 22:25:56 +0000
commitec731e80784ec1940faefdd6dc72339c60c2b7ce (patch)
tree53f75713444b3d8f42c3b353366c63f7d2c2b262 /src/modules/m_messageflood.cpp
parenta3912ad8aa274fca0b1a21d5b4f7427484046f20 (diff)
Propogation of remote kicks (testy test)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3266 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_messageflood.cpp')
-rw-r--r--src/modules/m_messageflood.cpp29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index 97b51b36f..282a42a3b 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -174,23 +174,26 @@ class ModuleMsgFlood : public Module
void ProcessMessages(userrec* user,chanrec* dest,std::string &text)
{
- floodsettings *f = (floodsettings*)dest->GetExt("flood");
- if (f)
+ if (IS_LOCAL(user))
{
- f->addmessage(user);
- if (f->shouldkick(user))
+ floodsettings *f = (floodsettings*)dest->GetExt("flood");
+ if (f)
{
- /* Youre outttta here! */
- f->clear(user);
- if (f->ban)
+ f->addmessage(user);
+ if (f->shouldkick(user))
{
- char* parameters[3];
- parameters[0] = dest->name;
- parameters[1] = "+b";
- parameters[2] = user->MakeWildHost();
- Srv->SendMode(parameters,3,user);
+ /* Youre outttta here! */
+ f->clear(user);
+ if (f->ban)
+ {
+ char* parameters[3];
+ parameters[0] = dest->name;
+ parameters[1] = "+b";
+ parameters[2] = user->MakeWildHost();
+ Srv->SendMode(parameters,3,user);
+ }
+ Srv->KickUser(NULL, user, dest, "Channel flood triggered (mode +f)");
}
- Srv->KickUser(NULL, user, dest, "Channel flood triggered (mode +f)");
}
}
}