mirror of
https://github.com/anope/anope.git
synced 2026-07-08 12:23:13 +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:
@@ -63,7 +63,7 @@ class CommandMSRSend : public Command
|
||||
source.Reply(_("Memo sent to \002%s\002."), name.c_str());
|
||||
|
||||
bool ischan;
|
||||
MemoInfo *mi = MemoServService->GetMemoInfo(nick, ischan);
|
||||
MemoInfo *mi = MemoInfo::GetMemoInfo(nick, ischan);
|
||||
if (mi == NULL)
|
||||
throw CoreException("NULL mi in ms_rsend");
|
||||
Memo *m = (mi->memos->size() ? mi->GetMemo(mi->memos->size() - 1) : NULL);
|
||||
|
||||
Reference in New Issue
Block a user