mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 23:52:22 +02:00
perl changes - values() method doesn't exist anymore, instead of
$server->values()->{...} you now use directly $server->{...}
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@972 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
a99e93ef5d
commit
e95f309b50
22 changed files with 412 additions and 326 deletions
|
|
@ -6,12 +6,17 @@ PREINIT:
|
|||
GSList *tmp;
|
||||
PPCODE:
|
||||
for (tmp = channels; tmp != NULL; tmp = tmp->next) {
|
||||
CHANNEL_REC *rec = tmp->data;
|
||||
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(rec))),
|
||||
irssi_get_stash(rec))));
|
||||
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
|
||||
#*******************************
|
||||
|
|
@ -23,10 +28,7 @@ PREINIT:
|
|||
GSList *tmp;
|
||||
PPCODE:
|
||||
for (tmp = server->channels; tmp != NULL; tmp = tmp->next) {
|
||||
CHANNEL_REC *rec = tmp->data;
|
||||
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(rec))),
|
||||
irssi_get_stash(rec))));
|
||||
XPUSHs(sv_2mortal(irssi_bless((CHANNEL_REC *) tmp->data)));
|
||||
}
|
||||
|
||||
Irssi::Channel
|
||||
|
|
@ -47,17 +49,12 @@ nicklist_get_same(server, nick)
|
|||
char *nick
|
||||
PREINIT:
|
||||
GSList *list, *tmp;
|
||||
HV *nickstash;
|
||||
PPCODE:
|
||||
list = nicklist_get_same(server, nick);
|
||||
|
||||
nickstash = gv_stashpv("Irssi::Nick", 0);
|
||||
for (tmp = list; tmp != NULL; tmp = tmp->next->next) {
|
||||
CHANNEL_REC *channel = tmp->data;
|
||||
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(channel))),
|
||||
irssi_get_stash(channel))));
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(tmp->next->data))), nickstash)));
|
||||
XPUSHs(sv_2mortal(irssi_bless((CHANNEL_REC *) tmp->data)));
|
||||
XPUSHs(sv_2mortal(irssi_bless((NICK_REC *) tmp->next->data)));
|
||||
}
|
||||
g_slist_free(list);
|
||||
|
||||
|
|
@ -66,27 +63,15 @@ MODULE = Irssi PACKAGE = Irssi::Channel PREFIX = channel_
|
|||
#*******************************
|
||||
|
||||
void
|
||||
values(channel)
|
||||
init(channel)
|
||||
Irssi::Channel channel
|
||||
PREINIT:
|
||||
HV *hv;
|
||||
PPCODE:
|
||||
hv = newHV();
|
||||
perl_channel_fill_hash(hv, channel);
|
||||
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
|
||||
CODE:
|
||||
perl_channel_fill_hash(hvref(ST(0)), channel);
|
||||
|
||||
void
|
||||
channel_destroy(channel)
|
||||
Irssi::Channel channel
|
||||
|
||||
Irssi::Channel
|
||||
channel_find(channel)
|
||||
char *channel
|
||||
CODE:
|
||||
RETVAL = channel_find(NULL, channel);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
command(channel, cmd)
|
||||
Irssi::Channel channel
|
||||
|
|
@ -95,35 +80,43 @@ CODE:
|
|||
signal_emit("send command", 3, cmd, channel->server, channel);
|
||||
|
||||
Irssi::Nick
|
||||
nicklist_insert(channel, nick, op, voice, send_massjoin)
|
||||
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
|
||||
nicklist_remove(channel, nick)
|
||||
nick_remove(channel, nick)
|
||||
Irssi::Channel channel
|
||||
Irssi::Nick nick
|
||||
CODE:
|
||||
nicklist_remove(channel, nick);
|
||||
|
||||
Irssi::Nick
|
||||
nicklist_find(channel, mask)
|
||||
nick_find(channel, mask)
|
||||
Irssi::Channel channel
|
||||
char *mask
|
||||
CODE:
|
||||
RETVAL = nicklist_find(channel, mask);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
nicklist_getnicks(channel)
|
||||
nicks(channel)
|
||||
Irssi::Channel channel
|
||||
PREINIT:
|
||||
GSList *list, *tmp;
|
||||
HV *stash;
|
||||
PPCODE:
|
||||
list = nicklist_getnicks(channel);
|
||||
|
||||
stash = gv_stashpv("Irssi::Nick", 0);
|
||||
for (tmp = list; tmp != NULL; tmp = tmp->next) {
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(tmp->data))), stash)));
|
||||
XPUSHs(sv_2mortal(irssi_bless((NICK_REC *) tmp->data)));
|
||||
}
|
||||
g_slist_free(list);
|
||||
|
||||
|
|
@ -132,25 +125,8 @@ MODULE = Irssi PACKAGE = Irssi::Nick
|
|||
#*******************************
|
||||
|
||||
void
|
||||
values(nick)
|
||||
init(nick)
|
||||
Irssi::Nick nick
|
||||
PREINIT:
|
||||
HV *hv;
|
||||
PPCODE:
|
||||
hv = newHV();
|
||||
hv_store(hv, "last_check", 10, newSViv(nick->last_check), 0);
|
||||
|
||||
hv_store(hv, "nick", 4, new_pv(nick->nick), 0);
|
||||
hv_store(hv, "host", 4, new_pv(nick->host), 0);
|
||||
hv_store(hv, "realname", 8, new_pv(nick->realname), 0);
|
||||
hv_store(hv, "hops", 4, newSViv(nick->hops), 0);
|
||||
|
||||
hv_store(hv, "gone", 4, newSViv(nick->gone), 0);
|
||||
hv_store(hv, "serverop", 8, newSViv(nick->serverop), 0);
|
||||
|
||||
hv_store(hv, "send_massjoin", 13, newSViv(nick->send_massjoin), 0);
|
||||
hv_store(hv, "op", 2, newSViv(nick->op), 0);
|
||||
hv_store(hv, "halfop", 6, newSViv(nick->halfop), 0);
|
||||
hv_store(hv, "voice", 5, newSViv(nick->voice), 0);
|
||||
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
|
||||
CODE:
|
||||
perl_nick_fill_hash(hvref(ST(0)), nick);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue