void KaduExtInfo::openChat(const QString &link) { kdebugf(); QString uin = link; uin.replace("gg://",""); #if defined(KADU_0_4_x) chat_manager->openChat(QVariant(uin).toUInt()); #elif defined(KADU_0_5_0) UserListElements ul; ul.append(userlist->byID("Gadu",uin)); chat_manager->openChat("Gadu",ul); #endif kdebugf2(); }
void Firewall::messageFiltering(Protocol *protocol, UserListElements senders, QString& msg, QByteArray& formats, bool& stop) { kdebugf(); QString user; // czy senders.count() mo¿e byæ < 1 ??? if (senders.count() > 1) user = tr("conference") + " " + senders[0].ID("Gadu"); else if (userlist->contains(senders[0], FalseForAnonymous)) user = senders[0].altNick(); else user = senders[0].ID("Gadu"); // emotikony s± sprawdzane nawet przy ³±czeniu const int min_interval_notify = 2000; if (config_file.readBoolEntry("Firewall", "dos_emoticons", true)) { bool ignore = false; if (config_file.readBoolEntry("Firewall", "emoticons_allow_known", false)) { ignore = true; foreach(const UserListElement &user, senders) { if (!userlist->contains(user, FalseForAnonymous)) { ignore = false; break; } } }
void KaduExtInfo::onAddedButton(ToolButton *button, ToolBar *toolbar, const UserListElements& users) { kdebugf(); #if defined(KADU_0_5_0) if (!showButton || (users.count() > 1)) button->hide(); button->setPopup(chatmenu); #endif kdebugf2(); }
void KaduExtInfo::setShowChatButton(bool v) { kdebugf(); #if defined(KADU_0_5_0) ChatList cs = chat_manager->chats(); for (uint i = 0; i < cs.count(); i++) { UserListElements u = cs[i]->users()->toUserListElements(); if (u.count() > 1) continue; QValueList<ToolButton*> buttons = KaduActions["extinfo_button"]->toolButtonsForUserListElements(u); for (QValueList<ToolButton*>::iterator i = buttons.begin(); i != buttons.end(); i++) { (*i)->setShown(v); } } #endif kdebugf2(); }