Fix #121: don't accept tells to bot

This commit is contained in:
Ryan Hitchman 2015-01-11 23:31:09 -08:00
parent c6f3423efa
commit 22a3a6aa70
1 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ def showtells(inp, nick='', chan='', pm=None, db=None):
@hook.command
def tell(inp, nick='', chan='', db=None):
def tell(inp, nick='', chan='', db=None, conn=None):
".tell <nick> <message> -- relay <message> to <nick> when <nick> is around"
query = inp.split(' ', 1)
@ -85,7 +85,7 @@ def tell(inp, nick='', chan='', db=None):
if chan.lower() == user_from.lower():
chan = 'a pm'
if user_to == user_from.lower():
if user_to in (user_from.lower(), conn.nick.lower()):
return "No."
db_init(db)