Esempio n. 1
0
    int32 CalculateBadWords(std::string& msg)
    {

        if (m_BadWordsList.empty() || !IsDisabled() || BadnessLevel == 0)
            return -1;

        int32 value = -1;
        for (std::list<sBadWords>::iterator itr = m_BadWordsList.begin(); itr != m_BadWordsList.end(); ++itr)
        {
            if (HasWord(msg, itr->m_word))
            {
                if (value < 0)
                    value = 0;

                value += itr->m_level;
            }
        }
        return value;
    }
Esempio n. 2
0
OP_STATUS OpSpellUiSessionImpl::GetCurrentWord(OpString &word)
{
	return word.Set(HasWord() ? g_spell_ui_data->GetWord() : UNI_L(""));
}