diff options
| author | unknown <pesco@khjk.org> | 2011-10-01 16:57:48 +0200 | 
|---|---|---|
| committer | unknown <pesco@khjk.org> | 2011-10-01 16:57:48 +0200 | 
| commit | 3231485f983ea5bffe425205abfb059ee62b0168 (patch) | |
| tree | 8bb0d64149fabe0e120cf121286b5500d4e6a728 /otr.c | |
| parent | fb11647a0dc92198488c709e0444c2aacbf15505 (diff) | |
make libotr messages associated with a user appear from that nick
Diffstat (limited to 'otr.c')
| -rw-r--r-- | otr.c | 10 | 
1 files changed, 9 insertions, 1 deletions
| @@ -613,9 +613,15 @@ int op_display_otr_message(void *opdata, const char *accountname,  	struct im_connection *ic = check_imc(opdata, accountname, protocol);  	char *msg = g_strdup(message);  	irc_t *irc = ic->bee->ui_data; +	irc_user_t *u = peeruser(irc, username, protocol);  	strip_html(msg); -	irc_usermsg(irc, "otr: %s", msg); +	if(u) { +		/* display message like it came from this particular user */ +		bee_irc_msg_from_user(u, msg, 0 /* sent_at */); +	} else { +		irc_usermsg(irc, "otr: %s", msg); +	}  	g_free(msg);  	return 0; @@ -1844,3 +1850,5 @@ void yes_keygen(void *data)  		otr_keygen(irc, acc->user, acc->prpl->name);  	}  } + +/* vim: noet ts=4 sw=4 */ | 
