Mercurial > pidgin.yaz
diff src/protocols/irc/cmds.c @ 9130:933a19e3a6b3
[gaim-migrate @ 9908]
This puts the core in charge of irc-style /commands, which is way cool. Tim did most of the work, I've just been keeping it in sync with CVS, and slowly adding more commands to jabber.
committer: Tailor Script <tailor@pidgin.im>
| author | Nathan Walp <nwalp@pidgin.im> |
|---|---|
| date | Sun, 30 May 2004 19:34:21 +0000 |
| parents | da687392cbcb |
| children | 6430b09ccc71 |
line wrap: on
line diff
--- a/src/protocols/irc/cmds.c Sun May 30 19:30:14 2004 +0000 +++ b/src/protocols/irc/cmds.c Sun May 30 19:34:21 2004 +0000 @@ -111,13 +111,17 @@ g_free(newargs); convo = gaim_find_conversation_with_account(target, irc->account); - if (convo && gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) { + if (convo) { action = g_strdup_printf("/me %s", args[0]); if (action[strlen(action) - 1] == '\n') action[strlen(action) - 1] = '\0'; - serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo)), - gaim_connection_get_display_name(gc), - 0, action, time(NULL)); + if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) + serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo)), + gaim_connection_get_display_name(gc), + 0, action, time(NULL)); + else + gaim_conv_im_write(GAIM_CONV_IM(convo), gaim_connection_get_display_name(gc), + action, 0, time(NULL)); g_free(action); }
