Merge branch 'patch-1' of https://github.com/nathanblaney/CloudBot into nathanblaney-patch-1
This commit is contained in:
commit
27bd43b5ec
2 changed files with 6 additions and 3 deletions
|
@ -31,7 +31,10 @@ def seen_sieve(paraml, input=None, db=None):
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def seen(inp, nick='', chan='', db=None, input=None):
|
def seen(inp, nick='', chan='', db=None, input=None):
|
||||||
"""seen <nick> -- Tell when a nickname was last in active in one of this bot's channels."""
|
"""seen <nick> <channel> -- Tell when a nickname was last in active in one of this bot's channels."""
|
||||||
|
if len(inp.split(' ')) > 1:
|
||||||
|
chan = inp.split(' ')[1]
|
||||||
|
inp = inp.split(' ')[0]
|
||||||
|
|
||||||
if input.conn.nick.lower() == inp.lower():
|
if input.conn.nick.lower() == inp.lower():
|
||||||
return "You need to get your eyes checked."
|
return "You need to get your eyes checked."
|
||||||
|
|
|
@ -95,7 +95,7 @@ def tell(inp, nick='', chan='', db=None, input=None, notice=None):
|
||||||
notice("Thanks for the message, {}!".format(user_from))
|
notice("Thanks for the message, {}!".format(user_from))
|
||||||
return
|
return
|
||||||
|
|
||||||
if not re.match("^[A-Za-z0-9_|.-\]\[]*$", user_to.lower()):
|
if not re.match("^[A-Za-z0-9_|.\-\]\[]*$", user_to.lower()):
|
||||||
notice("I cant send a message to that user!")
|
notice("I cant send a message to that user!")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Reference in a new issue