X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fcmode_l.cpp;h=3bdacd60e42f7d574f57430b650c3aa9a6b12b64;hb=74d221e54a8db39820f6f86104116f74f9939b01;hp=a5fa5329be77bce38de8aaca8bb46e4c45d46c1d;hpb=f4d202cdbbcaa9e17c21e3f74d7816f58b2ffc6a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/cmode_l.cpp b/src/modes/cmode_l.cpp index a5fa5329b..3bdacd60e 100644 --- a/src/modes/cmode_l.cpp +++ b/src/modes/cmode_l.cpp @@ -4,11 +4,11 @@ #include "users.h" #include "modes/cmode_l.h" -ModeChannelLimit::ModeChannelLimit() : ModeHandler('l', 1, 0, false, MODETYPE_CHANNEL, false) +ModeChannelLimit::ModeChannelLimit(InspIRCd* Instance) : ModeHandler(Instance, 'l', 1, 0, false, MODETYPE_CHANNEL, false) { } -std::pair ModeChannelLimit::ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter) +ModePair ModeChannelLimit::ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter) { if (channel->limit) { @@ -20,6 +20,12 @@ std::pair ModeChannelLimit::ModeSet(userrec* source, userrec* } } +bool ModeChannelLimit::CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel) +{ + /* When TS is equal, the higher channel limit wins */ + return (atoi(their_param.c_str()) < atoi(our_param.c_str())); +} + ModeAction ModeChannelLimit::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) { if (adding)