mirror of
https://github.com/anope/anope.git
synced 2026-06-28 02:16:37 +02:00
Allow assigning service bots via /invite
This commit is contained in:
@@ -49,6 +49,17 @@ void Error::Run(MessageSource &source, const std::vector<Anope::string> ¶ms)
|
||||
Anope::Quitting = true;
|
||||
}
|
||||
|
||||
void Invite::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
User *targ = User::Find(params[0]);
|
||||
Channel *c = Channel::Find(params[1]);
|
||||
|
||||
if (!targ || targ->server != Me || !c || c->FindUser(targ))
|
||||
return;
|
||||
|
||||
FOREACH_MOD(I_OnInvite, OnInvite(source.GetUser(), c, targ));
|
||||
}
|
||||
|
||||
void Join::Run(MessageSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *user = source.GetUser();
|
||||
|
||||
Reference in New Issue
Block a user