Mercurial > pidgin
diff src/protocols/irc/msgs.c @ 12001:8bcccf2988fa
[gaim-migrate @ 14294]
How does this look?
1. If an IRC account sets itself to "away" but does not enter a message,
then use a default away message of "Away"
2. Sign-on-as-away for IRC
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 07 Nov 2005 04:49:23 +0000 |
parents | 3ba50c385299 |
children | 1019f1d510d6 |
line wrap: on
line diff
--- a/src/protocols/irc/msgs.c Mon Nov 07 03:44:30 2005 +0000 +++ b/src/protocols/irc/msgs.c Mon Nov 07 04:49:23 2005 +0000 @@ -437,6 +437,7 @@ void irc_msg_endmotd(struct irc_conn *irc, const char *name, const char *from, char **args) { GaimConnection *gc; + GaimStatus *status; GaimBlistNode *gnode, *cnode, *bnode; gc = gaim_account_get_connection(irc->account); @@ -445,6 +446,14 @@ gaim_connection_set_state(gc, GAIM_CONNECTED); + /* If we're away then set our away message */ + status = gaim_account_get_active_status(irc->account); + if (!gaim_status_get_type(status) != GAIM_STATUS_AVAILABLE) + { + GaimPluginProtocolInfo *prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); + prpl_info->set_status(irc->account, status); + } + /* this used to be in the core, but it's not now */ for (gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) { if(!GAIM_BLIST_NODE_IS_GROUP(gnode))