summaryrefslogtreecommitdiff
path: root/src/modules/m_messageflood.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_messageflood.cpp')
-rw-r--r--src/modules/m_messageflood.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index 7efe8e8ec..f322a63e6 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -88,7 +88,7 @@ class MsgFlood : public ModeHandler
public:
MsgFlood() : ModeHandler('f', 1, 0, false, MODETYPE_CHANNEL, false) { }
- std::pair<bool,std::string> ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
{
floodsettings* x;
if (channel->GetExt("flood",x))
@@ -97,6 +97,12 @@ class MsgFlood : public ModeHandler
return std::make_pair(false, parameter);
}
+ bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel)
+ {
+ /* When TS is equal, the alphabetically later one wins */
+ return (their_param < our_param);
+ }
+
ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
{
floodsettings *f;