|
|
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:
mask | The host mask of the ban. |
nick | The nick or server who set the ban |
timestamp | A QDateTime object representing the time on which the ban was set. |
const QString& getMask () |
Get the host mask of the ban object.
Returns: A string containing the mask the ban was set on.
const QString& getSetBy () |
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 () |
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) |
Determine wether the specified mask matches the ban.
Parameters:
mask | The 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) |
Determine if a specifed mask matches a string. This is a static method, and can therefore be used as Ban::match() from anywhere.
Parameters:
str | The full string to match against the mask (the non-wildcarded one) |
mask | The mask to check the string against (usually wildcarded) |
Returns: true if the string matches the mask, false otherwise.