Changeset 4be8239 for irc.h


Ignore:
Timestamp:
2010-03-27T02:39:08Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
b9e020a
Parents:
ebaebfe
Message:

Simple IRC channel interface, use it to represent the control channel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.h

    rebaebfe r4be8239  
    7373        struct account *accounts;
    7474        GSList *file_transfers;
    75         struct chat *chatrooms;
    7675       
    77         GSList *users;
     76        GSList *users, *channels;
    7877        GHashTable *nick_user_hash;
    7978        GHashTable *watches;
     
    106105} irc_user_t;
    107106
     107typedef enum
     108{
     109        IRC_CHANNEL_JOINED = 1,
     110} irc_channel_flags_t;
     111
     112typedef struct irc_channel
     113{
     114        irc_t *irc;
     115        int flags;
     116        char *name;
     117        char *topic;
     118        char mode[8];
     119        GSList *users;
     120        struct set *set;
     121} irc_channel_t;
     122
    108123#include "user.h"
    109124
     
    125140int irc_check_login( irc_t *irc );
    126141
     142/* irc_channel.c */
     143irc_channel_t *irc_channel_new( irc_t *irc, const char *name );
     144int irc_channel_add_user( irc_channel_t *ic, irc_user_t *iu );
     145int irc_channel_del_user( irc_channel_t *ic, irc_user_t *iu );
     146int irc_channel_set_topic( irc_channel_t *ic, const char *topic );
     147
    127148/* irc_commands.c */
    128149void irc_exec( irc_t *irc, char **cmd );
     
    132153void irc_send_login( irc_t *irc );
    133154void irc_send_motd( irc_t *irc );
    134 int irc_usermsg( irc_t *irc, char *format, ... );
     155void irc_usermsg( irc_t *irc, char *format, ... );
     156void irc_send_join( irc_channel_t *ic, irc_user_t *iu );
     157void irc_send_part( irc_channel_t *ic, irc_user_t *iu, const char *reason );
     158void irc_send_names( irc_channel_t *ic );
     159void irc_send_topic( irc_channel_t *ic );
    135160
    136161/* irc_user.c */
Note: See TracChangeset for help on using the changeset viewer.