tiistaina, kesäkuuta 24, 2008

Auto-op my IRC friends

I finally managed to make a plugin for Colloquy, the IRC client I use on the Mac. The plugin grants channel operator status to my friends when they join the channel.

My first stab at this plugin caused the version prior to 2.1 to crash. 2.1 seems to work, almost. Colloquy does not pass input from plugins thru the same parser which processes commands like /op, so it seems to be necessary to send raw IRC protocol command to give ops. Thanks for Juha Autero for his help.

You can download the plugin. Put it in Application Support/Colloquy/Plugins

2 kommenttia:

Anonyymi kirjoitti...

How do you set the people you want to auto-op? Thanks in advance.

Sami kirjoitti...

You add them to your buddy list in Colloquy. Maybe this is not a generic solution but it works for me. I have a short list of friends and we all hang out on the same channel and they are all my buddies.

If you look at the script, you can see I used to have a list of my friends at the top of the script. Then I commented it out and the couple of lines that check the list and added the buddy list check. (Well, I'm very new to AppleScript, so I did not know how to check if a nick is a buddy, except by trying to access some buddy properties and catch the error that occurs if the nick is not a buddy)

If you want to use the fixed list, you can uncomment it. You could also add a check for a channel if you only want to auto-op on certain channels.