don't allow fjoining unidentified players when var.ACCOUNTS_ONLY is on
This commit is contained in:
parent
1d77fc4a29
commit
2b4895f34c
@ -1343,25 +1343,29 @@ def fjoin(cli, nick, chan, rest):
|
|||||||
if not rest.strip():
|
if not rest.strip():
|
||||||
join_player(cli, nick, chan, forced=True)
|
join_player(cli, nick, chan, forced=True)
|
||||||
|
|
||||||
for a in re.split(" +",rest):
|
for tojoin in re.split(" +",rest):
|
||||||
a = a.strip()
|
tojoin = tojoin.strip()
|
||||||
if not a:
|
if not tojoin:
|
||||||
continue
|
continue
|
||||||
ul = list(var.USERS.keys())
|
ul = list(var.USERS.keys())
|
||||||
ull = [u.lower() for u in ul]
|
ull = [u.lower() for u in ul]
|
||||||
if a.lower() not in ull:
|
if tojoin.lower() not in ull:
|
||||||
if not is_fake_nick(a) or not botconfig.DEBUG_MODE:
|
if not is_fake_nick(tojoin) or not botconfig.DEBUG_MODE:
|
||||||
if not noticed: # important
|
if not noticed: # important
|
||||||
cli.msg(chan, nick+(": You may only fjoin "+
|
cli.msg(chan, nick+(": You may only fjoin "+
|
||||||
"people who are in this channel."))
|
"people who are in this channel."))
|
||||||
noticed = True
|
noticed = True
|
||||||
continue
|
continue
|
||||||
if not is_fake_nick(a):
|
if not is_fake_nick(tojoin):
|
||||||
a = ul[ull.index(a.lower())]
|
tojoin = ul[ull.index(tojoin.lower())].strip()
|
||||||
|
if not botconfig.DEBUG_MODE and var.ACCOUNTS_ONLY:
|
||||||
|
if not var.USERS[tojoin]["account"] or var.USERS[tojoin]["account"] == "*":
|
||||||
|
cli.notice(nick, "{0} is not logged in to NickServ.".format(tojoin))
|
||||||
|
return
|
||||||
elif botconfig.DEBUG_MODE:
|
elif botconfig.DEBUG_MODE:
|
||||||
fake = True
|
fake = True
|
||||||
if a != botconfig.NICK:
|
if tojoin != botconfig.NICK:
|
||||||
join_player(cli, a.strip(), chan, forced=True, who=nick)
|
join_player(cli, tojoin, chan, forced=True, who=nick)
|
||||||
else:
|
else:
|
||||||
cli.notice(nick, "No, that won't be allowed.")
|
cli.notice(nick, "No, that won't be allowed.")
|
||||||
if fake:
|
if fake:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user