class Channel

* This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. More...

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

Public Methods

Public Members

Protected Methods

Protected Members


Detailed Description

* This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * *************************************************************************

explicit Channel (const QString& name)

Create a channel with a specific name.

Parameters:
nameThe name of the new channel.

const ChanUser* findUser (QString nickname)
[const]

Search the channel for a user with the specified nickname.

Parameters:
nicknameThe nickname of the user to find.

Returns: A const pointer to the ChanUser object that represents the specified user, or 0 if nickname is not on the channel.

bool isOp ()
[const]

Determines if the client is currently oped on the channel.

Returns: true if the client is oped on the channel, false otherwise.

const QString& getName ()
[const]

Get the name of the channel object.

Returns: The name of the channel.

const int getModes ()
[const]

Get the current modes on the channel.

Returns: A bitwise OR of the different mode constants. See static const definitions for a list of mode constants.

const QString& getKey ()
[const]

Get the current channel key, if any.

Returns: The channel key if the channel has a key set, an empty string otherwise.

const int getLimit ()
[const]

Get the current channel limit, if any.

Returns: The channel limit if the channel has one, 0 otherwise.

const ChanUser* getMe ()
[const]

Get the ChanUser object associated with the client on the channel.

PRECONDITIONS: setMe() was called with a valid ChanUser object.

Returns: The ChanUser object that was set as associated with the client.

const Ban* findBan (QString banMask)
[const]

Find a specific ban in the channel banlist.

Parameters:
banMaskthe mask of the ban to search for.

UserListIterator* createUserListIterator ()
[const]

Get a UserListIterator on the channel's list of users. This allows to iterate over the channel's userlist. The order the users are listed is arbitrary.

NOTE: this method allocates memory for a new UserListIterator object. The calling method is responsible for freeing that memory.

Returns: A pointer to an iterator initialized to the first user on the channel (in arbitrary order).

BanListIterator* createBanListIterator ()
[const]

Get a BanListIterator on the channel's banlist This allows to iterate over all the bans on the channel. The order the bans are listed is arbitrary.

NOTE: this method allocates memory for a new BanListIterator object. The calling method is responsible for freeing that memory.

Returns: A pointer to an iterator initialized to the first ban on the channel (in arbitrary order).

void list ()
[const]

Temporary.

void setModes (const int mode,char addDelete = '+')
[protected]

Add or remove a mode from the channel, depending on the addDelete flag.

Parameters:
modeThe mode to change (as defined in Channel::Mode constants).
addDeleteEither '+' or '-'. The mode will be added if addDelete is '+', or removed if addDelete is '-'.

void setKey (const QString& key)
[protected]

Change the channel's key.

Parameters:
keyThe new channel key.

void addMode (const int value)
[protected]

Add the specified mode to the channel.

Parameters:
valueThe mode to add, as defined in Channel::Mode constants

void remMode (const int value)
[protected]

Remove the specified mode to the channel.

Parameters:
valueThe mode to remove, as defined in Channel::Mode constants

void setLimit (const int value)
[protected]

Change the channel's limit.

Parameters:
valueThe new channel limit.

void setMe (ChanUser* value)
[protected]

Change the channel's reference to which user is the program using the IRCModule.

PRECONDITIONS: value != 0

Parameters:
valueA pointer to the ChanUser object representing the client.

void addBan (Ban* theBan)
[protected]

Adds a new ban to the channel's banlist.

Parameters:
theBanA pointer to the ban object to add to the list. This pointer should not be deleted or referenced after being added to the banlist.

void remBan (QString banMask)
[protected]

Remove a ban from the channel's banlist.

PRECONDITIONS: banMask != ""

Parameters:
banMaskthe mask of the ban to remove. The mask is case insensitive.

ChanUser* findUserForUpdate (QString nickname)
[protected]

Same as findUser , but returns a non-const pointer to the found user.

NOTE: The pointer returned by this method should not be deleted!

Parameters:
nicknameThe nick of the user to find.

Returns: A pointer to the ChanUser object representing nickname, or 0 if the user was not found.

void addUser (ChanUser* user)
[protected]

Add a user to the channel's userlist.

Parameters:
userA pointer to the ChanUser to add. That pointer must not be externaly deleted!

void remUser (const QString& nickname)
[protected]

Remove a user from the channel's userlist.

Parameters:
nicknameThe nick of the user to delete. Nothing happens if the user is not found.


Generated by: nightsky@centauri on Sat Jan 15 23:06:10 2000, using kdoc 2.0a30.