Communi  3.7.0
A cross-platform IRC framework written with Qt
Public Types | Public Member Functions | Properties | List of all members
IrcModeMessage Class Reference

Represents a mode message.

Inherits IrcMessage.

Public Types

enum  Kind { Channel , User }
 
- Public Types inherited from IrcMessage
enum  Flag {
  None = 0x00 , Own = 0x01 , Identified = 0x02 , Unidentified = 0x04 ,
  Playback = 0x08 , Implicit = 0x10
}
 
enum  Type {
  Unknown , Capability , Error , Invite ,
  Join , Kick , Mode , Motd ,
  Names , Nick , Notice , Numeric ,
  Part , Ping , Pong , Private ,
  Quit , Topic , WhoReply , Account ,
  Away , Whois , Whowas , HostChange ,
  Batch
}
 

Public Member Functions

Q_INVOKABLE IrcModeMessage (IrcConnection *connection)
 
QString argument () const
 
QStringList arguments () const
 
Kind kind () const
 
QString mode () const
 
QString target () const
 
- Public Member Functions inherited from IrcMessage
Q_INVOKABLE IrcMessage (IrcConnection *connection)
 
 ~IrcMessage () override
 
QString account () const
 
Q_INVOKABLE IrcMessageclone (QObject *parent=nullptr) const
 
QString command () const
 
IrcConnectionconnection () const
 
QByteArray encoding () const
 
Flags flags () const
 
QString host () const
 
QString ident () const
 
IrcNetworknetwork () const
 
QString nick () const
 
QString parameter (int index) const
 
QStringList parameters () const
 
QString prefix () const
 
Q_INVOKABLE void setFlag (Flag flag, bool on=true)
 
void setParameter (int index, const QString &parameter)
 
void setTag (const QString &name, const QVariant &tag)
 
QVariant tag (const QString &name) const
 
QVariantMap tags () const
 
Q_INVOKABLE bool testFlag (Flag flag) const
 
QDateTime timeStamp () const
 
Q_INVOKABLE QByteArray toData () const
 
Type type () const
 

Properties

bool reply
 
- Properties inherited from IrcMessage
bool implicit
 
bool own
 
bool valid
 

Additional Inherited Members

- Static Public Member Functions inherited from IrcMessage
static Q_INVOKABLE IrcMessagefromData (const QByteArray &data, IrcConnection *connection)
 
static Q_INVOKABLE IrcMessagefromParameters (const QString &prefix, const QString &command, const QStringList &parameters, IrcConnection *connection)
 

Member Enumeration Documentation

◆ Kind

This enum describes the kind of modes.

Enumerator
Channel 

Channel mode.

User 

User mode.

Constructor & Destructor Documentation

◆ IrcModeMessage()

IrcModeMessage::IrcModeMessage ( IrcConnection connection)
explicit

Constructs a new IrcModeMessage with connection.

Member Function Documentation

◆ argument()

QString IrcModeMessage::argument ( ) const

This property holds the first mode argument.

Access function:
  • QString argument() const

◆ arguments()

QStringList IrcModeMessage::arguments ( ) const
Since
3.1

This property holds the all mode arguments.

Access function:
  • QStringList arguments() const

◆ kind()

IrcModeMessage::Kind IrcModeMessage::kind ( ) const

This property holds the kind of the mode.

Access function:
  • Kind kind() const

◆ mode()

QString IrcModeMessage::mode ( ) const

This property holds the channel or user mode.

Access function:
  • QString mode() const

◆ target()

QString IrcModeMessage::target ( ) const

This property holds the target channel or user in question.

Access function:
  • QString target() const

Property Documentation

◆ reply

bool IrcModeMessage::reply
read

This property holds whether the message is a reply.

Mode messages are sent when a mode changes (false) and when joining a channel (true).

Access function:
  • bool isReply() const
See also
Irc::RPL_CHANNELMODEIS