Fix #121: don't accept tells to bot
This commit is contained in:
parent
c6f3423efa
commit
22a3a6aa70
|
@ -70,7 +70,7 @@ def showtells(inp, nick='', chan='', pm=None, db=None):
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@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"
|
".tell <nick> <message> -- relay <message> to <nick> when <nick> is around"
|
||||||
|
|
||||||
query = inp.split(' ', 1)
|
query = inp.split(' ', 1)
|
||||||
|
@ -85,7 +85,7 @@ def tell(inp, nick='', chan='', db=None):
|
||||||
if chan.lower() == user_from.lower():
|
if chan.lower() == user_from.lower():
|
||||||
chan = 'a pm'
|
chan = 'a pm'
|
||||||
|
|
||||||
if user_to == user_from.lower():
|
if user_to in (user_from.lower(), conn.nick.lower()):
|
||||||
return "No."
|
return "No."
|
||||||
|
|
||||||
db_init(db)
|
db_init(db)
|
||||||
|
|
Loading…
Reference in New Issue