changeset 1772:896432d66303

[gaim-migrate @ 1782] remove OPT_USR_KEEPALIVE; add OPT_PROTO_UNIQUE_CHATNAME for Jabber. other things that need to be implemented still. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 30 Apr 2001 01:58:24 +0000
parents 213607e89598
children 6d1d9e988fd4
files TODO plugins/icq/gaim_icq.c plugins/jabber/jabber.c src/conversation.c src/gaim.h src/multi.c src/prpl.h src/server.c
diffstat 8 files changed, 53 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/TODO	Mon Apr 30 01:25:30 2001 +0000
+++ b/TODO	Mon Apr 30 01:58:24 2001 +0000
@@ -5,22 +5,25 @@
 	Border for GtkIMHtml
 	GPG Encryption of messages
 	Better way of showing away state - and possibly in main window
-	OPT_PROTO_PASSWORD (mainly for IRC/Zephyr) - should hide password dialog
-		in account editor
-	Remove OPT_USR_KEEPALIVE (or whatever it's called) - keepalives shouldn't
-		be optional
-	OPT_PROTO_MAILCHECK (mainly for Yahoo/MSN) - with appropriate toggle on
-		account editor modify thing for whether or not to display it (and
-		also move Yahoo/MSN dialog to prpl.c and have both of them use it)
+	Implement:
+		OPT_PROTO_NO_PASSWORD (mainly for IRC/Zephyr) - should hide password
+			dialog in account editor
+		OPT_PROTO_OFFLINE to allow sending offline messages... checkbox on
+			the convo window? need to decide UI for switching between
+			offline/ normal message. uh... maybe this isn't the best
+			idea, but we need something that gives us this functionality....
+			prpl->send_im_offline?
+		OPT_PROTO_CHAT_TOPIC (for IRC/Jabber chatroom topics)
+		OPT_PROTO_MAILCHECK (mainly for Yahoo/MSN) - with appropriate toggle
+			on account editor modify thing for whether or not to display
+			it (and also move Yahoo/MSN dialog to prpl.c and have both of
+			them use it (is this doable? Yahoo only gives message count,
+			what does MSN give?))
 	Ha. Maybe we should also add OPT_GEN_MAILCHECK to check $MAIL (or
 		/var/spool/mail/$USER if that fails). If we did that I could get rid
 		of one more applet on my gnome panel and make it almost completely
-		for the sole purpose of gaim_applet.
-	OPT_PROTO_OFFLINE to allow sending offline messages... checkbox on the
-		convo window? need to decide UI for switching between offline/
-		normal message. uh... maybe this isn't the best idea, but we need
-		something that gives us this functionality....
-		prpl->send_im_offline?
+		for the sole purpose of gaim_applet. (Maybe this could be a plugin?
+		What should the UI be for this?)
 	Away needs to be modified to include "show" and "status", i.e. you can have
 		an away state, and an away message. This is exactly what ICQ does -
 		you're "N/A" (show in Jabber) and your away message is "I'm gone."
--- a/plugins/icq/gaim_icq.c	Mon Apr 30 01:25:30 2001 +0000
+++ b/plugins/icq/gaim_icq.c	Mon Apr 30 01:58:24 2001 +0000
@@ -99,7 +99,7 @@
 	struct icq_data *id = (struct icq_data *)gc->proto_data;
 	debug_printf("%s is now online.\n", gc->username);
 	account_online(gc);
-	gc->options |= OPT_USR_KEEPALV;
+	/*gc->options |= OPT_USR_KEEPALV; this is always-on now */
 	serv_finish_login(gc);
 
 	icq_ChangeStatus(id->link, STATUS_ONLINE);
--- a/plugins/jabber/jabber.c	Mon Apr 30 01:25:30 2001 +0000
+++ b/plugins/jabber/jabber.c	Mon Apr 30 01:58:24 2001 +0000
@@ -1575,6 +1575,7 @@
 {
 	/* the NULL's aren't required but they're nice to have */
 	ret->protocol = PROTO_JABBER;
+	ret->options = OPT_PROTO_UNIQUE_CHATNAME | OPT_PROTO_CHAT_TOPIC;
 	ret->name = jabber_name;
 	ret->list_icon = jabber_list_icon;
 	ret->away_states = jabber_away_states;
--- a/src/conversation.c	Mon Apr 30 01:25:30 2001 +0000
+++ b/src/conversation.c	Mon Apr 30 01:58:24 2001 +0000
@@ -1296,24 +1296,26 @@
 	if (!(logging_options & OPT_LOG_STRIP_HTML))
 		gtk_font_options = gtk_font_options ^ GTK_IMHTML_RETURN_LOG;
 
-	if (!who) {
-		if (flags & WFLAG_SEND) {
-			b = find_buddy(c->gc, c->gc->username);
+	if (!c->is_chat || !(c->gc->prpl->options & OPT_PROTO_UNIQUE_CHATNAME)) {
+		if (!who) {
+			if (flags & WFLAG_SEND) {
+				b = find_buddy(c->gc, c->gc->username);
+				if (b)
+					who = b->show;
+				else
+					who = c->gc->username;
+			} else {
+				b = find_buddy(c->gc, c->name);
+				if (b)
+					who = b->show;
+				else
+					who = c->name;
+			}
+		} else {
+			b = find_buddy(c->gc, who);
 			if (b)
 				who = b->show;
-			else
-				who = c->gc->username;
-		} else {
-			b = find_buddy(c->gc, c->name);
-			if (b)
-				who = b->show;
-			else
-				who = c->name;
 		}
-	} else {
-		b = find_buddy(c->gc, who);
-		if (b)
-			who = b->show;
 	}
 
 	
--- a/src/gaim.h	Mon Apr 30 01:25:30 2001 +0000
+++ b/src/gaim.h	Mon Apr 30 01:58:24 2001 +0000
@@ -532,7 +532,7 @@
 #define OPT_LOG_INDIVIDUAL       0x00000040
 
 #define OPT_USR_AUTO		0x00000001
-#define OPT_USR_KEEPALV		0x00000002
+/*#define OPT_USR_KEEPALV	0x00000002 this shouldn't be optional */
 #define OPT_USR_REM_PASS	0x00000004
 
 #define DEFAULT_INFO "Visit the GAIM website at <A HREF=\"http://gaim.sourceforge.net/\">http://gaim.sourceforge.net/</A>."
--- a/src/multi.c	Mon Apr 30 01:25:30 2001 +0000
+++ b/src/multi.c	Mon Apr 30 01:58:24 2001 +0000
@@ -386,7 +386,7 @@
 
 	acct_button(_("Remember Password"), u, OPT_USR_REM_PASS, vbox);
 	acct_button(_("Auto-Login"), u, OPT_USR_AUTO, vbox);
-	acct_button(_("Send KeepAlive packet (6 bytes/second)"), u, OPT_USR_KEEPALV, vbox);
+	/*acct_button(_("Send KeepAlive packet (6 bytes/second)"), u, OPT_USR_KEEPALV, vbox);*/
 
 	if (u) {
 		u->name = name;
--- a/src/prpl.h	Mon Apr 30 01:25:30 2001 +0000
+++ b/src/prpl.h	Mon Apr 30 01:58:24 2001 +0000
@@ -36,11 +36,21 @@
 #define PROTO_NAPSTER	9
 #define PROTO_ZEPHYR   10
 
-#define OPT_PROTO_HTML         0x00000001
-#define OPT_PROTO_CORRECT_TIME 0x00000002
-/* there should be more here eventually... These should all be stuff that other
- * plugins can't do (for example, TOC and Oscar and Jabber can do HTML in messages,
- * but IRC etc can't, so TOC/Oscar/Jabber have _HTML set but not IRC. */
+/* These should all be stuff that some plugins can do and others can't */
+/* TOC/Oscar send HTML-encoded messages; most other protocols don't */
+#define OPT_PROTO_HTML            0x00000001
+/* TOC/Oscar have signon time, and the server's time needs to be adjusted to match
+ * your computer's time. We wouldn't need this if everyone used NTP. */
+#define OPT_PROTO_CORRECT_TIME    0x00000002
+/* Jabber lets you choose what name you want for chat. So it shouldn't be pulling
+ * the alias for when you're in chat; it gets annoying. */
+#define OPT_PROTO_UNIQUE_CHATNAME 0x00000004
+/* IRC, Jabber let you have chat room topics */
+#define OPT_PROTO_CHAT_TOPIC      0x00000008
+/* IRC and Zephyr don't require passwords, so there's no need for a password prompt */
+#define OPT_PROTO_NO_PASSWORD     0x00000010
+/* ICQ, Yahoo, others? let you send offline messages */
+#define OPT_PROTO_OFFLINE         0x00000020
 
 #define GAIM_AWAY_CUSTOM "Custom"
 
--- a/src/server.c	Mon Apr 30 01:25:30 2001 +0000
+++ b/src/server.c	Mon Apr 30 01:58:24 2001 +0000
@@ -113,7 +113,7 @@
 
 	time(&gc->login_time);
 
-	update_keepalive(gc, gc->options & OPT_USR_KEEPALV);
+	update_keepalive(gc, TRUE);
 }