for (std::string::const_iterator i = text.begin() + offset; i != text.end(); ++i)
caps += capsmap[(unsigned char)*i];
for (std::string::const_iterator i = text.begin() + offset; i != text.end(); ++i)
caps += capsmap[(unsigned char)*i];
- if ( ((caps*100)/(int)text.length()) >= percent )
+ if (((caps * 100) / text.length()) >= percent)
{
{
- user->WriteNumeric(ERR_CANNOTSENDTOCHAN, "%s :Your message cannot contain more than %d%% capital letters if it's longer than %d characters", c->name.c_str(), percent, minlen);
+ user->WriteNumeric(ERR_CANNOTSENDTOCHAN, c->name, InspIRCd::Format("Your message cannot contain %d%% or more capital letters if it's longer than %d characters", percent, minlen));