diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-04-08 01:55:17 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-04-08 01:55:17 +0100 |
commit | 5b9b2b6413d66df01a866205af489eca9f8ea308 (patch) | |
tree | 821d6baee4c15e4660f654fb1c354185043d4592 /protocols/nogaim.c | |
parent | 37d84b32ca7f02f2e3b05858e090e2470b8c479b (diff) |
Added display_timestamps setting in case some people may not really like them.
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 53e459b5..36d97f51 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -723,7 +723,7 @@ void imcb_buddy_status( struct im_connection *ic, const char *handle, int flags, void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at ) { irc_t *irc = ic->irc; - char *wrapped, *ts; + char *wrapped, *ts = NULL; user_t *u; u = user_findhandle( ic, handle ); @@ -766,7 +766,8 @@ void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, ui ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->irc->set, "strip_html" ) ) ) strip_html( msg ); - if( ( ts = format_timestamp( irc, sent_at ) ) ) + if( set_getbool( &ic->irc->set, "display_timestamps" ) && + ( ts = format_timestamp( irc, sent_at ) ) ) { char *new = g_strconcat( ts, msg, NULL ); g_free( ts ); @@ -880,7 +881,9 @@ void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t fl wrapped = word_wrap( msg, 425 ); if( c && u ) { - char *ts = format_timestamp( ic->irc, sent_at ); + char *ts = NULL; + if( set_getbool( &ic->irc->set, "display_timestamps" ) ) + ts = format_timestamp( ic->irc, sent_at ); irc_privmsg( ic->irc, u, "PRIVMSG", c->channel, ts ? : "", wrapped ); g_free( ts ); } |