Răsfoiți Sursa

* Fix many unitialized errors with rbot format.

Morten Brix Pedersen 22 ani în urmă
părinte
comite
83baed34eb
3 a modificat fișierele cu 17 adăugiri și 3 ștergeri
  1. 2 1
      docs/Changelog
  2. 10 2
      modules/Pisg/Parser/Format/rbot.pm
  3. 5 0
      pisg.cfg

+ 2 - 1
docs/Changelog

@@ -1,6 +1,7 @@
 pisg (x.xx)
    * Fix parsing of energymech kick messages and modes (thanks, optika81)
-   * Add colorscheme with traditional pisg (website) colors. Thanks, jarod.
+   * Add colorscheme with traditional pisg (website) colors. Thanks, mite.
+   * Fix many unitialized errors with rbot format.
 
 pisg (0.55) - Sun May, 30th 2004
    * Added javabot support (thanks, Tobias Larsson)

+ 10 - 2
modules/Pisg/Parser/Format/rbot.pm

@@ -64,7 +64,7 @@ sub thirdline
         $hash{min}  = $2;
 	$hash{nick} = $3;
 	
-	if (($3) eq 'Quit') {
+	if ($3 and (($3) eq 'Quit')) {
 	    $hash{nick} = $4;
 
 	} elsif (($3) eq 'Mode') {
@@ -92,7 +92,15 @@ sub thirdline
 	    $hash{newjoin} = $3;
 
 	}elsif (($4.$5) eq 'settopic') {
-	    $hash{newtopic} = $6.$7.$8;
+            my $newtopic;
+            if ($8 and $7 and $6) {
+                $newtopic = $6.$7.$8;
+            } elsif ($7 and $6) {
+                $newtopic = $6.$7;
+            } else {
+                $newtopic = $6;
+            }
+            $hash{newtopic} = $newtopic;
 
 	}elsif (($4.$5.$6.$7) eq 'isnowknownas') {
 	    $hash{nick} = $3;

+ 5 - 0
pisg.cfg

@@ -17,3 +17,8 @@
 #   OutputFile="index.html"
 # </channel>
 #
+
+<channel="#channel">
+  LogFile="/home/mbp/dumber.log"
+  Format="rbot"
+</channel>