Auto-join all currently open channels in Irssi
Asked Answered
W

2

9

Is there a way to tell Irssi that I want to auto-join all of the channels that are currently open?

I want something like:

/channel add -auto <all my currently open channels>
/save
Wirra answered 25/2, 2015 at 17:11 Comment(0)
W
6

I found the answer here:

/alias addallchannels script exec foreach my \$channel (Irssi::channels()) { Irssi::command("channel add -auto \$channel->{name} \$channel->{server}->{tag} \$channel->{key}")\;}

Followed by:

/addallchannels
/save
Wirra answered 25/2, 2015 at 17:32 Comment(0)
E
9

Irssi has had an /ADDALLCHANS alias since at least July 2014 that does exactly what you want: add all currently joined channels to the auto-join list.

Specifically, the alias is defined as: ADDALLCHANS = "SCRIPT EXEC foreach my \\$channel (Irssi::channels()) { Irssi::command(\"CHANNEL ADD -auto \\$channel->{name} \\$channel->{server}->{tag} \\$channel->{key}\")\\;}";

You'll still want to call /save afterwards if you want the settings to persist.

Exact answered 26/1, 2016 at 17:52 Comment(2)
Added 2014... found 2020! Thank you!Giorgio
if you have saved all open channels to autojoin and want to remove one you have to either remove it manually in config or use this alias first before ADDALLCHANS and saving after: RMALLCHANS = "SCRIPT EXEC foreach my \\$channel (Irssi::channels()) { Irssi::command(\"CHANNEL REMOVE \\$channel->{name} \\$channel->{server}->{tag} \\$channel->{key}\")\\;}"; Cossack
W
6

I found the answer here:

/alias addallchannels script exec foreach my \$channel (Irssi::channels()) { Irssi::command("channel add -auto \$channel->{name} \$channel->{server}->{tag} \$channel->{key}")\;}

Followed by:

/addallchannels
/save
Wirra answered 25/2, 2015 at 17:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.