X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fcmode_l.cpp;h=0fddf2af0dd637244e4b35883e8d485ed004d538;hb=c4d6ce8c5e1802e5b834d5845e31c3adf7700585;hp=3d37fc900e645a881b81de770f15eff9b2b61014;hpb=2dfc384cde46ba63ed7c2f4420712596096123ca;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/cmode_l.cpp b/src/modes/cmode_l.cpp index 3d37fc900..0fddf2af0 100644 --- a/src/modes/cmode_l.cpp +++ b/src/modes/cmode_l.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/cmode_l.h" -ModeChannelLimit::ModeChannelLimit(InspIRCd* Instance) : ModeHandler(Instance, 'l', 1, 0, false, MODETYPE_CHANNEL, false) +ModeChannelLimit::ModeChannelLimit() : ModeHandler(NULL, "limit", 'l', PARAM_SETONLY, MODETYPE_CHANNEL) { } @@ -34,13 +34,13 @@ ModePair ModeChannelLimit::ModeSet(User*, User*, Channel* channel, const std::st } } -bool ModeChannelLimit::CheckTimeStamp(time_t, time_t, const std::string &their_param, const std::string &our_param, Channel*) +bool ModeChannelLimit::ResolveModeConflict(std::string &their_param, const std::string &our_param, Channel*) { /* When TS is equal, the higher channel limit wins */ return (atoi(their_param.c_str()) < atoi(our_param.c_str())); } -ModeAction ModeChannelLimit::OnModeChange(User*, User*, Channel* channel, std::string ¶meter, bool adding, bool servermode) +ModeAction ModeChannelLimit::OnModeChange(User*, User*, Channel* channel, std::string ¶meter, bool adding) { if (adding) { @@ -54,7 +54,7 @@ ModeAction ModeChannelLimit::OnModeChange(User*, User*, Channel* channel, std::s parameter = ConvToStr(limit); /* Set new limit */ - channel->SetMode('l', parameter); + channel->SetModeParam('l', parameter); return MODEACTION_ALLOW; } @@ -70,7 +70,7 @@ ModeAction ModeChannelLimit::OnModeChange(User*, User*, Channel* channel, std::s } /* Removing old limit, no checks here */ - channel->SetMode('l', ""); + channel->SetModeParam('l', ""); return MODEACTION_ALLOW; } }