Cleaned up flirt, kill, lart, and slap.py
This commit is contained in:
parent
fb304bf970
commit
59628292c1
4 changed files with 24 additions and 21 deletions
|
@ -47,9 +47,16 @@ flirts = ["I bet your name's Mickey, 'cause you're so fine.",
|
|||
@hook.command(autohelp=False)
|
||||
def flirt(inp, nick=None, me=None, input=None):
|
||||
".flirt <user> -- Make the bot flirt with <user>."
|
||||
msg = "flirts with " + nick + "... \"" + random.choice(flirts) + "\""
|
||||
if re.match("^[A-Za-z0-9_|.-\]\[]*$", inp.lower()) and inp != "":
|
||||
msg = "flirts with " + inp + "... \"" + random.choice(flirts) + "\""
|
||||
inp = inp.strip()
|
||||
|
||||
if not re.match("^[A-Za-z0-9_|.-\]\[]*$", inp.lower()):
|
||||
notice("Invalid username!")
|
||||
return
|
||||
|
||||
target = nick
|
||||
if inp.lower() and inp != "":
|
||||
target = inp
|
||||
if inp == input.conn.nick.lower() or inp == "itself":
|
||||
msg = "flirts with itself... \"" + random.choice(flirts) + "\""
|
||||
target = "itself"
|
||||
msg = "flirts with " + target + "... \"" + random.choice(flirts) + "\""
|
||||
me(msg)
|
||||
|
|
Reference in a new issue