Mercurial > pidgin
diff src/protocols/irc/msgs.c @ 11338:17142948653e
[gaim-migrate @ 13551]
Change the GAIM_CONV_IM and GAIM_CONV_CHAT enums to GAIM_CONV_TYPE_IM
and GAIM_CONV_TYPE_CHAT. This touched A LOT of files. Also combined
two oscar header files (one of them was small and dorky).
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 25 Aug 2005 02:33:44 +0000 |
parents | a659e6bac294 |
children | 4eaa0f7eb3c9 |
line wrap: on
line diff
--- a/src/protocols/irc/msgs.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/irc/msgs.c Thu Aug 25 02:33:44 2005 +0000 @@ -126,7 +126,7 @@ if (!args || !args[0] || !args[1] || !args[2]) return; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[1], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[1], irc->account); if (!convo) return; @@ -147,7 +147,7 @@ if (!args || !args[1] || !args[2]) return; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[1], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[1], irc->account); if (!convo) /* XXX punt on channels we are not in for now */ return; @@ -305,7 +305,7 @@ topic = irc_mirc2txt (args[2]); } - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, chan, irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, chan, irc->account); if (!convo) { gaim_debug(GAIM_DEBUG_ERROR, "irc", "Got a topic for %s, which doesn't exist\n", chan); } @@ -350,7 +350,7 @@ GaimConversation *convo; if (!strcmp(name, "366")) { - convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, irc->nameconv ? irc->nameconv : args[1], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, irc->nameconv ? irc->nameconv : args[1], irc->account); if (!convo) { gaim_debug(GAIM_DEBUG_ERROR, "irc", "Got a NAMES list for %s, which doesn't exist\n", args[2]); g_string_free(irc->names, TRUE); @@ -364,7 +364,7 @@ irc->names = NULL; if (irc->nameconv) { msg = g_strdup_printf(_("Users on %s: %s"), args[1], names ? names : ""); - if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) + if (gaim_conversation_get_type(convo) == GAIM_CONV_TYPE_CHAT) gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else gaim_conv_im_write(GAIM_CONV_IM(convo), "", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); @@ -480,9 +480,9 @@ GaimConnection *gc; GaimConversation *convo; - convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, args[1], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, args[1], irc->account); if (convo) { - if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) /* does this happen? */ + if (gaim_conversation_get_type(convo) == GAIM_CONV_TYPE_CHAT) /* does this happen? */ gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[1], _("no such channel"), GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else @@ -505,7 +505,7 @@ GaimConnection *gc; GaimConversation *convo; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[1], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[1], irc->account); if (convo) { gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[1], args[2], GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); } else { @@ -517,7 +517,7 @@ void irc_msg_notinchan(struct irc_conn *irc, const char *name, const char *from, char **args) { - GaimConversation *convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[1], irc->account); + GaimConversation *convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[1], irc->account); gaim_debug(GAIM_DEBUG_INFO, "irc", "We're apparently not in %s, but tried to use it\n", args[1]); if (convo) { @@ -534,7 +534,7 @@ if (!args || !args[1] || !args[2]) return; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[1], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[1], irc->account); if (!convo) return; @@ -632,7 +632,7 @@ return; } - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[0], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[0], irc->account); if (convo == NULL) { gaim_debug(GAIM_DEBUG_ERROR, "irc", "JOIN for %s failed\n", args[0]); g_free(nick); @@ -654,7 +654,7 @@ void irc_msg_kick(struct irc_conn *irc, const char *name, const char *from, char **args) { GaimConnection *gc = gaim_account_get_connection(irc->account); - GaimConversation *convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[0], irc->account); + GaimConversation *convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[0], irc->account); char *nick = irc_mask_nick(from), *buf, *reason; if (!gc) { @@ -692,7 +692,7 @@ if (*args[0] == '#' || *args[0] == '&') { /* Channel */ char *escaped; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[0], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[0], irc->account); if (!convo) { gaim_debug(GAIM_DEBUG_ERROR, "irc", "MODE received for %s, which we are not in\n", args[0]); g_free(nick); @@ -772,7 +772,7 @@ chats = chats->next; } - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, nick, + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, nick, irc->account); if (conv != NULL) gaim_conversation_set_name(conv, args[0]); @@ -834,7 +834,7 @@ if (!args || !args[0] || !gc) return; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[0], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[0], irc->account); if (!convo) { gaim_debug(GAIM_DEBUG_INFO, "irc", "Got a PART on %s, which doesn't exist -- probably closed\n", args[0]); return; @@ -890,10 +890,10 @@ msg = g_strdup_printf(_("PING reply -- Lag: %lu seconds"), time(NULL) - oldstamp); } - convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, parts[0], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, parts[0], irc->account); g_strfreev(parts); if (convo) { - if (gaim_conversation_get_type (convo) == GAIM_CONV_CHAT) + if (gaim_conversation_get_type (convo) == GAIM_CONV_TYPE_CHAT) gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "PONG", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else gaim_conv_im_write(GAIM_CONV_IM(convo), "PONG", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); @@ -944,7 +944,7 @@ } else if (notice) { serv_got_im(gc, nick, msg, 0, time(NULL)); } else { - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[0], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[0], irc->account); if (convo) serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo)), nick, 0, msg, time(NULL)); else