fix ra,rato,xra aliases

This commit is contained in:
wowaname 2016-09-18 00:01:42 +00:00
parent 00df59df39
commit 613bc37bfa
2 changed files with 16 additions and 6 deletions

View File

@ -99,8 +99,8 @@ qrm = "query_blocker del"
quiet = "kloeri quiet"
r-pair = "eval /set plugins.var.python.text_replace.replacement_pairs "${plugins.var.python.text_replace.replacement_pairs}\;$1=$2-""
r-word = "eval /set plugins.var.python.text_replace.replacement_words "${plugins.var.python.text_replace.replacement_words}\;$1=$2-""
ra = "exec -pipe /prism sed s/^/ / ascii/*/"$*""
rato = "exec -pipe /prism sed 's/^/$1: /' ascii/*/"$2-""
ra = "exec -pipe "/prism -c (BEGIN) /msg -server $server $channel" sed 's/^/(BEGIN) /' ascii/*/"$*""
rato = "exec -pipe "/prism -c (BEGIN) /msg -server $server $channel" sed 's/^/(BEGIN)$1: /' ascii/*/"$2-""
raw = "quote"
rc = "reconnect"
reason = "kloeri reason"
@ -145,7 +145,7 @@ wi = "whois"
wii = "whois $1 $1"
wv = "command core version"
ww = "whowas"
xra = "exec -pipe "/prism -x" sed s/^/ / ascii/*/"$*""
xra = "exec -pipe "/prism -xc (BEGIN) /msg -server $server $channel" sed 's/^/(BEGIN) /' ascii/*/"$*""
xyzzy = "print Nothing happens"
[completion]

View File

@ -29,11 +29,14 @@ from channel forwards, as well as forced parts, such as from the /remove
command. You can configure certain behaviour using the options under
"plugins.var.perl.antifuck.*". Configure rejoin-on-/remove with the
irc.server_default.autorejoin and .autorejoin_delay commands.
Running "/antifuck part" will close all forcejoined channels and part them where
appropriate.
HELP
'part', 'cmd_antifuck', '');
weechat::hook_signal('irc_server_connected', 'irc_connect', '');
weechat::hook_signal('irc_server_disconnected', 'irc_disconnect', '');
#weechat::hook_signal('irc_channel_opened', 'buffer_opened', '');
weechat::hook_signal('irc_channel_opened', 'buffer_opened', '');
weechat::hook_signal('*,irc_out1_join', 'client_join', '');
weechat::hook_signal('*,irc_out1_part', 'client_part', '');
weechat::hook_modifier('irc_in_366', 'irc_366', '');
@ -67,7 +70,12 @@ sub servchan {
sub cmd_antifuck {
my (undef, $buffer, $args) = @_;
weechat::print('',"$_: ".join(' ', keys %{ $part{$_} })) for (keys %part);
if ($args eq 'part') {
# TODO: we really need to spend more time here making sure we send the
# fewest PARTs possible, a la irc_join_delay
weechat::buffer_close($fuckbuf);
}
}
sub fuckbuf_input {
@ -76,6 +84,8 @@ sub fuckbuf_input {
sub fuckbuf_close {
$fuckbuf = '';
weechat::buffer_close($_) for (@partbuf);
@partbuf = ();
return weechat::WEECHAT_RC_OK;
}
@ -115,7 +125,7 @@ sub buffer_opened {
weechat::buffer_merge($buffer, $fuckbuf);
return weechat::WEECHAT_RC_OK unless weechat::config_get_plugin('autopart');
#push @partbuf, $buffer;
push @partbuf, $buffer;
return weechat::WEECHAT_RC_OK;
}