diff options
author | Adam <Adam@anope.org> | 2013-04-14 17:39:01 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-04-14 17:39:01 -0500 |
commit | f08dbced60d59de28d13efee2e19097e0b42f4c7 (patch) | |
tree | b3aae56d92e788e7ca386258ac81ba8a259a8c48 /src/messages.cpp | |
parent | baabc91ead367a9461bce20dfa1a0e6d44043358 (diff) |
Allow assigning service bots via /invite
Diffstat (limited to 'src/messages.cpp')
-rw-r--r-- | src/messages.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/messages.cpp b/src/messages.cpp index 178d376c3..c9ffd3c59 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -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(); |