Handle protobuf unpacking errors. Unhandled errors caused segfault when old client...
[umurmur.git] / src / channel.h
index a7f31d55f90ea75842c00e179c2b77f4a8032082..c092c56b46c9b809ec87c8a3917075a02952af0c 100644 (file)
 
 typedef struct channel {
        int id;
-       char name[MAX_TEXT];
-       char desc[MAX_TEXT];
+       char *name;
+       char *desc;
        struct channel *parent;
-       bool_t temporary;
+       bool_t temporary, noenter;
        struct dlist node;
        struct dlist subs;
        struct dlist clients;
@@ -55,8 +55,10 @@ void Chan_addChannel(channel_t *parent, channel_t *sub);
 void Chan_removeChannel(channel_t *c);
 void Chan_addClient(channel_t *c, client_t *client);
 void Chan_removeClient(channel_t *c, client_t *client);
-int Chan_playerJoin(channel_t *ch, client_t *client);
-int Chan_playerJoin_id(int channelid, client_t *client);
+int Chan_userJoin(channel_t *ch, client_t *client);
+int Chan_userJoin_id(int channelid, client_t *client);
+int Chan_userLeave(client_t *client);
+bool_t Chan_userJoin_id_test(int channelid);
 channel_t *Chan_iterate(channel_t **channelpptr);
 channel_t *Chan_iterate_siblings(channel_t *parent, channel_t **channelpptr);
 channel_t *Chan_createChannel(const char *name, const char *desc);