mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 00:52:30 +02:00
.. lots of changes ..
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@197 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
bacfcb060c
commit
d3dc9a1307
106 changed files with 4864 additions and 1597 deletions
|
|
@ -88,8 +88,18 @@ command_bind(cmd, category, func)
|
|||
char *func
|
||||
CODE:
|
||||
char *signal;
|
||||
GSList *tmp;
|
||||
|
||||
command_bind(cmd, *category ? category : "Perl scripts' commands", NULL);
|
||||
/* Don't add the command twice */
|
||||
if (*category == '\0') category = "Perl scripts' commands";
|
||||
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
|
||||
COMMAND_REC *rec = tmp->data;
|
||||
|
||||
if (g_strcasecmp(rec->cmd, cmd) == 0 &&
|
||||
g_strcasecmp(rec->category, category) == 0)
|
||||
break;
|
||||
}
|
||||
if (tmp == NULL) command_bind(cmd, category, NULL);
|
||||
signal = g_strconcat("command ", cmd, NULL);
|
||||
perl_signal_add(signal, func);
|
||||
g_free(signal);
|
||||
|
|
@ -101,7 +111,6 @@ command_unbind(cmd, func)
|
|||
CODE:
|
||||
char *signal;
|
||||
|
||||
command_unbind(cmd, NULL);
|
||||
signal = g_strconcat("command ", cmd, NULL);
|
||||
perl_signal_remove(signal, func);
|
||||
g_free(signal);
|
||||
|
|
|
|||
|
|
@ -22,13 +22,30 @@ void
|
|||
values(netsplit)
|
||||
Irssi::Netsplit netsplit
|
||||
PREINIT:
|
||||
HV *hv;
|
||||
HV *hv, *stash;
|
||||
PPCODE:
|
||||
hv = newHV();
|
||||
hv_store(hv, "nick", 4, new_pv(netsplit->nick), 0);
|
||||
hv_store(hv, "address", 7, new_pv(netsplit->address), 0);
|
||||
hv_store(hv, "server", 6, new_pv(netsplit->server), 0);
|
||||
hv_store(hv, "destserver", 10, new_pv(netsplit->destserver), 0);
|
||||
hv_store(hv, "destroy", 7, newSViv(netsplit->destroy), 0);
|
||||
|
||||
stash = gv_stashpv("Irssi::Netsplitserver", 0);
|
||||
hv_store(hv, "server", 6, sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(netsplit->server))), stash), 0);
|
||||
/*FIXME: add GSList *channels;*/
|
||||
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Netsplitserver
|
||||
#*******************************
|
||||
|
||||
void
|
||||
values(rec)
|
||||
Irssi::Netsplitserver rec
|
||||
PREINIT:
|
||||
HV *hv;
|
||||
PPCODE:
|
||||
hv = newHV();
|
||||
hv_store(hv, "server", 6, new_pv(rec->server), 0);
|
||||
hv_store(hv, "destserver", 10, new_pv(rec->destserver), 0);
|
||||
hv_store(hv, "count", 5, newSViv(rec->count), 0);
|
||||
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ void
|
|||
values(server)
|
||||
Irssi::Server server
|
||||
PREINIT:
|
||||
HV *hv, *stash;
|
||||
HV *hv;
|
||||
char *type;
|
||||
PPCODE:
|
||||
type = "IRC";
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ typedef RECONNECT_REC *Irssi__Reconnect;
|
|||
typedef NICK_REC *Irssi__Nick;
|
||||
typedef BAN_REC *Irssi__Ban;
|
||||
typedef NETSPLIT_REC *Irssi__Netsplit;
|
||||
typedef NETSPLIT_SERVER_REC *Irssi__Netsplitserver;
|
||||
typedef IGNORE_REC *Irssi__Ignore;
|
||||
|
||||
typedef DCC_REC *Irssi__Dcc;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ Irssi::Nick T_PTROBJ
|
|||
Irssi::Ban T_PTROBJ
|
||||
Irssi::Dcc T_PTROBJ
|
||||
Irssi::Netsplit T_PTROBJ
|
||||
Irssi::Netsplitserver T_PTROBJ
|
||||
Irssi::Autoignore T_PTROBJ
|
||||
Irssi::Log T_PTROBJ
|
||||
Irssi::Rawlog T_PTROBJ
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue