diff options
author | Adam <Adam@anope.org> | 2013-01-25 03:09:51 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-01-25 03:09:51 -0500 |
commit | 76d9e58ae59ca99452ebaeedef661d0f82fc7104 (patch) | |
tree | 014661d8ceb6d422a7cafbd1a97ef3095fea04f4 /include/memo.h | |
parent | 3769cc1a3597dd70e88c305540a61984db2626af (diff) |
mysql_insert_id doesn't return an id if one isnt generated, so
check that it really returns a value before using it.
Also fix memos to cleanup after themselves when deleted.
Diffstat (limited to 'include/memo.h')
-rw-r--r-- | include/memo.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/memo.h b/include/memo.h index c8bf11f74..30215a340 100644 --- a/include/memo.h +++ b/include/memo.h @@ -22,6 +22,7 @@ class CoreExport Memo : public Serializable bool unread; bool receipt; Memo(); + ~Memo(); void Serialize(Serialize::Data &data) const anope_override; static Serializable* Unserialize(Serializable *obj, Serialize::Data &); @@ -46,8 +47,9 @@ struct CoreExport MemoInfo Memo *GetMemo(unsigned index) const; unsigned GetIndex(Memo *m) const; void Del(unsigned index); - void Del(Memo *m); bool HasIgnore(User *u); + + static MemoInfo *GetMemoInfo(const Anope::string &targ, bool &is_chan); }; #endif // MEMO_H |