Send message from console with nullclient.c

KamilR RuanYun at
Thu Dec 10 10:22:13 EST 2009

anyone can tell me, i make a send_message function in nullclient.c
send_message(PurpleAccount *account, char *im_dest) {
	PurpleConversation *conv;
	PurpleConvIm *conv_im;
	conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, im_dest);
	conv_im = PURPLE_CONV_IM(conv);
	char *name = purple_conversation_get_name(conv);
	printf("Message to: %s \n", name);

	purple_conv_im_send(conv_im,"TEST MESSAGE");

but this send only once at startup, how can i send message when i type something into console and press ENTER?

More information about the Devel mailing list