Fix goat and fgoat to use proper case
It would be nice to have a users.complete_one_match function (do we even need the current API?)
This commit is contained in:
parent
54de373242
commit
e74079dae1
@ -2939,8 +2939,7 @@ def goat(var, wrapper, message):
|
|||||||
if not target:
|
if not target:
|
||||||
wrapper.pm(messages["not_enough_parameters"])
|
wrapper.pm(messages["not_enough_parameters"])
|
||||||
return
|
return
|
||||||
possible_users = {u.lower().nick for u in wrapper.target.users}
|
victim, _ = users.complete_match(users.lower(target), wrapper.target.users)
|
||||||
victim = complete_one_match(users.lower(target), possible_users)
|
|
||||||
if not victim:
|
if not victim:
|
||||||
wrapper.pm(messages["goat_target_not_in_channel"].format(target))
|
wrapper.pm(messages["goat_target_not_in_channel"].format(target))
|
||||||
return
|
return
|
||||||
@ -2954,8 +2953,7 @@ def fgoat(var, wrapper, message):
|
|||||||
"""Forces a goat to interact with anyone or anything, without limitations."""
|
"""Forces a goat to interact with anyone or anything, without limitations."""
|
||||||
|
|
||||||
nick = message.split(' ')[0].strip()
|
nick = message.split(' ')[0].strip()
|
||||||
possible_users = {u.lower().nick for u in wrapper.target.users}
|
victim, _ = users.complete_match(users.lower(nick), wrapper.target.users)
|
||||||
victim = complete_one_match(users.lower(nick), possible_users)
|
|
||||||
if victim:
|
if victim:
|
||||||
togoat = victim
|
togoat = victim
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user