65#define KVI_CHANNEL_ACTION_HISTORY_MAX_COUNT 40
66#define KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN 600
68#ifndef KVI_CHANNEL_AVERAGE_USERS
69#define KVI_CHANNEL_AVERAGE_USERS 101
118 HaveWhoList = (1 << 2),
120 SentWhoRequest = (1 << 4),
122 Synchronized = (1 << 6),
123 NoCloseOnPart = (1 << 7),
124 SentSyncWhoRequest = (1 << 8)
212 const std::vector<KviMaskEntry *> &
modeMasks(
char cMode)
const
214 static const std::vector<KviMaskEntry *> EMPTY_VECTOR;
215 const auto it = m_ModeLists.find(cMode);
216 if(it != m_ModeLists.end())
304 size_t maskCount(
char cMode)
const {
return this->modeMasks(cMode).size(); };
323 void setModeInList(
char cMode,
const QString & szMask,
bool bAdd,
const QString & szSetBy,
unsigned int uSetAt, QString szChangeMask = QString());
386 m_szSentModeRequests.remove(cMode);
402 m_iStateFlags |= HaveAllNames;
424 m_iStateFlags |= HaveWhoList;
458 void partMessageSent(
bool bCloseOnPart =
true,
bool bShowMessage =
true);
466 bool activityMeter(
unsigned int * puActivityValue,
unsigned int * puActivityTemperature)
override;
505 QSize sizeHint()
const override;
522 KviUserListEntry *
join(
const QString & szNick,
const QString & szUser = QString(),
const QString &
szHost = QString(),
int iFlags = 0) {
return m_pUserListView->
join(szNick, szUser,
szHost, iFlags); };
554 bool setOp(
const QString & szNick,
bool bOp,
bool bIsMe);
562 bool setHalfOp(
const QString & szNick,
bool bHalfOp,
bool) {
return m_pUserListView->
setHalfOp(szNick, bHalfOp); };
570 bool setVoice(
const QString & szNick,
bool bVoice,
bool) {
return m_pUserListView->
setVoice(szNick, bVoice); };
578 bool setUserOp(
const QString & szNick,
bool bUserOp,
bool) {
return m_pUserListView->
setUserOp(szNick, bUserOp); };
586 bool isChanOwner(
const QString & szNick,
bool bAtLeast =
false) {
return m_pUserListView->
isChanOwner(szNick, bAtLeast); };
594 bool isChanAdmin(
const QString & szNick,
bool bAtLeast =
false) {
return m_pUserListView->
isChanAdmin(szNick, bAtLeast); };
602 bool isOp(
const QString & szNick,
bool bAtLeast =
false) {
return m_pUserListView->
isOp(szNick, bAtLeast); };
610 bool isHalfOp(
const QString & szNick,
bool bAtLeast =
false) {
return m_pUserListView->
isHalfOp(szNick, bAtLeast); };
618 bool isVoice(
const QString & szNick,
bool bAtLeast =
false) {
return m_pUserListView->
isVoice(szNick, bAtLeast); };
626 bool isUserOp(
const QString & szNick,
bool bAtLeast =
false) {
return m_pUserListView->
isUserOp(szNick, bAtLeast); };
683 void userAction(
KviIrcMask * user,
unsigned int uActionType);
691 void userAction(
const QString & szNick,
unsigned int uActionType);
701 void userAction(
const QString & szNick,
const QString & szUser,
const QString &
szHost,
unsigned int uActionType);
710 void channelAction(
const QString & szNick,
unsigned int uActionType,
int iTemperature);
718 bool nickChange(
const QString & szOldNick,
const QString & szNewNick);
725 bool part(
const QString & szNick);
732 bool isOn(
const QString & szNick) {
return (m_pUserListView->
findEntry(szNick) != 0); };
751 void updateModeLabel();
759 virtual void outputMessage(
int iMsgType,
const QString & szMsg,
const QDateTime & datetime = QDateTime());
782 void setChannelMode(
char cMode,
bool bAdd);
795 void getChannelModeString(QString &
szBuffer);
802 QString getChannelModeStringWithEmbeddedParams();
810 void setChannelModeWithParam(
char cMode, QString & szParam);
817 bool hasChannelMode(
char cMode) {
return m_szChannelParameterModes.count(cMode); };
826 const auto it = m_szChannelParameterModes.find(cMode);
827 if(it != m_szChannelParameterModes.end())
837 void addHighlightedUser(
const QString & szNick);
844 void removeHighlightedUser(
const QString & szNick);
851 bool isHighlightedUser(
const QString & szNick) {
return m_pTmpHighLighted->contains(szNick, Qt::CaseInsensitive); };
882 void checkChannelSync();
900 bool eventFilter(QObject * pObject, QEvent * pEvent)
override;
965 void internalMask(
const QString & szMask,
bool bAdd,
const QString & szSetBy,
unsigned int uSetAt, std::vector<KviMaskEntry *> &
l,
KviMaskEditor ** ppEd, QString & szChangeMask);
976 void showDoubleView(
bool bShow);
982 void fixActionHistory();
991 void getTalkingUsersStats(QString &
szBuffer, QStringList & list,
bool bPast);
1000 void resizeEvent(QResizeEvent *)
override;
1001 void closeEvent(QCloseEvent * pEvent)
override;
1007 void toggleDoubleView();
1014 void toggleListView();
1020 void toggleListModeEditor();
1026 void toggleModeEditor();
1031 void modeSelectorDone();
1038 void topicSelected(
const QString & szTopic);
1045 void setMode(
const QString & szMode);
1053 void textViewRightClicked();
1061 void removeMasks(
KviMaskEditor * pEd,
const std::vector<KviMaskEntry *> & pList);
1067 void toggleToolButtons();
#define KviTalSplitter
Definition KviTalSplitter.h:34
#define kvi_time_t
Definition KviTimeUtils.h:43
User list view management.
Contains the KviWindow class.
The class which manages a channel.
Definition KviChannelWindow.h:108
const QString & nameWithUserFlag()
Returns the name of the channel with user flags.
Definition KviChannelWindow.h:243
void prependUserFlag(const QString &szNick, QString &szBuffer)
Prepends the user flag to the nickname.
Definition KviChannelWindow.h:492
bool isHalfOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a half operator.
Definition KviChannelWindow.h:610
void setSentWhoRequest()
Sets the WHO request flag.
Definition KviChannelWindow.h:366
bool hasChannelMode(char cMode)
Returns true if the channel has a mode with parameter set (eg. mode k)
Definition KviChannelWindow.h:817
QString m_szSentModeRequests
Definition KviChannelWindow.h:168
QString channelModeParam(char cMode) const
Returns the value (parameter) for a channel mode (eg. the password for mode k)
Definition KviChannelWindow.h:824
ActivityLimit
Holds the limits of the activity in a channel.
Definition KviChannelWindow.h:132
bool sentSyncWhoRequest()
Returns true if we have sent the sync WHO request.
Definition KviChannelWindow.h:342
void setSentSyncWhoRequest()
Sets the sync WHO request flag.
Definition KviChannelWindow.h:348
bool hasQuietBanList()
Returns true if the channel has a quiet ban list.
Definition KviChannelWindow.h:444
bool setVoice(const QString &szNick, bool bVoice, bool)
Sets the voice mode.
Definition KviChannelWindow.h:570
bool hasBanList()
Returns true if the channel has a ban list.
Definition KviChannelWindow.h:432
KviIrcView * messageView() const
Returns the irc view object.
Definition KviChannelWindow.h:200
bool isChanAdmin(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a chan admin.
Definition KviChannelWindow.h:594
bool isDeadChan()
Returns true if the channel is dead.
Definition KviChannelWindow.h:478
QDateTime m_joinTime
Definition KviChannelWindow.h:173
QString m_szChannelMode
Definition KviChannelWindow.h:169
bool isOn(const QString &szNick)
Returns true if the user is on the channel.
Definition KviChannelWindow.h:732
kvi_time_t lastReceivedWhoReply()
Returns the time of the last received WHO reply.
Definition KviChannelWindow.h:329
KviWindowToolPageButton * m_pModeEditorButton
Definition KviChannelWindow.h:159
bool setHalfOp(const QString &szNick, bool bHalfOp, bool)
Sets the half operator mode.
Definition KviChannelWindow.h:562
size_t maskCount(char cMode) const
Returns the number of masks is a channel mode list.
Definition KviChannelWindow.h:304
int chanOwnerCount()
Returns the number of users with chanowner status.
Definition KviChannelWindow.h:262
QString m_szNameWithUserFlag
Definition KviChannelWindow.h:174
bool isChanOwner(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a chan owner.
Definition KviChannelWindow.h:586
StateFlag
Holds the state flags of the channel.
Definition KviChannelWindow.h:116
bool isOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is an operator.
Definition KviChannelWindow.h:602
QString plainChannelMode()
Returns only the plain (parameter-less) channel modes (eg: mi)
Definition KviChannelWindow.h:788
const std::vector< KviMaskEntry * > & modeMasks(char cMode) const
Returns a list of masks for a specific mode.
Definition KviChannelWindow.h:212
QList< int > m_SplitterSizesList
Definition KviChannelWindow.h:180
bool isUserOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a user operator.
Definition KviChannelWindow.h:626
KviUserListView * m_pUserListView
Definition KviChannelWindow.h:165
KviPixmap m_privateBackground
Definition KviChannelWindow.h:172
KviIrcView * m_pMessageView
Definition KviChannelWindow.h:163
bool isMeIrcOp(bool bAtLeast=false)
Returns true if we are an ircop.
KviTalHBox * m_pButtonContainer
Definition KviChannelWindow.h:181
bool setChanOwner(const QString &szNick, bool bChanOwner)
Sets the chan owner mode.
Definition KviChannelWindow.h:537
bool isMeChanOwner(bool bAtLeast=false)
Returns true if we are a chan owner.
bool isMeOp(bool bAtLeast=false)
Returns true if we are an operator.
bool setChanAdmin(const QString &szNick, bool bChanAdmin)
Sets the chan admin mode.
Definition KviChannelWindow.h:545
KviTalSplitter * m_pVertSplitter
Definition KviChannelWindow.h:156
void setSentListRequest(char cMode)
Sets the "sent request" flag for a specific channel mode.
Definition KviChannelWindow.h:378
bool hasAllNames()
Returns true if the channel has all names.
Definition KviChannelWindow.h:394
QStringList * m_pTmpHighLighted
Definition KviChannelWindow.h:175
const QString & target() override
Returns the name of the channel.
Definition KviChannelWindow.h:237
QList< KviChannelAction * > m_lActionHistory
Definition KviChannelWindow.h:177
void setHasWhoList()
Sets the existence of the WHO list.
Definition KviChannelWindow.h:422
void setListRequestDone(char cMode)
Clears the "sent request" flag for a specific chanel mode.
Definition KviChannelWindow.h:384
KviTalSplitter * m_pTopSplitter
Definition KviChannelWindow.h:155
bool isHighlightedUser(const QString &szNick)
Returns true if the user is highlighted.
Definition KviChannelWindow.h:851
bool closeOnPart()
Returns true if the channel has to be closed on part.
Definition KviChannelWindow.h:450
void setLastReceivedWhoReply(kvi_time_t tTime)
Sets the time of the last received WHO reply.
Definition KviChannelWindow.h:336
kvi_time_t m_tLastReceivedWhoReply
Definition KviChannelWindow.h:178
int halfOpCount()
Returns the number of users with halfop status.
Definition KviChannelWindow.h:280
bool isMeVoice(bool bAtLeast=false)
Returns true if we are a voice.
KviUserListView * userListView()
Returns the user listview object.
Definition KviChannelWindow.h:188
void opStatusChanged()
Emitted when our op status change.
QString * firstSelectedNickname()
Returns the first selected nickname in the userlist.
Definition KviChannelWindow.h:225
void clearSentSyncWhoRequest()
Clears the sync WHO request flag.
Definition KviChannelWindow.h:354
bool hasWhoList()
Returns true if the channel has a WHO list.
Definition KviChannelWindow.h:416
QList< int > m_VertSplitterSizesList
Definition KviChannelWindow.h:179
std::map< char, std::vector< KviMaskEntry * > > m_ModeLists
Definition KviChannelWindow.h:171
int userOpCount()
Returns the number of users with userop status.
Definition KviChannelWindow.h:292
KviTopicWidget * topicWidget()
Returns the topic widget object.
Definition KviChannelWindow.h:194
KviUserListEntry * join(const QString &szNick, const QString &szUser=QString(), const QString &szHost=QString(), int iFlags=0)
Called when a user joins the channel.
Definition KviChannelWindow.h:522
int selectedCount()
Returns the number of selected users.
Definition KviChannelWindow.h:256
void setHasAllNames()
Sets the existence of all names.
Definition KviChannelWindow.h:400
KviUserListEntry * findEntry(const QString &szNick)
Searches for a user in the userlist.
Definition KviChannelWindow.h:739
bool avatarChanged(const QString &szNick)
Returns true if the avatar of a user is changed.
Definition KviChannelWindow.h:529
bool hasInviteList()
Returns true if the channel has an invite list.
Definition KviChannelWindow.h:410
bool isMeHalfOp(bool bAtLeast=false)
Returns true if we are a half operator.
KviTopicWidget * m_pTopicWidget
Definition KviChannelWindow.h:164
KviWindowToolPageButton * m_pListViewButton
Definition KviChannelWindow.h:158
QString * nextSelectedNickname()
Returns the next selected nickname in the userlist.
Definition KviChannelWindow.h:231
QToolButton * m_pDoubleViewButton
Definition KviChannelWindow.h:157
KviModeEditor * m_pModeEditor
Definition KviChannelWindow.h:162
unsigned int m_uActionHistoryHotActionCount
Definition KviChannelWindow.h:176
bool isMeUserOp(bool bAtLeast=false)
Returns true if we are a user operator.
int voiceCount()
Returns the number of users with voice status.
Definition KviChannelWindow.h:286
bool isVoice(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a voice.
Definition KviChannelWindow.h:618
bool isMeChanAdmin(bool bAtLeast=false)
Returns true if we are a chan admin.
bool sentListRequest(char cMode)
Returns true if we have sent a list request for a specific channel mode.
Definition KviChannelWindow.h:372
bool sentWhoRequest()
Returns true if we have sent the WHO request.
Definition KviChannelWindow.h:360
int opCount()
Returns the number of users with op status.
Definition KviChannelWindow.h:274
QFrame * buttonContainer() override
Returns the button container object.
Definition KviChannelWindow.h:206
bool setUserOp(const QString &szNick, bool bUserOp, bool)
Sets the user operator mode.
Definition KviChannelWindow.h:578
int chanAdminCount()
Returns the number of users with chanadmin status.
Definition KviChannelWindow.h:268
KviModeWidget * m_pModeWidget
Definition KviChannelWindow.h:166
bool hasBanExceptionList()
Returns true if the channel has a ban exception list.
Definition KviChannelWindow.h:438
std::map< char, KviWindowToolPageButton * > m_ListEditorButtons
Definition KviChannelWindow.h:160
unsigned int count()
Returns the number of users.
Definition KviChannelWindow.h:298
std::map< char, QString > m_szChannelParameterModes
Definition KviChannelWindow.h:170
int m_iStateFlags
Definition KviChannelWindow.h:167
void enableUserListUpdates(bool bEnable)
Enables or disable the userlist updates.
Definition KviChannelWindow.h:512
std::map< char, KviMaskEditor * > m_ListEditors
Definition KviChannelWindow.h:161
char getUserFlag(const QString &szNick)
Returns the flag of a user.
Definition KviChannelWindow.h:499
Definition KviConfigurationFile.h:50
Definition KviConsoleWindow.h:74
Definition KviIrcConnectionServerInfo.h:300
Irc user mask handling.
Definition KviIrcMask.h:48
Definition KviIrcView.h:60
Definition KviMaskEditor.h:97
Definition KviModeEditor.h:44
Definition KviPixmap.h:35
Toolkit Abstraction Layer: hbox class.
Definition KviTalHBox.h:44
Definition KviThemedLabel.h:34
Userlist entry management class.
Definition KviUserListView.h:134
User list view management class.
Definition KviUserListView.h:226
bool setVoice(const QString &szNick, bool bVoice)
Sets the voice mode.
bool isChanOwner(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a chan owner.
int userOpCount()
Returns the number of user operators.
Definition KviUserListView.h:390
QString * firstSelectedNickname()
Returns the first selected nickname in the list.
Definition KviUserListView.cpp:1161
int voiceCount()
Returns the number of voices.
Definition KviUserListView.h:384
int selectedCount()
Returns the number of selected entries in the userlist.
Definition KviUserListView.h:348
KviUserListEntry * findEntry(const QString &szNick)
Searches an entry in the userlist.
Definition KviUserListView.h:399
bool setChanOwner(const QString &szNick, bool bChanOwner)
Sets the chan owner mode.
bool isOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is an operator.
bool setHalfOp(const QString &szNick, bool bHalfOp)
Sets the half operator mode.
bool setUserOp(const QString &szNick, bool bUserOp)
Sets the user operator mode.
int chanOwnerCount()
Returns the number of chan owners.
Definition KviUserListView.h:360
int chanAdminCount()
Returns the number of chan admins.
Definition KviUserListView.h:366
KviUserListEntry * join(const QString &szNick, const QString &szUser=QString(), const QString &szHost=QString(), int iFlags=0)
Called when a user joins the channel.
Definition KviUserListView.cpp:834
QString * nextSelectedNickname()
Returns the next selected nickname in the list.
Definition KviUserListView.cpp:1177
int halfOpCount()
Returns the number of half operators.
Definition KviUserListView.h:378
int opCount()
Returns the number of operators.
Definition KviUserListView.h:372
bool isChanAdmin(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a chan admin.
void enableUpdates(bool bEnable)
Enables the updates on the view list area.
Definition KviUserListView.cpp:385
bool isUserOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a user operator.
void prependUserFlag(const QString &szNick, QString &szBuffer)
Prepends the user flags before the nickname.
Definition KviUserListView.cpp:1102
unsigned int count()
Returns the number of the entries in the userlist.
Definition KviUserListView.h:342
bool isHalfOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is an half operator.
bool avatarChanged(const QString &szNick)
Returns true if the avatar of a user is changed.
Definition KviUserListView.cpp:889
bool isVoice(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a voice.
char getUserFlag(KviUserListEntry *pEntry)
Returns the flags of a user.
Definition KviUserListView.cpp:1094
bool setChanAdmin(const QString &szNick, bool bChanAdmin)
Sets the chan admin mode.
Definition KviWindowToolWidget.h:47
Base class for all windows in KVIrc.
Definition KviWindow.h:75
virtual void loadProperties(KviConfigurationFile *pCfg)
Definition KviWindow.cpp:599
bool eventFilter(QObject *pObject, QEvent *pEvent) override
Definition KviWindow.cpp:1010
virtual void preprocessMessage(QString &szMessage)
Definition KviWindow.cpp:1330
const QString & windowName() const
Returns the name of this window.
Definition KviWindow.h:228
virtual KviIrcView * lastClickedView() const
Returns the KviIrcView that was last clicked in this window.
Definition KviWindow.h:291
virtual void applyOptions()
Definition KviWindow.cpp:1140
virtual QPixmap * myIconPtr()
Definition KviWindow.cpp:630
virtual void triggerCreationEvents()
Definition KviWindow.h:468
virtual void getWindowListTipText(QString &szBuffer)
Definition KviWindow.h:357
virtual void fillCaptionBuffers()
Definition KviWindow.cpp:635
virtual void saveProperties(KviConfigurationFile *pCfg)
Definition KviWindow.cpp:573
virtual void lostUserFocus()
Definition KviWindow.cpp:1160
virtual void ownAction(const QString &)
Definition KviWindow.h:391
virtual void ownMessage(const QString &, bool=true)
Definition KviWindow.h:390
virtual void getBaseLogFileName(QString &szBuffer)
Definition KviWindow.cpp:568
void closeEvent(QCloseEvent *pEvent) override
Definition KviWindow.cpp:869
void unhighlight()
Definition KviWindow.cpp:1323
virtual void getConfigGroupName(QString &szBuffer)
Definition KviWindow.cpp:501
virtual bool activityMeter(unsigned int *puActivityValue, unsigned int *puActivityTemperature)
Definition KviWindow.cpp:285
#define l
Definition detector.cpp:77
This file contains compile time settings.
#define KVIRC_API
Definition kvi_settings.h:127
QString szHost
Definition libkvisetup.cpp:48
Definition KviChannelWindow.h:77
QString szNick
Definition KviChannelWindow.h:78
int iTemperature
Definition KviChannelWindow.h:81
unsigned int uActionType
Definition KviChannelWindow.h:79
kvi_time_t tTime
Definition KviChannelWindow.h:80
Definition KviChannelWindow.h:89
bool bStatsInaccurate
Definition KviChannelWindow.h:91
unsigned int uHotActionPercent
Definition KviChannelWindow.h:98
unsigned int uActionsInTheLastMinute
Definition KviChannelWindow.h:95
QStringList lTalkingUsers
Definition KviChannelWindow.h:99
unsigned int uHotActionCount
Definition KviChannelWindow.h:97
double dActionsPerMinute
Definition KviChannelWindow.h:94
QStringList lWereTalkingUsers
Definition KviChannelWindow.h:100
unsigned int uLastActionTimeSpan
Definition KviChannelWindow.h:92
unsigned int uFirstActionTimeSpan
Definition KviChannelWindow.h:93
int iAverageActionTemperature
Definition KviChannelWindow.h:96
unsigned int uActionCount
Definition KviChannelWindow.h:90
char szBuffer[4096]
Definition winamp.cpp:77