EggdropRecords
Jump to navigation
Jump to search
Eggdrop has two types of records: User records, and channel records.
A channel record tracks bans, invites, and exempts, and users in the channel (via member records). Member records are unique to a channel, and a single user in two channels will have two member records associated with them.
Eggdrop joining a channel
- Eggdrop gets a JOIN for itself (gotjoin), and sends reset_chan_info
- reset_chan_info sets the channel into a CHAN_PENDING status until
- reset_chan_info calls refresh_who_chan, which sends a WHO #channel to the server
- Eggdrop gets a 352/4 message for a user on the channel
- Eggdrop Eggdrop checks the if that user is/was already on the channel (ismember). If they were not, a new member record is added (newmember)
- Eggdrop gets 315 (End of who)
- Eggdrop removes channel Pending status, sets channel status to Active
User joining a channel
When a member joins a channel, Eggdrop checks the if that user is/was already on the channel (ismember). If they were not, a new member record is added (newmember)
Struct
| chan_t | { | ||||
|---|---|---|---|---|---|
| memberlist *member | { | ||||
| char nick[NICKLEN] | |||||
| char userhost[UHOSTLEN] | |||||
| char account[NICKLEN] | |||||
| time_t joined | |||||
| time_t last | |||||
| time_t delay | |||||
| userrec *user | { | ||||
| *next | |||||
| char handle[HANDLEN+1] | |||||
| ulong flags | |||||
| ulong flags_udef | |||||
| chanuserrec *chanrec | { | ||||
| char channel[CHANNELLEN + 1] | |||||
| time_t laston | |||||
| ulong flags | |||||
| ulong flags_udef | |||||
| char *info | |||||
| user_entry *entries | |||||
| int tried_getuser |
|||||
| memstruct *next | |||||
| masklist *ban | |||||
| masklist *exempt | |||||
| masklist *invite | |||||
| char *topic | |||||
| char *key | |||||
| uint mod |
|||||
| int maxmembers | |||||
| int members |