Mercurial > pidgin
comparison libpurple/protocols/irc/parse.c @ 32819:2c6510167895 default tip
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24)
to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
| author | Elliott Sales de Andrade <qulogic@pidgin.im> |
|---|---|
| date | Sat, 02 Jun 2012 02:30:49 +0000 |
| parents | ca4714f51bb1 |
| children |
comparison
equal
deleted
inserted
replaced
| 32818:01ff09d4a463 | 32819:2c6510167895 |
|---|---|
| 169 { | 169 { |
| 170 PurpleConnection *gc; | 170 PurpleConnection *gc; |
| 171 struct irc_conn *irc; | 171 struct irc_conn *irc; |
| 172 struct _irc_user_cmd *cmdent; | 172 struct _irc_user_cmd *cmdent; |
| 173 | 173 |
| 174 gc = purple_conversation_get_gc(conv); | 174 gc = purple_conversation_get_connection(conv); |
| 175 if (!gc) | 175 if (!gc) |
| 176 return PURPLE_CMD_RET_FAILED; | 176 return PURPLE_CMD_RET_FAILED; |
| 177 | 177 |
| 178 irc = gc->proto_data; | 178 irc = purple_connection_get_protocol_data(gc); |
| 179 | 179 |
| 180 if ((cmdent = g_hash_table_lookup(irc->cmds, cmd)) == NULL) | 180 if ((cmdent = g_hash_table_lookup(irc->cmds, cmd)) == NULL) |
| 181 return PURPLE_CMD_RET_FAILED; | 181 return PURPLE_CMD_RET_FAILED; |
| 182 | 182 |
| 183 (cmdent->cb)(irc, cmd, purple_conversation_get_name(conv), (const char **)args); | 183 (cmdent->cb)(irc, cmd, purple_conversation_get_name(conv), (const char **)args); |
| 668 g_free(msg); | 668 g_free(msg); |
| 669 return; | 669 return; |
| 670 } else if (!strncmp(input, "ERROR ", 6)) { | 670 } else if (!strncmp(input, "ERROR ", 6)) { |
| 671 if (g_utf8_validate(input, -1, NULL)) { | 671 if (g_utf8_validate(input, -1, NULL)) { |
| 672 char *tmp = g_strdup_printf("%s\n%s", _("Disconnected."), input); | 672 char *tmp = g_strdup_printf("%s\n%s", _("Disconnected."), input); |
| 673 purple_connection_error_reason (gc, | 673 purple_connection_error (gc, |
| 674 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp); | 674 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp); |
| 675 g_free(tmp); | 675 g_free(tmp); |
| 676 } else | 676 } else |
| 677 purple_connection_error_reason (gc, | 677 purple_connection_error (gc, |
| 678 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, | 678 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, |
| 679 _("Disconnected.")); | 679 _("Disconnected.")); |
| 680 return; | 680 return; |
| 681 } | 681 } |
| 682 | 682 |
