diff options
author | Timo Sirainen <cras@irssi.org> | 2000-04-28 08:07:42 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-04-28 08:07:42 +0000 |
commit | a5a66264de2f56c5b1ba00e0228eae61f70d5689 (patch) | |
tree | 981b0663ff753f754cd0204b742ea12bff0d5e56 /src/perl/xs/Irssi-ignore.xs | |
parent | 9cbf26d5199bdd1f3bd29fb27f181af4b94de02e (diff) | |
download | irssi-a5a66264de2f56c5b1ba00e0228eae61f70d5689.zip |
Perl working again, better than ever (unless there's bugs :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@191 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/xs/Irssi-ignore.xs')
-rw-r--r-- | src/perl/xs/Irssi-ignore.xs | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/perl/xs/Irssi-ignore.xs b/src/perl/xs/Irssi-ignore.xs new file mode 100644 index 00000000..643198f3 --- /dev/null +++ b/src/perl/xs/Irssi-ignore.xs @@ -0,0 +1,74 @@ +MODULE = Irssi PACKAGE = Irssi + +void +ignores() +PREINIT: + GSList *tmp; + HV *stash; +PPCODE: + stash = gv_stashpv("Irssi::Ignore", 0); + for (tmp = servers; tmp != NULL; tmp = tmp->next) { + XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(tmp->data))), stash))); + } + +int +ignore_check(nick, host, channel, text, level) + char *nick + char *host + char *channel + char *text + int level +CODE: + RETVAL = ignore_check(NULL, nick, host, channel, text, level); +OUTPUT: + RETVAL + +#******************************* +MODULE = Irssi PACKAGE = Irssi::Server +#******************************* + +int +ignore_check(server, nick, host, channel, text, level) + Irssi::Server server + char *nick + char *host + char *channel + char *text + int level + +#******************************* +MODULE = Irssi PACKAGE = Irssi::Ignore PREFIX = ignore_ +#******************************* + +void +values(ignore) + Irssi::Ignore ignore +PREINIT: + HV *hv; + AV *av; + char **tmp; +PPCODE: + hv = newHV(); + hv_store(hv, "mask", 4, new_pv(ignore->mask), 0); + hv_store(hv, "servertag", 9, new_pv(ignore->servertag), 0); + av = newAV(); + for (tmp = ignore->channels; *tmp != NULL; tmp++) { + av_push(av, new_pv(*tmp)); + } + hv_store(hv, "channels", 8, newRV_noinc((SV*)av), 0); + hv_store(hv, "pattern", 7, new_pv(ignore->pattern), 0); + + hv_store(hv, "level", 5, newSViv(ignore->level), 0); + hv_store(hv, "except_level", 12, newSViv(ignore->except_level), 0); + + hv_store(hv, "regexp", 6, newSViv(ignore->regexp), 0); + hv_store(hv, "fullword", 8, newSViv(ignore->fullword), 0); + XPUSHs(sv_2mortal(newRV_noinc((SV*)hv))); + +void +ignore_add_rec(rec) + Irssi::Ignore rec + +void +ignore_update_rec(rec) + Irssi::Ignore rec |