cmd.c
changeset 6 8e64b6d3302e
parent 5 1b3263c96cbe
child 7 08aba7a38618
equal deleted inserted replaced
5:1b3263c96cbe 6:8e64b6d3302e
    60 	if (crypted == -1) {
    60 	if (crypted == -1) {
    61 		scr_LogPrint (LPRINT_LOGNORM, "cmd: Encryption error. Message not sent.");
    61 		scr_LogPrint (LPRINT_LOGNORM, "cmd: Encryption error. Message not sent.");
    62 		return FALSE;
    62 		return FALSE;
    63 	}
    63 	}
    64 
    64 
    65 	if (!room)
    65 	if (!room) {
    66 		hk_message_out (to, subject, 0, body, crypted, xep184);
    66 		if (subject) {
       
    67 			gchar *hbody = g_strdup_printf ("[%s]\n%s", subject, body);
       
    68 			hk_message_out (to, NULL, 0, hbody, crypted, xep184);
       
    69 			g_free (hbody);
       
    70 		} else
       
    71 			hk_message_out (to, NULL, 0, body, crypted, xep184);
       
    72 	}
    67 
    73 
    68 	return TRUE;
    74 	return TRUE;
    69 }
    75 }
    70 
    76 
    71 static gboolean cmd_reader (GIOChannel *channel, GIOCondition condition, gpointer data)
    77 static gboolean cmd_reader (GIOChannel *channel, GIOCondition condition, gpointer data)