From 52899de0ff2d62ca0542b243c41626010bf62083 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 25 Mar 2005 03:51:56 +0000 Subject: Documentation update git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@899 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/classchanrec.html | 599 ++++++++++++++++++++------------------ 1 file changed, 309 insertions(+), 290 deletions(-) (limited to 'docs/module-doc/classchanrec.html') diff --git a/docs/module-doc/classchanrec.html b/docs/module-doc/classchanrec.html index 27763e5a6..c7c0a6a1b 100644 --- a/docs/module-doc/classchanrec.html +++ b/docs/module-doc/classchanrec.html @@ -1,90 +1,102 @@ -chanrec class Reference +InspIRCd: chanrec class Reference - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  
-

chanrec Class Reference

Holds all relevent information for a channel. + +
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members
+

chanrec Class Reference

Holds all relevent information for a channel. More...

#include <channels.h>

-Inheritance diagram for chanrec:

Inheritance graph
- - - - -
[legend]
Collaboration diagram for chanrec:

Collaboration graph
- - - - -
[legend]
List of all members. +Inherits Extensible. +

+List of all members.

- - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

void SetCustomMode (char mode, bool mode_on)
 Sets or unsets a custom mode in the channels info.

void SetCustomModeParam (char mode, char *parameter, bool mode_on)
 Sets or unsets the parameters for a custom mode in a channels info.

bool IsCustomModeSet (char mode)
 Returns true if a custom mode is set on a channel.

std::string GetModeParameter (char mode)
 Returns the parameter for a custom mode on a channel.

 chanrec ()
 Creates a channel record and initialises it with default values.

virtual ~chanrec ()
void SetCustomMode (char mode, bool mode_on)
 Sets or unsets a custom mode in the channels info.

void SetCustomModeParam (char mode, char *parameter, bool mode_on)
 Sets or unsets the parameters for a custom mode in a channels info.

bool IsCustomModeSet (char mode)
 Returns true if a custom mode is set on a channel.

std::string GetModeParameter (char mode)
 Returns the parameter for a custom mode on a channel.

 chanrec ()
 Creates a channel record and initialises it with default values.

virtual ~chanrec ()

Public Attributes

char name [CHANMAX]
 The channels name.

char custom_modes [MAXMODES]
 Custom modes for the channel.

char topic [MAXBUF]
 Channel topic.

time_t created
 Creation time.

time_t topicset
 Time topic was set.

char setby [NICKMAX]
 The last user to set the topic.

long limit
 Contains the channel user limit.

char key [32]
 Contains the channel key.

short int topiclock
 Nonzero if the mode +t is set.

short int noexternal
 Nonzero if the mode +n is set.

short int inviteonly
 Nonzero if the mode +i is set.

short int moderated
 Nonzero if the mode +m is set.

short int secret
 Nonzero if the mode +s is set.

short int c_private
 Nonzero if the mode +p is set.

BanList bans
 The list of all bans set on the channel.

char name [CHANMAX]
 The channels name.

char custom_modes [MAXMODES]
 Custom modes for the channel.

char topic [MAXBUF]
 Channel topic.

time_t created
 Creation time.

time_t topicset
 Time topic was set.

char setby [NICKMAX]
 The last user to set the topic.

long limit
 Contains the channel user limit.

char key [32]
 Contains the channel key.

short int topiclock
 Nonzero if the mode +t is set.

short int noexternal
 Nonzero if the mode +n is set.

short int inviteonly
 Nonzero if the mode +i is set.

short int moderated
 Nonzero if the mode +m is set.

short int secret
 Nonzero if the mode +s is set.

short int c_private
 Nonzero if the mode +p is set.

BanList bans
 The list of all bans set on the channel.


Detailed Description

-Holds all relevent information for a channel. +Holds all relevent information for a channel.

This class represents a channel, and contains its name, modes, time created, topic, topic set time, etc, and an instance of the BanList type.

-Definition at line 83 of file channels.h.


Constructor & Destructor Documentation

+Definition at line 94 of file channels.h.

Constructor & Destructor Documentation

- +
-
+ - - + + @@ -100,36 +112,36 @@ Definition at line 83 of
chanrec::chanrec    ) 

-Creates a channel record and initialises it with default values. +Creates a channel record and initialises it with default values.

-Definition at line 96 of file channels.cpp. +Definition at line 111 of file channels.cpp.

-References c_private, created, inviteonly, limit, moderated, noexternal, secret, topiclock, and topicset. +References c_private, created, custom_modes, inviteonly, key, limit, moderated, name, noexternal, secret, setby, topic, topiclock, and topicset.

-

00097 {
-00098         strcpy(name,"");
-00099         strcpy(custom_modes,"");
-00100         strcpy(topic,"");
-00101         strcpy(setby,"");
-00102         strcpy(key,"");
-00103         created = topicset = limit = 0;
-00104         topiclock = noexternal = inviteonly = moderated = secret = c_private = false;
-00105 }
+
00112 {
+00113         strcpy(name,"");
+00114         strcpy(custom_modes,"");
+00115         strcpy(topic,"");
+00116         strcpy(setby,"");
+00117         strcpy(key,"");
+00118         created = topicset = limit = 0;
+00119         topiclock = noexternal = inviteonly = moderated = secret = c_private = false;
+00120 }
 

- +
-
+ - + - - + + @@ -147,24 +159,24 @@ References c_private,

-Definition at line 174 of file channels.h. +Definition at line 185 of file channels.h.

-

00174 { /* stub */ }
+
00185 { /* stub */ }
 
virtual chanrec::~chanrec virtual chanrec::~chanrec    )  [inline, virtual]

Member Function Documentation

- +
-
+ - - + + @@ -180,41 +192,41 @@ Definition at line 174 o
std::string chanrec::GetModeParameter char   mode mode  ) 

-Returns the parameter for a custom mode on a channel. +Returns the parameter for a custom mode on a channel.

For example if "+L #foo" is set, and you pass this method 'L', it will return '#foo'. If the mode is not set on the channel, or the mode has no parameters associated with it, it will return an empty string.

-Definition at line 172 of file channels.cpp. -

-References custom_mode_params. -

-

00173 {
-00174         if (custom_mode_params.size())
-00175         {
-00176                 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
-00177                 {
-00178                         if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
-00179                         {
-00180                                 return std::string(i->parameter);
-00181                         }
-00182                 }
-00183         }
-00184         return std::string("");
-00185 }
+Definition at line 184 of file channels.cpp.
+

+References custom_mode_params. +

+

00185 {
+00186         if (custom_mode_params.size())
+00187         {
+00188                 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
+00189                 {
+00190                         if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
+00191                         {
+00192                                 return std::string(i->parameter);
+00193                         }
+00194                 }
+00195         }
+00196         return std::string("");
+00197 }
 

- +
-
+ - - + + @@ -230,35 +242,37 @@ References custom_mode_par
bool chanrec::IsCustomModeSet char   mode mode  ) 

-Returns true if a custom mode is set on a channel. +Returns true if a custom mode is set on a channel.

-Definition at line 166 of file channels.cpp. +Definition at line 178 of file channels.cpp. +

+References DEBUG.

-

00167 {
-00168         log(DEBUG,"Checking ISCustomModeSet: %c %s",mode,this->custom_modes);
-00169         return (strchr(this->custom_modes,mode) != 0);
-00170 }
+
00179 {
+00180         log(DEBUG,"Checking ISCustomModeSet: %c %s",mode,this->custom_modes);
+00181         return (strchr(this->custom_modes,mode) != 0);
+00182 }
 

- +
-
+ - + - + @@ -278,64 +292,61 @@ Definition at line 166
void chanrec::SetCustomMode char   mode, mode,
bool   mode_on mode_on

-Sets or unsets a custom mode in the channels info. +Sets or unsets a custom mode in the channels info.

-Definition at line 107 of file channels.cpp. +Definition at line 122 of file channels.cpp.

-References custom_modes, and SetCustomModeParam(). +References custom_modes, DEBUG, and SetCustomModeParam().

-

00108 {
-00109         if (mode_on) {
-00110                 char m[3];
-00111                 m[0] = mode;
-00112                 m[1] = '\0';
-00113                 if (!strchr(this->custom_modes,mode))
-00114                 {
-00115                         strncat(custom_modes,m,MAXMODES);
-00116                 }
-00117                 log(DEBUG,"Custom mode %c set",mode);
-00118         }
-00119         else {
-00120                 char temp[MAXBUF];
-00121                 int count = 0;
-00122                 for (int q = 0; q < strlen(custom_modes); q++) {
-00123                         if (custom_modes[q] != mode) {
-00124                                 temp[count++] = mode;
-00125                         }
-00126                 }
-00127                 temp[count] = '\0';
-00128                 strncpy(custom_modes,temp,MAXMODES);
-00129                 log(DEBUG,"Custom mode %c removed",mode);
-00130                 this->SetCustomModeParam(mode,"",false);
-00131         }
-00132 }
+
00123 {
+00124         if (mode_on) {
+00125                 char m[3];
+00126                 m[0] = mode;
+00127                 m[1] = '\0';
+00128                 if (!strchr(this->custom_modes,mode))
+00129                 {
+00130                         strlcat(custom_modes,m,MAXMODES);
+00131                 }
+00132                 log(DEBUG,"Custom mode %c set",mode);
+00133         }
+00134         else {
+00135 
+00136                 std::string a = this->custom_modes;
+00137                 int pos = a.find(mode);
+00138                 a.erase(pos,1);
+00139                 strncpy(this->custom_modes,a.c_str(),MAXMODES);
+00140 
+00141                 log(DEBUG,"Custom mode %c removed: modelist='%s'",mode,this->custom_modes);
+00142                 this->SetCustomModeParam(mode,"",false);
+00143         }
+00144 }
 

- +
-
+ - + - + - + @@ -355,56 +366,56 @@ References custom_modes,
void chanrec::SetCustomModeParam char   mode, mode,
char *   parameter, parameter,
bool   mode_on mode_on

-Sets or unsets the parameters for a custom mode in a channels info. +Sets or unsets the parameters for a custom mode in a channels info.

-Definition at line 135 of file channels.cpp. +Definition at line 147 of file channels.cpp.

-References ModeParameter::channel, custom_mode_params, ModeParameter::mode, and ModeParameter::parameter. +References ModeParameter::channel, custom_mode_params, DEBUG, ModeParameter::mode, and ModeParameter::parameter.

-Referenced by SetCustomMode(). +Referenced by SetCustomMode().

-

00136 {
-00137 
-00138         log(DEBUG,"SetCustomModeParam called");
-00139         ModeParameter M;
-00140         M.mode = mode;
-00141         strcpy(M.channel,this->name);
-00142         strcpy(M.parameter,parameter);
-00143         if (mode_on)
-00144         {
-00145                 log(DEBUG,"Custom mode parameter %c %s added",mode,parameter);
-00146                 custom_mode_params.push_back(M);
-00147         }
-00148         else
-00149         {
-00150                 if (custom_mode_params.size())
-00151                 {
-00152                         for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
-00153                         {
-00154                                 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
-00155                                 {
-00156                                         log(DEBUG,"Custom mode parameter %c %s removed",mode,parameter);
-00157                                         custom_mode_params.erase(i);
-00158                                         return;
-00159                                 }
-00160                         }
-00161                 }
-00162                 log(DEBUG,"*** BUG *** Attempt to remove non-existent mode parameter!");
-00163         }
-00164 }
+
00148 {
+00149 
+00150         log(DEBUG,"SetCustomModeParam called");
+00151         ModeParameter M;
+00152         M.mode = mode;
+00153         strlcpy(M.channel,this->name,CHANMAX);
+00154         strlcpy(M.parameter,parameter,MAXBUF);
+00155         if (mode_on)
+00156         {
+00157                 log(DEBUG,"Custom mode parameter %c %s added",mode,parameter);
+00158                 custom_mode_params.push_back(M);
+00159         }
+00160         else
+00161         {
+00162                 if (custom_mode_params.size())
+00163                 {
+00164                         for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
+00165                         {
+00166                                 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
+00167                                 {
+00168                                         log(DEBUG,"Custom mode parameter %c %s removed",mode,parameter);
+00169                                         custom_mode_params.erase(i);
+00170                                         return;
+00171                                 }
+00172                         }
+00173                 }
+00174                 log(DEBUG,"*** BUG *** Attempt to remove non-existent mode parameter!");
+00175         }
+00176 }
 

Member Data Documentation

-

- +

+

- @@ -417,20 +428,20 @@ Referenced by SetCustomMod +Definition at line 159 of file channels.h.
+ -
BanList chanrec::bans + BanList chanrec::bans

-The list of all bans set on the channel. +The list of all bans set on the channel.

-Definition at line 148 of file channels.h.

-

- +

+

- @@ -443,22 +454,22 @@ Definition at line 148 o +Referenced by chanrec().
+ -
short int chanrec::c_private + short int chanrec::c_private

-Nonzero if the mode +p is set. +Nonzero if the mode +p is set.

-This value cannot be set at the same time as chanrec::secret +This value cannot be set at the same time as chanrec::secret

-Definition at line 144 of file channels.h. +Definition at line 155 of file channels.h.

-Referenced by chanrec().

-

- +

+

- @@ -471,22 +482,22 @@ Referenced by chanrec()

-Creation time. +Creation time.

-Definition at line 100 of file channels.h. +Definition at line 111 of file channels.h.

-Referenced by chanrec(). +Referenced by chanrec().

+ -
time_t chanrec::created + time_t chanrec::created
-

- +

+

- @@ -499,22 +510,22 @@ Referenced by chanrec()

-Custom modes for the channel. +Custom modes for the channel.

Plugins may use this field in any way they see fit.

-Definition at line 92 of file channels.h. +Definition at line 103 of file channels.h.

-Referenced by SetCustomMode(). +Referenced by chanrec(), and SetCustomMode().

+ -
char chanrec::custom_modes[MAXMODES] + char chanrec::custom_modes[MAXMODES]
-

- +

+

- @@ -527,22 +538,22 @@ Referenced by SetCustomMod +Referenced by chanrec().
+ -
short int chanrec::inviteonly + short int chanrec::inviteonly

-Nonzero if the mode +i is set. +Nonzero if the mode +i is set.

-Definition at line 130 of file channels.h. +Definition at line 141 of file channels.h.

-Referenced by chanrec().

-

- +

+

- @@ -555,20 +566,22 @@ Referenced by chanrec()

-Contains the channel key. +Contains the channel key.

If this value is an empty string, there is no channel key in place.

-Definition at line 118 of file channels.h. +Definition at line 129 of file channels.h. +

+Referenced by chanrec().

+ -
char chanrec::key[32] + char chanrec::key[32]
-

- +

+

- @@ -581,22 +594,22 @@ Definition at line 118 o +Referenced by chanrec().
+ -
long chanrec::limit + long chanrec::limit

-Contains the channel user limit. +Contains the channel user limit.

If this value is zero, there is no limit in place.

-Definition at line 113 of file channels.h. +Definition at line 124 of file channels.h.

-Referenced by chanrec().

-

- +

+

- @@ -609,22 +622,22 @@ Referenced by chanrec()

-Nonzero if the mode +m is set. +Nonzero if the mode +m is set.

-Definition at line 134 of file channels.h. +Definition at line 145 of file channels.h.

-Referenced by chanrec(). +Referenced by chanrec().

+ -
short int chanrec::moderated + short int chanrec::moderated
-

- +

+

- @@ -637,20 +650,22 @@ Referenced by chanrec()

-The channels name. +The channels name.

-Definition at line 88 of file channels.h. +Definition at line 99 of file channels.h. +

+Referenced by chanrec().

+ -
char chanrec::name[CHANMAX] + char chanrec::name[CHANMAX]
-

- +

+

- @@ -663,22 +678,22 @@ Definition at line 88 of +Referenced by chanrec().
+ -
short int chanrec::noexternal + short int chanrec::noexternal

-Nonzero if the mode +n is set. +Nonzero if the mode +n is set.

-Definition at line 126 of file channels.h. +Definition at line 137 of file channels.h.

-Referenced by chanrec().

-

- +

+

- @@ -691,22 +706,22 @@ Referenced by chanrec()

-Nonzero if the mode +s is set. +Nonzero if the mode +s is set.

-This value cannot be set at the same time as chanrec::c_private +This value cannot be set at the same time as chanrec::c_private

-Definition at line 139 of file channels.h. +Definition at line 150 of file channels.h.

-Referenced by chanrec(). +Referenced by chanrec().

+ -
short int chanrec::secret + short int chanrec::secret
-

- +

+

- @@ -719,20 +734,22 @@ Referenced by chanrec()

-The last user to set the topic. +The last user to set the topic.

If this member is an empty string, no topic was ever set.

-Definition at line 108 of file channels.h. +Definition at line 119 of file channels.h. +

+Referenced by chanrec().

+ -
char chanrec::setby[NICKMAX] + char chanrec::setby[NICKMAX]
-

- +

+

- @@ -745,20 +762,22 @@ Definition at line 108 o +Definition at line 108 of file channels.h. +

+Referenced by chanrec().

+ -
char chanrec::topic[MAXBUF] + char chanrec::topic[MAXBUF]

-Channel topic. +Channel topic.

If this is an empty string, no channel topic is set.

-Definition at line 97 of file channels.h.

-

- +

+

- @@ -771,22 +790,22 @@ Definition at line 97 of +Referenced by chanrec().
+ -
short int chanrec::topiclock + short int chanrec::topiclock

-Nonzero if the mode +t is set. +Nonzero if the mode +t is set.

-Definition at line 122 of file channels.h. +Definition at line 133 of file channels.h.

-Referenced by chanrec().

-

- +

+

- @@ -799,20 +818,20 @@ Referenced by chanrec()

-Time topic was set. +Time topic was set.

-If no topic was ever set, this will be equal to chanrec::created +If no topic was ever set, this will be equal to chanrec::created

-Definition at line 104 of file channels.h. +Definition at line 115 of file channels.h.

-Referenced by chanrec(). +Referenced by chanrec().

+ -
time_t chanrec::topicset + time_t chanrec::topicset


The documentation for this class was generated from the following files: -
Generated on Sun May 2 00:09:31 2004 for InspIRCd by +
Generated on Fri Mar 25 03:49:31 2005 for InspIRCd by -doxygen1.3-rc3
+doxygen +1.3.3
-- cgit v1.2.3