Changeset 280c56a for irc.h


Ignore:
Timestamp:
2010-03-27T17:36:47Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
74f1cde
Parents:
2f53ada
Message:

Added privmsg handlers to users/channels. root commands are coming back.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.h

    r2f53ada r280c56a  
    107107       
    108108        //struct user *b;
     109       
     110        const struct irc_user_funcs *f;
    109111} irc_user_t;
     112
     113struct irc_user_funcs
     114{
     115        gboolean (*privmsg)( irc_user_t *iu, const char *msg );
     116};
     117
     118extern const struct irc_user_funcs irc_user_root_funcs;
     119extern const struct irc_user_funcs irc_user_self_funcs;
    110120
    111121typedef enum
     
    117127{
    118128        irc_t *irc;
     129        char *name;
     130        char mode[8];
    119131        int flags;
    120         char *name;
     132       
    121133        char *topic;
    122134        char *topic_who;
    123135        time_t topic_time;
    124         char mode[8];
     136       
    125137        GSList *users;
    126138        struct set *set;
     139       
     140        const struct irc_channel_funcs *f;
    127141} irc_channel_t;
     142
     143struct irc_channel_funcs
     144{
     145        gboolean (*privmsg)( irc_channel_t *iu, const char *msg );
     146};
    128147
    129148#include "user.h"
     
    175194irc_user_t *irc_user_new( irc_t *irc, const char *nick );
    176195int irc_user_free( irc_t *irc, const char *nick );
    177 irc_user_t *irc_user_find( irc_t *irc, const char *nick );
     196irc_user_t *irc_user_by_name( irc_t *irc, const char *nick );
    178197int irc_user_rename( irc_t *irc, const char *old, const char *new );
    179198gint irc_user_cmp( gconstpointer a_, gconstpointer b_ );
Note: See TracChangeset for help on using the changeset viewer.