Просмотр исходного кода

Small changes/corrections to psybnc format (thanks, Marco Dieckhoff
<dieck@gmx.de>)

Morten Brix Pedersen 25 лет назад
Родитель
Сommit
64a8c9ce2b
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      modules/Pisg/Parser/Format/psybnc.pm

+ 5 - 3
modules/Pisg/Parser/Format/psybnc.pm

@@ -69,13 +69,15 @@ sub thirdline
 
         my @arr = split(" ", $5);
         if ($4 eq 'KICK') {
-            $hash{kicker} = $arr[1];
+            $hash{kicker} = $hash{nick};
+            $hash{nick} = $arr[1];
 
-        } elsif ($4 eq 'changes') {
-            $hash{newtopic} = "$7 $8";
+        } elsif ($4 eq 'TOPIC') {
+            $hash{newtopic} = join(" ", @arr[1..@arr]);
 
         } elsif ($4 eq 'MODE') {
             $hash{newmode} = $arr[1];
+            $hash{newtopic} =~ s/^://;
 
         } elsif ($4 eq 'JOIN') {
             $hash{newjoin} = $3;