paddykontschak / irssi-notifier

Simple script for irssi to trigger Mac OS X 10.8's Notification Center
110 stars 13 forks source link

Added Voice Notifications and Explicit Filter for Identify Command #4

Closed kc-dot-io closed 10 years ago

kc-dot-io commented 11 years ago

Hey Paddy

Great little plugin. Feel free not to merge this because it's a whole lot of silly. But I thought I'd send a pull request that you can leave in your issues tab (if you want) for people to see this because while it's silly, it's also kinda neat. If you don't want to pull it, then people can fork it off me.

I was having issues with not getting notification sounds and would miss every mention of my nick. So I added "say" to the notifier_it function so now Victoria (my favorite little say voice) reads me messages so I don't miss them. I also noticed that the channel regex didn't seem to work (maybe it just doesn't load in time) for my autosendcmd for identify. I didn't want it notifying my password and very much didn't want Victoria speaking my password, so I put an explicit check for it and return 0 if it is.

I don't really know perl, but I had fun on this. Thanks for giving me a place to start!

Kyle

paddykontschak commented 11 years ago

I understand the reason why you added the voice but frankly this should be optional rather hardcoded. I'll play around with it over the weekend/next week but I think this should be the code making the voice an option for the user.

if (Irssi::settings_get_str('notifier_voice') == 1) {
  system("say -v Vicki '$data'");
}

There should be a new Irssi::signal_add somewhere at the end of the code; I have to figure out which one though. If all that works the user can activate it with /SET notifier_voice 1.

kc-dot-io commented 11 years ago

Yeah you are totally right. I added this. It would also be nice to make the voice name an option and default to Vicki, but I'm afraid my prerequisite PERL knowledge doesn't support how best to do that right now. Maybe I'll make a stab at it later.