diff options
| author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-04-04 00:49:50 +0000 |
|---|---|---|
| committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-04-04 00:49:50 +0000 |
| commit | 36f523249a2834b289471465c2a4b4b5a2475589 (patch) | |
| tree | f22907a72bde0006d35f72db067cedb17185f93b /src | |
| parent | b0b8e704423949b9335de1c4d147854264778157 (diff) | |
Fix access checking in core
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2256 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
| -rw-r--r-- | src/hostserv.c | 2 | ||||
| -rw-r--r-- | src/mail.c | 2 | ||||
| -rw-r--r-- | src/memoserv.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/hostserv.c b/src/hostserv.c index a2a82cf00..ec57ac841 100644 --- a/src/hostserv.c +++ b/src/hostserv.c @@ -519,7 +519,7 @@ int is_host_setter(User * u) int i, j; NickAlias *na; - if (is_services_oper(u)) { + if (u->nc && u->nc->IsServicesOper()) { return 1; } if (!nick_identified(u)) { diff --git a/src/mail.c b/src/mail.c index e33d9ab61..5e7adb7a2 100644 --- a/src/mail.c +++ b/src/mail.c @@ -91,7 +91,7 @@ MailInfo *MailBegin(User * u, NickCore * nc, char *subject, char *service) notice_lang(service, u, MAIL_DISABLED); } else if (((time(NULL) - u->lastmail < MailDelay) || (time(NULL) - nc->lastmail < MailDelay)) - && !is_services_root(u)) { + && !(u->nc && u->nc->IsServicesOper())) { notice_lang(service, u, MAIL_DELAYED, MailDelay); } else if (!nc->email) { notice_lang(service, u, MAIL_INVALID, nc->display); diff --git a/src/memoserv.c b/src/memoserv.c index fc578a25a..b8b394bdb 100644 --- a/src/memoserv.c +++ b/src/memoserv.c @@ -201,7 +201,7 @@ void memo_send(User * u, const char *name, const char *text, int z) MemoInfo *mi; time_t now = time(NULL); char *source = u->nc->display; - int is_servoper = is_services_oper(u); + int is_servoper = u->nc && u->nc->IsServicesOper(); if (readonly) { notice_lang(s_MemoServ, u, MEMO_SEND_DISABLED); @@ -232,7 +232,7 @@ void memo_send(User * u, const char *name, const char *text, int z) } } } else if (z != 2 && MSSendDelay > 0 && - u && u->lastmemosend + MSSendDelay > now && !is_servoper) { + u && u->lastmemosend + MSSendDelay > now) { u->lastmemosend = now; if (z == 0) notice_lang(s_MemoServ, u, MEMO_SEND_PLEASE_WAIT, MSSendDelay); |
