diff options
author | Timo Sirainen <cras@irssi.org> | 2002-12-08 17:43:57 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-12-08 17:43:57 +0000 |
commit | 65eb0d32806026c289fd3c223836ef1bc90ea8f8 (patch) | |
tree | 0109f708fc07adbb60f18f54d1fa2e9625d536f2 /src | |
parent | 3447e0c1b9937fa9728c2b592bb717a23cadd6ee (diff) | |
download | irssi-65eb0d32806026c289fd3c223836ef1bc90ea8f8.zip |
Added Irssi::Script object and "script error" signal.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3050 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rwxr-xr-x | src/perl/get-signals.pl | 3 | ||||
-rw-r--r-- | src/perl/perl-common.c | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/perl/get-signals.pl b/src/perl/get-signals.pl index df4667ce..c61c81cc 100755 --- a/src/perl/get-signals.pl +++ b/src/perl/get-signals.pl @@ -51,6 +51,9 @@ while (<STDIN>) { s/WINDOW_REC[^,]*/Irssi::UI::Window/g; s/WI_ITEM_REC[^,]*/iobject/g; + # perl + s/PERL_SCRIPT_REC[^,]*/Irssi::Script/g; + s/([\w\*:]+)(,|$)/"\1"\2/g; print " { \"$signal\", { $_, NULL } },\n"; } diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c index fb6d3531..cd23afe5 100644 --- a/src/perl/perl-common.c +++ b/src/perl/perl-common.c @@ -40,6 +40,7 @@ #include "queries.h" #include "nicklist.h" +#include "perl-core.h" #include "perl-common.h" typedef struct { @@ -489,6 +490,14 @@ static void perl_reconnect_fill_hash(HV *hv, RECONNECT_REC *reconnect) hv_store(hv, "next_connect", 12, newSViv(reconnect->next_connect), 0); } +static void perl_script_fill_hash(HV *hv, PERL_SCRIPT_REC *script) +{ + hv_store(hv, "name", 4, new_pv(script->name), 0); + hv_store(hv, "package", 7, new_pv(script->package), 0); + hv_store(hv, "path", 4, new_pv(script->path), 0); + hv_store(hv, "data", 4, new_pv(script->data), 0); +} + void perl_command(const char *cmd, SERVER_REC *server, WI_ITEM_REC *item) { const char *cmdchars; @@ -626,6 +635,7 @@ void perl_common_start(void) { "Irssi::Logitem", (PERL_OBJECT_FUNC) perl_log_item_fill_hash }, { "Irssi::Rawlog", (PERL_OBJECT_FUNC) perl_rawlog_fill_hash }, { "Irssi::Reconnect", (PERL_OBJECT_FUNC) perl_reconnect_fill_hash }, + { "Irssi::Script", (PERL_OBJECT_FUNC) perl_script_fill_hash }, { NULL, NULL } }; |