Opened at 2009-11-04T21:10:43Z
Closed at 2015-11-26T05:31:16Z
#537 closed enhancement (duplicate)
There is no away_priority setting yet
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | BitlBee | Version: | devel |
| Keywords: | Cc: | ||
| IRC client+version: | Client-independent | Operating System: | Public server |
| OS version/distro: |
Description
It would be nice to have a priority that is set when a jabber account is set to away.
Attachments (0)
Change History (4)
comment:1 Changed at 2009-11-04T21:19:02Z by
comment:2 Changed at 2012-01-20T15:05:37Z by
This ticket has been open for a long time, but at least for me this would still be a nice feature. I've patched my screen_away script to provide a simple workaround for this, it may be interesting for other IRSSI users using screen_away as well:
--- /tmp/screen_away.pl 2012-01-20 15:56:24.077092938 +0100
+++ .irssi/scripts/screen_away.pl 2012-01-20 15:53:47.549209568 +0100
@@ -2,7 +2,7 @@
use strict;
use FileHandle;
-use vars qw($VERSION %IRSSI);
+use vars qw($VERSION %IRSSI %BITLBEE);
$VERSION = "0.9.7.1";
%IRSSI = (
@@ -13,6 +13,15 @@
url => 'none',
);
+# set Bitlbee account
+%BITLBEE = (
+ chatnet => 'bitlbee',
+ channel => '&bitlbee',
+ accountID => 0,
+ prio => 1,
+ away_prio => -1,
+);
+
# screen_away irssi module
#
# written by Andreas 'ads' Scherbaum <ads@ufp.de>
@@ -197,6 +206,8 @@
$away{$server->{'tag'}} = 1;
}
}
+ # lower priority of jabber resource
+ Irssi::server_find_chatnet($BITLBEE{'chatnet'})->channel_find($BITLBEE{'channel'})->command("MSG " . $BITLBEE{'channel'} . " account " . $BITLBEE{'accountID'} . " set priority " . $BITLBEE{'away_prio'});
$away_status = $away;
} elsif ($away == 2 and $away_status != 2) {
# unset away
@@ -216,6 +227,8 @@
$old_nicks{$server->{'tag'}} = "";
}
}
+ # raise priority of jabber resource
+ Irssi::server_find_chatnet($BITLBEE{'chatnet'})->channel_find($BITLBEE{'channel'})->command("MSG " . $BITLBEE{'channel'} . " account " . $BITLBEE{'accountID'} . " set priority " . $BITLBEE{'prio'});
$away_status = $away;
}
}
comment:3 Changed at 2014-02-12T16:42:46Z by
Thank you for the screen_away patch, that works. Anyway, a away_priority setting would be much smoother.
comment:4 Changed at 2015-11-26T05:31:16Z by
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
This was addressed by #1164, I somehow missed this ticket before.
It's not a separate setting, but it substracts 5 from the existing priority, which should be good enough.

A quick workaround for IRSSI users using manual away is
Replace four with your account #, and add any number of commands with ; between them of course. Add these to the aliases section of your irssi config.