Support account-notify and extended-join capabilities
[rofl0r-ixchat.git] / src / common / userlist.h
blob458ca00f03675e5ae7fb289c21a18b007e291573
1 #include <time.h>
3 #ifndef XCHAT_USERLIST_H
4 #define XCHAT_USERLIST_H
6 struct User
8 char nick[NICKLEN];
9 char *hostname;
10 char *realname;
11 char *servername;
12 char *account;
13 time_t lasttalk;
14 unsigned int access; /* axs bit field */
15 char prefix[2]; /* @ + % */
16 unsigned int op:1;
17 unsigned int hop:1;
18 unsigned int voice:1;
19 unsigned int me:1;
20 unsigned int away:1;
21 unsigned int selected:1;
24 #define USERACCESS_SIZE 12
26 int userlist_add_hostname (session *sess, char *nick,
27 char *hostname, char *realname,
28 char *servername, char *account, unsigned int away);
29 void userlist_set_away (session *sess, char *nick, unsigned int away);
30 void userlist_set_account (session *sess, char *nick, char *account);
31 struct User *userlist_find (session *sess, char *name);
32 struct User *userlist_find_global (server *serv, char *name);
33 void userlist_clear (session *sess);
34 void userlist_free (session *sess);
35 void userlist_add (session *sess, char *name, char *hostname, char *account, char *realname);
36 int userlist_remove (session *sess, char *name);
37 void userlist_remove_user (session *sess, struct User *user);
38 int userlist_change (session *sess, char *oldname, char *newname);
39 void userlist_update_mode (session *sess, char *name, char mode, char sign);
40 GSList *userlist_flat_list (session *sess);
41 GList *userlist_double_list (session *sess);
42 void userlist_rehash (session *sess);
44 #endif