Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

chanserv.h File Reference

Go to the source code of this file.

Defines

#define HELPOPS_CHAN   "#helpops"
 Magic channel used for auto-+h by services.

#define PM_MASK   0x00f000ff
 Plus-mode mask.

#define PM_I   0x00000001
 +i

#define PM_K   0x00000002
 +k

#define PM_L   0x00000004
 +l

#define PM_M   0x00000008
 +m

#define PM_N   0x00000010
 +n

#define PM_P   0x00000020
 +p

#define PM_S   0x00000040
 +s

#define PM_T   0x00000080
 +t [?]

#define MM_MASK   0x000fff00
 Minus-mode mask */.

#define MM_I   0x00000100
 -i

#define MM_K   0x00000200
 -k

#define MM_L   0x00000400
 -l

#define MM_M   0x00000800
 -m

#define MM_N   0x00001000
 -n

#define MM_P   0x00002000
 -p

#define MM_S   0x00004000
 -s

#define MM_T   0x00008000
 -t [?]

#define MM_H   0x00010000
#define MM_C   0x00020000
#define PM_H   0x00100000
#define PM_C   0x00200000
#define COPGUARD   0x00000001
 Channel opguard.

#define CKTOPIC   0x00000002
 Keeptopic mode.

#define CLEAVEOPS   0x00000004
 Leaveops.

#define CQUIET   0x00000008
 Quiet Changes.

#define CCSJOIN   0x00000010
#define CIDENT   0x00000020
 Ops must identify for access.

#define CHOLD   0x00000040
 Held -- will not expire.

#define CREG   0x00000080
 Unknown.

#define CBANISH   0x00000100
 Banished channel.

#define CPROTOP   0x00000200
 Protect sops from deops/such.

#define CMARK   0x00000400
 Channel is marked.

#define CCLOSE   0x00000800
 Channel has been closed.

#define CFORCEXFER   0x00001000
 at the moment for drop command.

#define CENCRYPT   0x00002000
 Channel password encrypted.

#define OPNONE   0
 No chanop access.

#define OP1   1
 Unused.

#define OP2   2
 Unused.

#define MAOP   3
 Mini-AOP.

#define OP4   4
 Unused.

#define AOP   5
 Unused.

#define OP6   6
 AutoOp.

#define OP7   7
 Unused.

#define MSOP   8
 MiniSop (Channel Operator).

#define OP9   9
 Unused.

#define SOP   10
 SuperOp.

#define OP11   11
 Unused.

#define OP12   12
 Unused.

#define MFOUNDER   13
 Mini Founder.

#define OP14   14
 Unused.

#define FOUNDER   15
 Founder.

#define CHANOP   0x0001
 +o - Channel Operator Status

#define CHANVOICE   0x0002
 +v - Voice Status


Functions

void sendToChanServ (UserList *, char **, int)
 Parse a ChanServ command.

void addUserToChan (UserList *, char *)
 Add user to a channel.

void remUserFromChan (UserList *, char *)
 Removes a user from channel(s).

void remFromAllChans (UserList *)
void changeNickOnAllChans (UserList *, UserList *)
void setChanMode (char **, int)
 Updates services' idea of what a channel's modes are.

void setChanTopic (char **, int)
 Tell ChanServ about a topic change.

void sendToChanOps (ChanList *, char *,...)
void sendToChanOpsAlways (ChanList *, char *,...)
void addChan (ChanList *)
 Add an online channel to the hash table and linked list.

void delChan (ChanList *)
 remove a channel from the channel list, and close it up where necessary

void addRegChan (RegChanList *)
 Add a registered channel to the hash table and linked list.

void delRegChan (RegChanList *)
 Delete a registered channel.

void addChanAkick (RegChanList *, cAkickList *)
 Add an autokick list item to a registered channel's autokick list.

void delChanAkick (RegChanList *, cAkickList *)
void addChanOp (RegChanList *, cAccessList *)
 Add an 'access list' item to a registered channel's operator list.

void delChanOp (RegChanList *, cAccessList *)
void initRegChanData (RegChanList *)
 Initialize (clean) a registered channel object Init data on a registered channel (clean hashes and pointers).

void addChanUser (ChanList *, cNickList *)
 Add an online user to an online channel's user hash and linked list.

void delChanUser (ChanList *, cNickList *, int)
void addChanBan (ChanList *, cBanList *)
 Add a ban item to an online channel's banlist.

void delChanBan (ChanList *, cBanList *)
ChanListgetChanData (char *)
 Find a channel in the list of online channels.

RegChanList * getRegChanData (char *)
 Find a registered channel in the list.

cNickListgetChanUserData (ChanList *, UserList *)
 Find a user channel record in an online channel.

cBanListgetChanBan (ChanList *, char *)
 Search for a certain ban in a channel (What's this for?).

int getChanOp (RegChanList *, char *)
 Get a user's chanop access to a channel.

cAccessListgetChanOpData (const RegChanList *, const char *)
 Get the chanop data structure of a nick that might be in the access list.

cAkickListgetChanAKick (RegChanList *, char *)
void syncChanData (time_t)
cAkickListgetChanAkick (RegChanList *, char *)
 Search for a specific akick in a channel.

void freeRegChan (RegChanList *)
 Frees a registered channel and its data.

void indexAkickItems (RegChanList *)
 Re-Index the akick list.

void indexOpItems (RegChanList *)
 Re-Index the oplist.

int isFounder (RegChanList *, UserList *)
 Determine if a user is the founder of a channel.

void makeModeLockStr (RegChanList *, char *)
 Generate mode-lock string.

char * initModeStr (char *chan)
void banKick (ChanList *, UserList *, char *,...)
 Kick and ban a user from a channel.

void rshift_argv (char **args, int x, int numargs)


Detailed Description

ChanServ header file

Definition in file chanserv.h.


Define Documentation

#define CCSJOIN   0x00000010
 

original meaning (ChanServ stays in channel) is antiquated

Definition at line 81 of file chanserv.h.

Referenced by addUserToChan(), createGhostChannel(), and deleteGhostChannel().

#define CFORCEXFER   0x00001000
 

at the moment for drop command.

Password is not authoritative

Definition at line 91 of file chanserv.h.

Referenced by IpcType::alterObjMessage(), IpcType::authObjMessage(), getMiscChanOp(), isFounder(), and setChanMode().

#define CLEAVEOPS   0x00000004
 

Leaveops.

Bug:
unimplemented

Definition at line 79 of file chanserv.h.


Function Documentation

void addChan ChanList newchan  ) 
 

Add an online channel to the hash table and linked list.

Parameters:
newchan Pointer to the online channel to be added
Precondition:
Newchan is a pointer to an initialized online channel record that has not yet been listed. The channel name member holds the name of the channel.
Postcondition:
The channel record ``newchan'' is added to the online channels table (has been listed).

Definition at line 285 of file chanserv.c.

References chanhashent::chan, ChanHash, firstChan, getChanData(), getHashKey(), chanlist_struct::hashnext, chanlist_struct::hashprev, chanhashent::lastchan, lastChan, chanlist_struct::name, chanlist_struct::next, and chanlist_struct::previous.

Referenced by addUserToChan().

void addChanAkick RegChanList *  channel,
cAkickList item
 

Add an autokick list item to a registered channel's autokick list.

Parameters:
channel Channel database item that autokick object should be added to
item Autokick object to be added to a registered channel object
Precondition:
Channel is a pointer to a valid REGISTERED channel record, and item is a pointer to a freshly-allocated cAkickList (or ChanServ AutoKick) item that has not yet been stored in a list.
Postcondition:
The ``item'' record is inserted in the ``channel autokick'' linked list.

Definition at line 446 of file chanserv.c.

References indexAkickItems(), cakicklist_struct::next, and cakicklist_struct::previous.

Referenced by readChanData().

void addChanBan ChanList channel,
cBanList item
 

Add a ban item to an online channel's banlist.

Parameters:
channel Online channel that a ban object should be added to
item Ban object to be added to ChanServ's information on a channel's banlist.
Precondition:
Channel is a pointer to a valid online channel record, and item is a pointer to a freshly-allocated cBanList (or channel ban-list entry) record that has not yet been stored in a list.
Postcondition:
The ``item'' record is added to the ``channel'' ban list.

Definition at line 418 of file chanserv.c.

References chanlist_struct::firstBan, chanlist_struct::lastBan, cbanlist_struct::next, and cbanlist_struct::previous.

Referenced by addUserToChan(), banKick(), and setChanMode().

void addChanOp RegChanList *  channel,
cAccessList item
 

Add an 'access list' item to a registered channel's operator list.

Parameters:
channel Registered channel object of item to be added
item Object to be added to the channel access list
Precondition:
Channel is a pointer to a valid REGISTERED channel record, and item is a pointer to a freshly-allocated cAccessList (or ChanServ operator) item that has not yet been stored in a list.
Postcondition:
The ``item'' record is inserted in the ``channel operator'' linked list but has been initialized to contain the appropriate nickname.
Warning:
Once an access list record is listed, the nickname of the record should never be altered.

Definition at line 476 of file chanserv.c.

References RegId::getHashKey(), caccesslist_struct::hashnext, caccesslist_struct::hashprev, indexOpItems(), caccesslist_struct::next, caccesslist_struct::nickId, and caccesslist_struct::previous.

Referenced by readChanData().

void addChanUser ChanList channel,
cNickList newnick
 

Add an online user to an online channel's user hash and linked list.

Parameters:
channel Online channel whom a user is to be added to
newnick A pointer to a channel-nick object to add to the hash table and list of the channel's members
Precondition:
Channel is a pointer to a valid online channel record, and newnick is a pointer to a freshly-allocated cNickList (or channel member entry) record that is not in a list but has been initialized to contain the appropriate nickname.
Postcondition:
The ``newnick'' record is stored in the ``channel'' member list.
Warning:
Once a userlist record is listed, the nickname of the record should never be altered.

Definition at line 371 of file chanserv.c.

References chanlist_struct::firstUser, getHashKey(), cnicklist_struct::hashnext, cnicklist_struct::hashprev, cnicklisthashent_struct::item, cnicklisthashent_struct::lastitem, chanlist_struct::lastUser, cnicklist_struct::next, _userlist::nick, cnicklist_struct::person, cnicklist_struct::previous, and chanlist_struct::users.

Referenced by addUserToChan(), and changeNickOnAllChans().

void addRegChan RegChanList *  newchan  ) 
 

Add a registered channel to the hash table and linked list.

Parameters:
newchan Pointer to a channel database object to add into the list
Precondition:
Newchan is a pointer to an initialized registered channel record that is not yet listed. The channel name member holds the name of the channel.
Postcondition:
The record ``newchan'' is added to the registered channels table (the channel is listed).

Definition at line 326 of file chanserv.c.

References regchanhashent::chan, firstRegChan, freeRegChan(), getHashKey(), getRegChanData(), regchanhashent::lastchan, lastRegChan, and RegChanHash.

Referenced by readChanData().

void addUserToChan UserList nick,
char *  channel
 

Add user to a channel.

Adds a user to the specified channel after a JOIN

Parameters:
nick Pointer to an online user item
channel Name of a channel
Warning:
MAXCHANSPERUSER as used by ircd must be match the value of NICKCHANHASH or desyncs will occur.
Bug:
this depends on maxchans

Definition at line 1584 of file chanserv.c.

References addChan(), addChanBan(), addChanUser(), AOP, cbanlist_struct::ban, banKick(), CBANISH, CCLOSE, CCSJOIN, _userlist::chan, CHANOP, ChanServ, CHANVOICE, CKTOPIC, createGhostChannel(), CTime, DEBUGCHAN, delChanUser(), deleteTimedGhostChannel(), dlogEntry(), chanlist_struct::firstUser, genHostMask(), getChanData(), getChanOp(), getRegChanData(), HELPOPS_CHAN, _userlist::host, initModeStr(), isOper(), makeModeLockStr(), MAOP, cakicklist_struct::mask, match(), MFOUNDER, MM_K, chanlist_struct::name, cakicklist_struct::next, _userlist::nick, NISHELPOP, oalloc(), _userlist::oflags, cnicklist_struct::op, cnicklist_struct::person, PM_I, PM_K, PM_L, chanlist_struct::reg, remFromAllChans(), remUserFromChan(), sSend(), strncpyzt, timer(), and _userlist::user.

Referenced by parseLine().

void banKick ChanList chan,
UserList nick,
char *  format,
... 
 

Kick and ban a user from a channel.

Kicks a user off the specified channel and sets a ban.

Parameters:
chan Pointer to a channel item
nick Pointer to online nickname (target item)
format Kick message format string
... Kick message format argument list
Precondition:
Chan points to a listed, valid online channel record. Nick points to a listed, valid online user record. Format points to a valid NUL-terminated character array, and format and the following parameters form a valid format string and set of arguments for that string.
Postcondition:
An IRC message has been sent to kick and ban the specified online user. This procedure does not perform the internal updates necessary to note a change.
Warning:
This function can cause a channel to be deleted, 'chan' should be treated as no longer valid after a call to this function -- since it is void, there is no way to test if the pointer value is still valid short of a lookup by name in the Channel hash table.

Definition at line 1371 of file chanserv.c.

References addChanBan(), cbanlist_struct::ban, ChanServ, DEBUGCHAN, delChanUser(), getChanUserData(), _userlist::host, mask(), chanlist_struct::name, _userlist::nick, oalloc(), sSend(), strncpyzt, and _userlist::user.

Referenced by addUserToChan().

void changeNickOnAllChans UserList oldnick,
UserList newnick
 

Changes a user's nicknames on all channels that they have joined

Parameters:
oldnick Pointer to the original nickname of the user
newnick Pointer to an online user item of the target nickname

Definition at line 2029 of file chanserv.c.

References addChanUser(), _userlist::chan, ChanServ, DEBUGCHAN, delChanUser(), getChanUserData(), _userlist::nick, oalloc(), cnicklist_struct::op, cnicklist_struct::person, and sSend().

Referenced by changeNick().

void delChan ChanList killme  ) 
 

remove a channel from the channel list, and close it up where necessary

Parameters:
killme Channel to remove from services' online channels list and destroy
Precondition:
Killme is a pointer to a listed online channel record.
Postcondition:
The channel is unlisted, removed from the table, and the memory area is freed.
Warning:
This does free killme.

Definition at line 519 of file chanserv.c.

References chanhashent::chan, ChanHash, firstChan, getHashKey(), chanlist_struct::hashnext, chanlist_struct::hashprev, chanhashent::lastchan, lastChan, chanlist_struct::name, chanlist_struct::next, and chanlist_struct::previous.

Referenced by delChanUser().

void delChanAkick RegChanList *  channel,
cAkickList item
 

Remove channel akick

Precondition:
Channel points to a valid, listed registered channel record. Item points to a valid cAkickList record that can be found in the autokick list of channel.
Postcondition:
Item is removed from the channel autokick list and the memory area pointed to by item is freed.

Definition at line 732 of file chanserv.c.

References indexAkickItems(), cakicklist_struct::next, and cakicklist_struct::previous.

void delChanBan ChanList channel,
cBanList item
 

Remove a channel ban item

Precondition:
Channel points to a valid, listed channel record. Item points to a valid cBanList channel ban list record that can be found in the ban list of channel.
Postcondition:
Item is removed from the channel banlist and the memory area pointed to by item is freed.

Definition at line 708 of file chanserv.c.

References chanlist_struct::firstBan, chanlist_struct::lastBan, cbanlist_struct::next, and cbanlist_struct::previous.

Referenced by setChanMode().

void delChanOp RegChanList *  channel,
cAccessList item
 

Remove channel operator

Parameters:
channel Channel item to remove an operator from
item Access list entry to remove
Precondition:
Channel points to a valid, listed registered channel record. Item points to a valid cAccessList record that can be found in the channel operator list of channel.
Postcondition:
Item is removed from the channel operator list and the memory area pointed to by item is freed.

Definition at line 759 of file chanserv.c.

References RegId::getHashKey(), caccesslist_struct::hashnext, caccesslist_struct::hashprev, indexOpItems(), caccesslist_struct::next, caccesslist_struct::nickId, and caccesslist_struct::previous.

void delChanUser ChanList channel,
cNickList nick,
int  doCleanChan
 

Now delete the user from the channel, gee is this easy or what? no. :>

Parameters:
channel Channel to delete from
nick User to delete
doCleanChan Clean an empty channel or no?
Precondition:
Channel points to a valid, listed online channel record, and Nick points to a valid cNickList record that can be found in the proper members hash table bucket of the channel record.
Postcondition:
The nick record is removed from the table and the memory pointed to by nick is freed. If no member structures remain, then the entire channel is unlisted and freed if doCleanChan is true.

Definition at line 650 of file chanserv.c.

References _userlist::chan, delChan(), chanlist_struct::firstUser, getHashKey(), cnicklist_struct::hashnext, cnicklist_struct::hashprev, cnicklisthashent_struct::item, cnicklisthashent_struct::lastitem, chanlist_struct::lastUser, cnicklist_struct::next, _userlist::nick, cnicklist_struct::person, cnicklist_struct::previous, and chanlist_struct::users.

Referenced by addUserToChan(), banKick(), changeNickOnAllChans(), remFromAllChans(), and remUserFromChan().

void delRegChan RegChanList *  killme  ) 
 

Delete a registered channel.

Remove a channel from the registered channel list, and close it up where necessary

Parameters:
killme Registered channel object to be deleted
Precondition:
Killme is a pointer to a listed registered channel record.
Postcondition:
The registration record is unlisted, removed from the table, and the memory area is freed.
Warning:
This procedure does not search for and update the 'reg' member of the online channel record to indicate that it is no longer registered. The caller must do this.

This does free killme.

Definition at line 569 of file chanserv.c.

References regchanhashent::chan, firstRegChan, freeRegChan(), getHashKey(), regchanhashent::lastchan, lastRegChan, RegNickIdMap::nick, and RegChanHash.

Referenced by expireChans().

void freeRegChan RegChanList *  killme  ) 
 

Frees a registered channel and its data.

Parameters:
killme Registered channel object to release from memory
Precondition:
Killme points to an otherwise valid registered channel record that has been allocated from the heap but is not found in the channel list(s) or table(s).
Postcondition:
The memory area pointed by killme has been freed and all non-null dynamic members of the killme record have been individually freed

Definition at line 623 of file chanserv.c.

Referenced by addRegChan(), and delRegChan().

cAkickList* getChanAkick RegChanList *  chan,
char *  akick
 

Search for a specific akick in a channel.

Parameters:
chan Pointer to online channel item
akick AutoKick string to look for
Returns:
Null pointer if the specified autokick could not be found, otherwise a pointer to the relevant #cAkickList object.

Definition at line 1163 of file chanserv.c.

References cakicklist_struct::mask, and cakicklist_struct::next.

cBanList* getChanBan ChanList chan,
char *  ban
 

Search for a certain ban in a channel (What's this for?).

Parameters:
chan Pointer to an online channel item to look in
ban Ban to search for
Returns:
NULL if the ban could not be found, or a pointer to the appropriate #cBanList structure if it is found.

Definition at line 1141 of file chanserv.c.

References cbanlist_struct::ban, chanlist_struct::firstBan, and cbanlist_struct::next.

Referenced by setChanMode().

ChanList* getChanData char *  name  ) 
 

Find a channel in the list of online channels.

Parameters:
Name of channel to find
Precondition:
Name points to a valid NUL-terminated character array that is also a valid channel name.
Returns:
Null pointer if no online channel by that name has been listed. #ChanList object if a channel by that name is listed.

Definition at line 803 of file chanserv.c.

References chanhashent::chan, ChanHash, getHashKey(), chanlist_struct::hashnext, and chanlist_struct::name.

Referenced by addChan(), addUserToChan(), expireChans(), gs_roll(), remUserFromChan(), and setChanMode().

int getChanOp RegChanList *  chan,
char *  nick
 

Get a user's chanop access to a channel.

Precondition:
Chan is a null pointer or a pointer to a valid, listed registered channel record. Nick is a null pointer or a pointer to a valid character array.
Returns:
The access level of the specified nickname to the channel.
See also: getMiscChanOp()

Definition at line 1065 of file chanserv.c.

References CIDENT, and getMiscChanOp().

Referenced by addUserToChan(), gs_roll(), remUserFromChan(), setChanMode(), and setChanTopic().

cAccessList* getChanOpData const RegChanList *  chan,
const char *  nick
 

Get the chanop data structure of a nick that might be in the access list.

Parameters:
Pointer to online channel
Name of nickname to find in oplist
Precondition:
Chan is a null pointer or a pointer to a valid, listed registered channel record. Nick is a null pointer or a pointer to a valid character array.
Returns:
A null pointer if the chanop cannot be found, otherwise a pointer to the chanop access object (#cAccessList) is returned.

Definition at line 1105 of file chanserv.c.

References getRegNickData(), caccesslist_struct::hashnext, and caccesslist_struct::nickId.

Referenced by do_chanop_add(), and getMiscChanOp().

cNickList* getChanUserData ChanList chan,
UserList data
 

Find a user channel record in an online channel.

Parameters:
chan Pointer to an online channel item
data Pointer to an online user item
Precondition:
Chan points to a valid, listed online channel record. Data points to a valid, listed online user record.
Returns:
A null pointer if no channel user record is found for that nickname on the channel. Else a #cNickList record, the membership object for the requested channel for the requested user.

Definition at line 891 of file chanserv.c.

References getHashKey(), cnicklist_struct::hashnext, cnicklisthashent_struct::item, _userlist::nick, cnicklist_struct::person, and chanlist_struct::users.

Referenced by banKick(), changeNickOnAllChans(), gs_roll(), remFromAllChans(), remUserFromChan(), and setChanMode().

RegChanList* getRegChanData char *  name  ) 
 

Find a registered channel in the list.

Parameters:
Name of registered channel to find
Precondition:
Name points to a valid NUL-terminated character array that is also a valid channel name.
Returns:
A pointer to the #RegChanList object for a registered channel record if a registered channel structure by that name has been listed. Otherwise a null pointer.

Definition at line 835 of file chanserv.c.

References regchanhashent::chan, getHashKey(), and RegChanHash.

Referenced by addRegChan(), addUserToChan(), IpcType::alterObjMessage(), IpcType::authObjMessage(), createGhostChannel(), deleteGhostChannel(), readChanData(), and setChanTopic().

void indexAkickItems RegChanList *  chan  ) 
 

Re-Index the akick list.

Parameters:
chan Registered channel to re-index the autokick list of.
Precondition:
Chan is a pointer to a valid, listed registered channel record.
Postcondition:
Autokick items for the channel are renumbered (indexed) starting at 1.

Definition at line 1185 of file chanserv.c.

References cakicklist_struct::index, and cakicklist_struct::next.

Referenced by addChanAkick(), and delChanAkick().

void indexOpItems RegChanList *  chan  ) 
 

Re-Index the oplist.

Parameters:
Registered channel to re-index chanop list of
Precondition:
Chan is a pointer to a valid, listed registered channel record.
Postcondition:
Channel operator items for the channel are renumbered (indexed) starting at 1.

Definition at line 1202 of file chanserv.c.

References caccesslist_struct::index, and caccesslist_struct::next.

Referenced by addChanOp(), and delChanOp().

void initRegChanData RegChanList *  chan  ) 
 

Initialize (clean) a registered channel object Init data on a registered channel (clean hashes and pointers).

Precondition:
Chan is a pointer to a freshly-allocated registered channel structure that has not yet been listed and has not been used.
Parameters:
chan Registered channel object to be initialized

Definition at line 1284 of file chanserv.c.

Referenced by readChanData().

int isFounder RegChanList *  chan,
UserList nick
 

Determine if a user is the founder of a channel.

Is this 'nick' person the founder of the channel or no?

Precondition:
Chan is a pointer to a valid, listed registered channel record.
Parameters:
chan Channel to check
nick Nick to check founder access of
Returns:
1 if yes, 0 if not

Definition at line 1238 of file chanserv.c.

References CFORCEXFER, clearChanIdent(), getNickData(), _userlist::idnum, isRecognized(), _userlist::nick, opFlagged(), OVERRIDE, _userlist::reg, and _userlist::timestamp.

Referenced by do_chanop_add(), and getMiscChanOp().

void makeModeLockStr RegChanList *  chan,
char *  modelock
 

Generate mode-lock string.

Fills the modelock buffer with a copy of the locked modes string

Parameters:
chan Pointer to channel list item
modelock Buffer of at least 80 characters to hold the lock buffer
Precondition:
Chan must point to a valid, listed registered channel. Mode must point to a character memory area of at least 20 characters in length.
Postcondition:
The memory area pointed to by modelock has received a copy of the modelock enforcement string that can be used with an IRC message to enforce channel modes.
Warning:
DON'T add modes to this procedure without first checking that all callers have a large enough buffer. Buffer is assumed 20 units long.

Definition at line 1512 of file chanserv.c.

References MM_I, MM_K, MM_L, MM_M, MM_N, MM_P, MM_S, MM_T, PM_I, PM_K, PM_L, PM_M, PM_N, PM_P, PM_S, and PM_T.

Referenced by addUserToChan(), initModeStr(), and setChanMode().

void remFromAllChans UserList nick  ) 
 

Removes a user from all channels

Parameters:
nick Pointer to online user item

Definition at line 1996 of file chanserv.c.

References _userlist::chan, ChanServ, DEBUGCHAN, delChanUser(), getChanUserData(), _userlist::nick, and sSend().

Referenced by addUserToChan(), and remUser().

void remUserFromChan UserList nick,
char *  channel
 

Removes a user from channel(s).

Removes a user from channel(s) in response to a PART message

Parameters:
nick Pointer to online user item
channel List of channel(s) to remove user from

Definition at line 1918 of file chanserv.c.

References _userlist::chan, ChanServ, DEBUGCHAN, delChanUser(), getChanData(), getChanOp(), getChanUserData(), HELPOPS_CHAN, chanlist_struct::name, _userlist::nick, NISHELPOP, NISOPER, _userlist::oflags, chanlist_struct::reg, and sSend().

Referenced by addUserToChan(), and parseLine().

void sendToChanOps ChanList chan,
char *  format,
... 
 

Precondition:
Chan is a pointer to a valid, online channel. Format points to a valid NUL-terminated character array, and parameters beyond it follow rules of the format string.
Postcondition:
If the channel is not registered or the QUIET option is not set, then the given message has been sent to all channel operators.
Parameters:
chan Pointer to channel item
format Format string for message
... Format arguments

Definition at line 1307 of file chanserv.c.

References ChanServ, CQUIET, chanlist_struct::name, chanlist_struct::reg, and sSend().

void sendToChanOpsAlways ChanList chan,
char *  format,
... 
 

Todo:
make these two one function. Send a message to channel operators, ignore QUIET
Parameters:
chan Pointer to channel item
format Format string for message
... Format arguments
Precondition:
Chan is a pointer to a valid, online channel. Format points to a valid NUL-terminated character array, and parameters beyond it follow rules of the format string.
Postcondition:
An IRC message has been sent for all operators of the given channel.

Definition at line 1335 of file chanserv.c.

References ChanServ, chanlist_struct::name, and sSend().

void setChanMode char **  args,
int  numargs
 

Updates services' idea of what a channel's modes are.

Parameters:
args The args[] vector of the MODE message of which args[3] is the mode string, args[0] is the setter, args[2] is the channel, and anything beyond args[3] are parameters.
numargs Total number of indices in the args[] vector passed

Definition at line 2065 of file chanserv.c.

References addChanBan(), AOP, cbanlist_struct::ban, CFORCEXFER, CHANOP, ChanServ, CHANVOICE, COPGUARD, CPROTOP, DEBUGCHAN, delChanBan(), chanlist_struct::firstUser, getChanBan(), getChanData(), getChanOp(), getChanUserData(), getNickData(), chanlist_struct::lastUser, makeModeLockStr(), MM_K, chanlist_struct::modes, chanlist_struct::name, oalloc(), cnicklist_struct::op, PM_I, PM_K, PM_L, PM_M, PM_N, PM_P, PM_S, PM_T, chanlist_struct::reg, sSend(), and strncpyzt.

Referenced by parseLine().

void setChanTopic char **  args,
int  numargs
 

Tell ChanServ about a topic change.

Updates services' idea of what a channel's topic is. Enforces topic locks.

Parameters:
args args[] vector from a TOPIC message
numargs numargs from a TOPIC message
Warning:
Assumes TOPIC_MAX < IRCBUF

Definition at line 2355 of file chanserv.c.

References getChanOp(), getRegChanData(), myname, parse_str(), sSend(), strncpyzt, and TOPIC_MAX.

Referenced by parseLine().

void syncChanData time_t  next  ) 
 

Handle timed ChanServ database syncs

Definition at line 2472 of file chanserv.c.

References firstRegChan, nextCsync, and saveChanData().

Referenced by sshutdown(), and sync_cfg().


Generated at Sat Oct 25 20:56:11 2003 for Services using Doxygen.
Services Copyr. 1996-2001 Chip Norkus, Max Byrd, Greg Poma, Michael Graff, James Hess, Dafydd James. All rights reserved See LICENSE for licensing information.