From 71bedf497cde8b0b38afbb366828b3df9c2803d6 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 19 Dec 2005 18:04:22 +0000 Subject: git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2578 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/channels_8cpp.html | 246 +++++++++++++++++++------------------ 1 file changed, 125 insertions(+), 121 deletions(-) (limited to 'docs/module-doc/channels_8cpp.html') diff --git a/docs/module-doc/channels_8cpp.html b/docs/module-doc/channels_8cpp.html index 4bd98b6e2..ef2c18660 100644 --- a/docs/module-doc/channels_8cpp.html +++ b/docs/module-doc/channels_8cpp.html @@ -10,7 +10,6 @@

channels.cpp File Reference

#include "inspircd_config.h"
#include "inspircd.h"
#include "inspircd_io.h"
-#include "inspircd_util.h"
#include <unistd.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
@@ -39,17 +38,17 @@

Include dependency graph for channels.cpp:

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

@@ -113,7 +112,7 @@ Include dependency graph for channels.cpp:

55 of file channels.cpp. +Definition at line 54 of file channels.cpp.

Function Documentation

@@ -165,99 +164,100 @@ Definition at line 55

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

-References chanrec::bans, chanrec::binarymodes, chanlist, userrec::chans, CM_INVITEONLY, CM_NOEXTERNAL, CM_TOPICLOCK, DEBUG, DEFAULT, connection::fd, FindChan(), ForceChan(), FOREACH_RESULT, userrec::GetFullHost(), has_channel(), userrec::IsInvited(), chanrec::key, chanrec::limit, log(), userrec::modes, chanrec::name, userrec::nick, userrec::RemoveInvite(), TIME, and WriteServ(). -

-Referenced by Server::JoinUserToChannel().

00196 {
-00197         if ((!user) || (!cn))
-00198         {
-00199                 log(DEFAULT,"*** BUG *** add_channel was given an invalid parameter");
-00200                 return 0;
-00201         }
-00202 
-00203         int created = 0;
-00204         char cname[MAXBUF];
-00205         int MOD_RESULT = 0;
-00206         strncpy(cname,cn,CHANMAX);
-00207 
-00208         log(DEBUG,"add_channel: %s %s",user->nick,cname);
-00209 
-00210         chanrec* Ptr = FindChan(cname);
-00211 
-00212         if (!Ptr)
-00213         {
-00214                 if (user->fd > -1)
-00215                 {
-00216                         MOD_RESULT = 0;
-00217                         FOREACH_RESULT(OnUserPreJoin(user,NULL,cname));
-00218                         if (MOD_RESULT == 1)
-00219                                 return NULL;
-00220                 }
-00221                 /* create a new one */
-00222                 chanlist[cname] = new chanrec();
-00223                 strlcpy(chanlist[cname]->name, cname,CHANMAX);
-00224                 chanlist[cname]->binarymodes = CM_TOPICLOCK | CM_NOEXTERNAL;
-00225                 chanlist[cname]->created = TIME;
-00226                 strcpy(chanlist[cname]->topic, "");
-00227                 strncpy(chanlist[cname]->setby, user->nick,NICKMAX);
-00228                 chanlist[cname]->topicset = 0;
-00229                 Ptr = chanlist[cname];
-00230                 log(DEBUG,"add_channel: created: %s",cname);
-00231                 /* set created to 2 to indicate user
-00232                  * is the first in the channel
-00233                  * and should be given ops */
-00234                 created = 2;
-00235         }
-00236         else
-00237         {
-00238                 /* Already on the channel */
-00239                 if (has_channel(user,Ptr))
-00240                         return NULL;
-00241 
-00242                 // remote users are allowed us to bypass channel modes
-00243                 // and bans (used by servers)
-00244                 if (user->fd > -1)
-00245                 {
-00246                         MOD_RESULT = 0;
-00247                         FOREACH_RESULT(OnUserPreJoin(user,Ptr,cname));
-00248                         if (MOD_RESULT == 1)
-00249                         {
-00250                                 return NULL;
-00251                         }
-00252                         else
-00253                         {
-00254                                 if (*Ptr->key)
-00255                                 {
-00256                                         MOD_RESULT = 0;
-00257                                         FOREACH_RESULT(OnCheckKey(user, Ptr, key ? key : ""));
-00258                                         if (!MOD_RESULT)
-00259                                         {
-00260                                                 if (!key)
-00261                                                 {
-00262                                                         log(DEBUG,"add_channel: no key given in JOIN");
-00263                                                         WriteServ(user->fd,"475 %s %s :Cannot join channel (Requires key)",user->nick, Ptr->name);
-00264                                                         return NULL;
-00265                                                 }
-00266                                                 else
-00267                                                 {
-00268                                                         if (strcasecmp(key,Ptr->key))
-00269                                                         {
-00270                                                                 log(DEBUG,"add_channel: bad key given in JOIN");
-00271                                                                 WriteServ(user->fd,"475 %s %s :Cannot join channel (Incorrect key)",user->nick, Ptr->name);
-00272                                                                 return NULL;
-00273                                                         }
-00274                                                 }
-00275                                         }
-00276                                 }
-00277                                 if (Ptr->binarymodes & CM_INVITEONLY)
-00278                                 {
-00279                                         MOD_RESULT = 0;
+Definition at line 194 of file channels.cpp.
+

+References chanrec::bans, chanrec::binarymodes, chanlist, userrec::chans, CM_INVITEONLY, CM_NOEXTERNAL, CM_TOPICLOCK, DEBUG, DEFAULT, connection::fd, FindChan(), ForceChan(), FOREACH_RESULT, userrec::GetFullHost(), has_channel(), userrec::IsInvited(), chanrec::key, chanrec::limit, log(), userrec::modes, chanrec::name, userrec::nick, userrec::RemoveInvite(), TIME, and WriteServ(). +

+Referenced by Server::JoinUserToChannel().

00195 {
+00196         if ((!user) || (!cn))
+00197         {
+00198                 log(DEFAULT,"*** BUG *** add_channel was given an invalid parameter");
+00199                 return 0;
+00200         }
+00201 
+00202         int created = 0;
+00203         char cname[MAXBUF];
+00204         int MOD_RESULT = 0;
+00205         strncpy(cname,cn,CHANMAX);
+00206 
+00207         log(DEBUG,"add_channel: %s %s",user->nick,cname);
+00208 
+00209         chanrec* Ptr = FindChan(cname);
+00210 
+00211         if (!Ptr)
+00212         {
+00213                 if (user->fd > -1)
+00214                 {
+00215                         MOD_RESULT = 0;
+00216                         FOREACH_RESULT(OnUserPreJoin(user,NULL,cname));
+00217                         if (MOD_RESULT == 1)
+00218                                 return NULL;
+00219                 }
+00220                 /* create a new one */
+00221                 chanlist[cname] = new chanrec();
+00222                 strlcpy(chanlist[cname]->name, cname,CHANMAX);
+00223                 chanlist[cname]->binarymodes = CM_TOPICLOCK | CM_NOEXTERNAL;
+00224                 chanlist[cname]->created = TIME;
+00225                 strcpy(chanlist[cname]->topic, "");
+00226                 strncpy(chanlist[cname]->setby, user->nick,NICKMAX);
+00227                 chanlist[cname]->topicset = 0;
+00228                 Ptr = chanlist[cname];
+00229                 log(DEBUG,"add_channel: created: %s",cname);
+00230                 /* set created to 2 to indicate user
+00231                  * is the first in the channel
+00232                  * and should be given ops */
+00233                 created = 2;
+00234         }
+00235         else
+00236         {
+00237                 /* Already on the channel */
+00238                 if (has_channel(user,Ptr))
+00239                         return NULL;
+00240 
+00241                 // remote users are allowed us to bypass channel modes
+00242                 // and bans (used by servers)
+00243                 if (user->fd > -1)
+00244                 {
+00245                         MOD_RESULT = 0;
+00246                         FOREACH_RESULT(OnUserPreJoin(user,Ptr,cname));
+00247                         if (MOD_RESULT == 1)
+00248                         {
+00249                                 return NULL;
+00250                         }
+00251                         else
+00252                         {
+00253                                 if (*Ptr->key)
+00254                                 {
+00255                                         MOD_RESULT = 0;
+00256                                         FOREACH_RESULT(OnCheckKey(user, Ptr, key ? key : ""));
+00257                                         if (!MOD_RESULT)
+00258                                         {
+00259                                                 if (!key)
+00260                                                 {
+00261                                                         log(DEBUG,"add_channel: no key given in JOIN");
+00262                                                         WriteServ(user->fd,"475 %s %s :Cannot join channel (Requires key)",user->nick, Ptr->name);
+00263                                                         return NULL;
+00264                                                 }
+00265                                                 else
+00266                                                 {
+00267                                                         if (strcasecmp(key,Ptr->key))
+00268                                                         {
+00269                                                                 log(DEBUG,"add_channel: bad key given in JOIN");
+00270                                                                 WriteServ(user->fd,"475 %s %s :Cannot join channel (Incorrect key)",user->nick, Ptr->name);
+00271                                                                 return NULL;
+00272                                                         }
+00273                                                 }
+00274                                         }
+00275                                 }
+00276                                 if (Ptr->binarymodes & CM_INVITEONLY)
+00277                                 {
+00278                                         MOD_RESULT = 0;
+00279                                         irc::string xname(Ptr->name);
 00280                                         FOREACH_RESULT(OnCheckInvite(user, Ptr));
 00281                                         if (!MOD_RESULT)
 00282                                         {
 00283                                                 log(DEBUG,"add_channel: channel is +i");
-00284                                                 if (user->IsInvited(Ptr->name))
+00284                                                 if (user->IsInvited(xname))
 00285                                                 {
 00286                                                         /* user was invited to channel */
 00287                                                         /* there may be an optional channel NOTICE here */
@@ -268,7 +268,7 @@ Referenced by Server::JoinU
 00292                                                         return NULL;
 00293                                                 }
 00294                                         }
-00295                                         user->RemoveInvite(Ptr->name);
+00295                                         user->RemoveInvite(xname);
 00296                                 }
 00297                                 if (Ptr->limit)
 00298                                 {
@@ -399,9 +399,9 @@ Referenced by Server::JoinU
 

Definition at line 401 of file channels.cpp.

-References chanlist, userrec::chans, DEBUG, DEFAULT, chanrec::DelUser(), FindChan(), FOREACH_MOD, log(), chanrec::name, userrec::nick, and WriteChannel(). +References chanlist, userrec::chans, DEBUG, DEFAULT, chanrec::DelUser(), FindChan(), FOREACH_MOD, log(), chanrec::name, userrec::nick, and WriteChannel().

-Referenced by Server::PartUserFromChannel().

00402 {
+Referenced by Server::PartUserFromChannel().
00402 {
 00403         if ((!user) || (!cname))
 00404         {
 00405                 log(DEFAULT,"*** BUG *** del_channel was given an invalid parameter");
@@ -511,9 +511,9 @@ Referenced by Server::PartU
 

Definition at line 372 of file channels.cpp.

-References chanrec::AddUser(), ucrec::channel, DEBUG, FOREACH_MOD, log(), chanrec::name, chanrec::setby, chanrec::topic, chanrec::topicset, ucrec::uc_modes, UCMODE_OP, WriteChannel(), and WriteServ(). +References chanrec::AddUser(), ucrec::channel, DEBUG, FOREACH_MOD, log(), chanrec::name, chanrec::setby, chanrec::topic, chanrec::topicset, ucrec::uc_modes, UCMODE_OP, WriteChannel(), and WriteServ().

-Referenced by add_channel().

00373 {
+Referenced by add_channel().
00373 {
 00374         if (created == 2)
 00375         {
 00376                 /* first user in is given ops */
@@ -592,7 +592,7 @@ Referenced by add_channel(
 

Definition at line 459 of file channels.cpp.

-References AC_KICK, ACR_DEFAULT, ACR_DENY, chanlist, userrec::chans, cstatus(), DEBUG, DEFAULT, chanrec::DelUser(), connection::fd, FOREACH_MOD, FOREACH_RESULT, has_channel(), is_uline(), log(), chanrec::name, userrec::nick, userrec::server, STATUS_HOP, WriteChannel(), and WriteServ().

00460 {
+References AC_KICK, ACR_DEFAULT, ACR_DENY, chanlist, userrec::chans, cstatus(), DEBUG, DEFAULT, chanrec::DelUser(), connection::fd, FOREACH_MOD, FOREACH_RESULT, has_channel(), is_uline(), log(), chanrec::name, userrec::nick, userrec::server, STATUS_HOP, WriteChannel(), and WriteServ().
00460 {
 00461         if ((!src) || (!user) || (!Ptr) || (!reason))
 00462         {
 00463                 log(DEFAULT,"*** BUG *** kick_channel was given an invalid parameter");
@@ -704,7 +704,7 @@ References AC_KICK, 
 
 

-Referenced by add_channel(), del_channel(), and kick_channel(). +Referenced by add_channel(), del_channel(), and kick_channel().

@@ -752,9 +752,9 @@ Referenced by add_channel(

-Definition at line 70 of file channels.cpp. +Definition at line 69 of file channels.cpp.

-Referenced by chanrec::GetModeParameter(), and chanrec::SetCustomModeParam(). +Referenced by chanrec::GetModeParameter(), and chanrec::SetCustomModeParam().

@@ -786,7 +786,7 @@ Referenced by chanrec::Get - +
int MODCOUNT = -1 int MODCOUNT = -1
@@ -802,9 +802,9 @@ Referenced by
chanrec::Get

-Definition at line 935 of file modules.cpp. +Definition at line 934 of file modules.cpp.

-Referenced by Server::FindModule(). +Referenced by Server::FindModule().

@@ -829,7 +829,7 @@ Referenced by Server::FindM

-Referenced by Server::FindModule(). +Referenced by Server::FindModule().

@@ -854,7 +854,7 @@ Referenced by Server::FindM

-Referenced by add_channel(), and userrec::userrec(). +Referenced by add_channel(), AddClient(), AddWhoWas(), FullConnectUser(), and userrec::userrec().

@@ -863,7 +863,7 @@ Referenced by add_channel( - +
int WHOWAS_MAX int WHOWAS_MAX
@@ -877,7 +877,9 @@ Referenced by
add_channel(

- + +

+Referenced by AddWhoWas().

@@ -886,7 +888,7 @@ Referenced by add_channel( - +
int WHOWAS_STALE int WHOWAS_STALE
@@ -900,10 +902,12 @@ Referenced by
add_channel(

- + +

+Referenced by AddWhoWas(). -


Generated on Thu Dec 15 11:14:15 2005 for InspIRCd by  +
Generated on Mon Dec 19 18:02:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
-- cgit v1.2.3