IRCBot Plugin API  v5
Public Attributes | List of all members
USER Struct Reference

#include <plugins.h>

Public Attributes

char Nick [128]
 The user's username/nick. More...
 
char Pass [128]
 The user's password if one exists, otherwise it will be an empty string. More...
 
char LastHostmask [256]
 The user's last known hostmask, if he's ever been seen. More...
 
uint32 Flags
 IRC letter-based flag system (+o/-x/etc.) More...
 
bool Temporary
 The user was gotten from a remote source (auth plugin). The user account won't be loaded again the next time the bot starts up. More...
 
time_t Created
 When the user was created (only persistent for non-temporary users) More...
 
time_t Seen
 When the user was last seen. More...
 
int32 NumHostmasks
 
char Hostmasks [MAX_HOSTMASKS][128]
 The hostmasks that belong to the user. More...
 
void(* ref )(USER *user)
 
void(* unref )(USER *user)
 
uint32 ref_cnt
 DO NOT TOUCH!!! Only the ref and unref commands should alter ref_cnt. More...
 

Detailed Description

The USER structure is the record of an IRC user. This structure is only valid at the time it was created, so if someone changes their password or flags later it may not be correct anymore. If you are holding on to a USER handle for a long time you should use the username to get an updated copy and see if the user is still valid from time to time.

See also
API_user

Member Data Documentation

char USER::Nick[128]

The user's username/nick.

char USER::Pass[128]

The user's password if one exists, otherwise it will be an empty string.

char USER::LastHostmask[256]

The user's last known hostmask, if he's ever been seen.

uint32 USER::Flags

IRC letter-based flag system (+o/-x/etc.)

bool USER::Temporary

The user was gotten from a remote source (auth plugin). The user account won't be loaded again the next time the bot starts up.

time_t USER::Created

When the user was created (only persistent for non-temporary users)

time_t USER::Seen

When the user was last seen.

int32 USER::NumHostmasks
char USER::Hostmasks[MAX_HOSTMASKS][128]

The hostmasks that belong to the user.

void(* USER::ref)(USER *user)

This command increases the reference count of the USER structure. Use this anytime you need to hang on to a copy of the structure.
Do not call this function directly, instead use RefUser() on the USER structure ptr.

Parameters
usera ptr to a valid USER structure
void(* USER::unref)(USER *user)

This command decreases the reference count of the USER structure and deletes it when it reaches zero. Use this when you are done with a structure you have RefUser'ed (or gotten from a call that RefUser'ed it)
Do not call this function directly, instead use UnrefUser() on the USER structure ptr.

Parameters
usera ptr to a valid USER structure
uint32 USER::ref_cnt

DO NOT TOUCH!!! Only the ref and unref commands should alter ref_cnt.


The documentation for this struct was generated from the following file: