diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-22 16:07:22 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-22 16:07:22 +0000 |
commit | 15664c61f847c7f4ed4d21fac825283ce844d7b7 (patch) | |
tree | fb4ad6ab0d9bfa1f1c6fa05e6ae65cc7075fee7b /src/modules/m_messageflood.cpp | |
parent | 8934ec9c4bd2529db698a5a022e7833918c2ac03 (diff) |
Fixed typos etc to make this compile now
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2828 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_messageflood.cpp')
-rw-r--r-- | src/modules/m_messageflood.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index 10048ccf0..cc4fa0963 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -26,13 +26,14 @@ using namespace std; class floodsettings { + public: bool ban; int secs; int lines; floodsettings() : ban(0), secs(0), lines(0) {}; floodsettings(bool a, int b, int c) : ban(a), secs(b), lines(c) {}; -} +}; class ModuleMsgFlood : public Module { @@ -55,8 +56,9 @@ class ModuleMsgFlood : public Module { std::string FloodParams = params[0]; chanrec* c = (chanrec*)target; - char data[MAXBUF]; - strlcpy(data,FloodParams.c_str(),MAXBUF); + char ndata[MAXBUF]; + char* data = ndata; + strlcpy(ndata,FloodParams.c_str(),MAXBUF); char* lines = data; char* secs = NULL; bool ban = false; @@ -109,6 +111,7 @@ class ModuleMsgFlood : public Module } else { + chanrec* c = (chanrec*)target; if (c->GetExt("flood")) { floodsettings *f = (floodsettings*)c->GetExt("flood"); @@ -123,11 +126,11 @@ class ModuleMsgFlood : public Module void OnChannelDelete(chanrec* chan) { - if (c->GetExt("flood")) + if (chan->GetExt("flood")) { - floodsettings *f = (floodsettings*)c->GetExt("flood"); + floodsettings *f = (floodsettings*)chan->GetExt("flood"); delete f; - c->Shrink("flood"); + chan->Shrink("flood"); } } |