mirror of
https://github.com/anope/anope.git
synced 2026-07-07 13:23:12 +02:00
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.
This commit is contained in:
+3
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user