pork (0.99.8.1-2.1) 002-wireless-upstream.patch

Summary

 doc/help/main/set                  |    3 +++
 src/pork_buddy.h                   |    5 +++--
 src/pork_format.c                  |    2 ++
 src/pork_set.c                     |    6 ++++++
 src/pork_set.h                     |    1 +
 src/pork_set_defaults.h            |    1 +
 src/protocols/aim/pork_aim_proto.c |    4 ++++
 7 files changed, 20 insertions(+), 2 deletions(-)

    
download this patch

Patch contents

From: Benjamin Seidenberg <astronut@dlgeek.net>
Subject: Upstream patch to recognize wireless users

diff -urNad pork-0.99.8.1~/doc/help/main/set pork-0.99.8.1/doc/help/main/set
--- pork-0.99.8.1~/doc/help/main/set	2005-04-28 13:35:16.000000000 -0400
+++ pork-0.99.8.1/doc/help/main/set	2006-05-01 20:02:11.000000000 -0400
@@ -448,6 +448,9 @@
  TEXT_BUDDY_IDLE (string)
 	The format string that specifies how the buddy list status indicator for idle users will be displayed.
 
+ TEXT_BUDDY_WIRELESS (string)
+	The format string that specifies how the buddy list status indicator for wireless users will be displayed.
+
  TEXT_NO_NAME (string)
 	The string displayed in the status bar to indicate that no screen name has been specified yet. This string is displayed before logging in with any account.
 
diff -urNad pork-0.99.8.1~/src/pork_buddy.h pork-0.99.8.1/src/pork_buddy.h
--- pork-0.99.8.1~/src/pork_buddy.h	2005-04-28 13:35:17.000000000 -0400
+++ pork-0.99.8.1/src/pork_buddy.h	2006-05-01 20:02:11.000000000 -0400
@@ -14,7 +14,8 @@
 	STATUS_OFFLINE,
 	STATUS_ACTIVE,
 	STATUS_IDLE,
-	STATUS_AWAY
+	STATUS_AWAY,
+    STATUS_WIRELESS
 };
 
 struct pork_acct;
@@ -48,7 +49,7 @@
 	u_int32_t signon_time;
 	u_int32_t idle_time;
 	u_int32_t warn_level;
-	u_int32_t status:2;
+	u_int32_t status:3;
 	u_int32_t notify:1;
 	u_int32_t ignore:1;
 	u_int32_t type:6;
diff -urNad pork-0.99.8.1~/src/pork_format.c pork-0.99.8.1/src/pork_format.c
--- pork-0.99.8.1~/src/pork_format.c	2005-04-28 13:35:17.000000000 -0400
+++ pork-0.99.8.1/src/pork_format.c	2006-05-01 20:02:11.000000000 -0400
@@ -911,6 +911,8 @@
 				status_text = opt_get_str(OPT_TEXT_BUDDY_AWAY);
 			else if (buddy->status == STATUS_IDLE)
 				status_text = opt_get_str(OPT_TEXT_BUDDY_IDLE);
+			else if (buddy->status == STATUS_WIRELESS)
+				status_text = opt_get_str(OPT_TEXT_BUDDY_WIRELESS);
 			else
 				status_text = "%p?%x";
 
diff -urNad pork-0.99.8.1~/src/pork_set.c pork-0.99.8.1/src/pork_set.c
--- pork-0.99.8.1~/src/pork_set.c	2005-04-28 13:35:18.000000000 -0400
+++ pork-0.99.8.1/src/pork_set.c	2006-05-01 20:02:11.000000000 -0400
@@ -720,6 +720,12 @@
 		opt_set_format,
 		pork_acct_update_blist_format,
 		SET_STR(DEFAULT_TEXT_BUDDY_IDLE),
+	},{	"TEXT_BUDDY_WIRELESS",
+		OPT_STR,
+		0,
+		opt_set_format,
+		pork_acct_update_blist_format,
+		SET_STR(DEFAULT_TEXT_BUDDY_WIRELESS),
 	},{	"TEXT_NO_NAME",
 		OPT_STR,
 		0,
diff -urNad pork-0.99.8.1~/src/pork_set.h pork-0.99.8.1/src/pork_set.h
--- pork-0.99.8.1~/src/pork_set.h	2005-04-28 13:35:18.000000000 -0400
+++ pork-0.99.8.1/src/pork_set.h	2006-05-01 20:02:11.000000000 -0400
@@ -135,6 +135,7 @@
 	OPT_TEXT_BUDDY_ACTIVE,
 	OPT_TEXT_BUDDY_AWAY,
 	OPT_TEXT_BUDDY_IDLE,
+    OPT_TEXT_BUDDY_WIRELESS,
 	OPT_TEXT_NO_NAME,
 	OPT_TEXT_NO_ROOM,
 	OPT_TEXT_TYPING,
diff -urNad pork-0.99.8.1~/src/pork_set_defaults.h pork-0.99.8.1/src/pork_set_defaults.h
--- pork-0.99.8.1~/src/pork_set_defaults.h	2005-04-28 13:35:18.000000000 -0400
+++ pork-0.99.8.1/src/pork_set_defaults.h	2006-05-01 20:02:11.000000000 -0400
@@ -123,6 +123,7 @@
 #define	DEFAULT_TEXT_BUDDY_ACTIVE			"%G*%x"
 #define DEFAULT_TEXT_BUDDY_AWAY				"%r*%x"
 #define DEFAULT_TEXT_BUDDY_IDLE				"%Y*%x"
+#define DEFAULT_TEXT_BUDDY_WIRELESS			"%b*%x"
 #define DEFAULT_TEXT_NO_NAME				"<not specified>"
 #define DEFAULT_TEXT_NO_ROOM				":(not joined)"
 #define DEFAULT_TEXT_TYPING					"Typing"
diff -urNad pork-0.99.8.1~/src/protocols/aim/pork_aim_proto.c pork-0.99.8.1/src/protocols/aim/pork_aim_proto.c
--- pork-0.99.8.1~/src/protocols/aim/pork_aim_proto.c	2005-04-29 15:17:44.000000000 -0400
+++ pork-0.99.8.1/src/protocols/aim/pork_aim_proto.c	2006-05-01 20:02:11.000000000 -0400
@@ -162,6 +162,10 @@
 	if (userinfo->flags & AIM_FLAG_AWAY)
 		buddy->status = STATUS_AWAY;
 
+    if (userinfo->flags & AIM_FLAG_WIRELESS) {
+        buddy->status = STATUS_WIRELESS;
+    }
+
 	return (0);
 }