aboutsummaryrefslogtreecommitdiffstats
path: root/fixery
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-12-02 11:37:00 +0000
committerTom Feist <shabble@metavore.org>2011-12-02 11:47:17 +0000
commit85f08fc4684b854d973b3ad771bfd03af2b70b87 (patch)
tree09020fa22129346491566fb1d3f3fdc314ce5756 /fixery
parentAdd a whole bunch of un-tracked files that need some looking at. (diff)
downloadirssi-scripts-85f08fc4684b854d973b3ad771bfd03af2b70b87.tar.gz
irssi-scripts-85f08fc4684b854d973b3ad771bfd03af2b70b87.zip
Another flagrant abuse of version control because I'm too lazy to stash.
Diffstat (limited to 'fixery')
-rw-r--r--fixery/awayproxy.pl22
1 files changed, 17 insertions, 5 deletions
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.
+}