3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-02-17 14:01:03 +01:00

fantasy: accept "@servicebot" as fantasy trigger prefix

For platforms like Discord where this form of address is the norm.

Closes https://github.com/PyLink/pylink-discord/issues/17
This commit is contained in:
James Lu 2019-06-15 23:56:55 -07:00
parent 3d039b78e2
commit 3b07f8ab2b

View File

@ -41,10 +41,9 @@ def handle_fantasy(irc, source, command, args):
conf.conf['pylink'].get('prefixes', {}).get(botname))]
# If responding to nick is enabled, add variations of the current nick
# to the prefix list: "<nick>," and "<nick>:"
# to the prefix list: "<nick>,", "<nick>:", and "@<nick>" (for Discord and other protocols)
nick = irc.to_lower(irc.users[servuid].nick)
nick_prefixes = [nick+',', nick+':']
nick_prefixes = [nick+',', nick+':', '@'+nick]
if respondtonick:
prefixes += nick_prefixes