*bump*
After giving up last October I've found some time to go through alot of code and found the corresponding structs and function that allow you to look for the required flags.
Code: Select all
/*
* The user record. You can find this using get_user_by_handle(userlist, text);
* Neither variables have to be malloc'ed before hand. The variable userlist is global and already filled by the bot.
*/
struct userrec {
struct userrec *next;
char handle[HANDLEN + 1];
unsigned long flags;
unsigned long flags_udef;
struct chanuserrec *chanrec;
struct user_entry *entries;
};
/*
* The user record of a channel. You can access this via the struct member variable *chanrec.
*/
struct chanuserrec {
struct chanuserrec *next;
char channel[81];
time_t laston;
unsigned long flags;
unsigned long flags_udef;
char *info;
};
/*
* The flag record of a user. You can find this using getget_user_flagrec(u, fr, u->handle);
* Neither variables have to be malloc'ed before hand.
*/
struct flag_record {
int match;
int global;
int udef_global;
int bot;
int chan;
int udef_chan;
};
Now the only thing I can't seem to find is how to check for the user flags A-Z. According to the code they are available for programmers to use, but I cannot find anything to check for them. There is a function called bread_down_flags(), but I have no idea how to use it.
When I print the flags in IRC for my admin user (afghjlmnoptvwxW) i get these numbers. I can check them with the preset hex values and see if I'm global op or master, but again not the user definable flags:
Code: Select all
dprintf(DP_SERVER, "privmsg %s : flag_record: match: %i; global: %i; udef_global: %i; bot: %i; chan: %i; udef_chan: %i;\r\n", chan, fr->match, fr->global, fr->udef_global, fr->bot, fr->chan, fr->udef_chan);
gives:
Code: Select all
flag_record: match: 134938216; global: 0; udef_global: 0; bot: 0; chan: 135003104; udef_chan: 135001216;
Silly thing is that the variable global is empty but the match is filled. The match variable is the global value
I have no idea what the chan variable is for but I never use channel flags so that ok for me.
Is there anyone who knows what to look for? I can try and use the empty flags I and S but those might be used in later versions. I just want to use the flags W and V