aboutsummaryrefslogtreecommitdiffstats
path: root/irc_user.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-04-13 02:04:55 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2010-04-13 02:04:55 +0200
commit7b59872d86160099968d0f8cdafc2853b074d39b (patch)
tree59e3d7ec91c305bcabf4daea5f754ab15cbc787b /irc_user.c
parent89c11e735164b7212d27bb64ff1a00ac50b9c746 (diff)
Support for simple VERSION/PING CTCPs to root.
Diffstat (limited to 'irc_user.c')
-rw-r--r--irc_user.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/irc_user.c b/irc_user.c
index cf1d1e3e..7b2d4be1 100644
--- a/irc_user.c
+++ b/irc_user.c
@@ -150,6 +150,13 @@ static gboolean root_ctcp( irc_user_t *iu, char * const *ctcp )
{
if( g_strcasecmp( ctcp[0], "VERSION" ) == 0 )
{
+ irc_send_msg_f( iu, "NOTICE", iu->irc->user->nick, "\001%s %s\001",
+ ctcp[0], "BitlBee " BITLBEE_VERSION " " ARCH "/" CPU );
+ }
+ else if( g_strcasecmp( ctcp[0], "PING" ) == 0 )
+ {
+ irc_send_msg_f( iu, "NOTICE", iu->irc->user->nick, "\001%s %s\001",
+ ctcp[0], ctcp[1] ? : "" );
}
return TRUE;