QTextCharFormat chathandlerprv::getRightFormat(const usermessage u) { QTextCharFormat format; if (!containsCI(S_S.buddylist, u.user())) format = hash[e_hash_chat]; else format = hash[e_hash_buddy]; if(u.user()==netc->nick) format=hash[e_hash_myself]; if(u.has_type(e_PRIVMSG) && u.has_type(e_ACTION)) format=hash[e_hash_action]; else if(u.has_type(e_CTCP)) format=hash[e_hash_ctcp]; else if(u.has_type(e_NOTICE)) { if(u.has_type(e_ACTION)) format=hash[e_hash_noticeaction]; else format=hash[e_hash_notice]; } else if(u.has_type(e_RAWCOMMAND) || u.has_type(e_SCRIPTCOMMAND)) format=hash[e_hash_raw]; return format; }