Move userlist sorting to frontend

This Fixes possible crashes when the two
usertrees get out of sync and a double free occurs.

Also now requires restart to change sort orders.

Fixes #1252
Fixes #818 (probably)
This commit is contained in:
TingPing
2014-12-31 03:34:55 -05:00
parent fef580ed7f
commit 9f7444baa2
9 changed files with 88 additions and 67 deletions

View File

@@ -37,6 +37,7 @@
#endif
#include "history.h"
#include "tree.h"
#ifdef USE_OPENSSL
#include <openssl/ssl.h> /* SSL_() */
@@ -369,8 +370,7 @@ typedef struct session
guint8 text_strip;
struct server *server;
void *usertree_alpha; /* pure alphabetical tree */
void *usertree; /* ordered with Ops first */
tree *usertree; /* alphabetical tree */
struct User *me; /* points to myself in the usertree */
char channel[CHANLEN];
char waitchannel[CHANLEN]; /* waiting to join channel (/join sent) */