mirror of
https://github.com/anope/anope.git
synced 2026-06-27 16:46:39 +02:00
Added a new logging system
This commit is contained in:
@@ -24,7 +24,8 @@ class CommandNSConfirm : public Command
|
||||
|
||||
if (!na)
|
||||
{
|
||||
Alog() << Config->s_NickServ << ": makenick(" << u->nick << ") failed";
|
||||
// XXX
|
||||
//Alog() << Config->s_NickServ << ": makenick(" << u->nick << ") failed";
|
||||
notice_lang(Config->s_NickServ, u, NICK_REGISTRATION_FAILED);
|
||||
return MOD_CONT;
|
||||
}
|
||||
@@ -57,7 +58,7 @@ class CommandNSConfirm : public Command
|
||||
if (!force)
|
||||
{
|
||||
u->Login(na->nc);
|
||||
Alog() << Config->s_NickServ << ": '" << u->nick << "' registered by " << u->GetIdent() << "@" << u->host << " (e-mail: " << (!nr->email.empty() ? nr->email : "none") << ")";
|
||||
Log(LOG_COMMAND, u, this) << "to register " << u->nick << " (email: " << (!nr->email.empty() ? nr->email : "none") << ")";
|
||||
if (Config->NSAddAccessOnReg)
|
||||
notice_lang(Config->s_NickServ, u, NICK_REGISTERED, u->nick.c_str(), na->nc->GetAccess(0).c_str());
|
||||
else
|
||||
@@ -74,7 +75,7 @@ class CommandNSConfirm : public Command
|
||||
}
|
||||
else
|
||||
{
|
||||
Alog() << Config->s_NickServ << ": '" << nr->nick << "' confirmed by " << u->GetMask() << " (email: " << (!nr->email.empty() ? nr->email : "none") << " )";
|
||||
Log(LOG_COMMAND, u, this) << "to confirm " << u->nick << " (email: " << (!nr->email.empty() ? nr->email : "none") << ")";
|
||||
notice_lang(Config->s_NickServ, u, NICK_FORCE_REG, nr->nick.c_str());
|
||||
User *user = finduser(nr->nick);
|
||||
/* Delrequest must be called before validate_user */
|
||||
@@ -250,7 +251,8 @@ class CommandNSRegister : public CommandNSConfirm
|
||||
/* i.e. there's already such a nick regged */
|
||||
if (na->HasFlag(NS_FORBIDDEN))
|
||||
{
|
||||
Alog() << Config->s_NickServ << ": " << u->GetIdent() << "@" << u->host << " tried to register FORBIDden nick " << u->nick;
|
||||
// XXX
|
||||
//Alog() << Config->s_NickServ << ": " << u->GetIdent() << "@" << u->host << " tried to register FORBIDden nick " << u->nick;
|
||||
notice_lang(Config->s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
|
||||
}
|
||||
else
|
||||
@@ -278,11 +280,11 @@ class CommandNSRegister : public CommandNSConfirm
|
||||
if (SendRegmail(u, nr))
|
||||
{
|
||||
notice_lang(Config->s_NickServ, u, NICK_ENTER_REG_CODE, email.c_str(), Config->s_NickServ.c_str());
|
||||
Alog() << Config->s_NickServ << ": sent registration verification code to " << nr->email;
|
||||
Log(LOG_COMMAND, u, this) << "send registration verification code to " << nr->email;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alog() << Config->s_NickServ << ": Unable to send registration verification mail";
|
||||
Log(LOG_COMMAND, u, this) << "unable to send registration verification mail";
|
||||
notice_lang(Config->s_NickServ, u, NICK_REG_UNABLE);
|
||||
delete nr;
|
||||
return MOD_CONT;
|
||||
@@ -342,11 +344,11 @@ class CommandNSResend : public Command
|
||||
{
|
||||
nr->lastmail = time(NULL);
|
||||
notice_lang(Config->s_NickServ, u, NICK_REG_RESENT, nr->email.c_str());
|
||||
Alog() << Config->s_NickServ << ": re-sent registration verification code for " << nr->nick << " to " << nr->email;
|
||||
Log(LOG_COMMAND, u, this) << "resend registration verification code for " << nr->nick;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alog() << Config->s_NickServ << ": Unable to re-send registration verification mail for " << nr->nick;
|
||||
Log(LOG_COMMAND, u, this) << "unable to resend registration verification code for " << nr->nick;
|
||||
return MOD_CONT;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user