Communi  3.4.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 ( QObject parent = 0)
explicit

Constructs a new user with parent.

IrcUser::~IrcUser ( )
virtual

Destructs the user object.

Property Documentation

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)
IrcChannel * IrcUser::channel
read

This property holds the channel of the user.

Access function:
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:
Notifier signal:
  • void modeChanged(const QString& mode)
See also
prefix, IRCv3 support
QString IrcUser::name
read

This property holds the name.

Access function:
Notifier signal:
  • void nameChanged(const QString& name)
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:
Notifier signal:
  • void prefixChanged(const QString& prefix)
See also
mode, IRCv3 support
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)
QString IrcUser::title
read

This property holds the title.

The title consists of prefix and name.

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