| 38 if (!convo) |
38 if (!convo) |
| 39 return 1; |
39 return 1; |
| 40 |
40 |
| 41 buf = g_strdup_printf(_("Unknown command: %s"), cmd); |
41 buf = g_strdup_printf(_("Unknown command: %s"), cmd); |
| 42 if (gaim_conversation_get_type(convo) == GAIM_CONV_IM) |
42 if (gaim_conversation_get_type(convo) == GAIM_CONV_IM) |
| 43 gaim_im_write(GAIM_IM(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
43 gaim_conv_im_write(GAIM_CONV_IM(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
| 44 else |
44 else |
| 45 gaim_chat_write(GAIM_CHAT(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
45 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
| 46 g_free(buf); |
46 g_free(buf); |
| 47 |
47 |
| 48 return 1; |
48 return 1; |
| 49 } |
49 } |
| 50 |
50 |
| 111 convo = gaim_find_conversation_with_account(target, irc->account); |
111 convo = gaim_find_conversation_with_account(target, irc->account); |
| 112 if (convo && gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) { |
112 if (convo && gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) { |
| 113 action = g_strdup_printf("/me %s", args[0]); |
113 action = g_strdup_printf("/me %s", args[0]); |
| 114 if (action[strlen(action) - 1] == '\n') |
114 if (action[strlen(action) - 1] == '\n') |
| 115 action[strlen(action) - 1] = '\0'; |
115 action[strlen(action) - 1] = '\0'; |
| 116 serv_got_chat_in(gc, gaim_chat_get_id(GAIM_CHAT(convo)), |
116 serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo)), |
| 117 gaim_connection_get_display_name(gc), |
117 gaim_connection_get_display_name(gc), |
| 118 0, action, time(NULL)); |
118 0, action, time(NULL)); |
| 119 g_free(action); |
119 g_free(action); |
| 120 } |
120 } |
| 121 |
121 |
| 130 |
130 |
| 131 if (!convo) |
131 if (!convo) |
| 132 return 0; |
132 return 0; |
| 133 |
133 |
| 134 if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) { |
134 if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) { |
| 135 gaim_chat_write(GAIM_CHAT(convo), "", _("<B>Supported IRC Commands:</B><BR>" |
135 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", _("<B>Supported IRC Commands:</B><BR>" |
| 136 "AWAY INVITE JOIN KICK<BR>" |
136 "AWAY INVITE JOIN KICK<BR>" |
| 137 "ME MODE MSG NAMES<BR>" |
137 "ME MODE MSG NAMES<BR>" |
| 138 "NICK OP DEOP OPERWALL<BR>" |
138 "NICK OP DEOP OPERWALL<BR>" |
| 139 "PART PING QUERY QUIT<BR>" |
139 "PART PING QUERY QUIT<BR>" |
| 140 "QUOTE REMOVE TOPIC UMODE<BR>" |
140 "QUOTE REMOVE TOPIC UMODE<BR>" |
| 141 "VOICE DEVOICE WALLOPS WHOIS<BR>"), |
141 "VOICE DEVOICE WALLOPS WHOIS<BR>"), |
| 142 GAIM_MESSAGE_NO_LOG, time(NULL)); |
142 GAIM_MESSAGE_NO_LOG, time(NULL)); |
| 143 } else { |
143 } else { |
| 144 gaim_im_write(GAIM_IM(convo), "", _("<B>Supported IRC Commands:</B><BR>" |
144 gaim_conv_im_write(GAIM_CONV_IM(convo), "", _("<B>Supported IRC Commands:</B><BR>" |
| 145 "AWAY JOIN ME MODE<BR>" |
145 "AWAY JOIN ME MODE<BR>" |
| 146 "MSG NICK OPERWALL PING<BR>" |
146 "MSG NICK OPERWALL PING<BR>" |
| 147 "QUERY QUIT QUOTE UMODE<BR>" |
147 "QUERY QUIT QUOTE UMODE<BR>" |
| 148 "WALLOPS WHOIS"), GAIM_MESSAGE_NO_LOG, time(NULL)); |
148 "WALLOPS WHOIS"), GAIM_MESSAGE_NO_LOG, time(NULL)); |
| 149 } |
149 } |
| 410 convo = gaim_conversation_new(GAIM_CONV_IM, irc->account, args[0]); |
410 convo = gaim_conversation_new(GAIM_CONV_IM, irc->account, args[0]); |
| 411 |
411 |
| 412 if (args[1]) { |
412 if (args[1]) { |
| 413 gc = gaim_account_get_connection(irc->account); |
413 gc = gaim_account_get_connection(irc->account); |
| 414 irc_cmd_privmsg(irc, cmd, target, args); |
414 irc_cmd_privmsg(irc, cmd, target, args); |
| 415 gaim_im_write(GAIM_IM(convo), gaim_connection_get_display_name(gc), |
415 gaim_conv_im_write(GAIM_CONV_IM(convo), gaim_connection_get_display_name(gc), |
| 416 args[1], GAIM_MESSAGE_SEND, time(NULL)); |
416 args[1], GAIM_MESSAGE_SEND, time(NULL)); |
| 417 } |
417 } |
| 418 |
418 |
| 419 return 0; |
419 return 0; |
| 420 } |
420 } |
| 451 convo = gaim_find_conversation_with_account(target, irc->account); |
451 convo = gaim_find_conversation_with_account(target, irc->account); |
| 452 if (!convo || gaim_conversation_get_type(convo) != GAIM_CONV_CHAT) |
452 if (!convo || gaim_conversation_get_type(convo) != GAIM_CONV_CHAT) |
| 453 return 0; |
453 return 0; |
| 454 |
454 |
| 455 if (!args[0]) { |
455 if (!args[0]) { |
| 456 topic = gaim_chat_get_topic (GAIM_CHAT(convo)); |
456 topic = gaim_conv_chat_get_topic (GAIM_CONV_CHAT(convo)); |
| 457 |
457 |
| 458 if (topic) |
458 if (topic) |
| 459 buf = g_strdup_printf(_("current topic is: %s"), topic); |
459 buf = g_strdup_printf(_("current topic is: %s"), topic); |
| 460 else |
460 else |
| 461 buf = g_strdup(_("No topic is set")); |
461 buf = g_strdup(_("No topic is set")); |
| 462 gaim_chat_write(GAIM_CHAT(convo), target, buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
462 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), target, buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
| 463 g_free(buf); |
463 g_free(buf); |
| 464 |
464 |
| 465 return 0; |
465 return 0; |
| 466 } |
466 } |
| 467 |
467 |