X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fcmode_k.cpp;h=4105660d11d5183a6090d334a06fe5d0e1f6f61a;hb=7aa5e059a8f66d91bd8b69c58c657ceb70b4baff;hp=a7c491aa55a2441f5bc79b7717e3fc40ac688ba1;hpb=2dfc384cde46ba63ed7c2f4420712596096123ca;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp index a7c491aa5..4105660d1 100644 --- a/src/modes/cmode_k.cpp +++ b/src/modes/cmode_k.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/cmode_k.h" -ModeChannelKey::ModeChannelKey(InspIRCd* Instance) : ModeHandler(Instance, 'k', 1, 1, false, MODETYPE_CHANNEL, false) +ModeChannelKey::ModeChannelKey() : ModeHandler(NULL, 'k', PARAM_ALWAYS, MODETYPE_CHANNEL) { } @@ -61,13 +61,7 @@ void ModeChannelKey::RemoveMode(User*, irc::modestacker* stack) { } -bool ModeChannelKey::CheckTimeStamp(time_t, time_t, const std::string &their_param, const std::string &our_param, Channel*) -{ - /* When TS is equal, the alphabetically later channel key wins */ - return (their_param < our_param); -} - -ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding, bool servermode) +ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) { bool exists = channel->IsModeSet('k'); if (IS_LOCAL(source)) @@ -99,11 +93,11 @@ ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, s std::string ckey; ckey.assign(parameter, 0, 32); parameter = ckey; - channel->SetMode('k', parameter); + channel->SetModeParam('k', parameter); } else { - channel->SetMode('k', ""); + channel->SetModeParam('k', ""); } return MODEACTION_ALLOW; }