diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2005-12-04 01:48:57 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2005-12-04 01:48:57 +0100 |
commit | 25d1be7fbfe217b756861b4306ff7a5ae77becb1 (patch) | |
tree | fa7282c36fcad0601596fd42c4001131cf1af744 | |
parent | 8f515c822d4bea8439c5ca076d965ae52010ec2d (diff) |
do_error_dialog shouldn't do NULL dereferences anymore, and TYPING notifications are always direct PRIVMSGs.
-rw-r--r-- | irc.c | 2 | ||||
-rw-r--r-- | protocols/nogaim.c | 11 |
2 files changed, 10 insertions, 3 deletions
@@ -1509,7 +1509,7 @@ int irc_privmsg( irc_t *irc, user_t *u, char *type, char *to, char *prefix, char else { irc_write( irc, ":%s!%s@%s %s %s :%s%s", u->nick, u->user, u->host, - type, to, prefix, line ); + type, to, prefix ? prefix : "", line ); } line = s + 1; } diff --git a/protocols/nogaim.c b/protocols/nogaim.c index d0676201..5fbe00ab 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -380,7 +380,14 @@ void signoff( struct gaim_connection *gc ) void do_error_dialog( struct gaim_connection *gc, char *msg, char *title ) { - serv_got_crap( gc, "Error: %s", msg ); + if( msg && title ) + serv_got_crap( gc, "Error: %s: %s", title, msg ); + else if( msg ) + serv_got_crap( gc, "Error: %s", msg ); + else if( title ) + serv_got_crap( gc, "Error: %s", title ); + else + serv_got_crap( gc, "Error" ); } void do_ask_dialog( struct gaim_connection *gc, char *msg, void *data, void *doit, void *dont ) @@ -697,7 +704,7 @@ void serv_got_typing( struct gaim_connection *gc, char *handle, int timeout ) return; if( ( u = user_findhandle( gc, handle ) ) ) - irc_msgfrom( gc->irc, u->nick, "\1TYPING 1\1" ); + irc_privmsg( gc->irc, u, "PRIVMSG", gc->irc->nick, NULL, "\1TYPING \1" ); } void serv_got_chat_left( struct gaim_connection *gc, int id ) |