From 85f08fc4684b854d973b3ad771bfd03af2b70b87 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Fri, 2 Dec 2011 11:37:00 +0000 Subject: Another flagrant abuse of version control because I'm too lazy to stash. --- fixery/awayproxy.pl | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'fixery') diff --git a/fixery/awayproxy.pl b/fixery/awayproxy.pl index b60eff4..d0b33dd 100644 --- a/fixery/awayproxy.pl +++ b/fixery/awayproxy.pl @@ -9,7 +9,7 @@ ## Other hand if you dont use irssi-proxy you still have a good reason to ## use this if you want to forward messages that come to you while ## you are away to email box. -## This is usefull for forwarding messages to an SMS-gateway ;) +## This is useful for forwarding messages to an SMS-gateway ;) ## ## btw.. if you find any bugs or have any ideas for development of this ## script dont hesitate to send msg to BCOW@IrcNET @@ -311,7 +311,19 @@ sub msg_pri { } } -Irssi::signal_add_last('proxy client connected', \&client_connect); -Irssi::signal_add_last('proxy client disconnected', \&client_disconnect); -Irssi::signal_add_last('message public', \&msg_pub); -Irssi::signal_add_last('message private', \&msg_pri); +sub init { + + Irssi::settings_add_string('awayproxy', 'awayproxy_send_mode', MODE_EMAIL); + + Irssi::signal_add_last('proxy client connected', \&sig_client_connect); + Irssi::signal_add_last('proxy client disconnected', \&sig_client_disconnect); + Irssi::signal_add_last('message public', \&sig_msg_public); + Irssi::signal_add_last('message private', \&sig_msg_private); + Irssi::signal_add('setup changed', \&sig_setup_changed); + + sig_setup_changed(); +} + +sub sig_setup_changed { + # load values from settings. +} -- cgit v1.2.3