19 this->
SetDesc(
_(
"Invites you or an optionally specified nick into a channel"));
20 this->
SetSyntax(
_(
"\037channel\037 [\037nick\037]"));
27 User *u = source.GetUser();
43 if (!source.AccessFor(ci).HasPriv(
"INVITE") && !source.HasCommand(
"chanserv/invite"))
50 if (params.size() == 1)
57 source.Reply(
NICK_X_NOT_IN_USE, params.size() > 1 ? params[1].c_str() : source.GetNick().c_str());
64 source.Reply(
_(
"You are already in \002%s\002!"), c->
name.
c_str());
70 bool override = !source.AccessFor(ci).HasPriv(
"INVITE");
75 source.Reply(
_(
"\002%s\002 has been invited to \002%s\002."), u2->
nick.
c_str(), c->
name.
c_str());
91 source.Reply(
_(
"Tells %s to invite you or an optionally specified\n"
92 "nick into the given channel.\n"
94 "By default, limited to AOPs or those with level 5 and above\n"
95 "on the channel."), source.service->nick.c_str());
CSInvite(const Anope::string &modname, const Anope::string &creator)
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
CommandCSInvite commandcsinvite
virtual void SendInvite(const MessageSource &source, const Channel *c, User *u)
#define CHAN_X_NOT_IN_USE
void SetDesc(const Anope::string &d)
Serialize::Reference< ChannelInfo > ci
#define NICK_X_NOT_IN_USE
BotInfo * WhoSends() const
CoreExport IRCDProto * IRCD
ChanUserContainer * FindUser(User *u) const
void SetSyntax(const Anope::string &s)
#define CHAN_X_NOT_REGISTERED
static User * Find(const Anope::string &name, bool nick_only=false)
static Channel * Find(const Anope::string &name)
CommandCSInvite(Module *creator)
void SendSyntax(CommandSource &)
const char * c_str() const
void SendMessage(BotInfo *source, const char *fmt,...)
void Execute(CommandSource &source, const std::vector< Anope::string > ¶ms) anope_override