class Ban

Keep data for a channel ban. More...

Definition#include <Channel.h>
InheritsQObject
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods


Detailed Description

Class Ban represents a ban on an IRC channel. It is intended to be kept in a channel banlist.

Ban (const QString& mask,const QString& nick,const QDateTime& timestamp)

Create a new ban object with the specified attributes.

Parameters:
maskThe host mask of the ban.
nickThe nick or server who set the ban
timestampA QDateTime object representing the time on which the ban was set.

const QString& getMask ()
[const]

Get the host mask of the ban object.

Returns: A string containing the mask the ban was set on.

const QString& getSetBy ()
[const]

Get the name of the user/server who set the ban.

Returns: A string containing the nick of the user who set the ban, or the name of the server, in case of a server ban.

const QDateTime& getTimeStamp ()
[const]

Get the date and time on which the ban was set.

Returns: A QDateTime object initialized to the date and time the ban was set on.

bool matches (const QString& mask)
[const]

Determine wether the specified mask matches the ban.

Parameters:
maskThe mask to check against the internal banmask.

Returns: true if the ban matches the mask, false otherwise.

bool match (const QString& str,const QString& mask)
[static]

Determine if a specifed mask matches a string. This is a static method, and can therefore be used as Ban::match() from anywhere.

Parameters:
strThe full string to match against the mask (the non-wildcarded one)
maskThe mask to check the string against (usually wildcarded)

Returns: true if the string matches the mask, false otherwise.