X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fchannel.h;h=9979721e86d399a6bae459580c647551677ce9c7;hb=cac4b71f9ea600608b421127df1f80407182e405;hp=61346467cec71597023a659a4ad47a88ed4222fb;hpb=0f60078dfd1f7a770311c3dffa011788e5b7dcc2;p=umurmur.git diff --git a/src/channel.h b/src/channel.h index 6134646..9979721 100644 --- a/src/channel.h +++ b/src/channel.h @@ -1,5 +1,5 @@ -/* Copyright (C) 2009-2010, Martin Johansson - Copyright (C) 2005-2010, Thorvald Natvig +/* Copyright (C) 2009-2013, Martin Johansson + Copyright (C) 2005-2013, Thorvald Natvig All rights reserved. @@ -39,8 +39,10 @@ typedef struct channel { int id; char *name; char *desc; + char *password; struct channel *parent; - bool_t temporary, noenter; + bool_t temporary, noenter, silent; + int position; struct dlist node; struct dlist subs; struct dlist clients; @@ -55,6 +57,13 @@ typedef struct { struct dlist node; } channellist_t; +typedef struct { + bool_t CHJOIN_SILENT, + CHJOIN_NOENTER, + CHJOIN_WRONGPW, + CHJOIN_NOTFOUND; +} channelJoinResult_t; + void Chan_init(); void Chan_free(); void Chan_addChannel(channel_t *parent, channel_t *sub); @@ -64,7 +73,7 @@ void Chan_removeClient(channel_t *c, 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); +channelJoinResult_t Chan_userJoin_id_test(int channelid, client_t *client); 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);