summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAilin Nemui2016-06-05 11:00:12 +0200
committerAilin Nemui2016-06-05 11:00:12 +0200
commitc98ce03aade246ba1e43e7499180462005456b35 (patch)
tree00cd95a41d9ccbcc2705559af2326c316800a9e8
parentdb22de12297408298672a32aa81fb761ddb37af7 (diff)
downloadscripts.irssi.org-c98ce03aade246ba1e43e7499180462005456b35.tar.bz2
Update fix_slackirc to 0.2
- support self-messages
-rw-r--r--scripts/fix_slackirc.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/fix_slackirc.pl b/scripts/fix_slackirc.pl
index b557dc0..f279810 100644
--- a/scripts/fix_slackirc.pl
+++ b/scripts/fix_slackirc.pl
@@ -1,7 +1,7 @@
use strict;
use warnings;
-our $VERSION = '0.1'; # 258918adc08e622
+our $VERSION = '0.2'; # d8eac6db52159b2
our %IRSSI = (
authors => 'Nei',
contact => 'Nei @ anti@conference.jabber.teamidiot.de',
@@ -87,6 +87,10 @@ sub fix_incoming {
elsif ($raw =~ s/:$SLACK_ADDRESS 352 .* :\d+ \Knull$//) {
$continue = 1;
}
+ # support self msgs
+ elsif ($raw =~ s/^:(?:(\S+)!(\S+\@$SLACK_ADDRESS)) PRIVMSG ([^#\s]\S*) :\[\3\] /:$3!$2 PRIVMSG $1 :/) {
+ $continue = 1;
+ }
if ($continue) {
_s2r($server->{rawlog})->input("[FIXED] $raw") if $server->{rawlog};
Irssi::signal_continue($server, $raw);