From b98acac5c91ecb08da28d70185818a19991eb1db Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Fri, 12 Apr 2013 16:00:17 +0200 Subject: Channel::JoinUser() and Channel::ForceChan() changes Convert static Channel::ForceChan() to non-static Channel::ForceJoin() that joins a user to a channel, no permission checks The (static) Channel::JoinUser() now has a LocalUser parameter, and no longer have TS and bursting parameters. If the channel doesn't exist, it is created using current time as TS --- src/modules/m_cycle.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/m_cycle.cpp') diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp index b23bf5b92..bd09f5ae6 100644 --- a/src/modules/m_cycle.cpp +++ b/src/modules/m_cycle.cpp @@ -24,16 +24,17 @@ /** Handle /CYCLE */ -class CommandCycle : public Command +class CommandCycle : public SplitCommand { public: - CommandCycle(Module* Creator) : Command(Creator,"CYCLE", 1) + CommandCycle(Module* Creator) + : SplitCommand(Creator, "CYCLE", 1) { Penalty = 3; syntax = " :[reason]"; TRANSLATE3(TR_TEXT, TR_TEXT, TR_END); } - CmdResult Handle (const std::vector ¶meters, User *user) + CmdResult HandleLocal(const std::vector ¶meters, LocalUser* user) { Channel* channel = ServerInstance->FindChan(parameters[0]); std::string reason = ConvToStr("Cycling"); @@ -65,8 +66,7 @@ class CommandCycle : public Command } channel->PartUser(user, reason); - - Channel::JoinUser(user, parameters[0], true, "", false, ServerInstance->Time()); + Channel::JoinUser(user, parameters[0], true); } return CMD_SUCCESS; -- cgit v1.3.1-10-gc9f91