channel.h File Reference

Go to the source code of this file.

Data Structures

struct  Channel
struct  ChanUser
struct  CMode

Defines

#define MAX_CHAN   34
#define KEYLEN   15

Functions

Channelfind_channel (char *chan)
Channelnew_chan (char *chan)
void dest_chan (char *chan)
char * create_chanmode_string (Channel *)
struct ChanUsernew_chanuser (User *)
struct ChanUserfind_chanuser (User *, Channel *)
void AddToChannel (char *, Channel *)
void AddToChannelU (User *, Channel *)
void DelFromChannel (User *, Channel *)
void KickFromChannel (User *, Channel *, char *)
int findcmode_bysymbol (char *)
int in_channel (User *, Channel *)

Variables

dlink_list channels
struct CMode ircd_cmodes [128]

Define Documentation

#define KEYLEN   15

Definition at line 7 of file src/channel.h.

#define MAX_CHAN   34

Definition at line 6 of file src/channel.h.


Function Documentation

void AddToChannel ( char *  ,
Channel  
)
void AddToChannelU ( User *  ,
Channel  
)
char* create_chanmode_string ( Channel  ) 
void DelFromChannel ( User *  ,
Channel  
)
void dest_chan ( char *  chan  ) 
Channel* find_channel ( char *  chan  ) 

Find a channel structure within the list by channel name.

Parameters:
chan Channel name
Returns:
Channel* Return the structure we found, or NULL if it cant be found or we fail for w/e reason.

Definition at line 146 of file channel.c.

References channels, DLINK_FOREACH, and Channel::name.

struct ChanUser* find_chanuser ( User *  ,
Channel  
) [read]

Definition at line 413 of file channel.c.

References DLINK_FOREACH, ChanUser::user, and Channel::users.

int findcmode_bysymbol ( char *  symbol  ) 

Find a mode string by its retrospective symbol

Parameters:
symbol Symbol of the mode we are searching for.
Returns:
return the location of the mode within our supported mode structure or -1 if the mode isnt supported or we failed for whatever reason.

Definition at line 58 of file channel.c.

int in_channel ( User *  user,
Channel ch 
)

Check if a user is in a channel.

Parameters:
user User we are checking for.
ch Channel we are checking against.
Returns:
True if the user is within channel, or false if user is not.

Definition at line 178 of file channel.c.

References DLINK_FOREACH, and Channel::name.

void KickFromChannel ( User *  ,
Channel ,
char *   
)
Channel* new_chan ( char *  chan  ) 

Allocate a new channel structure as well as initialize the defaults for that channel.

Parameters:
chan the name of the channel we are creating a structure for
Returns:
Channel* Return a pointer to the channel structure regardless. if the channel already exsists return a pointer to that as well.

Definition at line 88 of file channel.c.

References alog(), Channel::audit, channels, Channel::channelts, dlink_add_tail(), dlink_create(), Channel::external, find_channel(), Channel::flood, Channel::haskey, Channel::invite, Channel::limit, Channel::linked, Channel::name, Channel::onlyoptopic, Channel::operonly, Channel::priv, Channel::registered, Channel::regonly, Channel::ssl, strlcpy(), Channel::unknownmodes, Channel::usercnt, and Channel::users.

struct ChanUser* new_chanuser ( User *   )  [read]

Variable Documentation

dlink_list channels

Definition at line 9 of file src/channel.h.

struct CMode ircd_cmodes[128]

Definition at line 31 of file channel.c.

Generated on Mon Jul 19 21:53:04 2010 for Omega Security Services by  doxygen 1.6.3