fix single digit fake nick joining in debug mode (only ranges worked)

This commit is contained in:
jacob1 2017-08-20 19:59:30 -04:00
parent a0055453fe
commit fb889393d7

View File

@ -1015,6 +1015,12 @@ def fjoin(var, wrapper, message):
to_join.append(s)
for tojoin in to_join:
tojoin = tojoin.strip()
# Allow joining single number fake users in debug mode
if users.predicate(tojoin) and botconfig.DEBUG_MODE:
user = users._add(wrapper.client, nick=tojoin) # FIXME
evt.data["join_player"](var, type(wrapper)(user, wrapper.target), forced=True, who=wrapper.source)
continue
# Allow joining ranges of numbers as fake users in debug mode
if "-" in tojoin and botconfig.DEBUG_MODE:
first, hyphen, last = tojoin.partition("-")
if first.isdigit() and last.isdigit():