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

nickserv.c File Reference

NickServ Implementation. More...

#include "services.h"
#include "memoserv.h"
#include "queue.h"
#include "macro.h"
#include "nickserv.h"
#include "chanserv.h"
#include "infoserv.h"
#include "email.h"
#include "hash.h"
#include "clone.h"
#include "mass.h"
#include "db.h"
#include "log.h"
#include "hash/md5pw.h"

Go to the source code of this file.

Classes

struct  ghost_struct
 Simple linked list with all the ghost stuff [enforcer] in them. More...

struct  nss_tab
struct  opflag_table
 Oper flag table structure. More...


Defines

#define REALLEN   50
#define OPFLAG(x, y, z)   { x, y, z }
 Oper flag definition macro.

#define NUM_CNICKS   (sizeof(cnick_prefixes)/sizeof(char *))
 Number of defined CNICK prefixes.

#define CNICK_FMT   ":%s CNICK %s %s %ld"

Typedefs

typedef ghost_struct GhostList
 Alias to structure for keeping NickServ enforcer information.


Enumerations

enum  ns_set_en { NSS_FLAG, NSS_PROC }
 NickServ set classes. More...


Functions

GhostListgetGhost (char *)
 Retrieve information about a NickServ enforcer.

char * urlEncode (const char *)
const char * GetAuthChKey (const char *, const char *pass, time_t, u_int32_t code_arg)
const char * PrintPass (u_char pI[], char enc)
 Print a password appropriately encoded according to its encryption type (if applicable).

akillgetAkill (char *nick, char *user, char *host)
char * applyAkill (char *nick, char *user, char *host, struct akill *ak)
char * getAkReason (struct akill *ak)
akillgetAhurt (char *nick, char *user, char *host)
long getAkillId (struct akill *ak)
void enforce_nickname (char *nick)
int isPasswordAcceptable (const char *password, char *reason)
 Is a password acceptable?

RegId top_user_idnum (0, 1)
 Highest user identifier.

RegId top_regnick_idnum (0, 1001)
void nDesynch (char *nick, char *type)
 Handle user desyncs.

void annoyNickThief (UserList *)
 Basically bother a nick owner into giving a nick back (and/or enforce nick kill).

void complainAboutEmail (UserList *)
 Nag users who never set an e-mail address and never did the '/NICKSERV SET ADDRESS NONE'.

void killide (char *)
 Timed force nick change (or nag) of a user whom services does not believe owns the nickname.

void removeEnforcer (char *)
 no longer exists

void freeUserListRec (UserList *zap)
 Free a userlist record.

void freeRegNickListRec (RegNickList *zap)
 Free a registered nick record.

void NickSeeUser (UserList *newnick, RegNickList *reg, int caccess, int verbose)
 NickServ sees a user.

void SetUserNickHostReal (UserList *newnick, char *nick, char *user, char *host, char *gecos)
 Assigns the nickname, username, host, and possibly gecos of an online user object.

char NickGetEnc (RegNickList *rnl)
 Get a registered nick encryption prefix.

void addNewUser (char **args, int numargs)
 Handles a server NICK message by adding a new user connection.

void changeNick (char *from, char *to, char *ts)
 Handles a NICK command, allowing nicknames to change.

void setMode (char *nick, char *mode)
 Changes the modes of an online user.

void setFlags (char *nick, int flag, char change)
 Sets online flags of an online user structure.

void setIdentify (UserList *user, RegNickList *nick)
 Identifies an online user to a registered nickname.

void clearIdentify (UserList *user)
 Clears any identify by an online user.

int isIdentified (UserList *user, RegNickList *nick)
 Reports TRUE or FALSE indicating whether or not the specified user is identified to the specified nickname.

int isRecognized (UserList *user, RegNickList *nick)
 Reports TRUE or FALSE indicating whether or not the specified user is recognized by access list (ACC 2) for the specified nickname.

int isOper (UserList *nick)
int opFlagged (UserList *nick, flag_t flag)
flag_t getOpFlags (UserList *nick)
 Returns the effective flags of an online user.

int issRoot (UserList *nick)
int isRoot (UserList *nick)
int isServop (UserList *nick)
int isGRPop (UserList *nick)
int isHelpop (UserList *nick)
int canAkill (UserList *nick)
void remUser (char *nick, int ignoreDesync)
 Handles the QUIT server message, it removes a user from the nickname list and destroys the allocated memory area.

void addNick (UserList *newnick)
 Adds the online user item to the user hash tables and user list.

void addRegNick (RegNickList *newnick)
 Adds the registered nick item to the nickname hash tables and user list.

void delNick (UserList *killme)
 Removes the online user item from the user hash tables and user list. When this function returns, 'killme' is no longer a valid pointer.

void delRegNick (RegNickList *killme)
 Removes the registered nick item from the nickname hash tables and nick list. When this function returns, 'killme' is no longer a valid pointer.

UserListgetNickData (char *nick)
 Searches the user hash table for information about the specified online user by nickname. Returns a pointer to the online user item if found, otherwise returns NULL.

RegNickList * getRegNickData (const char *nick)
 Searches the regnick hash table for information about the specified registered nick data by nickname.

int checkAccess (char *user, char *host, RegNickList *nick)
 Used to test whether the specified user@hostname can be matched against an entry in an access list.

void sendToNickServ (UserList *tmp, char **args, int numargs)
 Message handler for NickServ.

char * regnick_ugethost (UserList *user, RegNickList *target, int sM)
void addAccessMask (char *mask, UserList *nick)
 Handle the ACCESS ADD command.

void delAccessMask (char *mask, UserList *nick)
 Handle the ACCESS DEL command.

void guest_cnick (UserList *ul)
void addGhost (char *ghost)
 Add a NickServ enforcer.

void delGhost (char *ghost)
 Remove a NickServ enforcer.

void delTimedGhost (char *ghost)
 Handle expiration of a NickServ ghost timer by removing the enforcer.

int isGhost (char *ghost)
int BadPwNick (UserList *sender, RegNickList *target)
 Record a bad password attempt by `sender' on `target'.

int GoodPwNick (UserList *sender, RegNickList *target)
 Record a successful password entry by `sender' on `target'.

int addFlood (UserList *tmp, int addtoflood)
 Services Flood Protection -- addFlood adds the specified amount to a user's flood level, assuming this was added within tens econds of the last addition otherwise, simply makes floodlevel equal to whatever is sent. This function also updates lastmsg.

void expireNicks (char *dummy)
 This function handles timed NickServ expiration runs, deletes non-held nicknames that have not been used for their maximum inactivity period before expiration.

int addAccItem (RegNickList *nick, char *mask)
 Handles the work of placing an access item in a registered nickname's access list.

int delAccItem (RegNickList *nick, char *mask, char *deletedmask)
 Handles the work of removing an access item from a registered nickname's access list.

void syncNickData (time_t next)
 Saves the NickServ database.

void syncMemoData (time_t next)
 Saves the MemoServ database.

cmd_return ms_save (UserList *nick, char **args, int numargs)
 Sync MemoServ database to disk.

void addOpData (RegNickList *nick)
 Adds a user with opflags to the index.

void delOpData (RegNickList *nick)
 Removes and frees a user's index item from the oper index.

cmd_return ns_help (UserList *nick, char **args, int numargs)
cmd_return ns_vacation (UserList *nick, char **args, int numargs)
cmd_return ns_identify (UserList *nick, char **args, int numargs)
cmd_return ns_set_passwd (nss_tab *setEnt, UserList *nick, char *args[], int numargs)
 The /NICKSERV SET PASSWORD command.

cmd_return ns_set_url (nss_tab *setEnt, UserList *nick, char *args[], int numargs)
 The /NICKSERV SET URL command.

cmd_return ns_set_encrypt (nss_tab *setEnt, UserList *nick, char *args[], int numargs)
 The /NICKSERV SET URL command.

cmd_return ns_set_idtime (nss_tab *setEnt, UserList *nick, char *args[], int numargs)
 The /NICKSERV SET IDTIME command.

cmd_return ns_set_email (nss_tab *setEnt, UserList *nick, char *args[], int numargs)
 The /NICKSERV SET EMAIL command.

cmd_return ns_set (UserList *nick, char **args, int numargs)
cmd_return ns_register (UserList *nick, char **args, int numargs)
void SendNickInfo (UserList *nick, RegNickList *rnl, int terseOption)
cmd_return ns_info (UserList *nick, char **args, int numargs)
 Query NickServ for information on a nickname.

cmd_return ns_drop (UserList *nick, char **args, int numargs)
 Drop a registered nickname.

cmd_return ns_addmask (UserList *nick, char **args, int numargs)
cmd_return ns_access (UserList *nick, char **args, int numargs)
cmd_return ns_acc (UserList *nick, char **args, int numargs)
cmd_return ns_ghost (UserList *nick, char **args, int numargs)
cmd_return ns_recover (UserList *nick, char **args, int numargs)
cmd_return ns_release (UserList *nick, char **args, int numargs)
cmd_return ns_setopflags (UserList *nick, char **args, int numargs)
 Query/Change Operator flags.

cmd_return ns_mark (UserList *nick, char **args, int numargs)
cmd_return ns_setflags (UserList *nick, char **args, int numargs)
cmd_return ns_banish (UserList *nick, char **args, int numargs)
cmd_return ns_getrealpass (UserList *nick, char **args, int numargs)
cmd_return ns_getpass (UserList *nick, char **args, int numargs)
cmd_return ns_delete (UserList *nick, char **args, int numargs)
cmd_return ns_save (UserList *nick, char **args, int numargs)
 Save NickServ database.

cmd_return ns_list (UserList *nick, char **args, int numargs)
cmd_return ns_bypass (UserList *nick, char **args, int numargs)
cmd_return ns_logoff (UserList *nick, char **args, int numargs)

Variables

OperListfirstOper
 First item in the index to oper nicks.

unsigned long top_cnick = 0
 Number of CNICKs done.

int totalghosts = 0
 Current number of ghosts.

opflag_table opflags []
 Database of Oper flags.

char * cnick_prefixes []
 Nickname prefixes services uses when a user's nick is force-changed.

GhostListfirstGhost = NULL
 First Enforcer.

GhostListlastGhost = NULL
 Last Enforcer.

interp::service_cmd_t nickserv_commands []
 NickServ command dispatch table.


Detailed Description

NickServ Implementation.

Functions related to the manipulation of registered nick data and nickname authentication and associated operation commands.

Author:
Chip Norkus

Max Byrd

Greg Poma

James Hess

Date:
1996-2001
Id
nickserv.c,v 1.8 2003/10/25 17:56:11 Mysid Exp

Definition in file nickserv.c.


Enumeration Type Documentation

enum ns_set_en
 

NickServ set classes.

Enumeration values:
NSS_FLAG  /NICKSERV SET on-off nick -flag- option
NSS_PROC  /NICKSERV SET special procedure

Definition at line 160 of file nickserv.c.


Function Documentation

void addAccessMask char *  mask,
UserList nick
 

Handle the ACCESS ADD command.

Parameters:
mask Pointer to host address pattern to add to access list
nick List of online user requesting the add
Precondition:
Mask points to a valid NUL-terminated character array that consists of a valid NickServ access mask of the form user@host. Nick points to the record of an online user that is also a registered nick. nick->reg points to a valid registered nickname record.
Postcondition:
The specified mask is added to the online user's registered nickname.

Definition at line 1472 of file nickserv.c.

References AccessLimit, addAccItem(), isIdentified(), mask(), _userlist::nick, NickServ, _userlist::reg, and sSend().

Referenced by ns_addmask().

int addAccItem RegNickList *  nick,
char *  mask
 

Handles the work of placing an access item in a registered nickname's access list.

Parameters:
nick Registered nickname item to add an access list item to
mask Mask string to add a copy of
Precondition:
Nick is a pointer to a registered nickname record, and mask is a pointer to a NUL-terminated character array that is a valid user@host NickServ access mask.

Definition at line 2207 of file nickserv.c.

Referenced by addAccessMask(), and readNickData().

int addFlood UserList tmp,
int  addtoflood
 

Services Flood Protection -- addFlood adds the specified amount to a user's flood level, assuming this was added within tens econds of the last addition otherwise, simply makes floodlevel equal to whatever is sent. This function also updates lastmsg.

Parameters:
tmp Pointer to online user item
addtoflood Number of flood points the command is worth
Precondition:
Tmp is a pointer to a valid online user record, and addtoflood is an integer between of 0 and 100.
Postcondition:
Services flood checks have been performed. If a user floods excessively, they might have been killed. If a user has been killed then this procedure will have returned a non-zero value and their online user record can no longer be treated as valid without performing a nick lookup from the online users table based on a 'safe' copy of the nick string.
Warning:
If a user structure is killed, then so are all strings on the structure, example: 'char *from = nick->nick;' if the 'nick' structure is killed, then from is no longer valid. For most procedures, processing should return up back to a command interpreter once addFlood(nick, ...) returns a non-zero value.

Definition at line 2053 of file nickserv.c.

Referenced by BadPwChan(), BadPwNick(), gs_roll(), and parseLine().

void addGhost char *  ghost  ) 
 

Add a NickServ enforcer.

Parameters:
ghost What nickname to place a services enforcer on
Precondition:
Ghost is a pointer to a valid NUL-terminated character array containing an IRC nickname consisting of alphanumeric characters and a length between 1 and (NICKLEN - 1) characters. There is not a record in the online user table with a nickname the same as that specified.
Postcondition:
A services enforcer is signed on with the specified nickname.
Warning:
The enforcer is not scheduled for removal to do so, a timer must be set to call the delTimedGhost procedure with the ghost nickname as a parameter.

Definition at line 1811 of file nickserv.c.

References addUser(), firstGhost, ghost_struct::ghost, GhostList, lastGhost, ghost_struct::next, oalloc(), ghost_struct::previous, strncpyzt, totalghosts, and totalusers.

Referenced by addNewUser(), changeNick(), checkAkillAllUsers(), and parseLine().

void addNewUser char **  args,
int  numargs
 

Handles a server NICK message by adding a new user connection.

Parameters:
args Argument vector for received NICK server message
numargs Argument count for received NICK numargs
Precondition:
Args is non-NULL pointer to a valid char** array from a NICK message. Numargs is the number of elements in the outer array, and all inner elements are NUL-terminated
Postcondition:
A user structure from the supplied NICK message created and added to the services online user list.

Definition at line 417 of file nickserv.c.

References addClone(), addGhost(), addNick(), annoyNickThief(), applyAkill(), _userlist::caccess, checkAccess(), corelog, CTime, delTimedGhost(), dlogEntry(), freeUserListRec(), getNickData(), getRegNickData(), _userlist::host, service_struct::host, _userlist::idnum, InfoServ, isGhost(), logDump(), mostusers, service_struct::name, NBANISH, NDBISMASK, NDOEDIT, _userlist::nick, NickSeeUser(), NickServ, NISAHURT, NOISMASK, oalloc(), _userlist::oflags, OperServ, parse_str(), PutReply, _userlist::reg, RegId::SetNext(), SetUserNickHostReal(), sSend(), timer(), _userlist::timestamp, top_user_idnum(), totalusers, _userlist::user, and VERSION_NUM.

Referenced by parseLine().

void addNick UserList newnick  ) 
 

Adds the online user item to the user hash tables and user list.

Precondition:
Newnick is initialized to point to an allocated structure of type newnick.
Postcondition:
The structure newnick is added to the online users hash table.
Parameters:
nick User to add to the list

Definition at line 1129 of file nickserv.c.

References dlogEntry(), getHashKey(), LIST_ENTRY_INIT, LIST_INSERT_HEAD, _userlist::nick, totalusers, and UserHash.

Referenced by addNewUser(), and changeNick().

void addOpData RegNickList *  nick  ) 
 

Adds a user with opflags to the index.

Parameters:
nick Pointer to registered nickname item to add

Definition at line 2335 of file nickserv.c.

References firstOper, operlist_struct::next, oalloc(), OROOT, and operlist_struct::who.

Referenced by readConf(), and readNickData().

void addRegNick RegNickList *  newnick  ) 
 

Adds the registered nick item to the nickname hash tables and user list.

Precondition:
Newnick is initialized to point to a freshly-allocated nickname structure, it is not a null pointer, and no registered nick structure listed has the same nickname.
Postcondition:
The registered nick structure is added onto the hash table of registered nicknames.
Parameters:
nick Pointer to registered nickname item

Definition at line 1154 of file nickserv.c.

References assert, corelog, freeRegNickListRec(), getHashKey(), RegId::getHashKey(), getRegNickData(), RegNickIdMap::id, LIST_ENTRY_INIT, LIST_FIRST, LIST_INSERT_AFTER, LIST_INSERT_BEFORE, LIST_INSERT_HEAD, LIST_NEXT, logDump(), RegNickIdMap::nick, oalloc(), RegNickHash, and RegNickIdHash.

Referenced by IpcType::makeMessage(), and readNickData().

void annoyNickThief UserList nick  ) 
 

Basically bother a nick owner into giving a nick back (and/or enforce nick kill).

Precondition:
Nick points to a valid online user record, who is also a registered nickname and whose 'reg' member points to that registered nickname record.
Postcondition:
The user has been warned that they are using the nickname that is possibly owned by another user.
Parameters:
nick Pointer to an online user item

Definition at line 1613 of file nickserv.c.

References _userlist::host, killide(), myname, _userlist::nick, NickServ, NKILL, _userlist::reg, sSend(), and timer().

Referenced by addNewUser(), and changeNick().

char* applyAkill char *  nick,
char *  user,
char *  host,
struct akill ak
 

Returns:
A reason string if the user described is akilled, otherwise a null pointer.
Parameters:
nick The user's nickname
user The users's username
host The user's hostname
Precondition:
Nick, user, and host each point to separate, valid NUL-terminated character arrays. Nick is a valid IRC nickname, user is a valid IRC username, and host is a valid IRC hostname.
Postcondition:
If the user is found, then if appropriate an AKILL or AHURT message is sent.

Definition at line 238 of file akill.c.

int canAkill UserList nick  ) 
 

Returns:
FALSE if nick is a null pointer or has no access to the AKILL command as a result of the OAKILL opflag, specifically.
Precondition:
Nick is initialized to point to a valid online user or is a null pointer.
Parameters:
nick Nickname to check for akill access

Definition at line 1067 of file nickserv.c.

References isIdentified(), isOper(), OAKILL, and _userlist::reg.

void changeNick char *  from,
char *  to,
char *  ts
 

Handles a NICK command, allowing nicknames to change.

Parameters:
from Nickname of user to be changed
to Target nickname
ts Timestamp string of nickname change (if any)
Precondition:
From, to, and ts are all non-null pointers to 0-terminated character arrays.
Postcondition:
Nickname of online user is internally recorded as changed to 'from' at time 'ts'. The original nick structure is deleted. Some members are copied over, but many members are reset to initial values.
Called when someone uses the NICK command to change their nicks obviously...changed from, to, and it hands off the timestamp so that last seen time can be updated

Side Effects:
The entire online user structure is destroyed and re-created. Fields are copied manually, so any online user member that needs to follow the user across nick changes has to be special-cased here.

Definition at line 563 of file nickserv.c.

References addGhost(), addNick(), annoyNickThief(), _userlist::caccess, changeNickOnAllChans(), checkAccess(), clearIdentify(), CTime, delNick(), delTimedGhost(), dlogEntry(), _userlist::floodlevel, _userlist::gecos, getNickData(), getRegNickData(), _userlist::host, service_struct::host, _userlist::id, _userlist::idnum, _identifydata::idnum, isAKilled(), isGhost(), isIdentified(), killide(), myname, service_struct::name, NBANISH, NCNICK, nDesynch(), _userlist::nick, _identifydata::nick, NickSeeUser(), NickServ, oalloc(), _userlist::oflags, _userlist::reg, remUser(), RegId::SetNext(), SetUserNickHostReal(), sSend(), timer(), _userlist::timestamp, _identifydata::timestamp, top_user_idnum(), and _userlist::user.

Referenced by parseLine().

int checkAccess char *  user,
char *  host,
RegNickList *  nick
 

Used to test whether the specified user@hostname can be matched against an entry in an access list.

Precondition:
Both user and host point to valid NUL-terminated character arrays containing respectively an IRC username and IRC hostname of an online or recent user. Nick points to a valid registered nickname record.
Parameters:
user Pointer to the username to match
host Pointer to the hostname to match
nick Registered nickname to search the access list of

Definition at line 1343 of file nickserv.c.

References LIST_FIRST, LIST_NEXT, _naccesslist::mask, and match().

Referenced by addNewUser(), changeNick(), getMiscChanOp(), and isRecognized().

void clearIdentify UserList user  ) 
 

Clears any identify by an online user.

Parameters:
user Pointer to the online user who is to be affected
Precondition:
User points to a valid, non-null online user object.
Postcondition:
User will no longer be identified to any remote nickname.

Definition at line 819 of file nickserv.c.

References _userlist::id, _identifydata::idnum, _identifydata::nick, and _identifydata::timestamp.

Referenced by changeNick(), and delNick().

void complainAboutEmail UserList nick  ) 
 

Nag users who never set an e-mail address and never did the '/NICKSERV SET ADDRESS NONE'.

Precondition:
Nick points to a valid online user record
Postcondition:
If necessary an invalid e-mail address warning has been sent.
Parameters:
nick Pointer to the structure of the online user to be nagged

Definition at line 1564 of file nickserv.c.

References _userlist::nick, NickServ, _userlist::reg, and sSend().

Referenced by NickSeeUser().

void delAccessMask char *  mask,
UserList nick
 

Handle the ACCESS DEL command.

Parameters:
mask Pointer to host address pattern to delete from the access list
nick List of online user requesting the delete
Precondition:
Mask points to a valid NUL-terminated character array. Nick points to the record of an online user that is also a registered nick with a nick->reg member pointing to that record.
Postcondition:
The specified mask is removed from the online user's registered nickname if it could be found. If the mask specified is '-', then the registered nickname's access list is wiped clean.

Definition at line 1519 of file nickserv.c.

References delAccItem(), isIdentified(), LIST_FIRST, LIST_NEXT, mask(), _naccesslist::mask, _userlist::nick, NickServ, _userlist::reg, and sSend().

int delAccItem RegNickList *  nick,
char *  mask,
char *  deletedmask
 

Handles the work of removing an access item from a registered nickname's access list.

Parameters:
nick Registered nickname item to delete an access list item from
mask Mask to remove
Precondition:
Nick pointers to a valid registered nickname record, mask points to a valid NUL-terminated character array, and deletedmask points to a character memory area of at least size 70 bytes.
Postcondition:
If mask is found in the access list of nick, then that mask is removed. The string of the deleted mask is copied into the area pointed by deletedmask.
Returns:
1 If a mask was deleted, 0 if no mask was removed.

Definition at line 2255 of file nickserv.c.

Referenced by delAccessMask().

void delGhost char *  ghost  ) 
 

Remove a NickServ enforcer.

Parameters:
ghost Nickname of the enforcer to remove
Precondition:
Ghost is a pointer to a valid NUL-terminated character array bearing a legal IRC nickname.
Postcondition:
If the nickname was that of an online services enforcer, then services has removed the enforcer and the information stored about the enforcer.

Definition at line 1859 of file nickserv.c.

References firstGhost, getGhost(), GhostList, lastGhost, ghost_struct::next, ghost_struct::previous, sSend(), totalghosts, and totalusers.

Referenced by parseLine().

void delNick UserList killme  ) 
 

Removes the online user item from the user hash tables and user list. When this function returns, 'killme' is no longer a valid pointer.

Precondition:
Killme points to a valid, non-null online user object that is found in the online user list (or table).
Postcondition:
The online user nick object is removed from the online user table and freed from memory.
Parameters:
nick Pointer to an online user item to delete

Definition at line 1222 of file nickserv.c.

References clearIdentify(), flush_ad(), freeUserListRec(), LIST_REMOVE, and totalusers.

Referenced by changeNick(), and remUser().

void delOpData RegNickList *  nick  ) 
 

Removes and frees a user's index item from the oper index.

Parameters:
nick Pointer to registered nickname item to remove

Definition at line 2362 of file nickserv.c.

References firstOper, operlist_struct::next, and operlist_struct::who.

Referenced by delRegNick(), and readConf().

void delRegNick RegNickList *  killme  ) 
 

Removes the registered nick item from the nickname hash tables and nick list. When this function returns, 'killme' is no longer a valid pointer.

Precondition:
Killme points to a valid, non-null registered nickname object that is found in the nick table.
Postcondition:
The registered nick object is removed from the nick table and freed from memory.
Parameters:
nick Registered nick object to delete

Definition at line 1243 of file nickserv.c.

References delMemo(), delOpData(), freeRegNickListRec(), LIST_FIRST, LIST_NEXT, LIST_REMOVE, and _memolist::realto.

void delTimedGhost char *  ghost  ) 
 

Handle expiration of a NickServ ghost timer by removing the enforcer.

Parameters:
ghost Nickname of timed ghost
Side Effects:
the supplied ghost pointer value is freed
Precondition:
Ghost is a pointer to a valid NUL-terminated character array bearing a legal IRC nickname.
Postcondition:
delGhost() was called with the supplied value for 'ghost' to remove an enforcer if it was present, AND the memory pointed to by 'ghost' was freed.

Definition at line 1898 of file nickserv.c.

Referenced by addNewUser(), changeNick(), checkAkillAllUsers(), and parseLine().

void expireNicks char *  dummy  ) 
 

This function handles timed NickServ expiration runs, deletes non-held nicknames that have not been used for their maximum inactivity period before expiration.

<

Bug:
FIX ME

Definition at line 2122 of file nickserv.c.

References CTime, mostnicks, NBANISH, and NHOLD.

Referenced by parseLine().

const char* GetAuthChKey const char *  email,
const char *  password,
time_t  timereg,
u_int32_t  code_arg
 

Precondition:
Email and Password point to valid NUL-terminated character arrays. Timereg is a valid UTC calendar time, and code_arg is a code generated at random.
Returns:
An authentication key for password changes based on a hash of all data
Parameters:
email The user e-mail address
password The value of the nick or channel password structure
code_arg The selected change code

Definition at line 298 of file passwd.c.

GhostList * getGhost char *  ghost  ) 
 

Retrieve information about a NickServ enforcer.

Parameters:
ghost Nickname of the ghost

Definition at line 1908 of file nickserv.c.

References firstGhost, ghost_struct::ghost, and GhostList.

Referenced by delGhost().

UserList* getNickData char *  nick  ) 
 

Searches the user hash table for information about the specified online user by nickname. Returns a pointer to the online user item if found, otherwise returns NULL.

Precondition:
Nick points to a valid NUL-terminated character array.
Parameters:
nick Nickname of the user to find
Returns:
A null pointer if no online user structure found in the table has the specified nickname, else a pointer to one of the online user structures found.

Definition at line 1288 of file nickserv.c.

References getHashKey(), LIST_FIRST, LIST_NEXT, _userlist::nick, and UserHash.

Referenced by addNewUser(), changeNick(), getMiscChanOp(), guest_cnick(), isFounder(), killide(), make_clone(), IpcType::makeMessage(), nDesynch(), parseLine(), IpcType::queryRegNickMessage(), regnick_ugethost(), removeAkill(), removeAkillType(), remUser(), sendToNickServ(), setChanMode(), setFlags(), and setMode().

flag_t getOpFlags UserList nick  ) 
 

Returns the effective flags of an online user.

Parameters:
nick Pointer to online user item to extract flags from
Precondition:
Nick points to a valid online user object or is a null pointer.
A bitmask is returned with all flags that the user has access to set. The exception being that the '+a' flag is only set if /OPERSERV OVERRIDE is being used. If a null pointer is provided, the return value is zero.

Warning:
Presence of the +a flag cannot be tested with this function. OACC/OVERRIDE will return true only if /os override is in use.

Definition at line 946 of file nickserv.c.

References isIdentified(), isOper(), OACC, OOPER, OPFLAG_PLUS, OROOT, _userlist::reg, and userOverriding().

Referenced by sendToChanServ(), sendToGameServ(), sendToInfoServ(), sendToMemoServ(), sendToNickServ(), and sendToOperServ().

RegNickList* getRegNickData const char *  nick  ) 
 

Searches the regnick hash table for information about the specified registered nick data by nickname.

Returns:
A pointer to the registered nick record if one could be found. Else a null pointer.
Precondition:
Nick points to a valid NUL-terminated character array.
Parameters:
nick Nickname of the registered nick item to find

Definition at line 1312 of file nickserv.c.

References getHashKey(), LIST_FIRST, LIST_NEXT, and RegNickHash.

Referenced by addNewUser(), addRegNick(), IpcType::alterObjMessage(), IpcType::authObjMessage(), changeNick(), getChanOpData(), getMiscChanOp(), killide(), make_clone(), IpcType::makeMessage(), ms_DelMemoBlock(), IpcType::queryObjMessage(), readChanData(), readConf(), readMemoData(), readNickData(), and setMode().

void guest_cnick UserList ul  ) 
 

Format of a CNICK message

Definition at line 1649 of file nickserv.c.

References cnick_prefixes, CTime, dice(), getNickData(), myname, NCNICK, _userlist::nick, NickServ, NUM_CNICKS, _userlist::oflags, sSend(), and top_cnick.

int isGhost char *  ghost  ) 
 

Precondition:
Ghost is a pointer to a valid NUL-terminated character array whose contents are a valid IRC nickname string.
Returns:
FALSE if the specified nickname is not a NickServ enforcer. Else a non-zero value.
Parameters:
ghost Nickname to check

Definition at line 1926 of file nickserv.c.

Referenced by addNewUser(), changeNick(), and parseLine().

int isGRPop UserList nick  ) 
 

Returns:
FALSE if the specified online user is a null pointer or has no access to the NickServ getrealpass command; else a value other than FALSE is returned.
Precondition:
Nick points to a valid online user object or is a null pointer.
Parameters:
nick Pointer to an online user item

Definition at line 1025 of file nickserv.c.

References isIdentified(), isOper(), OGRP, and _userlist::reg.

int isHelpop UserList nick  ) 
 

Returns:
FALSE if the specified online user is not presently a HelpOp or nick was a NULL pointer. Else a value other than FALSE is returned.
Precondition:
Nick is initialized to point to a valid online user object or is a null pointer.
Parameters:
nick Pointer to an online user item

Definition at line 1047 of file nickserv.c.

References isIdentified(), NISHELPOP, _userlist::oflags, and _userlist::reg.

int isIdentified UserList user,
RegNickList *  nick
 

Reports TRUE or FALSE indicating whether or not the specified user is identified to the specified nickname.

Parameters:
user Pointer to online user to check for identification from
nick Pointer to registered nickname to check for identification to
Precondition:
User points to a valid online user object, nick points to a valid registered nickname object.
Returns:
FALSE indicates no identification, any other value indicates that the user is identified.

Definition at line 842 of file nickserv.c.

References _userlist::caccess, _userlist::id, _identifydata::idnum, NFORCEXFER, _identifydata::nick, NVACATION, _userlist::reg, _identifydata::timestamp, and _userlist::timestamp.

Referenced by addAccessMask(), canAkill(), changeNick(), delAccessMask(), getMiscChanOp(), getOpFlags(), isGRPop(), isHelpop(), isRecognized(), isRoot(), isServop(), killide(), opFlagged(), remUser(), and setMode().

int isOper UserList nick  ) 
 

Parameters:
nick Pointer to an online user item if the specified online user is invalid or not globally opered. Any other value indicates the user is an oper.
Precondition:
Nick is a NULL pointer or a valid online user object.

Definition at line 887 of file nickserv.c.

References NISOPER, and _userlist::oflags.

Referenced by addUserToChan(), canAkill(), getMiscChanOp(), getOpFlags(), is_listnews(), is_sendinfo(), isGRPop(), isRoot(), isServop(), newsNag(), opFlagged(), parseLine(), and sendToOperServ().

int isPasswordAcceptable const char *  password,
char *  reason
 

Is a password acceptable?

This procedure tests whether a password is acceptable or not in terms of technical devices that _need_ to have the password fit into certain ranges.

Definition at line 464 of file passwd.c.

int isRecognized UserList user,
RegNickList *  nick
 

Reports TRUE or FALSE indicating whether or not the specified user is recognized by access list (ACC 2) for the specified nickname.

Parameters:
user Pointer to online user to check for recognition from
nick Pointer to registered nickname to check for recognition to
Precondition:
User points to a valid online user object. Nick points to a valid registered nickname object.
Returns:
FALSE too indicate no recognition, any other value to indicate the user is recognized as being on the access list of the target nick.

Definition at line 870 of file nickserv.c.

References _userlist::caccess, checkAccess(), _userlist::host, isIdentified(), NVACATION, _userlist::reg, and _userlist::user.

Referenced by getMiscChanOp(), isFounder(), regnick_ugethost(), and setMode().

int isRoot UserList nick  ) 
 

Returns:
FALSE if nick is a null pointer or the user pointed to does not have services root privileges
Precondition:
Nick points to a valid online user object or is a null pointer.
Parameters:
nick Pointer to an online user item

Definition at line 983 of file nickserv.c.

References isIdentified(), isOper(), OROOT, and _userlist::reg.

Referenced by gs_roll(), and is_save().

int isServop UserList nick  ) 
 

Returns:
FALSE if the specified nick is a null pointer or not currently a Services Operator, or IRCop with services operator access.
Precondition:
Nick points to a valid online user object or is a null pointer.
Parameters:
nick Pointer to an online user item

Definition at line 1003 of file nickserv.c.

References isIdentified(), isOper(), OROOT, OSERVOP, and _userlist::reg.

void killide char *  info  ) 
 

Timed force nick change (or nag) of a user whom services does not believe owns the nickname.

Parameters:
info String indicating the nickname and time remaining (in seconds) in the form <nick>@<host>@<time>
Precondition:
Info is a pointer to a freshly allocated memory area. Info has been filled with a NUL-terminated string of the form <nick>@<host>@<time> nick is registered, hostname is the host of the current user of the nickname on IRC, and time is an index of time remaining before potential nickname enforcement from services.
Postcondition:
As appropriate: warnings may be sent out, nicknames may be changed, or users might be killed. One or more online user records may be removed from that table and no longer be valid records after this procedure. The supplied info parameter is no longer a valid pointer value, because this procedure frees the allocated memory pointed to by info.

Definition at line 1718 of file nickserv.c.

References corelog, getNickData(), getRegNickData(), _userlist::host, isIdentified(), killide(), logDump(), myname, NickServ, sSend(), and timer().

Referenced by annoyNickThief(), changeNick(), and killide().

void nDesynch char *  nick,
char *  type
 

Handle user desyncs.

Parameters:
nick the nickname (in char * form)
type Type of desync / What caused the desync? (in char * form)
Precondition:
Nick and type are non-null pointers to 0-terminated char arrays, 'nick' is the nickname of a client services doesnt see as online.
Postcondition:
Client is killed off the network, desync message is sent if appropriate. If someone desynched does something and we don't see that they exist, yell about it, and kill them to resync

Definition at line 252 of file nickserv.c.

References dlogEntry(), getNickData(), myname, NickServ, and sSend().

Referenced by changeNick(), parseLine(), remUser(), sendToNickServ(), setFlags(), and setMode().

char NickGetEnc RegNickList *  rnl  ) 
 

Get a registered nick encryption prefix.

Returns:
$ for encrypted or @ for plaintext

Definition at line 400 of file nickserv.c.

References NENCRYPT.

void NickSeeUser UserList newnick,
RegNickList *  reg,
int  caccess,
int  verbose
 

NickServ sees a user.

Updates NickServ "last seen time", timestamp data, "last seen userhost", and if gecos tracking is enabled, "last seen realname/gecos."

Parameters:
newnick Online user/nick object
reg A registered nickname that an online user has just acted upon with level ACC 2+ access either an IDENTIFY command or a LOGON event.
caccess Level of access user has to the nick presently
verbose FALSE for no verbosity, any other value for verbose. If verbose is set, then the user will receive notifications about unread news, issues about the nick, incoming memos, etc.
Precondition:
Newnick is a pointer to a listed online user object, reg is a pointer to a listed registered nick object, caccess is an integer between 0 and 4 inclusive, and verbose is TRUE or FALSE.
Postcondition:
Last seen data is updated and appropriate notices have been sent out over IRC.

Definition at line 329 of file nickserv.c.

References checkMemos(), complainAboutEmail(), CTime, _userlist::gecos, _userlist::host, newsNag(), NVACATION, SetDynBuffer(), strncpyzt, and _userlist::user.

Referenced by addNewUser(), and changeNick().

cmd_return ns_acc UserList nick,
char **  args,
int  numargs
 

Acc Acc {[<nick>] | <nick1> <nick2>} Check identified/NickServ recognition level of a user -Mysid

Definition at line 3959 of file nickserv.c.

cmd_return ns_access UserList nick,
char **  args,
int  numargs
 

Access Access add <mask> Access del <mask> Access del <number> Access del -

Purpose: Maintain a NickName's access list

  • /ns access add user@*.host.com -- add access mask
  • /ns access del user@*.host.com -- del access mask
  • /ns access del 1 -- del access mask #1
  • /ns access del - -- wipe access list clean

Definition at line 3818 of file nickserv.c.

References RET_OK.

cmd_return ns_addmask UserList nick,
char **  args,
int  numargs
 

Addmask Addmask Add a default hostmask

Definition at line 3768 of file nickserv.c.

References addAccessMask(), _userlist::host, mask(), RET_OK_DB, SetDynBuffer(), and _userlist::user.

cmd_return ns_banish UserList nick,
char **  args,
int  numargs
 

Banish Banish <nick> Banish a NickName from use and registration by users

Definition at line 4795 of file nickserv.c.

References RET_NOPERM.

cmd_return ns_getrealpass UserList nick,
char **  args,
int  numargs
 

Debugging command, get password field bits from user structure

Deprecated:
Use of this command is deprecated

Definition at line 4895 of file nickserv.c.

References RET_SYNTAX.

cmd_return ns_ghost UserList nick,
char **  args,
int  numargs
 

Ghost NghostCmd(nick, args, numargs)

  • args[1..2]:
  • args[0] = "ghost"
  • args[1] = nick
  • args[2] =
  • Used to 'ghost', or remove a non-existing (ghost) clients via NickServ.

  • Command Syntax: /msg NickServ GHOST [nickname]

  • Modification History (most recent at top):
  • Mon Jun 15 13:39:55 PDT 1998 by some2:
    • Added top comments, fixed parenthesis and spacing Added code to check that the user being ghosted is recorded by services as existing

Definition at line 4046 of file nickserv.c.

References NickServ, and RET_SYNTAX.

cmd_return ns_mark UserList nick,
char **  args,
int  numargs
 

Mark Mark <nick> Check state of mark flag Mark <nick> ("on" | "off") On means mark, off means unmark. A nick mark is an indication that an oper should be particularly wary in handling a password request for the nickname. Getrealpass, and getpass should both warn about this, but only GRp does. -Mysid

Definition at line 4597 of file nickserv.c.

References RET_SYNTAX, and sSend().

cmd_return ns_recover UserList nick,
char **  args,
int  numargs
 

Recover ns_recover(nick, args, numargs)

  • args[1..2]:
  • args[0] = "recover"
  • args[1] = nick
  • args[2] = password
  • Used to recover an owned nickname in use by another user

  • Command Syntax: /msg NickServ RECOVER

  • Created by Mysidia (jmh): based on ns_ghost

Definition at line 4156 of file nickserv.c.

References NickServ, and RET_SYNTAX.

cmd_return ns_register UserList nick,
char **  args,
int  numargs
 

Register Register <email> Register <password> <email>

Request a new nickname, activation code sent to <email> Arguments:

  1. argv[1] == password
  2. argv[2] == email (if supplied)

Definition at line 3199 of file nickserv.c.

References RET_EFAULT, RET_KILLED, and sSend().

cmd_return ns_release UserList nick,
char **  args,
int  numargs
 

Release Release <nick> <password> args[0..2]

Definition at line 4258 of file nickserv.c.

References NickServ, and RET_NOTARGET.

cmd_return ns_set UserList nick,
char **  args,
int  numargs
 

Set Set <setting> *{ <new value> } Set various NickName options such as kill enforcement or idtime. -Mysid

Definition at line 3077 of file nickserv.c.

References NIDENT, and NSS_FLAG.

cmd_return ns_setflags UserList nick,
char **  args,
int  numargs
 

Setflag Setflag <nick> [+-]<flags> Change a NickName's settings or flags

Definition at line 4668 of file nickserv.c.

References RET_NOPERM.

cmd_return ns_setopflags UserList nick,
char **  args,
int  numargs
 

Query/Change Operator flags.

Setopflags (/NS Setop) Setop <nick> Show access flags of nick. Setop <nick> {(+|-) Flags ...} Flags = [AOokKpsSNCIGrjL!cahD] Change access flags of nick. Setop del <nick> Strip nick of access flags. Setop add <nick> Give nick basic oper flags (setop +o does this too unless overriden with setop <nick> +o-pka).

Definition at line 4340 of file nickserv.c.

References opflags, and sSend().

int opFlagged UserList nick,
flag_t  flag
 

Returns:
FALSE if the online user is a null pointer or does not have all operator flags specified; any other value may be returned if the oper has all flags specified.
Parameters:
nick Pointer to online user item to check
flag Bitmask with flags specified to check set and all others clear
Precondition:
Nick points to a valid online user object or is a null pointer. Flag consists of an operator flag value as found in operserv.h or a sequence of such flags (ex: OOPER | OSERVOP)
Warning:
Presence of the +a flag cannot be tested with this function. OACC/OVERRIDE will return true only if /os override is in use.

Definition at line 912 of file nickserv.c.

References FALSE, isIdentified(), isOper(), OACC, OOPER, OPFLAG_ROOT, OROOT, _userlist::reg, and userOverriding().

Referenced by cs_set_memolvl(), do_chanop_add(), getMiscChanOp(), is_postnews(), isFounder(), removeAkill(), and removeAkillType().

const char* PrintPass u_char  pI[],
char  enc
 

Print a password appropriately encoded according to its encryption type (if applicable).

Parameters:
p Password field
enc Encryption status
Precondition:
pI is a NUL-terminated character array.
Returns:
A pointer to a static NUL-terminated character array containing the printable version of a password

Definition at line 440 of file passwd.c.

char* regnick_ugethost UserList user,
RegNickList *  target,
int  sM
 

Parameters:
user User requesting information
target Nick about whom host information is requested
Precondition:
User is a null pointer or valid online user record. Target is a null pointer or valid registered nickname record.
Returns:
The last seen host of the target as it should be shown to the user requesting that information.

Definition at line 1422 of file nickserv.c.

References genHostMask(), getNickData(), isRecognized(), NDBISMASK, NISOPER, NOISMASK, _userlist::oflags, and strncpyzt.

Referenced by do_chanop_list(), and GoodPwNick().

void remUser char *  nick,
int  ignoreDesync
 

Handles the QUIT server message, it removes a user from the nickname list and destroys the allocated memory area.

Precondition:
Nick is initialized to point to a NUL-terminated character array that contains the nickname know to be that of a valid online user structure.
Postcondition:
After a call to this function, nick is no longer in the online list, any pointer to that nickname's online user structure is now invalid, and services no longer considers the user to be on IRC.
Parameters:
nick Nickname of online user
ignoreDesync Non-zero value means to ignore desyncs

Definition at line 1095 of file nickserv.c.

References cleanMemos(), CTime, delClone(), delNick(), dlogEntry(), getNickData(), _userlist::host, isIdentified(), nDesynch(), _userlist::reg, remFromAllChans(), and _userlist::user.

Referenced by changeNick(), checkAkillAllUsers(), and parseLine().

void SendNickInfo UserList nick,
RegNickList *  rnl,
int  terseOption
 

Info NinfoCmd(nick, args, numargs)

  • args[0..1]
  • args[0] = "info"
  • args[1] = [nick]

/msg NickServ Info [<nick>]

Simple function.. checks various things on the nick and reports them to users and opers.

Revision History: Mon Jun 15 15:23:30 PDT 1998 by some2

  • Fixed Bug report 90
    • New replies if a user is online
  • Added this header

  • Wed Jun 16 11:45:20 CDT 1999 by dave
    • Reply is shortened for those with terse enabled

Sat Oct 2 11:05:53 PDT 1999 by Echostar

  • Added info replies for GRPOP status

Fri Oct 09:46:36 CST 2001 by Mysid

  • Major revamp.

Definition at line 3448 of file nickserv.c.

void sendToNickServ UserList tmp,
char **  args,
int  numargs
 

Message handler for NickServ.

Precondition:
Tmp points to a valid online user record. Args points to a valid C-string vector with numargs outer indices, the sum of whose lengths is IRCBUF or less, and whose contents are the text of a valid IRC PRIVMSG command split along spaces and starting after the message target.
Postcondition:
If NickServ command requested of the user was valid, then it will have been executed.
Parameters:
tmp Pointer to online user initiating the msesage
args Args of the message, where args[0] is the command and the extra parameters follow
numargs Highest index in the args[] array passed plus 1. so args[numargs - 1] is the highest index that can be safely accessed.

Definition at line 1376 of file nickserv.c.

References CTime, getNickData(), getOpFlags(), nDesynch(), nextNsync, _userlist::nick, NickServ, nickserv_commands, RET_FAIL, RET_OK_DB, and sSend().

Referenced by parseLine().

void setFlags char *  nick,
int  flag,
char  change
 

Sets online flags of an online user structure.

Parameters:
nick Nickname of the user whom flags are to be changed on
flag Flag to be added or removed from the user
change Indicates whether to add or remove the flag
Precondition:
Nick is a pointer to a terminated character array and the nickname of an online user, flag is a valid online user flag as defined in nickserv.h, and 'change' has the value of the literal '+' or the literal '-'
Postcondition:
Specified online flag will be added or removed from the structure of the online user. If '+' is the value of change, then addition occurs, if '-' is the value of change, then removal of a bit occurs.

Definition at line 771 of file nickserv.c.

References dlogEntry(), getNickData(), nDesynch(), and _userlist::oflags.

Referenced by parseLine().

void setIdentify UserList user,
RegNickList *  nick
 

Identifies an online user to a registered nickname.

Parameters:
user Pointer to online user who is identifying
nick Pointer to registered nickname to be identified
Precondition:
Neither user nor nick are null pointers. User is a valid online user structure, and nick points to a valid online registered nick structure.
Postcondition:
Online user user will be marked as having identified to the nickname nick.

Definition at line 799 of file nickserv.c.

References CTime, _userlist::id, _identifydata::idnum, MAX, _userlist::nick, _identifydata::nick, oalloc(), _identifydata::timestamp, and _userlist::timestamp.

void setMode char *  nick,
char *  mode
 

Changes the modes of an online user.

Parameters:
nick Nickname of user whose modes are changing
mode Mode change to be applied to the user
Precondition:
Nick and mode are pointers to valid NUL-terminated character arrays, 'nick' is that of an online user object found in the user hash table, and 'mode' is a valid mode-change string.
Postcondition:
User structure is modified to take into account specified mode changes.
Handles a MODE message for a user. Of particular interest to services are the state of the 'o' and 'm' usermodes.

Definition at line 696 of file nickserv.c.

References dlogEntry(), getNickData(), getRegNickData(), isIdentified(), isRecognized(), NDBISMASK, nDesynch(), _userlist::nick, NISAHURT, NISHELPOP, NISOPER, NOISMASK, and _userlist::oflags.

Referenced by parseLine().

void SetUserNickHostReal UserList newnick,
char *  nick,
char *  user,
char *  host,
char *  gecos
[static]
 

Assigns the nickname, username, host, and possibly gecos of an online user object.

Sets the nick, user, and hostname of an online user object

Parameters:
newnick Online user/nick object
Nick nickname of the user to assign to the objecty
User username to assign the object
Host hostname to assign the object
Gecos gecos to assign the object
Precondition:
Newnick is a pointer to an initialized userlist structure that is either not listed or is listed with a nickname the same as that in the 'nick' parameter. Nick, user, and host are points to valid NUL-terminated character arrays. Gecos is a NULL pointer if gecos tracking is disabled or a pointer to a NUL-terminated character array if the global gecos track option is enabled.
Postcondition:
Newnick is assigned copies of the specified nic, user, and hostname.

Definition at line 375 of file nickserv.c.

References _userlist::gecos, _userlist::host, _userlist::nick, SetDynBuffer(), strncpyzt, and _userlist::user.

Referenced by addNewUser(), and changeNick().

void syncMemoData time_t  next  ) 
 

Saves the MemoServ database.

Parameters:
next When the MemoServ database should next be saved (UTC)

Definition at line 2302 of file nickserv.c.

References nextMsync.

Referenced by sync_cfg().

void syncNickData time_t  next  ) 
 

Saves the NickServ database.

Parameters:
next When the NickServ database should next be saved (UTC)

Definition at line 2292 of file nickserv.c.

References nextNsync.

Referenced by sync_cfg().

RegId top_regnick_idnum ,
1001 
 

Highest registered nick identifier Id numbers 0 - 1000 are reserved for internal use


Variable Documentation

char* cnick_prefixes[]
 

Initial value:

 
{
    "Visitor-",
    "Nobody-",
    "Unnamed-",
    "Nickless-",
    "Nonick-",
    "Untitled-"
}
Nickname prefixes services uses when a user's nick is force-changed.

Definition at line 178 of file nickserv.c.

Referenced by guest_cnick().

struct opflag_table opflags[]
 

Initial value:

 
{
  
    OPFLAG('A', OADMIN,     "ADMIN"),
    OPFLAG('O', OSERVOP,    "SERVOP"),
    OPFLAG('o', OOPER,      "o"),
    OPFLAG('k', ORAKILL,    "AKILL"),
    OPFLAG('K', OAKILL,     "XAKILL"),
    OPFLAG('p', OINFOPOST,  "INFO-POST"),
    OPFLAG('s', OSETOP,     "SETOP"),
    OPFLAG('S', OSETFLAG,   "SETFLAG"),
    OPFLAG('N', ONBANDEL,   "NBANDEL"),
    OPFLAG('C', OCBANDEL,   "CBANDEL"),
    OPFLAG('I', OIGNORE,    "IGNORE"),
    OPFLAG('G', OGRP,       "GRp"),
    OPFLAG('r', ORAW,       "RAW"),
    OPFLAG('j', OJUPE,      "JUPE"),
    OPFLAG('L', OLIST,      "LIST"),
    OPFLAG('!', OPROT,      "FLAG-LOCK"),
    OPFLAG('c', OCLONE,     "CLONE"),
    OPFLAG('a', OACC,       "OVERRIDE"),
    OPFLAG('h', OHELPOP,    "HELPOP"),
    OPFLAG('H', OAHURT,     "AHURT"),
    OPFLAG('D', ODMOD,      "DIRECTMOD"),
    OPFLAG('*', OPFLAG_ADMIN | OPFLAG_DEFAULT | OPFLAG_ROOTSET, "*"),
    { (char)0, (int)0,  (char *)0 }
}
Database of Oper flags.

Definition at line 129 of file nickserv.c.

Referenced by ns_setopflags().


Generated at Sat Oct 25 20:56:12 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.