Mercurial > pidgin
comparison src/protocols/irc/cmds.c @ 10246:a66cf83552dc
[gaim-migrate @ 11386]
I changed gaim_find_conversation and gaim_find_conversation_with_account
The first parameter is now one of GAIM_CONV_IM, GAIM_CONV_CHAT or
GAIM_CONV_ANY. Unfortunately, this changes a bajillion files.
Please look over this and make sure I use the correct type everywhere.
Especially in Novell and MSN, and somewhat in SILC.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Tue, 23 Nov 2004 06:14:15 +0000 |
| parents | cbdce0acbbe6 |
| children | cdeb727d1de3 |
comparison
equal
deleted
inserted
replaced
| 10245:c143a3fac58d | 10246:a66cf83552dc |
|---|---|
| 32 | 32 |
| 33 static void irc_do_mode(struct irc_conn *irc, const char *target, const char *sign, char **ops); | 33 static void irc_do_mode(struct irc_conn *irc, const char *target, const char *sign, char **ops); |
| 34 | 34 |
| 35 int irc_cmd_default(struct irc_conn *irc, const char *cmd, const char *target, const char **args) | 35 int irc_cmd_default(struct irc_conn *irc, const char *cmd, const char *target, const char **args) |
| 36 { | 36 { |
| 37 GaimConversation *convo = gaim_find_conversation_with_account(target, irc->account); | 37 GaimConversation *convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, target, irc->account); |
| 38 char *buf; | 38 char *buf; |
| 39 | 39 |
| 40 if (!convo) | 40 if (!convo) |
| 41 return 1; | 41 return 1; |
| 42 | 42 |
| 108 irc_cmd_privmsg(irc, cmd, target, (const char **)newargs); | 108 irc_cmd_privmsg(irc, cmd, target, (const char **)newargs); |
| 109 g_free(newargs[0]); | 109 g_free(newargs[0]); |
| 110 g_free(newargs[1]); | 110 g_free(newargs[1]); |
| 111 g_free(newargs); | 111 g_free(newargs); |
| 112 | 112 |
| 113 convo = gaim_find_conversation_with_account(target, irc->account); | 113 convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, target, irc->account); |
| 114 if (convo) { | 114 if (convo) { |
| 115 action = g_strdup_printf("/me %s", args[0]); | 115 action = g_strdup_printf("/me %s", args[0]); |
| 116 if (action[strlen(action) - 1] == '\n') | 116 if (action[strlen(action) - 1] == '\n') |
| 117 action[strlen(action) - 1] = '\0'; | 117 action[strlen(action) - 1] = '\0'; |
| 118 if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) | 118 if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) |
| 165 GaimConversation *convo; | 165 GaimConversation *convo; |
| 166 | 166 |
| 167 if (!args || !args[0]) | 167 if (!args || !args[0]) |
| 168 return 0; | 168 return 0; |
| 169 | 169 |
| 170 convo = gaim_find_conversation_with_account(target, irc->account); | 170 convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, target, irc->account); |
| 171 if (!convo || gaim_conversation_get_type(convo) != GAIM_CONV_CHAT) | 171 if (!convo) |
| 172 return 0; | 172 return 0; |
| 173 | 173 |
| 174 if (args[1]) | 174 if (args[1]) |
| 175 buf = irc_format(irc, "vcn:", "KICK", target, args[0], args[1]); | 175 buf = irc_format(irc, "vcn:", "KICK", target, args[0], args[1]); |
| 176 else | 176 else |
| 434 GaimConversation *convo; | 434 GaimConversation *convo; |
| 435 | 435 |
| 436 if (!args) | 436 if (!args) |
| 437 return 0; | 437 return 0; |
| 438 | 438 |
| 439 convo = gaim_find_conversation_with_account(target, irc->account); | 439 convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, target, irc->account); |
| 440 if (!convo || gaim_conversation_get_type(convo) != GAIM_CONV_CHAT) | 440 if (!convo) |
| 441 return 0; | 441 return 0; |
| 442 | 442 |
| 443 if (!args[0]) { | 443 if (!args[0]) { |
| 444 topic = gaim_conv_chat_get_topic (GAIM_CONV_CHAT(convo)); | 444 topic = gaim_conv_chat_get_topic (GAIM_CONV_CHAT(convo)); |
| 445 | 445 |
