diff options
| author | dequis <dx@dxzone.com.ar> | 2015-12-01 01:38:30 -0300 | 
|---|---|---|
| committer | dequis <dx@dxzone.com.ar> | 2015-12-01 01:45:20 -0300 | 
| commit | 03df717bf8e01754c730c3ab5e08ed6a920dcb40 (patch) | |
| tree | 9d036cb7788ba3a697f707c7ef34a2d6f59f6d85 /protocols/nogaim.c | |
| parent | 398a139663c93b8c020e667d169b8898ba53ad9b (diff) | |
Add 'log' UI function, to avoid direct calls to irc_rootmsg from nogaim
Just a trivial wrapper over irc_rootmsg(), but will help me to slightly
reduce the ugliness of an unavoidably ugly hack for libpurple.
Diffstat (limited to 'protocols/nogaim.c')
| -rw-r--r-- | protocols/nogaim.c | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 459a3913..21152e0f 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -206,6 +206,10 @@ static void serv_got_crap(struct im_connection *ic, char *format, ...)  	char *text;  	account_t *a; +	if (!ic->bee->ui->log) { +		return; +	} +  	va_start(params, format);  	text = g_strdup_vprintf(format, params);  	va_end(params); @@ -224,10 +228,9 @@ static void serv_got_crap(struct im_connection *ic, char *format, ...)  	/* If we found one, include the screenname in the message. */  	if (a) { -		/* FIXME(wilmer): ui_log callback or so */ -		irc_rootmsg(ic->bee->ui_data, "%s - %s", ic->acc->tag, text); +		ic->bee->ui->log(ic->bee, ic->acc->tag, text);  	} else { -		irc_rootmsg(ic->bee->ui_data, "%s - %s", ic->acc->prpl->name, text); +		ic->bee->ui->log(ic->bee, ic->acc->prpl->name, text);  	}  	g_free(text); | 
