fixed a bug and made !frole case-insensitive
This commit is contained in:
parent
67d9509c1d
commit
05a44098bf
@ -88,6 +88,7 @@ def connect_callback(cli):
|
|||||||
|
|
||||||
var.GAME_START_TIME = datetime.now() # for idle checker only
|
var.GAME_START_TIME = datetime.now() # for idle checker only
|
||||||
var.GRAVEYARD_LOCK = threading.RLock()
|
var.GRAVEYARD_LOCK = threading.RLock()
|
||||||
|
var.GAME_ID = 0
|
||||||
|
|
||||||
prepare_stuff()
|
prepare_stuff()
|
||||||
|
|
||||||
@ -1337,12 +1338,14 @@ def frole(cli, nick, chan, rest):
|
|||||||
cli.msg(chan, "The syntax is incorrect.")
|
cli.msg(chan, "The syntax is incorrect.")
|
||||||
who = rst.pop(0).strip()
|
who = rst.pop(0).strip()
|
||||||
rol = " ".join(rst).strip()
|
rol = " ".join(rst).strip()
|
||||||
if who not in var.USERS:
|
ull = [u.lower() for u in var.USERS]
|
||||||
|
if who.lower() not in ull:
|
||||||
if not is_fake_nick(who):
|
if not is_fake_nick(who):
|
||||||
cli.msg(chan, "Could not be done.")
|
cli.msg(chan, "Could not be done.")
|
||||||
cli.msg(chan, "The target needs to be in this channel or a fake name.")
|
cli.msg(chan, "The target needs to be in this channel or a fake name.")
|
||||||
return
|
return
|
||||||
elif who == botconfig.NICK or not who:
|
who = var.USERS[ull.index(who.lower())]
|
||||||
|
if who == botconfig.NICK or not who:
|
||||||
cli.msg(chan, "No.")
|
cli.msg(chan, "No.")
|
||||||
return
|
return
|
||||||
if rol not in var.ROLES.keys():
|
if rol not in var.ROLES.keys():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user