summaryrefslogtreecommitdiff
path: root/src/perl/xs/Irssi-bans.xs
blob: 6d76bb5d826842f03cfc7ce16e78b00f1668fc0c (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
MODULE = Irssi  PACKAGE = Irssi

void
ban_set_type(type)
	char *type

#*******************************
MODULE = Irssi  PACKAGE = Irssi::Channel
#*******************************

char *
ban_get_mask(channel, nick)
	Irssi::Channel channel
	char *nick

void
ban_set(channel, bans)
	Irssi::Channel channel
	char *bans

void
ban_remove(channel, ban)
	Irssi::Channel channel
	char *ban

#*******************************
MODULE = Irssi	PACKAGE = Irssi::Ban
#*******************************

void
values(ban)
	Irssi::Ban ban
PREINIT:
	HV *hv;
PPCODE:
	hv = newHV();
	hv_store(hv, "ban", 3, new_pv(ban->ban), 0);
	hv_store(hv, "setby", 5, new_pv(ban->setby), 0);
	hv_store(hv, "time", 4, newSViv(ban->time), 0);
	XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));