summaryrefslogtreecommitdiff
path: root/lib/Tools.pm
diff options
context:
space:
mode:
authorAndreas Brachold <vdr07@deltab.de>2007-12-16 14:37:56 +0000
committerAndreas Brachold <vdr07@deltab.de>2007-12-16 14:37:56 +0000
commite74bdb7184b4e72ae58c5175464ef6a3db96aff7 (patch)
tree48b6c98ce3b2c5fd55a94f038c354b7f7e5bc42b /lib/Tools.pm
parent26868547aed93bdba91157faa30db80db06573ba (diff)
downloadxxv-e74bdb7184b4e72ae58c5175464ef6a3db96aff7.tar.gz
xxv-e74bdb7184b4e72ae58c5175464ef6a3db96aff7.tar.bz2
* VTX: Embedded vtx-font inside module, drop graphics from VTXPATH
* HTTPD: remove binary from url as parameter, now defined at cmdobj, inside modul header * EPG: rename VPS to PDC, Programme Delivery Control * tools: add con_err,con_msg to dump message on console and log file * RECORDS: Show message after editing recording * MUSIC: remove proxy from playlist building, use proxy only to playing files
Diffstat (limited to 'lib/Tools.pm')
-rw-r--r--lib/Tools.pm43
1 files changed, 42 insertions, 1 deletions
diff --git a/lib/Tools.pm b/lib/Tools.pm
index aac926f..7d89a31 100644
--- a/lib/Tools.pm
+++ b/lib/Tools.pm
@@ -24,7 +24,8 @@ our $DBH = {};
@EXPORT = qw(&datum &stackTrace &lg &event &debug &error &panic &rep2str &dumper
&getFromSocket &fields &load_file &save_file &tableUpdated &buildsearch
&deleteDir &getip &convert &int &entities &reentities &bench &fmttime
- &getDataByTable &getDataById &getDataBySearch &getDataByFields &touch &url);
+ &getDataByTable &getDataById &getDataBySearch &getDataByFields &touch &url
+ &con_err &con_msg);
# ------------------
@@ -169,6 +170,46 @@ sub panic {
}
# ------------------
+sub con_err {
+# ------------------
+ my $console = shift;
+ my $msg = shift;
+
+ if(ref $msg eq 'ARRAY') {
+ $msg = join('\n', @$msg);
+ }
+
+ &_msg(501,$msg, 2);
+
+ if(ref $console) {
+ $console->{call} = 'message'; #reset default widget, avoid own widget
+ $console->err($msg);
+ }
+
+ return undef;
+}
+
+# ------------------
+sub con_msg {
+# ------------------
+ my $console = shift;
+ my $msg = shift;
+
+ if(ref $msg eq 'ARRAY') {
+ $msg = join('\n', @$msg);
+ }
+
+ &_msg(250,$msg, 4);
+
+ if(ref $console) {
+ $console->{call} = 'message'; #reset default widget, avoid own widget
+ $console->msg($msg);
+ }
+
+ return undef;
+}
+
+# ------------------
sub getFromSocket {
# ------------------
my $sock = shift or return undef;