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

Keeps track of user status on a channel. More...

Inherits QObject.

Public Member Functions

 IrcUser (QObject *parent=0)
 
virtual ~IrcUser ()
 

Properties

bool away
 
IrcChannel channel
 
QString mode
 
QString name
 
QString prefix
 
bool servOp
 
QString title
 

Detailed Description

See also
IrcUserModel

Constructor & Destructor Documentation

◆ IrcUser()

IrcUser::IrcUser ( QObject *  parent = 0)
explicit

Constructs a new user with parent.

◆ ~IrcUser()

IrcUser::~IrcUser ( )
virtual

Destructs the user object.

Property Documentation

◆ away

bool IrcUser::away
read
Since
3.1

This property holds whether the user is marked as being away.

Note
IRC servers do not send this information by default. In order to fetch the information for all users on a channel, issue a WHO command on the channel:
IrcChannel* channel = user->channel();
IrcCommand* command = IrcCommand::createWho(channel->title());
channel->sendCommand(command);
Access function:
  • bool isAway() const
Notifier signal:
  • void awayChanged(bool away)

◆ channel

IrcChannel * IrcUser::channel
read

This property holds the channel of the user.

Access function:

◆ mode

QString IrcUser::mode
read

This property holds the mode letter.

Typical mode letters are o (op) and v (voice).

Note
The mode may be multiple characters if the multi-prefix capability is enabled.
Access function:
  • QString mode() const
Notifier signal:
  • void modeChanged(const QString& mode)
See also
prefix, IRCv3 support

◆ name

QString IrcUser::name
read

This property holds the name.

Access function:
  • QString name() const
Notifier signal:
  • void nameChanged(const QString& name)

◆ prefix

QString IrcUser::prefix
read

This property holds the prefix character.

Typical prefix characters are @ (op) and + (voice).

Note
The prefix may be multiple characters if the multi-prefix capability is enabled.
Access function:
  • QString prefix() const
Notifier signal:
  • void prefixChanged(const QString& prefix)
See also
mode, IRCv3 support

◆ servOp

bool IrcUser::servOp
read
Since
3.1

This property holds whether the user is a server operator.

Note
IRC servers do not send this information by default. In order to fetch the information for all users on a channel, issue a WHO command on the channel:
IrcChannel* channel = user->channel();
IrcCommand* command = IrcCommand::createWho(channel->title());
channel->sendCommand(command);
Access function:
  • bool isServOp() const
Notifier signal:
  • void servOpChanged(bool servOp)

◆ title

QString IrcUser::title
read

This property holds the title.

The title consists of prefix and name.

Access function:
  • QString title() const
Notifier signal:
  • void titleChanged(const QString& title)