summary refs log tree commit diff stats
path: root/src/common/userlist.h
diff options
context:
space:
mode:
authorberkeviktor@aol.com <berkeviktor@aol.com>2011-02-24 04:14:30 +0100
committerberkeviktor@aol.com <berkeviktor@aol.com>2011-02-24 04:14:30 +0100
commit4a6ceffb98a0b785494f680d3776c4bfc4052f9e (patch)
tree850703c1c841ccd99f58d0b06084615aaebe782c /src/common/userlist.h
parentf16af8be941b596dedac3bf4e371ee2d21f4b598 (diff)
add xchat r1489
Diffstat (limited to 'src/common/userlist.h')
-rw-r--r--src/common/userlist.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/common/userlist.h b/src/common/userlist.h
new file mode 100644
index 00000000..28831acd
--- /dev/null
+++ b/src/common/userlist.h
@@ -0,0 +1,41 @@
+#include <time.h>
+
+#ifndef XCHAT_USERLIST_H
+#define XCHAT_USERLIST_H
+
+struct User
+{
+	char nick[NICKLEN];
+	char *hostname;
+	char *realname;
+	char *servername;
+	time_t lasttalk;
+	unsigned int access;	/* axs bit field */
+	char prefix[2]; /* @ + % */
+	unsigned int op:1;
+	unsigned int hop:1;
+	unsigned int voice:1;
+	unsigned int me:1;
+	unsigned int away:1;
+	unsigned int selected:1;
+};
+
+#define USERACCESS_SIZE 12
+
+int userlist_add_hostname (session *sess, char *nick,
+									char *hostname, char *realname,
+									char *servername, unsigned int away);
+void userlist_set_away (session *sess, char *nick, unsigned int away);
+struct User *userlist_find (session *sess, char *name);
+struct User *userlist_find_global (server *serv, char *name);
+void userlist_clear (session *sess);
+void userlist_free (session *sess);
+void userlist_add (session *sess, char *name, char *hostname);
+int userlist_remove (session *sess, char *name);
+int userlist_change (session *sess, char *oldname, char *newname);
+void userlist_update_mode (session *sess, char *name, char mode, char sign);
+GSList *userlist_flat_list (session *sess);
+GList *userlist_double_list (session *sess);
+void userlist_rehash (session *sess);
+
+#endif