aboutsummaryrefslogtreecommitdiffstats
path: root/irc_channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'irc_channel.c')
-rw-r--r--irc_channel.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/irc_channel.c b/irc_channel.c
index c2e2c685..ec0433c1 100644
--- a/irc_channel.c
+++ b/irc_channel.c
@@ -25,6 +25,8 @@
#include "bitlbee.h"
+static const struct irc_channel_funcs control_channel_funcs;
+
irc_channel_t *irc_channel_new( irc_t *irc, const char *name )
{
irc_channel_t *ic;
@@ -33,6 +35,7 @@ irc_channel_t *irc_channel_new( irc_t *irc, const char *name )
return NULL;
ic = g_new0( irc_channel_t, 1 );
+ ic->f = &control_channel_funcs;
ic->irc = irc;
ic->name = g_strdup( name );
strcpy( ic->mode, CMODE );
@@ -131,3 +134,15 @@ gboolean irc_channel_name_ok( const char *name )
{
return strchr( CTYPES, name[0] ) != NULL && nick_ok( name + 1 );
}
+
+/* Channel-type dependent functions, for control channels: */
+static gboolean control_channel_privmsg( irc_channel_t *ic, const char *msg )
+{
+ root_command_string( ic->irc, msg );
+
+ return TRUE;
+}
+
+static const struct irc_channel_funcs control_channel_funcs = {
+ control_channel_privmsg,
+};