mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-20 07:20:59 +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:
parent
3d039b78e2
commit
3b07f8ab2b
@ -41,10 +41,9 @@ def handle_fantasy(irc, source, command, args):
|
|||||||
conf.conf['pylink'].get('prefixes', {}).get(botname))]
|
conf.conf['pylink'].get('prefixes', {}).get(botname))]
|
||||||
|
|
||||||
# If responding to nick is enabled, add variations of the current nick
|
# 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 = irc.to_lower(irc.users[servuid].nick)
|
||||||
|
nick_prefixes = [nick+',', nick+':', '@'+nick]
|
||||||
nick_prefixes = [nick+',', nick+':']
|
|
||||||
if respondtonick:
|
if respondtonick:
|
||||||
prefixes += nick_prefixes
|
prefixes += nick_prefixes
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user