Browse Source

make !fjoin more like !frole (you can do it on people who are in the channel)

master
jcao219 14 years ago
parent
commit
0a1dbc02ea
  1. 14
      wolfgame.py

14
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:
cli.msg(chan, nick+(": You may only fjoin fake people "+
"or people in this channel for now."))
noticed = True 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…
Cancel
Save