From 15664c61f847c7f4ed4d21fac825283ce844d7b7 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 22 Jan 2006 16:07:22 +0000 Subject: Fixed typos etc to make this compile now git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2828 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_messageflood.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/modules/m_messageflood.cpp') 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"); } } -- cgit v1.2.3