make !fjoin more like !frole (you can do it on people who are in the channel)
This commit is contained in:
parent
05a44098bf
commit
b7f6d8f15e
16
wolfgame.py
16
wolfgame.py
@ -262,7 +262,7 @@ def pinger(cli, nick, chan, rest):
|
|||||||
@cmd("back", raw_nick=True)
|
@cmd("back", raw_nick=True)
|
||||||
@pmcmd("back", raw_nick=True)
|
@pmcmd("back", raw_nick=True)
|
||||||
def away(cli, nick, *rest):
|
def away(cli, nick, *rest):
|
||||||
"""Use this to add yourself to the no-ping list."""
|
"""Use this to toggle your away status (for !ping)."""
|
||||||
cloak = parse_nick(nick)[3]
|
cloak = parse_nick(nick)[3]
|
||||||
nick = parse_nick(nick)[0]
|
nick = parse_nick(nick)[0]
|
||||||
if cloak in var.AWAY:
|
if cloak in var.AWAY:
|
||||||
@ -312,16 +312,20 @@ def fjoin(cli, nick, chan, rest):
|
|||||||
noticed = False
|
noticed = False
|
||||||
if not rest.strip():
|
if not rest.strip():
|
||||||
return
|
return
|
||||||
|
|
||||||
for a in re.split("\s+",rest):
|
for a in re.split("\s+",rest):
|
||||||
a = a.strip()
|
a = a.strip()
|
||||||
if not a:
|
if not a:
|
||||||
continue
|
continue
|
||||||
if not is_fake_nick(a):
|
ull = [u.lower() for u in var.USERS]
|
||||||
if not noticed:
|
if a.lower() not in ull:
|
||||||
cli.msg(chan, nick+": You may only fjoin fake people for now.")
|
if not is_fake_nick(a) and not noticed:
|
||||||
noticed = True
|
cli.msg(chan, nick+(": You may only fjoin fake people "+
|
||||||
|
"or people in this channel for now."))
|
||||||
|
noticed = True
|
||||||
continue
|
continue
|
||||||
if a != botconfig.NICK and a:
|
a = var.USERS[ull.index(a.lower())]
|
||||||
|
if a != botconfig.NICK:
|
||||||
join(cli, a.strip(), chan, "")
|
join(cli, a.strip(), chan, "")
|
||||||
else:
|
else:
|
||||||
cli.notice(nick, "No, that won't be allowed.")
|
cli.notice(nick, "No, that won't be allowed.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user