mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Perl updates. Lots of updates to perl documentation :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1081 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
d108026a37
commit
341cd55587
987
docs/perl.txt
987
docs/perl.txt
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,14 @@ CODE:
|
|||||||
OUTPUT:
|
OUTPUT:
|
||||||
RETVAL
|
RETVAL
|
||||||
|
|
||||||
|
Irssi::Channel
|
||||||
|
channel_create(chat_type, name, automatic)
|
||||||
|
int chat_type
|
||||||
|
char *name
|
||||||
|
int automatic
|
||||||
|
CODE:
|
||||||
|
channel_create(chat_type, NULL, name, automatic);
|
||||||
|
|
||||||
#*******************************
|
#*******************************
|
||||||
MODULE = Irssi PACKAGE = Irssi::Server
|
MODULE = Irssi PACKAGE = Irssi::Server
|
||||||
#*******************************
|
#*******************************
|
||||||
@ -31,12 +39,21 @@ PPCODE:
|
|||||||
XPUSHs(sv_2mortal(irssi_bless((CHANNEL_REC *) tmp->data)));
|
XPUSHs(sv_2mortal(irssi_bless((CHANNEL_REC *) tmp->data)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
channels_join(server, channels, automatic)
|
||||||
|
Irssi::Server server
|
||||||
|
char *channels
|
||||||
|
int automatic
|
||||||
|
CODE:
|
||||||
|
server->channels_join(server, channels, automatic);
|
||||||
|
|
||||||
Irssi::Channel
|
Irssi::Channel
|
||||||
channel_create(chat_type, server, name, automatic)
|
channel_create(server, name, automatic)
|
||||||
int chat_type
|
|
||||||
Irssi::Server server
|
Irssi::Server server
|
||||||
char *name
|
char *name
|
||||||
int automatic
|
int automatic
|
||||||
|
CODE:
|
||||||
|
channel_create(server->chat_type, server, name, automatic);
|
||||||
|
|
||||||
Irssi::Channel
|
Irssi::Channel
|
||||||
channel_find(server, name)
|
channel_find(server, name)
|
||||||
@ -44,7 +61,7 @@ channel_find(server, name)
|
|||||||
char *name
|
char *name
|
||||||
|
|
||||||
void
|
void
|
||||||
nicklist_get_same(server, nick)
|
nicks_get_same(server, nick)
|
||||||
Irssi::Server server
|
Irssi::Server server
|
||||||
char *nick
|
char *nick
|
||||||
PREINIT:
|
PREINIT:
|
||||||
|
@ -318,12 +318,11 @@ PPCODE:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
command_bind(cmd, category, func)
|
command_bind(cmd, func, category = "Perl scripts' commands")
|
||||||
char *cmd
|
char *cmd
|
||||||
char *category
|
char *category
|
||||||
char *func
|
char *func
|
||||||
CODE:
|
CODE:
|
||||||
if (*category == '\0') category = "Perl scripts' commands";
|
|
||||||
perl_command_bind(cmd, category, func);
|
perl_command_bind(cmd, category, func);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -13,7 +13,15 @@ require Exporter;
|
|||||||
require DynaLoader;
|
require DynaLoader;
|
||||||
|
|
||||||
@ISA = qw(Exporter DynaLoader);
|
@ISA = qw(Exporter DynaLoader);
|
||||||
@EXPORT = qw(INPUT_READ INPUT_WRITE);
|
@EXPORT = qw(INPUT_READ INPUT_WRITE
|
||||||
|
MSGLEVEL_CRAP MSGLEVEL_MSGS MSGLEVEL_PUBLIC MSGLEVEL_NOTICES
|
||||||
|
MSGLEVEL_SNOTES MSGLEVEL_CTCPS MSGLEVEL_ACTIONS MSGLEVEL_JOINS
|
||||||
|
MSGLEVEL_PARTS MSGLEVEL_QUITS MSGLEVEL_KICKS MSGLEVEL_MODES
|
||||||
|
MSGLEVEL_TOPICS MSGLEVEL_WALLOPS MSGLEVEL_INVITES MSGLEVEL_NICKS
|
||||||
|
MSGLEVEL_DCC MSGLEVEL_DCCMSGS MSGLEVEL_CLIENTNOTICE MSGLEVEL_CLIENTCRAP
|
||||||
|
MSGLEVEL_CLIENTERROR MSGLEVEL_HILIGHT MSGLEVEL_ALL MSGLEVEL_NOHILIGHT
|
||||||
|
MSGLEVEL_NO_ACT MSGLEVEL_NEVER MSGLEVEL_LASTLOG
|
||||||
|
);
|
||||||
@EXPORT_OK = qw();
|
@EXPORT_OK = qw();
|
||||||
|
|
||||||
bootstrap Irssi $VERSION;
|
bootstrap Irssi $VERSION;
|
||||||
|
@ -34,9 +34,9 @@ log_item_add(log, type, name, server)
|
|||||||
void
|
void
|
||||||
log_item_destroy(log, item)
|
log_item_destroy(log, item)
|
||||||
Irssi::Log log
|
Irssi::Log log
|
||||||
Irssi::LogItem item
|
Irssi::Logitem item
|
||||||
|
|
||||||
Irssi::LogItem
|
Irssi::Logitem
|
||||||
log_item_find(log, type, item, server)
|
log_item_find(log, type, item, server)
|
||||||
Irssi::Log log
|
Irssi::Log log
|
||||||
int type
|
int type
|
||||||
|
@ -11,6 +11,21 @@ PPCODE:
|
|||||||
XPUSHs(sv_2mortal(irssi_bless(rec)));
|
XPUSHs(sv_2mortal(irssi_bless(rec)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Irssi::Query
|
||||||
|
query_create(chat_type, server_tag, nick, automatic)
|
||||||
|
int chat_type
|
||||||
|
char *server_tag
|
||||||
|
char *nick
|
||||||
|
int automatic
|
||||||
|
|
||||||
|
Irssi::Query
|
||||||
|
query_find(nick)
|
||||||
|
char *nick
|
||||||
|
CODE:
|
||||||
|
RETVAL = query_find(NULL, nick);
|
||||||
|
OUTPUT:
|
||||||
|
RETVAL
|
||||||
|
|
||||||
#*******************************
|
#*******************************
|
||||||
MODULE = Irssi PACKAGE = Irssi::Server
|
MODULE = Irssi PACKAGE = Irssi::Server
|
||||||
#*******************************
|
#*******************************
|
||||||
@ -27,13 +42,6 @@ PPCODE:
|
|||||||
XPUSHs(sv_2mortal(irssi_bless(rec)));
|
XPUSHs(sv_2mortal(irssi_bless(rec)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Irssi::Query
|
|
||||||
query_create(chat_type, server_tag, nick, automatic)
|
|
||||||
int chat_type
|
|
||||||
char *server_tag
|
|
||||||
char *nick
|
|
||||||
int automatic
|
|
||||||
|
|
||||||
Irssi::Query
|
Irssi::Query
|
||||||
query_find(server, nick)
|
query_find(server, nick)
|
||||||
Irssi::Server server
|
Irssi::Server server
|
||||||
|
@ -7,26 +7,6 @@ rawlog_set_size(lines)
|
|||||||
Irssi::Rawlog
|
Irssi::Rawlog
|
||||||
rawlog_create()
|
rawlog_create()
|
||||||
|
|
||||||
#*******************************
|
|
||||||
MODULE = Irssi PACKAGE = Irssi::Server
|
|
||||||
#*******************************
|
|
||||||
|
|
||||||
void
|
|
||||||
rawlog_input(rawlog, str)
|
|
||||||
Irssi::Rawlog rawlog
|
|
||||||
char *str
|
|
||||||
|
|
||||||
void
|
|
||||||
rawlog_output(rawlog, str)
|
|
||||||
Irssi::Rawlog rawlog
|
|
||||||
char *str
|
|
||||||
|
|
||||||
void
|
|
||||||
rawlog_redirect(rawlog, str)
|
|
||||||
Irssi::Rawlog rawlog
|
|
||||||
char *str
|
|
||||||
|
|
||||||
|
|
||||||
#*******************************
|
#*******************************
|
||||||
MODULE = Irssi PACKAGE = Irssi::Rawlog PREFIX = rawlog_
|
MODULE = Irssi PACKAGE = Irssi::Rawlog PREFIX = rawlog_
|
||||||
#*******************************
|
#*******************************
|
||||||
|
@ -88,14 +88,6 @@ CODE:
|
|||||||
(char *) SvPV(ST(n), n_a), (char *) SvPV(ST(n+1), n_a), (int) SvIV(ST(n+2)));
|
(char *) SvPV(ST(n), n_a), (char *) SvPV(ST(n+1), n_a), (int) SvIV(ST(n+2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
channels_join(server, data, automatic)
|
|
||||||
Irssi::Server server
|
|
||||||
char *data
|
|
||||||
int automatic
|
|
||||||
CODE:
|
|
||||||
server->channels_join(server, data, automatic);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
isnickflag(server, flag)
|
isnickflag(server, flag)
|
||||||
Irssi::Server server
|
Irssi::Server server
|
||||||
|
@ -50,24 +50,6 @@ CODE:
|
|||||||
|
|
||||||
printformat_perl(&dest, format, arglist);
|
printformat_perl(&dest, format, arglist);
|
||||||
|
|
||||||
void
|
|
||||||
printformat_window(window, level, format, ...)
|
|
||||||
Irssi::Window window
|
|
||||||
int level
|
|
||||||
char *format
|
|
||||||
PREINIT:
|
|
||||||
TEXT_DEST_REC dest;
|
|
||||||
char *arglist[MAX_FORMAT_PARAMS];
|
|
||||||
int n;
|
|
||||||
CODE:
|
|
||||||
format_create_dest(&dest, NULL, NULL, level, window);
|
|
||||||
memset(arglist, 0, sizeof(arglist));
|
|
||||||
for (n = 3; n < 3+MAX_FORMAT_PARAMS; n++) {
|
|
||||||
arglist[n-3] = n < items ? SvPV(ST(n), PL_na) : "";
|
|
||||||
}
|
|
||||||
|
|
||||||
printformat_perl(&dest, format, arglist);
|
|
||||||
|
|
||||||
#*******************************
|
#*******************************
|
||||||
MODULE = Irssi PACKAGE = Irssi::Server
|
MODULE = Irssi PACKAGE = Irssi::Server
|
||||||
#*******************************
|
#*******************************
|
||||||
@ -91,6 +73,28 @@ CODE:
|
|||||||
|
|
||||||
printformat_perl(&dest, format, arglist);
|
printformat_perl(&dest, format, arglist);
|
||||||
|
|
||||||
|
#*******************************
|
||||||
|
MODULE = Irssi PACKAGE = Irssi::Window
|
||||||
|
#*******************************
|
||||||
|
|
||||||
|
void
|
||||||
|
printformat(window, level, format, ...)
|
||||||
|
Irssi::Window window
|
||||||
|
int level
|
||||||
|
char *format
|
||||||
|
PREINIT:
|
||||||
|
TEXT_DEST_REC dest;
|
||||||
|
char *arglist[MAX_FORMAT_PARAMS];
|
||||||
|
int n;
|
||||||
|
CODE:
|
||||||
|
format_create_dest(&dest, NULL, NULL, level, window);
|
||||||
|
memset(arglist, 0, sizeof(arglist));
|
||||||
|
for (n = 3; n < 3+MAX_FORMAT_PARAMS; n++) {
|
||||||
|
arglist[n-3] = n < items ? SvPV(ST(n), PL_na) : "";
|
||||||
|
}
|
||||||
|
|
||||||
|
printformat_perl(&dest, format, arglist);
|
||||||
|
|
||||||
#*******************************
|
#*******************************
|
||||||
MODULE = Irssi PACKAGE = Irssi::Windowitem
|
MODULE = Irssi PACKAGE = Irssi::Windowitem
|
||||||
#*******************************
|
#*******************************
|
||||||
|
@ -34,19 +34,10 @@ CODE:
|
|||||||
printtext_string(NULL, NULL, level, str);
|
printtext_string(NULL, NULL, level, str);
|
||||||
|
|
||||||
void
|
void
|
||||||
print_window(str, level=MSGLEVEL_CLIENTNOTICE)
|
command(cmd)
|
||||||
char *str
|
|
||||||
int level;
|
|
||||||
CODE:
|
|
||||||
printtext_window(active_win, level, str);
|
|
||||||
|
|
||||||
void
|
|
||||||
command(cmd, server=active_win->active_server, item=active_win->active)
|
|
||||||
char *cmd
|
char *cmd
|
||||||
Irssi::Server server
|
|
||||||
Irssi::Windowitem item
|
|
||||||
CODE:
|
CODE:
|
||||||
perl_command(cmd, server, item);
|
perl_command(cmd, active_win->active_server, active_win->active);
|
||||||
|
|
||||||
Irssi::Window
|
Irssi::Window
|
||||||
window_find_name(name)
|
window_find_name(name)
|
||||||
@ -77,6 +68,14 @@ CODE:
|
|||||||
OUTPUT:
|
OUTPUT:
|
||||||
RETVAL
|
RETVAL
|
||||||
|
|
||||||
|
Irssi::Window
|
||||||
|
window_find_item(name)
|
||||||
|
char *name
|
||||||
|
CODE:
|
||||||
|
RETVAL = window_find_item(NULL, name);
|
||||||
|
OUTPUT:
|
||||||
|
RETVAL
|
||||||
|
|
||||||
Irssi::Window
|
Irssi::Window
|
||||||
window_find_closest(name, level)
|
window_find_closest(name, level)
|
||||||
char *name
|
char *name
|
||||||
@ -86,20 +85,25 @@ CODE:
|
|||||||
OUTPUT:
|
OUTPUT:
|
||||||
RETVAL
|
RETVAL
|
||||||
|
|
||||||
|
Irssi::Windowitem
|
||||||
|
window_item_find(name)
|
||||||
|
char *name
|
||||||
|
CODE:
|
||||||
|
RETVAL = window_item_find(NULL, name);
|
||||||
|
OUTPUT:
|
||||||
|
RETVAL
|
||||||
|
|
||||||
|
|
||||||
#*******************************
|
#*******************************
|
||||||
MODULE = Irssi PACKAGE = Irssi::Server
|
MODULE = Irssi PACKAGE = Irssi::Server
|
||||||
#*******************************
|
#*******************************
|
||||||
|
|
||||||
void
|
void
|
||||||
command(server, cmd, item=active_win->active)
|
command(server, cmd)
|
||||||
Irssi::Server server
|
Irssi::Server server
|
||||||
char *cmd
|
char *cmd
|
||||||
Irssi::Windowitem item
|
|
||||||
CODE:
|
CODE:
|
||||||
if (item != NULL && item->server != SERVER(server))
|
perl_command(cmd, server, active_win->active);
|
||||||
item = NULL;
|
|
||||||
perl_command(cmd, server, item);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
print(server, channel, str, level)
|
print(server, channel, str, level)
|
||||||
@ -107,18 +111,19 @@ print(server, channel, str, level)
|
|||||||
char *channel
|
char *channel
|
||||||
char *str
|
char *str
|
||||||
int level
|
int level
|
||||||
PREINIT:
|
|
||||||
char *fixed;
|
|
||||||
CODE:
|
CODE:
|
||||||
fixed = perl_fix_formats(str);
|
printtext_string(server, channel, level, str);
|
||||||
printtext(server, channel, level, fixed);
|
|
||||||
g_free(fixed);
|
|
||||||
|
|
||||||
Irssi::Windowitem
|
Irssi::Windowitem
|
||||||
window_item_find(server, name)
|
window_item_find(server, name)
|
||||||
Irssi::Server server
|
Irssi::Server server
|
||||||
char *name
|
char *name
|
||||||
|
|
||||||
|
Irssi::Window
|
||||||
|
window_find_item(server, name)
|
||||||
|
Irssi::Server server
|
||||||
|
char *name
|
||||||
|
|
||||||
Irssi::Window
|
Irssi::Window
|
||||||
window_find_level(server, level)
|
window_find_level(server, level)
|
||||||
Irssi::Server server
|
Irssi::Server server
|
||||||
@ -148,13 +153,19 @@ PPCODE:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
command(window, cmd, server=window->active_server, item=window->active)
|
print(window, str, level=MSGLEVEL_CLIENTNOTICE)
|
||||||
|
Irssi::Window window
|
||||||
|
char *str
|
||||||
|
int level;
|
||||||
|
CODE:
|
||||||
|
printtext_window(window, level, str);
|
||||||
|
|
||||||
|
void
|
||||||
|
command(window, cmd)
|
||||||
Irssi::Window window
|
Irssi::Window window
|
||||||
char *cmd
|
char *cmd
|
||||||
Irssi::Server server
|
|
||||||
Irssi::Windowitem item
|
|
||||||
CODE:
|
CODE:
|
||||||
perl_command(cmd, server, item);
|
perl_command(cmd, window->active_server, window->active);
|
||||||
|
|
||||||
void
|
void
|
||||||
window_item_add(window, item, automatic)
|
window_item_add(window, item, automatic)
|
||||||
@ -163,18 +174,11 @@ window_item_add(window, item, automatic)
|
|||||||
int automatic
|
int automatic
|
||||||
|
|
||||||
void
|
void
|
||||||
window_item_remove(window, item)
|
window_item_remove(item)
|
||||||
Irssi::Window window
|
|
||||||
Irssi::Windowitem item
|
Irssi::Windowitem item
|
||||||
|
|
||||||
void
|
void
|
||||||
window_item_destroy(window, item)
|
window_item_destroy(item)
|
||||||
Irssi::Window window
|
|
||||||
Irssi::Windowitem item
|
|
||||||
|
|
||||||
void
|
|
||||||
window_item_set_active(window, item)
|
|
||||||
Irssi::Window window
|
|
||||||
Irssi::Windowitem item
|
Irssi::Windowitem item
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -217,11 +221,6 @@ char *
|
|||||||
window_get_active_name(window)
|
window_get_active_name(window)
|
||||||
Irssi::Window window
|
Irssi::Window window
|
||||||
|
|
||||||
Irssi::Window
|
|
||||||
window_find_item(server, name)
|
|
||||||
Irssi::Server server
|
|
||||||
char *name
|
|
||||||
|
|
||||||
Irssi::Windowitem
|
Irssi::Windowitem
|
||||||
window_item_find(window, server, name)
|
window_item_find(window, server, name)
|
||||||
Irssi::Window window
|
Irssi::Window window
|
||||||
@ -233,9 +232,17 @@ OUTPUT:
|
|||||||
RETVAL
|
RETVAL
|
||||||
|
|
||||||
#*******************************
|
#*******************************
|
||||||
MODULE = Irssi PACKAGE = Irssi::Windowitem
|
MODULE = Irssi PACKAGE = Irssi::Windowitem PREFIX = window_item_
|
||||||
#*******************************
|
#*******************************
|
||||||
|
|
||||||
|
void
|
||||||
|
print(item, str, level=MSGLEVEL_CLIENTNOTICE)
|
||||||
|
Irssi::Windowitem item
|
||||||
|
int level
|
||||||
|
char *str
|
||||||
|
CODE:
|
||||||
|
printtext_string(item->server, item->name, level, str);
|
||||||
|
|
||||||
void
|
void
|
||||||
command(item, cmd)
|
command(item, cmd)
|
||||||
Irssi::Windowitem item
|
Irssi::Windowitem item
|
||||||
@ -248,11 +255,6 @@ window_create(item, automatic)
|
|||||||
Irssi::Windowitem item
|
Irssi::Windowitem item
|
||||||
int automatic
|
int automatic
|
||||||
|
|
||||||
void
|
|
||||||
window_item_create(item, automatic)
|
|
||||||
Irssi::Windowitem item
|
|
||||||
int automatic
|
|
||||||
|
|
||||||
Irssi::Window
|
Irssi::Window
|
||||||
window(item)
|
window(item)
|
||||||
Irssi::Windowitem item
|
Irssi::Windowitem item
|
||||||
@ -270,19 +272,8 @@ int
|
|||||||
window_item_is_active(item)
|
window_item_is_active(item)
|
||||||
Irssi::Windowitem item
|
Irssi::Windowitem item
|
||||||
|
|
||||||
|
|
||||||
#*******************************
|
|
||||||
MODULE = Irssi PACKAGE = Irssi::Windowitem
|
|
||||||
#*******************************
|
|
||||||
|
|
||||||
void
|
void
|
||||||
print(item, str, level=MSGLEVEL_CLIENTNOTICE)
|
window_item_set_active(item)
|
||||||
Irssi::Windowitem item
|
Irssi::Windowitem item
|
||||||
int level
|
|
||||||
char *str
|
|
||||||
PREINIT:
|
|
||||||
char *fixed;
|
|
||||||
CODE:
|
CODE:
|
||||||
fixed = perl_fix_formats(str);
|
window_item_set_active(window_item_window(item), item);
|
||||||
printtext(item->server, item->name, level, fixed);
|
|
||||||
g_free(fixed);
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
typedef COMMAND_REC *Irssi__Command;
|
typedef COMMAND_REC *Irssi__Command;
|
||||||
typedef LOG_REC *Irssi__Log;
|
typedef LOG_REC *Irssi__Log;
|
||||||
typedef LOG_ITEM_REC *Irssi__LogItem;
|
typedef LOG_ITEM_REC *Irssi__Logitem;
|
||||||
typedef RAWLOG_REC *Irssi__Rawlog;
|
typedef RAWLOG_REC *Irssi__Rawlog;
|
||||||
typedef IGNORE_REC *Irssi__Ignore;
|
typedef IGNORE_REC *Irssi__Ignore;
|
||||||
typedef MODULE_REC *Irssi__Module;
|
typedef MODULE_REC *Irssi__Module;
|
||||||
|
@ -9,7 +9,7 @@ Irssi::Command T_PlainObj
|
|||||||
Irssi::Nick T_IrssiObj
|
Irssi::Nick T_IrssiObj
|
||||||
Irssi::Ignore T_PlainObj
|
Irssi::Ignore T_PlainObj
|
||||||
Irssi::Log T_PlainObj
|
Irssi::Log T_PlainObj
|
||||||
Irssi::LogItem T_PlainObj
|
Irssi::Logitem T_PlainObj
|
||||||
Irssi::Rawlog T_PlainObj
|
Irssi::Rawlog T_PlainObj
|
||||||
Irssi::Module T_PlainObj
|
Irssi::Module T_PlainObj
|
||||||
Irssi::Theme T_PlainObj
|
Irssi::Theme T_PlainObj
|
||||||
|
@ -188,7 +188,7 @@ void perl_connect_fill_hash(HV *hv, SERVER_CONNECT_REC *conn)
|
|||||||
|
|
||||||
void perl_server_fill_hash(HV *hv, SERVER_REC *server)
|
void perl_server_fill_hash(HV *hv, SERVER_REC *server)
|
||||||
{
|
{
|
||||||
char *type, *chat_type;
|
char *type;
|
||||||
HV *stash;
|
HV *stash;
|
||||||
|
|
||||||
g_return_if_fail(hv != NULL);
|
g_return_if_fail(hv != NULL);
|
||||||
@ -197,10 +197,7 @@ void perl_server_fill_hash(HV *hv, SERVER_REC *server)
|
|||||||
perl_connect_fill_hash(hv, server->connrec);
|
perl_connect_fill_hash(hv, server->connrec);
|
||||||
|
|
||||||
type = "SERVER";
|
type = "SERVER";
|
||||||
chat_type = (char *) chat_protocol_find_id(server->chat_type)->name;
|
|
||||||
|
|
||||||
hv_store(hv, "type", 4, new_pv(type), 0);
|
hv_store(hv, "type", 4, new_pv(type), 0);
|
||||||
hv_store(hv, "chat_type", 9, new_pv(chat_type), 0);
|
|
||||||
|
|
||||||
hv_store(hv, "connect_time", 12, newSViv(server->connect_time), 0);
|
hv_store(hv, "connect_time", 12, newSViv(server->connect_time), 0);
|
||||||
hv_store(hv, "real_connect_time", 17, newSViv(server->real_connect_time), 0);
|
hv_store(hv, "real_connect_time", 17, newSViv(server->real_connect_time), 0);
|
||||||
@ -350,7 +347,7 @@ void perl_log_fill_hash(HV *hv, LOG_REC *log)
|
|||||||
hv_store(hv, "failed", 6, newSViv(log->failed), 0);
|
hv_store(hv, "failed", 6, newSViv(log->failed), 0);
|
||||||
hv_store(hv, "temp", 4, newSViv(log->temp), 0);
|
hv_store(hv, "temp", 4, newSViv(log->temp), 0);
|
||||||
|
|
||||||
stash = gv_stashpv("Irssi::LogItem", 0);
|
stash = gv_stashpv("Irssi::Logitem", 0);
|
||||||
av = newAV();
|
av = newAV();
|
||||||
for (tmp = log->items; tmp != NULL; tmp = tmp->next) {
|
for (tmp = log->items; tmp != NULL; tmp = tmp->next) {
|
||||||
av_push(av, sv_2mortal(new_bless(tmp->data, stash)));
|
av_push(av, sv_2mortal(new_bless(tmp->data, stash)));
|
||||||
@ -382,7 +379,13 @@ void perl_rawlog_fill_hash(HV *hv, RAWLOG_REC *rawlog)
|
|||||||
|
|
||||||
void perl_reconnect_fill_hash(HV *hv, RECONNECT_REC *reconnect)
|
void perl_reconnect_fill_hash(HV *hv, RECONNECT_REC *reconnect)
|
||||||
{
|
{
|
||||||
|
char *type;
|
||||||
|
|
||||||
perl_connect_fill_hash(hv, reconnect->conn);
|
perl_connect_fill_hash(hv, reconnect->conn);
|
||||||
|
|
||||||
|
type = "RECONNECT";
|
||||||
|
hv_store(hv, "type", 4, new_pv(type), 0);
|
||||||
|
|
||||||
hv_store(hv, "tag", 3, newSViv(reconnect->tag), 0);
|
hv_store(hv, "tag", 3, newSViv(reconnect->tag), 0);
|
||||||
hv_store(hv, "next_connect", 12, newSViv(reconnect->next_connect), 0);
|
hv_store(hv, "next_connect", 12, newSViv(reconnect->next_connect), 0);
|
||||||
}
|
}
|
||||||
@ -561,7 +564,7 @@ void perl_common_init(void)
|
|||||||
{ "Irssi::Command", (PERL_OBJECT_FUNC) perl_command_fill_hash },
|
{ "Irssi::Command", (PERL_OBJECT_FUNC) perl_command_fill_hash },
|
||||||
{ "Irssi::Ignore", (PERL_OBJECT_FUNC) perl_ignore_fill_hash },
|
{ "Irssi::Ignore", (PERL_OBJECT_FUNC) perl_ignore_fill_hash },
|
||||||
{ "Irssi::Log", (PERL_OBJECT_FUNC) perl_log_fill_hash },
|
{ "Irssi::Log", (PERL_OBJECT_FUNC) perl_log_fill_hash },
|
||||||
{ "Irssi::LogItem", (PERL_OBJECT_FUNC) perl_log_item_fill_hash },
|
{ "Irssi::Logitem", (PERL_OBJECT_FUNC) perl_log_item_fill_hash },
|
||||||
{ "Irssi::Rawlog", (PERL_OBJECT_FUNC) perl_rawlog_fill_hash },
|
{ "Irssi::Rawlog", (PERL_OBJECT_FUNC) perl_rawlog_fill_hash },
|
||||||
{ "Irssi::Reconnect", (PERL_OBJECT_FUNC) perl_rawlog_fill_hash },
|
{ "Irssi::Reconnect", (PERL_OBJECT_FUNC) perl_rawlog_fill_hash },
|
||||||
{ "Irssi::Window", (PERL_OBJECT_FUNC) perl_window_fill_hash },
|
{ "Irssi::Window", (PERL_OBJECT_FUNC) perl_window_fill_hash },
|
||||||
|
Loading…
Reference in New Issue
Block a user