59#ifdef COMPILE_ON_WINDOWS
71#define KVI_CHANNEL_ACTION_HISTORY_MAX_COUNT 40
72#define KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN 600
74#ifndef KVI_CHANNEL_AVERAGE_USERS
75#define KVI_CHANNEL_AVERAGE_USERS 101
124 HaveWhoList = (1 << 2),
126 SentWhoRequest = (1 << 4),
128 Synchronized = (1 << 6),
129 NoCloseOnPart = (1 << 7),
130 SentSyncWhoRequest = (1 << 8)
218 const std::vector<KviMaskEntry *> &
modeMasks(
char cMode)
const
220 static const std::vector<KviMaskEntry *> EMPTY_VECTOR;
221 const auto it = m_ModeLists.find(cMode);
222 if(it != m_ModeLists.end())
310 size_t maskCount(
char cMode)
const {
return this->modeMasks(cMode).size(); };
329 void setModeInList(
char cMode,
const QString & szMask,
bool bAdd,
const QString & szSetBy,
unsigned int uSetAt, QString szChangeMask = QString());
392 m_szSentModeRequests.remove(cMode);
408 m_iStateFlags |= HaveAllNames;
430 m_iStateFlags |= HaveWhoList;
464 void partMessageSent(
bool bCloseOnPart =
true,
bool bShowMessage =
true);
472 bool activityMeter(
unsigned int * puActivityValue,
unsigned int * puActivityTemperature)
override;
511 QSize sizeHint()
const override;
528 KviUserListEntry *
join(
const QString & szNick,
const QString & szUser = QString(),
const QString &
szHost = QString(),
int iFlags = 0) {
return m_pUserListView->
join(szNick, szUser,
szHost, iFlags); };
560 bool setOp(
const QString & szNick,
bool bOp,
bool bIsMe);
568 bool setHalfOp(
const QString & szNick,
bool bHalfOp,
bool) {
return m_pUserListView->
setHalfOp(szNick, bHalfOp); };
576 bool setVoice(
const QString & szNick,
bool bVoice,
bool) {
return m_pUserListView->
setVoice(szNick, bVoice); };
584 bool setUserOp(
const QString & szNick,
bool bUserOp,
bool) {
return m_pUserListView->
setUserOp(szNick, bUserOp); };
592 bool isChanOwner(
const QString & szNick,
bool bAtLeast =
false) {
return m_pUserListView->
isChanOwner(szNick, bAtLeast); };
600 bool isChanAdmin(
const QString & szNick,
bool bAtLeast =
false) {
return m_pUserListView->
isChanAdmin(szNick, bAtLeast); };
608 bool isOp(
const QString & szNick,
bool bAtLeast =
false) {
return m_pUserListView->
isOp(szNick, bAtLeast); };
616 bool isHalfOp(
const QString & szNick,
bool bAtLeast =
false) {
return m_pUserListView->
isHalfOp(szNick, bAtLeast); };
624 bool isVoice(
const QString & szNick,
bool bAtLeast =
false) {
return m_pUserListView->
isVoice(szNick, bAtLeast); };
632 bool isUserOp(
const QString & szNick,
bool bAtLeast =
false) {
return m_pUserListView->
isUserOp(szNick, bAtLeast); };
689 void userAction(
KviIrcMask * user,
unsigned int uActionType);
697 void userAction(
const QString & szNick,
unsigned int uActionType);
707 void userAction(
const QString & szNick,
const QString & szUser,
const QString &
szHost,
unsigned int uActionType);
716 void channelAction(
const QString & szNick,
unsigned int uActionType,
int iTemperature);
724 bool nickChange(
const QString & szOldNick,
const QString & szNewNick);
731 bool part(
const QString & szNick);
738 bool isOn(
const QString & szNick) {
return (m_pUserListView->
findEntry(szNick) != 0); };
757 void updateModeLabel();
765 virtual void outputMessage(
int iMsgType,
const QString & szMsg,
const QDateTime & datetime = QDateTime());
788 void setChannelMode(
char cMode,
bool bAdd);
801 void getChannelModeString(QString &
szBuffer);
808 QString getChannelModeStringWithEmbeddedParams();
816 void setChannelModeWithParam(
char cMode, QString & szParam);
823 bool hasChannelMode(
char cMode) {
return m_szChannelParameterModes.count(cMode); };
832 const auto it = m_szChannelParameterModes.find(cMode);
833 if(it != m_szChannelParameterModes.end())
843 void addHighlightedUser(
const QString & szNick);
850 void removeHighlightedUser(
const QString & szNick);
857 bool isHighlightedUser(
const QString & szNick) {
return m_pTmpHighLighted->contains(szNick, Qt::CaseInsensitive); };
888 void checkChannelSync();
906 bool eventFilter(QObject * pObject, QEvent * pEvent)
override;
971 void internalMask(
const QString & szMask,
bool bAdd,
const QString & szSetBy,
unsigned int uSetAt, std::vector<KviMaskEntry *> &
l,
KviMaskEditor ** ppEd, QString & szChangeMask);
982 void showDoubleView(
bool bShow);
988 void fixActionHistory();
997 void getTalkingUsersStats(QString &
szBuffer, QStringList & list,
bool bPast);
1006 void resizeEvent(QResizeEvent *)
override;
1007 void closeEvent(QCloseEvent * pEvent)
override;
1013 void toggleDoubleView();
1020 void toggleListView();
1026 void toggleListModeEditor();
1032 void toggleModeEditor();
1037 void modeSelectorDone();
1044 void topicSelected(
const QString & szTopic);
1051 void setMode(
const QString & szMode);
1059 void textViewRightClicked();
1067 void removeMasks(
KviMaskEditor * pEd,
const std::vector<KviMaskEntry *> & pList);
1073 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:114
const QString & nameWithUserFlag()
Returns the name of the channel with user flags.
Definition KviChannelWindow.h:249
void prependUserFlag(const QString &szNick, QString &szBuffer)
Prepends the user flag to the nickname.
Definition KviChannelWindow.h:498
bool isHalfOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a half operator.
Definition KviChannelWindow.h:616
void setSentWhoRequest()
Sets the WHO request flag.
Definition KviChannelWindow.h:372
bool hasChannelMode(char cMode)
Returns true if the channel has a mode with parameter set (eg. mode k)
Definition KviChannelWindow.h:823
QString m_szSentModeRequests
Definition KviChannelWindow.h:174
QString channelModeParam(char cMode) const
Returns the value (parameter) for a channel mode (eg. the password for mode k)
Definition KviChannelWindow.h:830
ActivityLimit
Holds the limits of the activity in a channel.
Definition KviChannelWindow.h:138
bool sentSyncWhoRequest()
Returns true if we have sent the sync WHO request.
Definition KviChannelWindow.h:348
void setSentSyncWhoRequest()
Sets the sync WHO request flag.
Definition KviChannelWindow.h:354
bool hasQuietBanList()
Returns true if the channel has a quiet ban list.
Definition KviChannelWindow.h:450
bool setVoice(const QString &szNick, bool bVoice, bool)
Sets the voice mode.
Definition KviChannelWindow.h:576
bool hasBanList()
Returns true if the channel has a ban list.
Definition KviChannelWindow.h:438
KviIrcView * messageView() const
Returns the irc view object.
Definition KviChannelWindow.h:206
bool isChanAdmin(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a chan admin.
Definition KviChannelWindow.h:600
bool isDeadChan()
Returns true if the channel is dead.
Definition KviChannelWindow.h:484
QDateTime m_joinTime
Definition KviChannelWindow.h:179
QString m_szChannelMode
Definition KviChannelWindow.h:175
bool isOn(const QString &szNick)
Returns true if the user is on the channel.
Definition KviChannelWindow.h:738
kvi_time_t lastReceivedWhoReply()
Returns the time of the last received WHO reply.
Definition KviChannelWindow.h:335
KviWindowToolPageButton * m_pModeEditorButton
Definition KviChannelWindow.h:165
bool setHalfOp(const QString &szNick, bool bHalfOp, bool)
Sets the half operator mode.
Definition KviChannelWindow.h:568
size_t maskCount(char cMode) const
Returns the number of masks is a channel mode list.
Definition KviChannelWindow.h:310
int chanOwnerCount()
Returns the number of users with chanowner status.
Definition KviChannelWindow.h:268
QString m_szNameWithUserFlag
Definition KviChannelWindow.h:180
bool isChanOwner(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a chan owner.
Definition KviChannelWindow.h:592
StateFlag
Holds the state flags of the channel.
Definition KviChannelWindow.h:122
bool isOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is an operator.
Definition KviChannelWindow.h:608
QString plainChannelMode()
Returns only the plain (parameter-less) channel modes (eg: mi)
Definition KviChannelWindow.h:794
const std::vector< KviMaskEntry * > & modeMasks(char cMode) const
Returns a list of masks for a specific mode.
Definition KviChannelWindow.h:218
QList< int > m_SplitterSizesList
Definition KviChannelWindow.h:186
bool isUserOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a user operator.
Definition KviChannelWindow.h:632
KviUserListView * m_pUserListView
Definition KviChannelWindow.h:171
KviPixmap m_privateBackground
Definition KviChannelWindow.h:178
KviIrcView * m_pMessageView
Definition KviChannelWindow.h:169
bool isMeIrcOp(bool bAtLeast=false)
Returns true if we are an ircop.
KviTalHBox * m_pButtonContainer
Definition KviChannelWindow.h:187
bool setChanOwner(const QString &szNick, bool bChanOwner)
Sets the chan owner mode.
Definition KviChannelWindow.h:543
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:551
KviTalSplitter * m_pVertSplitter
Definition KviChannelWindow.h:162
void setSentListRequest(char cMode)
Sets the "sent request" flag for a specific channel mode.
Definition KviChannelWindow.h:384
bool hasAllNames()
Returns true if the channel has all names.
Definition KviChannelWindow.h:400
QStringList * m_pTmpHighLighted
Definition KviChannelWindow.h:181
const QString & target() override
Returns the name of the channel.
Definition KviChannelWindow.h:243
QList< KviChannelAction * > m_lActionHistory
Definition KviChannelWindow.h:183
void setHasWhoList()
Sets the existence of the WHO list.
Definition KviChannelWindow.h:428
void setListRequestDone(char cMode)
Clears the "sent request" flag for a specific chanel mode.
Definition KviChannelWindow.h:390
KviTalSplitter * m_pTopSplitter
Definition KviChannelWindow.h:161
bool isHighlightedUser(const QString &szNick)
Returns true if the user is highlighted.
Definition KviChannelWindow.h:857
bool closeOnPart()
Returns true if the channel has to be closed on part.
Definition KviChannelWindow.h:456
void setLastReceivedWhoReply(kvi_time_t tTime)
Sets the time of the last received WHO reply.
Definition KviChannelWindow.h:342
kvi_time_t m_tLastReceivedWhoReply
Definition KviChannelWindow.h:184
int halfOpCount()
Returns the number of users with halfop status.
Definition KviChannelWindow.h:286
bool isMeVoice(bool bAtLeast=false)
Returns true if we are a voice.
KviUserListView * userListView()
Returns the user listview object.
Definition KviChannelWindow.h:194
void opStatusChanged()
Emitted when our op status change.
QString * firstSelectedNickname()
Returns the first selected nickname in the userlist.
Definition KviChannelWindow.h:231
void clearSentSyncWhoRequest()
Clears the sync WHO request flag.
Definition KviChannelWindow.h:360
bool hasWhoList()
Returns true if the channel has a WHO list.
Definition KviChannelWindow.h:422
QList< int > m_VertSplitterSizesList
Definition KviChannelWindow.h:185
std::map< char, std::vector< KviMaskEntry * > > m_ModeLists
Definition KviChannelWindow.h:177
int userOpCount()
Returns the number of users with userop status.
Definition KviChannelWindow.h:298
KviTopicWidget * topicWidget()
Returns the topic widget object.
Definition KviChannelWindow.h:200
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:528
int selectedCount()
Returns the number of selected users.
Definition KviChannelWindow.h:262
void setHasAllNames()
Sets the existence of all names.
Definition KviChannelWindow.h:406
KviUserListEntry * findEntry(const QString &szNick)
Searches for a user in the userlist.
Definition KviChannelWindow.h:745
bool avatarChanged(const QString &szNick)
Returns true if the avatar of a user is changed.
Definition KviChannelWindow.h:535
bool hasInviteList()
Returns true if the channel has an invite list.
Definition KviChannelWindow.h:416
bool isMeHalfOp(bool bAtLeast=false)
Returns true if we are a half operator.
KviTopicWidget * m_pTopicWidget
Definition KviChannelWindow.h:170
KviWindowToolPageButton * m_pListViewButton
Definition KviChannelWindow.h:164
QString * nextSelectedNickname()
Returns the next selected nickname in the userlist.
Definition KviChannelWindow.h:237
QToolButton * m_pDoubleViewButton
Definition KviChannelWindow.h:163
KviModeEditor * m_pModeEditor
Definition KviChannelWindow.h:168
unsigned int m_uActionHistoryHotActionCount
Definition KviChannelWindow.h:182
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:292
bool isVoice(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a voice.
Definition KviChannelWindow.h:624
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:378
bool sentWhoRequest()
Returns true if we have sent the WHO request.
Definition KviChannelWindow.h:366
int opCount()
Returns the number of users with op status.
Definition KviChannelWindow.h:280
QFrame * buttonContainer() override
Returns the button container object.
Definition KviChannelWindow.h:212
bool setUserOp(const QString &szNick, bool bUserOp, bool)
Sets the user operator mode.
Definition KviChannelWindow.h:584
int chanAdminCount()
Returns the number of users with chanadmin status.
Definition KviChannelWindow.h:274
KviModeWidget * m_pModeWidget
Definition KviChannelWindow.h:172
bool hasBanExceptionList()
Returns true if the channel has a ban exception list.
Definition KviChannelWindow.h:444
std::map< char, KviWindowToolPageButton * > m_ListEditorButtons
Definition KviChannelWindow.h:166
unsigned int count()
Returns the number of users.
Definition KviChannelWindow.h:304
std::map< char, QString > m_szChannelParameterModes
Definition KviChannelWindow.h:176
int m_iStateFlags
Definition KviChannelWindow.h:173
void enableUserListUpdates(bool bEnable)
Enables or disable the userlist updates.
Definition KviChannelWindow.h:518
std::map< char, KviMaskEditor * > m_ListEditors
Definition KviChannelWindow.h:167
char getUserFlag(const QString &szNick)
Returns the flag of a user.
Definition KviChannelWindow.h:505
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:596
bool eventFilter(QObject *pObject, QEvent *pEvent) override
Definition KviWindow.cpp:1007
virtual void preprocessMessage(QString &szMessage)
Definition KviWindow.cpp:1327
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:1137
virtual QPixmap * myIconPtr()
Definition KviWindow.cpp:627
virtual void triggerCreationEvents()
Definition KviWindow.h:468
virtual void getWindowListTipText(QString &szBuffer)
Definition KviWindow.h:357
virtual void fillCaptionBuffers()
Definition KviWindow.cpp:632
virtual void saveProperties(KviConfigurationFile *pCfg)
Definition KviWindow.cpp:570
virtual void lostUserFocus()
Definition KviWindow.cpp:1157
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:565
void closeEvent(QCloseEvent *pEvent) override
Definition KviWindow.cpp:866
void unhighlight()
Definition KviWindow.cpp:1320
virtual void getConfigGroupName(QString &szBuffer)
Definition KviWindow.cpp:498
virtual bool activityMeter(unsigned int *puActivityValue, unsigned int *puActivityTemperature)
Definition KviWindow.cpp:282
#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:83
QString szNick
Definition KviChannelWindow.h:84
int iTemperature
Definition KviChannelWindow.h:87
unsigned int uActionType
Definition KviChannelWindow.h:85
kvi_time_t tTime
Definition KviChannelWindow.h:86
Definition KviChannelWindow.h:95
bool bStatsInaccurate
Definition KviChannelWindow.h:97
unsigned int uHotActionPercent
Definition KviChannelWindow.h:104
unsigned int uActionsInTheLastMinute
Definition KviChannelWindow.h:101
QStringList lTalkingUsers
Definition KviChannelWindow.h:105
unsigned int uHotActionCount
Definition KviChannelWindow.h:103
double dActionsPerMinute
Definition KviChannelWindow.h:100
QStringList lWereTalkingUsers
Definition KviChannelWindow.h:106
unsigned int uLastActionTimeSpan
Definition KviChannelWindow.h:98
unsigned int uFirstActionTimeSpan
Definition KviChannelWindow.h:99
int iAverageActionTemperature
Definition KviChannelWindow.h:102
unsigned int uActionCount
Definition KviChannelWindow.h:96
Definition KviMaskEditor.h:44
char szBuffer[4096]
Definition winamp.cpp:77