summaryrefslogtreecommitdiffstats
path: root/src/perl/irc/Channel.xs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:18:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:18:39 +0000
commitfff5217f02d91268ce90c8c05665602c059faaef (patch)
tree2ba24d32dc96eafe7ed0a85269548e76796d849d /src/perl/irc/Channel.xs
parentInitial commit. (diff)
downloadirssi-fff5217f02d91268ce90c8c05665602c059faaef.tar.xz
irssi-fff5217f02d91268ce90c8c05665602c059faaef.zip
Adding upstream version 1.4.5.upstream/1.4.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/perl/irc/Channel.xs')
-rw-r--r--src/perl/irc/Channel.xs64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/perl/irc/Channel.xs b/src/perl/irc/Channel.xs
new file mode 100644
index 0000000..782fa1d
--- /dev/null
+++ b/src/perl/irc/Channel.xs
@@ -0,0 +1,64 @@
+#define PERL_NO_GET_CONTEXT
+#include "module.h"
+
+MODULE = Irssi::Irc::Channel PACKAGE = Irssi::Irc PREFIX = irc_
+PROTOTYPES: ENABLE
+
+char *
+irc_get_mask(nick, address, flags)
+ char *nick
+ char *address
+ int flags
+
+int
+MASK_NICK()
+CODE:
+ RETVAL = IRC_MASK_NICK;
+OUTPUT:
+ RETVAL
+
+int
+MASK_USER()
+CODE:
+ RETVAL = IRC_MASK_USER;
+OUTPUT:
+ RETVAL
+
+int
+MASK_HOST()
+CODE:
+ RETVAL = IRC_MASK_HOST;
+OUTPUT:
+ RETVAL
+
+int
+MASK_DOMAIN()
+CODE:
+ RETVAL = IRC_MASK_DOMAIN;
+OUTPUT:
+ RETVAL
+
+MODULE = Irssi::Irc::Channel PACKAGE = Irssi::Irc::Channel PREFIX = irc_
+
+void
+bans(channel)
+ Irssi::Irc::Channel channel
+PREINIT:
+ GSList *tmp;
+PPCODE:
+ for (tmp = channel->banlist; tmp != NULL; tmp = tmp->next) {
+ XPUSHs(sv_2mortal(plain_bless(tmp->data, "Irssi::Irc::Ban")));
+ }
+
+Irssi::Irc::Nick
+irc_nick_insert(channel, nick, op, halfop, voice, send_massjoin)
+ Irssi::Irc::Channel channel
+ char *nick
+ int op
+ int halfop
+ int voice
+ int send_massjoin
+CODE:
+ RETVAL = irc_nicklist_insert(channel, nick, op, halfop, voice, send_massjoin, NULL);
+OUTPUT:
+ RETVAL