Mercurial > pidgin
diff src/server.c @ 1938:c9db54d8d8dc
[gaim-migrate @ 1948]
uh
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Fri, 01 Jun 2001 21:33:08 +0000 |
| parents | 6a9109c79034 |
| children | 24aed1c31342 |
line wrap: on
line diff
--- a/src/server.c Fri Jun 01 21:27:59 2001 +0000 +++ b/src/server.c Fri Jun 01 21:33:08 2001 +0000 @@ -163,30 +163,24 @@ void serv_set_away(struct gaim_connection *gc, char *state, char *message) { - if (gc && gc->prpl && gc->prpl->set_away) - { + if (gc && gc->prpl && gc->prpl->set_away) { char *buf=NULL; - if(message) - { - buf = g_malloc(strlen(message)+1); - if(gc->prpl->options & OPT_PROTO_HTML) - { - strncpy(buf, message, strlen(message)+1); - } - else - { - strncpy_nohtml(buf, message, strlen(message)+1); + if(message) { + buf = g_malloc(strlen(message)+1); + if(gc->prpl->options & OPT_PROTO_HTML) + strncpy(buf, message, strlen(message)+1); + else + strncpy_nohtml(buf, message, strlen(message)+1); } + + (*gc->prpl->set_away)(gc, state, buf); + plugin_event(event_away, gc, state, buf, 0); + + if(buf) + g_free(buf); } - (*gc->prpl->set_away)(gc, state, buf); - plugin_event(event_away, gc, state, buf, 0); - - if(buf) - g_free(buf); -} - -system_log(log_away, gc, NULL, OPT_LOG_BUDDY_AWAY | OPT_LOG_MY_SIGNON); + system_log(log_away, gc, NULL, OPT_LOG_BUDDY_AWAY | OPT_LOG_MY_SIGNON); } void serv_set_away_all(char *message)
