From: Mark D. <the...@us...> - 2003-08-25 04:51:40
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory sc8-pr-cvs1:/tmp/cvs-serv18833/src/protocols/irc Modified Files: cmds.c msgs.c Log Message: Individual accounts remember the "No Proxy" setting instead of reverting back to "Use Global Proxy Settings" Proxy settings for individual accounts do not revert to "No Proxy" if you open an account, don't change the proxy drop down, then save the account. Those two sound like the same thing, but they're different. I think. Added the "use environmental variables" setting in a way that isn't horrible. We're not using that thing that splits the proxy variable into host:port yet. I'll do that later. I would have done that earlier, but I had to go buy a bike. Also, I'd like to show what the environmental variables are set to somewhere. That'll come later. Also a patch from Robot101: (22:10:25) Bzubhipheron: I have a patch that replaces #define WFLAG_* with GaimMessageFlags GAIM_MESSAGE_* (22:10:30) Bzubhipheron: (an enum in disguise) (22:14:18) Bzubhipheron: GaimMessageFlags protrays much better typing information than "int". most of the other #defines are gone, and glib standardises on enums for its flags too. (22:14:27) Bzubhipheron: (gone or going) (22:14:45) Bzubhipheron: and it makes the prototype of my message queueing stuff prettier. Index: cmds.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/cmds.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cmds.c 8 Aug 2003 19:49:45 -0000 1.6 +++ cmds.c 25 Aug 2003 02:49:41 -0000 1.7 @@ -40,9 +40,9 @@ buf = g_strdup_printf(_("Unknown command: %s"), cmd); if (gaim_conversation_get_type(convo) == GAIM_CONV_IM) - gaim_im_write(GAIM_IM(convo), "", buf, -1, WFLAG_SYSTEM|WFLAG_NOLOG, time(NULL)); + gaim_im_write(GAIM_IM(convo), "", buf, -1, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else - gaim_chat_write(GAIM_CHAT(convo), "", buf, WFLAG_SYSTEM|WFLAG_NOLOG, time(NULL)); + gaim_chat_write(GAIM_CHAT(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); g_free(buf); return 1; @@ -139,13 +139,13 @@ "PART PING QUERY QUIT<BR>" "QUOTE REMOVE TOPIC UMODE<BR>" "VOICE DEVOICE WALLOPS WHOIS<BR>"), - WFLAG_NOLOG, time(NULL)); + GAIM_MESSAGE_NO_LOG, time(NULL)); } else { gaim_im_write(GAIM_IM(convo), "", _("<B>Supported IRC Commands:</B><BR>" "AWAY JOIN ME MODE<BR>" "MSG NICK OPERWALL PING<BR>" "QUERY QUIT QUOTE UMODE<BR>" - "WALLOPS WHOIS"), -1, WFLAG_NOLOG, time(NULL)); + "WALLOPS WHOIS"), -1, GAIM_MESSAGE_NO_LOG, time(NULL)); } return 0; @@ -413,7 +413,7 @@ gc = gaim_account_get_connection(irc->account); irc_cmd_privmsg(irc, cmd, target, args); gaim_im_write(GAIM_IM(convo), gaim_connection_get_display_name(gc), - args[1], -1, WFLAG_SEND, time(NULL)); + args[1], -1, GAIM_MESSAGE_SEND, time(NULL)); } return 0; @@ -459,7 +459,7 @@ buf = g_strdup_printf(_("current topic is: %s"), topic); else buf = g_strdup(_("No topic is set")); - gaim_chat_write(GAIM_CHAT(convo), target, buf, WFLAG_SYSTEM|WFLAG_NOLOG, time(NULL)); + gaim_chat_write(GAIM_CHAT(convo), target, buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); g_free(buf); return 0; Index: msgs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/msgs.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- msgs.c 7 Aug 2003 20:47:29 -0000 1.5 +++ msgs.c 25 Aug 2003 02:49:41 -0000 1.6 @@ -127,7 +127,7 @@ return; buf = g_strdup_printf("mode for %s: %s %s", args[1], args[2], args[3] ? args[3] : ""); - gaim_chat_write(GAIM_CHAT(convo), "", buf, WFLAG_SYSTEM|WFLAG_NOLOG, time(NULL)); + gaim_chat_write(GAIM_CHAT(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); g_free(buf); return; @@ -244,11 +244,11 @@ nick = irc_mask_nick(from); msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick, topic); g_free(nick); - gaim_chat_write(GAIM_CHAT(convo), from, msg, WFLAG_SYSTEM, time(NULL)); + gaim_chat_write(GAIM_CHAT(convo), from, msg, GAIM_MESSAGE_SYSTEM, time(NULL)); g_free(msg); } else { msg = g_strdup_printf(_("The topic for %s is: %s"), chan, topic); - gaim_chat_write(GAIM_CHAT(convo), "", msg, WFLAG_SYSTEM, time(NULL)); + gaim_chat_write(GAIM_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM, time(NULL)); g_free(msg); } } @@ -287,9 +287,9 @@ if (irc->nameconv) { msg = g_strdup_printf("Users on %s: %s", args[1], names); if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) - gaim_chat_write(GAIM_CHAT(convo), "", msg, WFLAG_SYSTEM|WFLAG_NOLOG, time(NULL)); + gaim_chat_write(GAIM_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else - gaim_im_write(GAIM_IM(convo), "", msg, -1, WFLAG_SYSTEM|WFLAG_NOLOG, time(NULL)); + gaim_im_write(GAIM_IM(convo), "", msg, -1, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); g_free(msg); g_free(irc->nameconv); irc->nameconv = NULL; @@ -367,10 +367,10 @@ if (convo) { if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) /* does this happen? */ gaim_chat_write(GAIM_CHAT(convo), args[1], _("no such channel"), - WFLAG_SYSTEM|WFLAG_NOLOG, time(NULL)); + GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else gaim_im_write(GAIM_IM(convo), args[1], _("User is not logged in"), -1, - WFLAG_SYSTEM|WFLAG_NOLOG, time(NULL)); + GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); } else { if ((gc = gaim_account_get_connection(irc->account)) == NULL) return; @@ -390,7 +390,7 @@ convo = gaim_find_conversation_with_account(args[1], irc->account); if (convo) { - gaim_chat_write(GAIM_CHAT(convo), args[1], args[2], WFLAG_SYSTEM|WFLAG_NOLOG, time(NULL)); + gaim_chat_write(GAIM_CHAT(convo), args[1], args[2], GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); } else { if ((gc = gaim_account_get_connection(irc->account)) == NULL) return; @@ -406,7 +406,7 @@ if (convo) { /*g_slist_remove(irc->gc->buddy_chats, convo); gaim_conversation_set_account(convo, NULL);*/ - gaim_chat_write(GAIM_CHAT(convo), args[1], args[2], WFLAG_SYSTEM|WFLAG_NOLOG, time(NULL)); + gaim_chat_write(GAIM_CHAT(convo), args[1], args[2], GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); } } @@ -421,7 +421,7 @@ if (!convo) return; - gaim_chat_write(GAIM_CHAT(convo), "", args[2], WFLAG_SYSTEM, time(NULL)); + gaim_chat_write(GAIM_CHAT(convo), "", args[2], GAIM_MESSAGE_SYSTEM, time(NULL)); } void irc_msg_invite(struct irc_conn *irc, const char *name, const char *from, char **args) @@ -548,7 +548,7 @@ if (!gaim_utf8_strcasecmp(gaim_connection_get_display_name(gc), args[1])) { buf = g_strdup_printf(_("You have been kicked by %s: (%s)"), nick, args[2]); - gaim_chat_write(GAIM_CHAT(convo), args[0], buf, WFLAG_SYSTEM, time(NULL)); + gaim_chat_write(GAIM_CHAT(convo), args[0], buf, GAIM_MESSAGE_SYSTEM, time(NULL)); g_free(buf); /*g_slist_remove(irc->gc->buddy_chats, convo); gaim_conversation_set_account(convo, NULL);*/ @@ -577,7 +577,7 @@ return; } buf = g_strdup_printf(_("mode (%s %s) by %s"), args[1], args[2] ? args[2] : "", nick); - gaim_chat_write(GAIM_CHAT(convo), args[0], buf, WFLAG_SYSTEM|WFLAG_NOLOG, time(NULL)); + gaim_chat_write(GAIM_CHAT(convo), args[0], buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); g_free(buf); } else { /* User */ } @@ -665,7 +665,7 @@ nick = irc_mask_nick(from); if (!gaim_utf8_strcasecmp(nick, gaim_connection_get_display_name(gc))) { msg = g_strdup_printf(_("You have parted the channel%s%s"), *args[1] ? ": " : "", args[1]); - gaim_chat_write(GAIM_CHAT(convo), args[0], msg, WFLAG_SYSTEM, time(NULL)); + gaim_chat_write(GAIM_CHAT(convo), args[0], msg, GAIM_MESSAGE_SYSTEM, time(NULL)); g_free(msg); } else { gaim_chat_remove_user(GAIM_CHAT(convo), nick, args[1]); @@ -711,9 +711,9 @@ g_strfreev(parts); if (convo) { if (gaim_conversation_get_type (convo) == GAIM_CONV_CHAT) - gaim_chat_write(GAIM_CHAT(convo), "PONG", msg, WFLAG_SYSTEM|WFLAG_NOLOG, time(NULL)); + gaim_chat_write(GAIM_CHAT(convo), "PONG", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else - gaim_im_write(GAIM_IM(convo), "PONG", msg, -1, WFLAG_SYSTEM|WFLAG_NOLOG, time(NULL)); + gaim_im_write(GAIM_IM(convo), "PONG", msg, -1, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); } else { gc = gaim_account_get_connection(irc->account); if (!gc) { |