aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/jabber')
-rw-r--r--protocols/jabber/Makefile1
-rw-r--r--protocols/jabber/jabber.c8
-rw-r--r--protocols/jabber/message.c5
3 files changed, 8 insertions, 6 deletions
diff --git a/protocols/jabber/Makefile b/protocols/jabber/Makefile
index 912ea702..efbd81fb 100644
--- a/protocols/jabber/Makefile
+++ b/protocols/jabber/Makefile
@@ -14,7 +14,6 @@ endif
# [SH] Program variables
objects = conference.o io.o iq.o jabber.o jabber_util.o message.o presence.o s5bytestream.o sasl.o si.o
-CFLAGS += -Wall
LFLAGS += -r
# [SH] Phony targets
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index 01353f8e..229e35bf 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -380,7 +380,7 @@ static void jabber_get_info( struct im_connection *ic, char *who )
imcb_log( ic, "Buddy %s (%d) information:", bud->full_jid, bud->priority );
if( bud->away_state )
imcb_log( ic, "Away state: %s", bud->away_state->full_name );
- imcb_log( ic, "Status message: %s", bud->away_message ? : "(none)" );
+ imcb_log( ic, "Status message: %s", bud->away_message ? bud->away_message : "(none)" );
bud = bud->next;
}
@@ -394,8 +394,10 @@ static void jabber_set_away( struct im_connection *ic, char *state_txt, char *me
/* state_txt == NULL -> Not away.
Unknown state -> fall back to the first defined away state. */
- jd->away_state = state_txt ? jabber_away_state_by_name( state_txt )
- ? : jabber_away_state_list : NULL;
+ if( state_txt == NULL )
+ jd->away_state = NULL;
+ else if( ( jd->away_state = jabber_away_state_by_name( state_txt ) ) == NULL )
+ jd->away_state = jabber_away_state_list;
g_free( jd->away_message );
jd->away_message = ( message && *message ) ? g_strdup( message ) : NULL;
diff --git a/protocols/jabber/message.c b/protocols/jabber/message.c
index fa915bd8..ce5017fb 100644
--- a/protocols/jabber/message.c
+++ b/protocols/jabber/message.c
@@ -58,7 +58,8 @@ xt_status jabber_pkt_message( struct xt_node *node, gpointer data )
( inv = xt_find_node( c->children, "invite" ) ) )
{
room = from;
- from = xt_find_attr( inv, "from" ) ? : from;
+ if( ( from = xt_find_attr( inv, "from" ) ) == NULL )
+ from = room;
g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Invitation to chatroom %s >>\n", room );
if( ( reason = xt_find_node( inv->children, "reason" ) ) && reason->text_len > 0 )
@@ -71,7 +72,7 @@ xt_status jabber_pkt_message( struct xt_node *node, gpointer data )
if( bud )
{
bud->last_msg = time( NULL );
- from = bud->ext_jid ? : bud->bare_jid;
+ from = bud->ext_jid ? bud->ext_jid : bud->bare_jid;
}
else
*s = 0; /* We need to generate a bare JID now. */