if (global_listing >= LimitList && !IS_OPER(user))
{
- user->WriteServ("NOTICE %s :*** Server load is currently too heavy. Please try again later.", user->nick);
- user->WriteNumeric(321, "%s Channel :Users Name",user->nick);
- user->WriteNumeric(323, "%s :End of channel list.",user->nick);
+ user->WriteServ("NOTICE %s :*** Server load is currently too heavy. Please try again later.", user->nick.c_str());
+ user->WriteNumeric(321, "%s Channel :Users Name",user->nick.c_str());
+ user->WriteNumeric(323, "%s :End of channel list.",user->nick.c_str());
return 1;
}
{
if (ServerInstance->Time() < (*last_list_time)+ThrottleSecs)
{
- user->WriteServ("NOTICE %s :*** Woah there, slow down a little, you can't /LIST so often!",user->nick);
- user->WriteNumeric(321, "%s Channel :Users Name",user->nick);
- user->WriteNumeric(323, "%s :End of channel list.",user->nick);
+ user->WriteServ("NOTICE %s :*** Woah there, slow down a little, you can't /LIST so often!",user->nick.c_str());
+ user->WriteNumeric(321, "%s Channel :Users Name",user->nick.c_str());
+ user->WriteNumeric(323, "%s :End of channel list.",user->nick.c_str());
return 1;
}
*llt = ServerInstance->Time();
user->Extend("safelist_last", llt);
- user->WriteNumeric(321, "%s Channel :Users Name",user->nick);
+ user->WriteNumeric(321, "%s Channel :Users Name",user->nick.c_str());
global_listing++;
bool display = (match(chan->name, ld->glob) || (*chan->topic && match(chan->topic, ld->glob)));
if ((users) && (display))
{
- int counter = snprintf(buffer, MAXBUF, "322 %s * %ld :", user->nick, users);
+ int counter = snprintf(buffer, MAXBUF, "322 %s * %ld :", user->nick.c_str(), users);
amount_sent += counter + ServerNameSize;
user->WriteServ(std::string(buffer));
}
bool display = (match(chan->name, ld->glob) || (*chan->topic && match(chan->topic, ld->glob)));
if ((users) && (display))
{
- int counter = snprintf(buffer, MAXBUF, "322 %s %s %ld :[+%s] %s",user->nick, chan->name, users, chan->ChanModes(has_user || IS_OPER(user)), chan->topic);
+ int counter = snprintf(buffer, MAXBUF, "322 %s %s %ld :[+%s] %s",user->nick.c_str(), chan->name, users, chan->ChanModes(has_user || IS_OPER(user)), chan->topic);
amount_sent += counter + ServerNameSize;
user->WriteServ(std::string(buffer));
}
if (!ld->list_ended)
{
ld->list_ended = true;
- user->WriteNumeric(323, "%s :End of channel list.",user->nick);
+ user->WriteNumeric(323, "%s :End of channel list.",user->nick.c_str());
}
}
}
{
if (ServerInstance->ULine(dest->server))
{
- user->WriteNumeric(990, "%s :Cannot use an SA command on a u-lined client",user->nick);
+ user->WriteNumeric(990, "%s :Cannot use an SA command on a u-lined client",user->nick.c_str());
return CMD_FAILURE;
}
if (!ServerInstance->IsChannel(parameters[1].c_str()))
}
else
{
- user->WriteServ("NOTICE %s :*** Invalid SAMODE sequence.", user->nick);
+ user->WriteServ("NOTICE %s :*** Invalid SAMODE sequence.", user->nick.c_str());
}
return CMD_FAILURE;
{
if (ServerInstance->ULine(target->server))
{
- user->WriteNumeric(990, "%s :Cannot use an SA command on a u-lined client",user->nick);
+ user->WriteNumeric(990, "%s :Cannot use an SA command on a u-lined client",user->nick.c_str());
return CMD_FAILURE;
}
std::string oldnick = user->nick;
}
else
{
- user->WriteServ("NOTICE %s :*** Invalid nickname '%s'", user->nick, parameters[1].c_str());
+ user->WriteServ("NOTICE %s :*** Invalid nickname '%s'", user->nick.c_str(), parameters[1].c_str());
}
return CMD_FAILURE;
}
else
{
- user->WriteServ("NOTICE %s :*** No such nickname: '%s'", user->nick, parameters[0].c_str());
+ user->WriteServ("NOTICE %s :*** No such nickname: '%s'", user->nick.c_str(), parameters[0].c_str());
}
return CMD_FAILURE;
if (ServerInstance->ULine(dest->server))
{
- user->WriteNumeric(990, "%s :Cannot use an SA command on a u-lined client",user->nick);
+ user->WriteNumeric(990, "%s :Cannot use an SA command on a u-lined client",user->nick.c_str());
return CMD_FAILURE;
}
}
else
{
- user->WriteServ("NOTICE %s :*** Unable to make %s part %s",user->nick, dest->nick, parameters[1].c_str());
+ user->WriteServ("NOTICE %s :*** Unable to make %s part %s",user->nick.c_str(), dest->nick.c_str(), parameters[1].c_str());
return CMD_FAILURE;
}
}
}
else
{
- user->WriteServ("NOTICE %s :*** Invalid nickname or channel", user->nick);
+ user->WriteServ("NOTICE %s :*** Invalid nickname or channel", user->nick.c_str());
}
return CMD_FAILURE;
{
if (ServerInstance->ULine(dest->server))
{
- user->WriteNumeric(990, "%s :Cannot use an SA command on a u-lined client",user->nick);
+ user->WriteNumeric(990, "%s :Cannot use an SA command on a u-lined client",user->nick.c_str());
return CMD_FAILURE;
}
}
else
{
- user->WriteServ("NOTICE %s :*** Invalid nickname '%s'", user->nick, parameters[0].c_str());
+ user->WriteServ("NOTICE %s :*** Invalid nickname '%s'", user->nick.c_str(), parameters[0].c_str());
}
return CMD_FAILURE;
switch (this->result)
{
case SASL_OK:
- this->user->WriteNumeric(903, "%s :SASL authentication successful", this->user->nick);
+ this->user->WriteNumeric(903, "%s :SASL authentication successful", this->user->nick.c_str());
break;
case SASL_ABORT:
- this->user->WriteNumeric(906, "%s :SASL authentication aborted", this->user->nick);
+ this->user->WriteNumeric(906, "%s :SASL authentication aborted", this->user->nick.c_str());
break;
case SASL_FAIL:
- this->user->WriteNumeric(904, "%s :SASL authentication failed", this->user->nick);
+ this->user->WriteNumeric(904, "%s :SASL authentication failed", this->user->nick.c_str());
break;
default:
break;
return 0;
/* Not exempt, BOOK EM DANNO! */
- user->WriteServ("NOTICE %s :*** You cannot list within the first %lu seconds of connecting. Please try again later.",user->nick, (unsigned long) WaitTime);
+ user->WriteServ("NOTICE %s :*** You cannot list within the first %lu seconds of connecting. Please try again later.",user->nick.c_str(), (unsigned long) WaitTime);
/* Some crap clients (read: mIRC, various java chat applets) muck up if they don't
* receive these numerics whenever they send LIST, so give them an empty LIST to mull over.
*/
- user->WriteNumeric(321, "%s Channel :Users Name",user->nick);
- user->WriteNumeric(323, "%s :End of channel list.",user->nick);
+ user->WriteNumeric(321, "%s Channel :Users Name",user->nick.c_str());
+ user->WriteNumeric(323, "%s :End of channel list.",user->nick.c_str());
return 1;
}
return 0;
virtual void OnUserPostNick(User* user, const std::string &oldnick)
{
- ServerInstance->SNO->WriteToSnoMask(IS_LOCAL(user) ? 'n' : 'N',"User %s changed their nickname to %s", oldnick.c_str(), user->nick);
+ ServerInstance->SNO->WriteToSnoMask(IS_LOCAL(user) ? 'n' : 'N',"User %s changed their nickname to %s", oldnick.c_str(), user->nick.c_str());
}
};