1 #ifndef _KVI_IRCMASK_H_
2 #define _KVI_IRCMASK_H_
47 friend class KviIrcUserList;
48 friend class KviIrcUserChanList;
76 : m_szNick(ircUser.m_szNick), m_szUser(ircUser.m_szUser), m_szHost(ircUser.m_szHost){};
85 KviIrcMask(
const QString & nick,
const QString & user,
const QString & host)
86 : m_szNick(nick), m_szUser(user), m_szHost(host){};
105 NickCleanUserHost = 11,
106 NickCleanUserNet = 12,
111 NickUserLargeNet = 17,
114 NickCleanUserLargeNet = 20,
115 CleanUserLargeNet = 21,
116 NickUserSmartNet = 22,
119 NickCleanUserSmartNet = 25,
120 CleanUserSmartNet = 26
131 void setNick(
const QString & szNick) { m_szNick = szNick.isEmpty() ? m_szWild : szNick; };
140 void setUsername(
const QString & szUser) { m_szUser = szUser.isEmpty() ? m_szWild : szUser; };
150 void setUser(
const QString & szUser) { m_szUser = szUser.isEmpty() ? m_szWild : szUser; };
167 const QString &
nick()
const {
return m_szNick; };
175 const QString &
user()
const {
return m_szUser; };
183 const QString &
host()
const {
return m_szHost; };
189 bool hasUser()
const {
return !(m_szUser.isEmpty() || (m_szUser == m_szWild)); };
195 bool hasHost()
const {
return !(m_szHost.isEmpty() || (m_szHost == m_szWild)); };
201 bool hasNumericHost()
const;
256 void mask(QString & szMask, MaskType eMaskType = NickCleanUserHost)
const;
278 bool matchesFixed(
const QString & szNick,
const QString & szUser,
const QString &
szHost)
const;
285 bool matchesFixed(
const KviIrcMask & mask)
const;
300 bool matchWildString(
const QString & szExp,
const QString & szStr)
const;
322 int getIpDomainMaskLen()
const;
330 int getLargeIpDomainMaskLen()
const;
336 QString getHostDomainMask()
const;
342 QString getLargeHostDomainMask()
const;
349 bool hasMaskedIp()
const;
352 #endif //_KVI_IRCMASK_H_
bool matchesFixed(const QString &szNick, const QString &szUser, const QString &szHost) const
Fixed external matches (this is wild, external is fixed)
Definition: KviIrcMask.cpp:357
__KVI_EXTERN bool operator==(const KviCString &left, const KviCString &right)
Definition: KviCString.h:552
QString m_szHost
Definition: KviIrcMask.h:53
Definition: KviHeapObject.h:124
bool hasUser() const
Returns true if the username is set in the mask.
Definition: KviIrcMask.h:189
void setNick(const QString &szNick)
Sets the nick for this user.
Definition: KviIrcMask.h:131
const QString & user() const
Returns the username of this user.
Definition: KviIrcMask.h:175
Irc user mask handling.
Definition: KviIrcMask.h:45
QString szHost
Definition: libkvisetup.cpp:45
void setHost(const QString &szHost)
Sets the host for this user.
Definition: KviIrcMask.h:159
QString m_szUser
Definition: KviIrcMask.h:52
const QString & nick() const
Returns the nickname of this user.
Definition: KviIrcMask.h:167
MaskType
Defines the type of the masks.
Definition: KviIrcMask.h:92
KviIrcMask(const QString &nick, const QString &user, const QString &host)
Carbon copy.
Definition: KviIrcMask.h:85
QString m_szNick
Definition: KviIrcMask.h:51
void setUsername(const QString &szUser)
Sets the username for this user.
Definition: KviIrcMask.h:140
This file contains compile time settings.
KviIrcMask(const KviIrcMask &ircUser)
Carbon copy.
Definition: KviIrcMask.h:75
bool hasHost() const
Returns true if the hostname is set in the mask.
Definition: KviIrcMask.h:195
bool matchedBy(const KviIrcMask &mask) const
Fixed internal matches (this is fixed, external is wild)
Definition: KviIrcMask.h:292
#define KVILIB_API
Definition: kvi_settings.h:125
static QString m_szWild
Definition: KviIrcMask.h:54
Helper functions for the QString class.
void setUser(const QString &szUser)
Sets the username for this user.
Definition: KviIrcMask.h:150
const QString & host() const
Returns the hostname of this user.
Definition: KviIrcMask.h:183