| 258 char *chan, *topic, *msg, *nick, *tmp; |
258 char *chan, *topic, *msg, *nick, *tmp; |
| 259 GaimConversation *convo; |
259 GaimConversation *convo; |
| 260 |
260 |
| 261 if (!strcmp(name, "topic")) { |
261 if (!strcmp(name, "topic")) { |
| 262 chan = args[0]; |
262 chan = args[0]; |
| 263 topic = args[1]; |
263 topic = irc_mirc2txt (args[1]); |
| 264 } else { |
264 } else { |
| 265 chan = args[1]; |
265 chan = args[1]; |
| 266 topic = args[2]; |
266 topic = irc_mirc2txt (args[2]); |
| 267 } |
267 } |
| 268 |
268 |
| 269 convo = gaim_find_conversation_with_account(chan, irc->account); |
269 convo = gaim_find_conversation_with_account(chan, irc->account); |
| 270 if (!convo) { |
270 if (!convo) { |
| 271 gaim_debug(GAIM_DEBUG_ERROR, "irc", "Got a topic for %s, which doesn't exist\n", chan); |
271 gaim_debug(GAIM_DEBUG_ERROR, "irc", "Got a topic for %s, which doesn't exist\n", chan); |
| 283 msg = g_strdup_printf(_("The topic for %s is: %s"), chan, tmp); |
283 msg = g_strdup_printf(_("The topic for %s is: %s"), chan, tmp); |
| 284 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM, time(NULL)); |
284 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM, time(NULL)); |
| 285 g_free(msg); |
285 g_free(msg); |
| 286 } |
286 } |
| 287 g_free(tmp); |
287 g_free(tmp); |
| |
288 g_free(topic); |
| 288 } |
289 } |
| 289 |
290 |
| 290 void irc_msg_unknown(struct irc_conn *irc, const char *name, const char *from, char **args) |
291 void irc_msg_unknown(struct irc_conn *irc, const char *name, const char *from, char **args) |
| 291 { |
292 { |
| 292 GaimConnection *gc = gaim_account_get_connection(irc->account); |
293 GaimConnection *gc = gaim_account_get_connection(irc->account); |