diff options
author | Sadie Powell <sadie@witchery.services> | 2024-10-22 16:16:32 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-10-22 16:29:22 +0100 |
commit | f1751dcb213b953ff362eda3276e210258a7cdb2 (patch) | |
tree | fab818dd75eaafee74d0b80e9d3da3e28aa0244c /src/bots.cpp | |
parent | 8b026135492c13ae030b27cb6ec6c5b09131c0bd (diff) |
Replace usestrictprivmsg with something actually useful.
Every IRC server we support (other than Bahamut which is probably
on the chopping bock) uses UIDs so this setting does nothing.
Instead, allow configuring a server-side alias for each service
and use that when servicealias is enabled.
Diffstat (limited to 'src/bots.cpp')
-rw-r--r-- | src/bots.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bots.cpp b/src/bots.cpp index b109f8680..323fbc29a 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -265,6 +265,13 @@ CommandInfo *BotInfo::GetCommand(const Anope::string &cname) return NULL; } +Anope::string BotInfo::GetQueryCommand() const +{ + if (Config->ServiceAlias && !this->alias.empty()) + return Anope::printf("/%s", this->alias.c_str()); + return Anope::printf("/msg %s", this->nick.c_str()); +} + BotInfo *BotInfo::Find(const Anope::string &nick, bool nick_only) { if (!nick_only && IRCD != NULL && IRCD->RequiresID) |