1
0
mirror of https://github.com/irssi/irssi.git synced 2025-01-03 14:56:47 -05:00
irssi/src/perl/common/Channel.xs
Timo Sirainen 5dcd683324 fixes, perl should work correctly now :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@982 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-12-09 20:54:47 +00:00

116 lines
2.2 KiB
Plaintext

MODULE = Irssi PACKAGE = Irssi
void
channels()
PREINIT:
GSList *tmp;
PPCODE:
for (tmp = channels; tmp != NULL; tmp = tmp->next) {
XPUSHs(sv_2mortal(irssi_bless((CHANNEL_REC *) tmp->data)));
}
Irssi::Channel
channel_find(channel)
char *channel
CODE:
RETVAL = channel_find(NULL, channel);
OUTPUT:
RETVAL
#*******************************
MODULE = Irssi PACKAGE = Irssi::Server
#*******************************
void
channels(server)
Irssi::Server server
PREINIT:
GSList *tmp;
PPCODE:
for (tmp = server->channels; tmp != NULL; tmp = tmp->next) {
XPUSHs(sv_2mortal(irssi_bless((CHANNEL_REC *) tmp->data)));
}
Irssi::Channel
channel_create(chat_type, server, name, automatic)
int chat_type
Irssi::Server server
char *name
int automatic
Irssi::Channel
channel_find(server, name)
Irssi::Server server
char *name
void
nicklist_get_same(server, nick)
Irssi::Server server
char *nick
PREINIT:
GSList *list, *tmp;
PPCODE:
list = nicklist_get_same(server, nick);
for (tmp = list; tmp != NULL; tmp = tmp->next->next) {
XPUSHs(sv_2mortal(irssi_bless((CHANNEL_REC *) tmp->data)));
XPUSHs(sv_2mortal(irssi_bless((NICK_REC *) tmp->next->data)));
}
g_slist_free(list);
#*******************************
MODULE = Irssi PACKAGE = Irssi::Channel PREFIX = channel_
#*******************************
void
channel_destroy(channel)
Irssi::Channel channel
void
command(channel, cmd)
Irssi::Channel channel
char *cmd
CODE:
signal_emit("send command", 3, cmd, channel->server, channel);
Irssi::Nick
nick_insert(channel, nick, op, voice, send_massjoin)
Irssi::Channel channel
char *nick
int op
int voice
int send_massjoin
CODE:
RETVAL = nicklist_insert(channel, nick, op, voice, send_massjoin);
OUTPUT:
RETVAL
void
nick_remove(channel, nick)
Irssi::Channel channel
Irssi::Nick nick
CODE:
nicklist_remove(channel, nick);
Irssi::Nick
nick_find(channel, mask)
Irssi::Channel channel
char *mask
CODE:
RETVAL = nicklist_find(channel, mask);
OUTPUT:
RETVAL
void
nicks(channel)
Irssi::Channel channel
PREINIT:
GSList *list, *tmp;
PPCODE:
list = nicklist_getnicks(channel);
for (tmp = list; tmp != NULL; tmp = tmp->next) {
XPUSHs(sv_2mortal(irssi_bless((NICK_REC *) tmp->data)));
}
g_slist_free(list);