diff options
author | Adam <Adam@anope.org> | 2010-09-26 02:33:01 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-09-26 02:33:01 -0400 |
commit | d646d455e2655be59f6d5bcc56710ac70548ca37 (patch) | |
tree | d236b9d4991d62538a0318f213416396734e72e0 /src/mail.cpp | |
parent | 05e6815d912f0418f6da25a2106dd718796f02fa (diff) |
Changed the language system to use gettext
Diffstat (limited to 'src/mail.cpp')
-rw-r--r-- | src/mail.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/mail.cpp b/src/mail.cpp index 55e99e406..5cb64f6d3 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -1,5 +1,4 @@ #include "services.h" -#include "language.h" MailThread::~MailThread() { @@ -30,17 +29,17 @@ void MailThread::Run() Success = true; } -bool Mail(User *u, NickRequest *nr, const Anope::string &service, const Anope::string &subject, const Anope::string &message) +bool Mail(User *u, NickRequest *nr, BotInfo *service, const Anope::string &subject, const Anope::string &message) { - if (!u || !nr || subject.empty() || service.empty() || message.empty()) + if (!u || !nr || !service || subject.empty() || message.empty()) return false; if (!Config->UseMail) - notice_lang(service, u, MAIL_DISABLED); + u->SendMessage(service, MAIL_DISABLED); else if (Anope::CurTime - u->lastmail < Config->MailDelay) - notice_lang(service, u, MAIL_DELAYED, Config->MailDelay - Anope::CurTime - u->lastmail); + u->SendMessage(service, MAIL_DELAYED, Config->MailDelay - Anope::CurTime - u->lastmail); else if (nr->email.empty()) - notice_lang(service, u, MAIL_INVALID, nr->nick.c_str()); + u->SendMessage(service, MAIL_INVALID, nr->nick.c_str()); else { u->lastmail = nr->lastmail = Anope::CurTime; @@ -51,17 +50,17 @@ bool Mail(User *u, NickRequest *nr, const Anope::string &service, const Anope::s return false; } -bool Mail(User *u, NickCore *nc, const Anope::string &service, const Anope::string &subject, const Anope::string &message) +bool Mail(User *u, NickCore *nc, BotInfo *service, const Anope::string &subject, const Anope::string &message) { - if (!u || !nc || subject.empty() || service.empty() || message.empty()) + if (!u || !nc || !service || subject.empty() || message.empty()) return false; if (!Config->UseMail) - notice_lang(service, u, MAIL_DISABLED); + u->SendMessage(service, MAIL_DISABLED); else if (Anope::CurTime - u->lastmail < Config->MailDelay) - notice_lang(service, u, MAIL_DELAYED, Config->MailDelay - Anope::CurTime - u->lastmail); + u->SendMessage(service, MAIL_DELAYED, Config->MailDelay - Anope::CurTime - u->lastmail); else if (nc->email.empty()) - notice_lang(service, u, MAIL_INVALID, nc->display.c_str()); + u->SendMessage(service, MAIL_INVALID, nc->display.c_str()); else { u->lastmail = nc->lastmail = Anope::CurTime; |