Index: commands.c
===================================================================
--- commands.c	(revision 78033261fc599d8d986e1c32b68523132b853d40)
+++ commands.c	(revision 6df57d4264483d81d678c5981c422da79199945e)
@@ -479,13 +479,10 @@
 
   OWLCMD_ARGS("away", owl_command_away, OWL_CTX_INTERACTIVE,
-	      "Set, enable or disable both AIM and zephyr away messages",
+	      "Set, enable or disable all away messages",
 	      "away [ on | off | toggle ]\n"
 	      "away <message>",
-	      "Turn on or off the AIM and zephyr away message.  If\n"
+	      "Turn on or off all away messages.  If\n"
 	      "'message' is specified turn them on with that message,\n"
 	      "otherwise use the default.\n"
-	      "\n"
-	      "This command really just runs the 'aaway' and 'zaway'\n"
-	      "commands together\n"
 	      "\n"
 	      "SEE ALSO: aaway, zaway"),
@@ -1531,42 +1528,40 @@
 char *owl_command_away(int argc, const char *const *argv, const char *buff)
 {
-  if ((argc==1) ||
-      ((argc==2) && !strcmp(argv[1], "on"))) {
+  bool away_off;
+  const char *message = NULL;
+
+  if (argc == 1 ||
+      (argc == 2 && !strcmp(argv[1], "on"))) {
+    away_off = false;
     owl_global_set_aaway_msg(&g, owl_global_get_aaway_msg_default(&g));
     owl_global_set_zaway_msg(&g, owl_global_get_zaway_msg_default(&g));
+  } else if (argc == 2 && !strcmp(argv[1], "off")) {
+    away_off = true;
+  } else if (argc == 2 && !strcmp(argv[1], "toggle")) {
+    away_off = owl_function_is_away();
+  } else {
+    away_off = false;
+    message = skiptokens(buff, 1);
+  }
+
+  if (away_off) {
+    owl_function_aaway_off();
+    owl_function_zaway_off();
+    owl_perlconfig_perl_call_norv("BarnOwl::Hooks::_away_off", 0, NULL);
+    owl_function_makemsg("Away messages off.");
+  } else if (message != NULL) {
+    owl_global_set_aaway_msg(&g, message);
+    owl_global_set_zaway_msg(&g, message);
     owl_function_aaway_on();
     owl_function_zaway_on();
+    owl_perlconfig_perl_call_norv("BarnOwl::Hooks::_away_on", 1, &message);
+    owl_function_makemsg("Away messages set (%s).", message);
+  } else {
+    owl_function_aaway_on();
+    owl_function_zaway_on();
+    owl_perlconfig_perl_call_norv("BarnOwl::Hooks::_away_on", 0, NULL);
     owl_function_makemsg("Away messages set.");
-    return NULL;
-  }
-
-  if (argc==2 && !strcmp(argv[1], "off")) {
-    owl_function_aaway_off();
-    owl_function_zaway_off();
-    return NULL;
-  }
-
-  if (argc==2 && !strcmp(argv[1], "toggle")) {
-    /* if either one is on, turn it off, otherwise toggle both (turn
-     *  them both on)
-     */
-    if (!owl_global_is_zaway(&g) && !owl_global_is_aaway(&g)) {
-      owl_function_aaway_toggle();
-      owl_function_zaway_toggle();
-      owl_function_makemsg("Away messages set.");
-    } else {
-      if (owl_global_is_zaway(&g)) owl_function_zaway_toggle();
-      if (owl_global_is_aaway(&g)) owl_function_aaway_toggle();
-      owl_function_makemsg("Away messages off.");
-    }
-    return NULL;
-  }
-
-  buff = skiptokens(buff, 1);
-  owl_global_set_aaway_msg(&g, buff);
-  owl_global_set_zaway_msg(&g, buff);
-  owl_function_aaway_on();
-  owl_function_zaway_on();
-  owl_function_makemsg("Away messages set.");
+  }
+
   return NULL;
 }
Index: functions.c
===================================================================
--- functions.c	(revision 78033261fc599d8d986e1c32b68523132b853d40)
+++ functions.c	(revision 6df57d4264483d81d678c5981c422da79199945e)
@@ -992,4 +992,11 @@
 }
 
+bool owl_function_is_away(void)
+{
+  return owl_global_is_zaway(&g) ||
+         owl_global_is_aaway(&g) ||
+         owl_perlconfig_perl_call_bool("BarnOwl::Hooks::_get_is_away", 0, NULL);
+}
+
 void owl_function_quit(void)
 {
Index: perl/lib/BarnOwl/Hooks.pm
===================================================================
--- perl/lib/BarnOwl/Hooks.pm	(revision b8a3e0025038d7a71f4d13206b772d904f95b8a0)
+++ perl/lib/BarnOwl/Hooks.pm	(revision 6df57d4264483d81d678c5981c422da79199945e)
@@ -57,4 +57,19 @@
 from every function registered with this hook will be appended and
 displayed in a popup window, with zephyr formatting parsed.
+
+=item $awayOn
+
+Called, for all protocol handlers, to go away, with the away message,
+if any.
+
+=item $awayOff
+
+Called, for all protocol handlers, to come back from away.
+
+=item $getIsAway
+
+Called to check away status for all protocol handlers.  Protocol
+handlers should return a true value if any account of the user is away
+for the given protocol, and a false value otherwise.
 
 =item $getQuickstart
@@ -75,5 +90,6 @@
                     $receiveMessage $newMessage
                     $mainLoop $getBuddyList
-                    $getQuickstart);
+                    $getQuickstart
+                    $awayOn $awayOff $getIsAway);
 
 our %EXPORT_TAGS = (all => [@EXPORT_OK]);
@@ -88,4 +104,7 @@
 our $getBuddyList = BarnOwl::Hook->new;
 our $getQuickstart = BarnOwl::Hook->new;
+our $awayOn = BarnOwl::Hook->new;
+our $awayOff = BarnOwl::Hook->new;
+our $getIsAway = BarnOwl::Hook->new;
 
 # Internal startup/shutdown routines called by the C code
@@ -201,4 +220,17 @@
 }
 
+sub _away_on {
+    $awayOn->run(@_);
+}
+
+sub _away_off {
+    $awayOff->run();
+}
+
+sub _get_is_away {
+    my @is_away = grep { $_ } $getIsAway->run();
+    return scalar @is_away;
+}
+
 sub _new_command {
     my $command = shift;
Index: sepbar.c
===================================================================
--- sepbar.c	(revision 6eb3ed9ee6c4b94d35628e5b6b2bbaeccca565a9)
+++ sepbar.c	(revision 6df57d4264483d81d678c5981c422da79199945e)
@@ -67,16 +67,10 @@
   }
 
-  if (owl_global_is_zaway(&g) || owl_global_is_aaway(&g)) {
+  if (owl_function_is_away()) {
     getyx(sepwin, y, x);
     wmove(sepwin, y, x+2);
     wattron(sepwin, A_BOLD);
     wattroff(sepwin, A_REVERSE);
-    if (owl_global_is_zaway(&g) && owl_global_is_aaway(&g)) {
-      waddstr(sepwin, " AWAY ");
-    } else if (owl_global_is_zaway(&g)) {
-      waddstr(sepwin, " Z-AWAY ");
-    } else if (owl_global_is_aaway(&g)) {
-      waddstr(sepwin, " A-AWAY ");
-    }
+    waddstr(sepwin, " AWAY ");
     wattron(sepwin, A_REVERSE);
     wattroff(sepwin, A_BOLD);
