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 /include | |
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 'include')
-rw-r--r-- | include/bots.h | 5 | ||||
-rw-r--r-- | include/config.h | 6 | ||||
-rw-r--r-- | include/language.h | 10 |
3 files changed, 12 insertions, 9 deletions
diff --git a/include/bots.h b/include/bots.h index 711e306b5..e64c097df 100644 --- a/include/bots.h +++ b/include/bots.h @@ -31,6 +31,8 @@ public: time_t lastmsg; /* Map of actual command names -> service name/permission required */ CommandInfo::map commands; + /* The server-side alias used to message this bot. */ + Anope::string alias; /* Modes the bot should have as configured in service:modes */ Anope::string botmodes; /* Channels the bot should be in as configured in service:channels */ @@ -126,6 +128,9 @@ public: */ CommandInfo *GetCommand(const Anope::string &cname); + /** Get the command that users can use to send a message to this bot. */ + Anope::string GetQueryCommand() const; + /** Find a bot by nick * @param nick The nick * @param nick_only True to only look by nick, and not by UID diff --git a/include/config.h b/include/config.h index 42445637d..0a0a3103d 100644 --- a/include/config.h +++ b/include/config.h @@ -94,13 +94,11 @@ namespace Configuration Anope::string DefLanguage; /* options:timeoutcheck */ time_t TimeoutCheck; - /* options:usestrictprivmsg */ - bool UseStrictPrivmsg; + /* options:servicealias */ + bool ServiceAlias; /* networkinfo:nickchars */ Anope::string NickChars; - /* either "/msg " or "/" */ - Anope::string StrictPrivmsg; /* List of uplink servers to try and connect to */ std::vector<Uplink> Uplinks; /* A vector of our logfile options */ diff --git a/include/language.h b/include/language.h index 7c95611ca..5d2e28bb5 100644 --- a/include/language.h +++ b/include/language.h @@ -65,9 +65,9 @@ namespace Language } // namespace Language /* Commonly used language strings */ -#define CONFIRM_DROP _("Please confirm that you want to drop \002%s\002 with \002%s%s DROP %s %s\002") +#define CONFIRM_DROP _("Please confirm that you want to drop \002%s\002 with \002%s DROP %s %s\002") #define SERVICE_UNAVAILABLE _("Sorry, %s is temporarily unavailable.") -#define MORE_INFO _("\002%s%s HELP %s\002 for more information.") +#define MORE_INFO _("\002%s HELP %s\002 for more information.") #define BAD_USERHOST_MASK _("Mask must be in the form \037user\037@\037host\037.") #define BAD_EXPIRY_TIME _("Invalid expiry time.") #define USERHOST_MASK_TOO_WIDE _("%s coverage is too wide; Please use a more specific mask.") @@ -93,7 +93,7 @@ namespace Language #define NO_EXPIRE _("does not expire") #define LIST_INCORRECT_RANGE _("Incorrect range specified. The correct syntax is \002#\037from\037-\037to\037\002.") #define NICK_IS_SECURE _("This nickname is registered and protected. If it is your\n" \ - "nick, type \002%s%s IDENTIFY \037password\037\002. Otherwise,\n" \ + "nick, type \002%s IDENTIFY \037password\037\002. Otherwise,\n" \ "please choose a different nick.") #define FORCENICKCHANGE_NOW _("This nickname has been registered; you may not use it.") #define NICK_CANNOT_BE_REGISTERED _("Nickname \002%s\002 may not be registered.") @@ -111,9 +111,9 @@ namespace Language #define CHAN_INFO_HEADER _("Information about channel \002%s\002:") #define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except has been removed.") #define MEMO_NEW_X_MEMO_ARRIVED _("There is a new memo on channel %s.\n" \ - "Type \002%s%s READ %s %zu\002 to read it.") + "Type \002%s READ %s %zu\002 to read it.") #define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s.\n" \ - "Type \002%s%s READ %zu\002 to read it.") + "Type \002%s READ %zu\002 to read it.") #define MEMO_HAVE_NO_MEMOS _("You have no memos.") #define MEMO_X_HAS_NO_MEMOS _("%s has no memos.") #define MEMO_HAVE_NO_NEW_MEMOS _("You have no new memos.") |