diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-03-20 04:59:38 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-03-20 04:59:38 +0000 |
| commit | 51351aac2b7e993de3610c406af1218d32a2811f (patch) | |
| tree | 452919cf896b89063894d5ff4af7a7e676d54c00 /src/memoserv.c | |
| parent | ba4c7d813808cad3dd79bfb58025b61506482252 (diff) | |
Added in support for OperServ and MemoServ into SQL
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2822 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/memoserv.c')
| -rw-r--r-- | src/memoserv.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/memoserv.c b/src/memoserv.c index 1db5aa06d..3548ac71c 100644 --- a/src/memoserv.c +++ b/src/memoserv.c @@ -247,17 +247,19 @@ void memo_send(User * u, const char *name, const char *text, int z) m = new Memo; mi->memos.push_back(m); m->sender = source; - if (mi->memos.size() > 1) { + if (mi->memos.size() > 1) + { m->number = mi->memos[mi->memos.size() - 2]->number + 1; - if (m->number < 1) { - unsigned i; - for (i = 0; i < mi->memos.size(); i++) { + if (m->number < 1) + { + for (unsigned i = 0; i < mi->memos.size(); i++) + { mi->memos[i]->number = i + 1; } } - } else { - m->number = 1; } + else + m->number = 1; m->time = time(NULL); m->text = sstrdup(text); m->SetFlag(MF_UNREAD); @@ -274,6 +276,8 @@ void memo_send(User * u, const char *name, const char *text, int z) NickAlias *na; NickCore *nc = (findnick(name))->nc; + FOREACH_MOD(I_OnMemoSend, OnMemoSend(u, nc, m)); + if (Config.MSNotifyAll) { if ((nc->HasFlag(NI_MEMO_RECEIVE)) && get_ignore(name) == NULL) { @@ -301,6 +305,8 @@ void memo_send(User * u, const char *name, const char *text, int z) } else { Channel *c; + FOREACH_MOD(I_OnMemoSend, OnMemoSend(u, cs_findchan(name), m)); + if (Config.MSNotifyAll && (c = findchan(name))) { for (CUserList::iterator it = c->users.begin(); it != c->users.end(); ++it) |
