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++;
if ((chan) && (chan->modes[CM_PRIVATE]) && (!IS_OPER(user)))
{
- bool display = (match(chan->name, ld->glob.c_str()) || (*chan->topic && match(chan->topic, ld->glob.c_str())));
+ bool display = (match(chan->name, ld->glob) || (!chan->topic.empty() && match(chan->topic, ld->glob)));
if ((users) && (display))
{
- int counter = snprintf(buffer, MAXBUF, "322 %s *", user->nick);
+ int counter = snprintf(buffer, MAXBUF, "322 %s * %ld :", user->nick.c_str(), users);
amount_sent += counter + ServerNameSize;
user->WriteServ(std::string(buffer));
}
}
- else if ((chan) && ((((!(chan->modes[CM_PRIVATE])) && (!(chan->modes[CM_SECRET])))) || (has_user) || IS_OPER(user)))
+ else if ((chan) && ((((!(chan->IsModeSet('p'))) && (!(chan->IsModeSet('s'))))) || (has_user) || IS_OPER(user)))
{
- bool display = (match(chan->name, ld->glob.c_str()) || (*chan->topic && match(chan->topic, ld->glob.c_str())));
+ bool display = (match(chan->name, ld->glob) || (!chan->topic.empty() && 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.c_str(), users, chan->ChanModes(has_user || IS_OPER(user)), chan->topic.c_str());
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());
}
}
}