aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/nogaim.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-04-14 11:27:50 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2010-04-14 11:27:50 +0200
commit21c87a78f1c01fe24610a5d05a65e52bd8eaa796 (patch)
treec4d95580134610222f8a2630d386be460fa74bb4 /protocols/nogaim.c
parent81186cab101fa8c2f82137014d0b3c060b658cb0 (diff)
parent156bbd7b66cf29220c2ff6a86217c4dec5e33765 (diff)
Merging loads of stuff from mainline.
Diffstat (limited to 'protocols/nogaim.c')
-rw-r--r--protocols/nogaim.c48
1 files changed, 45 insertions, 3 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index f7db5c37..74ec0642 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -126,6 +126,7 @@ void nogaim_init()
extern void oscar_initmodule();
extern void byahoo_initmodule();
extern void jabber_initmodule();
+ extern void twitter_initmodule();
#ifdef WITH_MSN
msn_initmodule();
@@ -143,6 +144,10 @@ void nogaim_init()
jabber_initmodule();
#endif
+#ifdef WITH_TWITTER
+ twitter_initmodule();
+#endif
+
#ifdef WITH_PLUGINS
load_plugins();
#endif
@@ -559,6 +564,37 @@ struct groupchat *imcb_chat_new( struct im_connection *ic, const char *handle )
return NULL;
}
+void imcb_chat_name_hint( struct groupchat *c, const char *name )
+{
+#if 0
+ if( !c->joined )
+ {
+ struct im_connection *ic = c->ic;
+ char stripped[MAX_NICK_LENGTH+1], *full_name;
+
+ strncpy( stripped, name, MAX_NICK_LENGTH );
+ stripped[MAX_NICK_LENGTH] = '\0';
+ nick_strip( stripped );
+ if( set_getbool( &ic->irc->set, "lcnicks" ) )
+ nick_lc( stripped );
+
+ full_name = g_strdup_printf( "&%s", stripped );
+
+ if( stripped[0] &&
+ nick_cmp( stripped, ic->irc->channel + 1 ) != 0 &&
+ irc_chat_by_channel( ic->irc, full_name ) == NULL )
+ {
+ g_free( c->channel );
+ c->channel = full_name;
+ }
+ else
+ {
+ g_free( full_name );
+ }
+ }
+#endif
+}
+
void imcb_chat_free( struct groupchat *c )
{
#if 0
@@ -622,7 +658,11 @@ void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t fl
wrapped = word_wrap( msg, 425 );
if( c && u )
{
- irc_privmsg( ic->irc, u, "PRIVMSG", c->channel, "", wrapped );
+ 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 );
}
else
{
@@ -825,8 +865,6 @@ char *set_eval_away_devoice( set_t *set, char *value )
}
#endif
-
-
/* The plan is to not allow straight calls to prpl functions anymore, but do
them all from some wrappers. We'll start to define some down here: */
@@ -852,6 +890,10 @@ int imc_away_send_update( struct im_connection *ic )
{
char *away, *msg = NULL;
+ if( ic->acc->prpl->away_states == NULL ||
+ ic->acc->prpl->set_away == NULL )
+ return 0;
+
away = set_getstr( &ic->acc->set, "away" ) ?
: set_getstr( &ic->bee->set, "away" );
if( away && *away )