From fbe8169b82cb071dd57b66941093df654aa7b22c Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 2 Sep 2009 00:44:06 +0000 Subject: Use CheckTimeStamp to merge modes on netburst git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11596 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/mode.h | 6 ++---- include/modes/cmode_k.h | 1 - include/modes/cmode_l.h | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/mode.h b/include/mode.h index 3e658e206..cbb9b9e94 100644 --- a/include/mode.h +++ b/include/mode.h @@ -266,14 +266,12 @@ class CoreExport ModeHandler : public Extensible * override this function and use it to return true or false. The default implementation just returns true if * theirs < ours. This will only be called for non-listmodes with parameters, when adding the mode and where * theirs == ours (therefore the default implementation will always return false). - * @param theirs The timestamp of the remote side - * @param ours The timestamp of the local side * @param their_param Their parameter if the mode has a parameter * @param our_param Our parameter if the mode has a parameter * @param channel The channel we are checking against * @return True if the other side wins the merge, false if we win the merge for this mode. */ - virtual bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel); + virtual bool CheckTimeStamp(std::string &their_param, const std::string &our_param, Channel* channel); /** * When a remote server needs to bounce a set of modes, it will call this method for every mode @@ -536,7 +534,7 @@ class CoreExport ModeParser : public classbase * and *user->server == NULL. * @param servermode True if a server is setting the mode. */ - void Process(const std::vector& parameters, User *user, bool servermode); + void Process(const std::vector& parameters, User *user, bool servermode, bool merge = false); /** Find the mode handler for a given mode and type. * @param modeletter mode letter to search for diff --git a/include/modes/cmode_k.h b/include/modes/cmode_k.h index 72dc125e8..671143be6 100644 --- a/include/modes/cmode_k.h +++ b/include/modes/cmode_k.h @@ -23,7 +23,6 @@ class ModeChannelKey : public ModeHandler ModeChannelKey(InspIRCd* Instance); ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode); ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter); - bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel); void RemoveMode(Channel* channel, irc::modestacker* stack = NULL); void RemoveMode(User* user, irc::modestacker* stack = NULL); }; diff --git a/include/modes/cmode_l.h b/include/modes/cmode_l.h index 0dfe779e0..eba711095 100644 --- a/include/modes/cmode_l.h +++ b/include/modes/cmode_l.h @@ -23,5 +23,5 @@ class ModeChannelLimit : public ModeHandler ModeChannelLimit(InspIRCd* Instance); ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode); ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter); - bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel); + bool CheckTimeStamp(std::string &their_param, const std::string &our_param, Channel* channel); }; -- cgit v1.2.3