Changeset 280c56a for irc_channel.c


Ignore:
Timestamp:
2010-03-27T17:36:47Z (9 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_channel.c

    r2f53ada r280c56a  
    2626#include "bitlbee.h"
    2727
     28static const struct irc_channel_funcs control_channel_funcs;
     29
    2830irc_channel_t *irc_channel_new( irc_t *irc, const char *name )
    2931{
     
    3436       
    3537        ic = g_new0( irc_channel_t, 1 );
     38        ic->f = &control_channel_funcs;
    3639        ic->irc = irc;
    3740        ic->name = g_strdup( name );
     
    132135        return strchr( CTYPES, name[0] ) != NULL && nick_ok( name + 1 );
    133136}
     137
     138/* Channel-type dependent functions, for control channels: */
     139static gboolean control_channel_privmsg( irc_channel_t *ic, const char *msg )
     140{
     141        root_command_string( ic->irc, msg );
     142       
     143        return TRUE;
     144}
     145
     146static const struct irc_channel_funcs control_channel_funcs = {
     147        control_channel_privmsg,
     148};
Note: See TracChangeset for help on using the changeset viewer.