Skip to content

January 13, 2012

2

/foreach user_in [users] do [commands] in irssi

I just finished my implementation of foreach user_in for irssi.

There was out there a plugin to execute anything for each user in a channel window. I had the requirement to send information to a huge amount of that users (that is, a list of users from my bitlbee channel) but not to all the channel, so I said… Why not a foreach_user indo?

This way, I can, for example, do something like this:

/foreach user in friend_one friend_two friend_three /msg -bitlbee &bitlbee $0: Want a beer? 2100 at my place.
 /foreach user in contact_one contact_two friend_three /msg -bitlbee &bitlbee $0: Have you checked out my last proyect

For this, just download the script from my github and place it in .irssi/scripts/autorun so it will be auto-executed when starting irssi, and load it with:

/load autorun/foreach_user_in.pl

2 Comments Post a comment
  1. mr.p
    Jun 22 2012

    could you make this do a for each user in `blist` or something to use bitlbee gw and msg every user? cheers

    Reply
    • Jun 23 2012

      Actually, a /names in bitlbee should return your blist result.
      I’ve done it a few times myself to spam my facebook/IM contacts from there ;-)

      Reply

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments