Allow !fjoin to join ranges of fake nicks
This commit is contained in:
parent
5793097626
commit
f40e749c07
@ -1110,6 +1110,16 @@ def fjoin(cli, nick, chan, rest):
|
|||||||
|
|
||||||
for tojoin in re.split(" +",rest):
|
for tojoin in re.split(" +",rest):
|
||||||
tojoin = tojoin.strip()
|
tojoin = tojoin.strip()
|
||||||
|
if "-" in tojoin:
|
||||||
|
first, hyphen, last = tojoin.partition("-")
|
||||||
|
if first.isdigit() and last.isdigit():
|
||||||
|
if int(last)+1 - int(first) > var.MAX_PLAYERS - len(var.list_players()):
|
||||||
|
cli.msg(chan, "{0}: Too many players to join.".format(nick))
|
||||||
|
break
|
||||||
|
fake = True
|
||||||
|
for i in range(int(first), int(last)+1):
|
||||||
|
join_player(cli, str(i), chan, forced=True, who=nick)
|
||||||
|
continue
|
||||||
if not tojoin:
|
if not tojoin:
|
||||||
continue
|
continue
|
||||||
ul = list(var.USERS.keys())
|
ul = list(var.USERS.keys())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user