X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_channel%2Fcmd_invite.cpp;h=431afe9b73779050c960f53bd02279d70ec8f61f;hb=c71361e8e4f22cb4f72881399bce2832eb080b0e;hp=25afc071318da79bd4e9d5845bbbd67640967c00;hpb=c67d3103e9f7397f0ab9631bf07a5e5547deb2c3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_channel/cmd_invite.cpp b/src/coremods/core_channel/cmd_invite.cpp index 25afc0713..431afe9b7 100644 --- a/src/coremods/core_channel/cmd_invite.cpp +++ b/src/coremods/core_channel/cmd_invite.cpp @@ -1,10 +1,17 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2009 Daniel De Graaf - * Copyright (C) 2007-2008 Robin Burchell - * Copyright (C) 2008 Craig Edwards + * Copyright (C) 2018, 2020 Sadie Powell + * Copyright (C) 2018 linuxdaemon + * Copyright (C) 2017 B00mX0r + * Copyright (C) 2013-2016, 2018 Attila Molnar + * Copyright (C) 2012, 2019 Robby + * Copyright (C) 2009-2010 Daniel De Graaf + * Copyright (C) 2009 Uli Schlachter * Copyright (C) 2008 Thomas Stagner + * Copyright (C) 2007-2008 Robin Burchell + * Copyright (C) 2007 Dennis Friis + * Copyright (C) 2006-2008 Craig Edwards * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -21,34 +28,31 @@ #include "inspircd.h" +#include "core_channel.h" +#include "invite.h" -/** Handle /INVITE. - */ -class CommandInvite : public Command +enum { - public: - /** Constructor for invite. - */ - CommandInvite ( Module* parent) : Command(parent,"INVITE", 0, 0) { Penalty = 4; syntax = "[ ]"; } - /** Handle command. - * @param parameters The parameters to the command - * @param user The user issuing the command - * @return A value from CmdResult to indicate command success or failure. - */ - CmdResult Handle(const std::vector& parameters, User *user); - RouteDescriptor GetRouting(User* user, const std::vector& parameters) - { - return (IS_LOCAL(user) ? ROUTE_LOCALONLY : ROUTE_BROADCAST); - } + // From ircd-hybrid. + RPL_INVITELIST = 336, + RPL_ENDOFINVITELIST = 337 }; +CommandInvite::CommandInvite(Module* parent, Invite::APIImpl& invapiimpl) + : Command(parent, "INVITE", 0, 0) + , invapi(invapiimpl) +{ + Penalty = 4; + syntax = "[ [