[Tell] Fix it

master
Sfan5 2013-11-17 19:36:08 +01:00
parent f00642cd97
commit 4832424cac
2 changed files with 5 additions and 6 deletions

View File

@ -93,6 +93,6 @@ Required arguments are enclosed in { and }, optional arguments are enclosed in \
<tr> <td>!next</td> <td>Say: "Another satisfied customer. Next!"</td> <td>Anyone</td> </tr>
<tr> <td>!pil [nick]</td> <td>Link to Lua PIL</td> <td>Anyone</td> </tr>
<tr> <td>!git [nick]</td> <td>Link to Git manual</td> <td>Anyone</td> </tr>
<tr> <td><b>tel.py</b></td> <td></td> <td></td> </tr>
<tr> <td><b>tell.py</b></td> <td></td> <td></td> </tr>
<tr> <td>!tell {nick} {message}</td> <td>Tell somebody a message</td> <td>Anyone</td> </tr>
</table>

View File

@ -30,7 +30,7 @@ def tell(phenny, input):
db = sqlite3.connect("tell.sqlite")
c = db.cursor()
c.execute("INSERT INTO tell VALUES (?,?,?)", (d,))
c.execute("INSERT INTO tell VALUES (?,?,?)", d)
c.close()
db.close()
@ -44,14 +44,13 @@ def tell(phenny, input):
tell.commands = ["tell"]
def checktell(phenny, input):
for i in range(len(tell_list)):
e = tell_list[i]
for e in tell_list:
if e[1].lower() == input.nick.lower():
phenny.say("%s: <%s> %s" % (input.nick, e[0], e[2]))
tell_list.remove(i)
tell_list.remove(e)
db = sqlite3.connect("tell.sqlite")
c = db.cursor()
c.execute("DELETE FROM tell WHERE nick = ? AND channel = ? AND msg = ?", (e,))
c.execute("DELETE FROM tell WHERE nick = ? AND channel = ? AND msg = ?", e)
c.close()
db.close()
return