aboutsummaryrefslogtreecommitdiffstats
path: root/irc_channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'irc_channel.c')
-rw-r--r--irc_channel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/irc_channel.c b/irc_channel.c
index 3afdddee..db3ecd34 100644
--- a/irc_channel.c
+++ b/irc_channel.c
@@ -138,10 +138,13 @@ gboolean irc_channel_name_ok( const char *name )
/* Channel-type dependent functions, for control channels: */
static gboolean control_channel_privmsg( irc_channel_t *ic, const char *msg )
{
+ char cmd[strlen(msg)+1];
+
g_free( ic->irc->last_root_cmd );
ic->irc->last_root_cmd = g_strdup( ic->name );
- root_command_string( ic->irc, msg );
+ strcpy( cmd, msg );
+ root_command_string( ic->irc, cmd );
return TRUE;
}