change /infolist new
now you can create infolists of any type and look through them
This commit is contained in:
parent
cc737019cb
commit
8600de8806
@ -55,7 +55,7 @@ sub look {
|
||||
} elsif (/^p:(.+)/) {
|
||||
$item .= "p:$1: ".weechat::infolist_pointer($iptr, $1);
|
||||
} elsif (/^b:(.+)/) {
|
||||
$item .= "b:$1: ".weechat::infolist_buffer($iptr, $1);
|
||||
$item .= "b:$1: "#.weechat::infolist_buffer($iptr, $1);
|
||||
} elsif (/^t:(.+)/) {
|
||||
$item .= "t:$1: ".weechat::infolist_time($iptr, $1);
|
||||
}
|
||||
@ -90,11 +90,13 @@ sub infolist_cb {
|
||||
weechat::command('', '/debug infolists');
|
||||
} elsif ($args =~ /^(0x[0-9a-f]+) *(.+)/i) {
|
||||
infolist($1, $2);
|
||||
} elsif ($args =~ /^new/) {
|
||||
} elsif ($args =~ /^new *([^ ]*) *([^ ]*|\-) *(.*|\-)/) {
|
||||
# let's get a nicklist and leave it open
|
||||
my $iptr = weechat::infolist_get('irc_nick', '',
|
||||
weechat::buffer_get_string($buffer, 'localvar_server').','.
|
||||
weechat::buffer_get_string($buffer, 'localvar_channel'));
|
||||
my $iptr = weechat::infolist_get(
|
||||
$1,
|
||||
$2 eq '-' ? '' : $2,
|
||||
$3 eq '-' ? '' : $3
|
||||
);
|
||||
$iptr ? info("infolist created at $iptr") :
|
||||
error("error creating infolist");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user