summaryrefslogtreecommitdiff
path: root/src/perl/irc/IrcChannel.xs
blob: 7d2b1092fc66c68baf18b14789661bb0071fbd69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
MODULE = Irssi::Irc	PACKAGE = Irssi::Irc::Channel  PREFIX = irc_channel_

void
bans(channel)
	Irssi::Irc::Channel channel
PREINIT:
	GSList *tmp;
	HV *stash;
PPCODE:
	stash = gv_stashpv("Irssi::Irc::Ban", 0);
	for (tmp = channel->banlist; tmp != NULL; tmp = tmp->next) {
		XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(tmp->data))), stash)));
	}

void
ebans(channel)
	Irssi::Irc::Channel channel
PREINIT:
	GSList *tmp;
	HV *stash;
PPCODE:
	stash = gv_stashpv("Irssi::Irc::Ban", 0);
	for (tmp = channel->ebanlist; tmp != NULL; tmp = tmp->next) {
		XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(tmp->data))), stash)));
	}

void
invites(channel)
	Irssi::Irc::Channel channel
PREINIT:
	GSList *tmp;
	HV *stash;
PPCODE:
	for (tmp = channel->invitelist; tmp != NULL; tmp = tmp->next) {
		XPUSHs(new_pv(tmp->data));
	}

MODULE = Irssi::Irc	PACKAGE = Irssi::Irc::Server  PREFIX = irc_

Irssi::Irc::Channel
irc_channel_create(server, name, automatic)
	Irssi::Irc::Server server
	char *name
	int automatic