.wiki causes multiple errors in terminal.

Bug #437816 reported by Robb Munson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VoteBot
Confirmed
Low
Unassigned

Bug Description

sending the command .wiki ubuntu in a channel where votebot is in produces the following chain of errors in the terminal, I can reproduce it over and over, the commands output does NOT go to the channel, but stays in terminal also.

[Sun Sep 27 20:11:46] <robbmunson> .wiki ubuntu

'Ubuntu' may refer to:

* Ubuntu , a Debian-based Linux distribution
* Ubuntu , an ethical concept of African origin emphasizing
  community, sharing and generosity
* Ubuntu Cola, a beverage
* Ubuntu Local Municipality, Northern Cape, South Africa
* Ubuntu Goode, a character in the series [[The Goode Family]]

Use of uninitialized value $response in substitution (s///) at ./voteBot.pl line 2505.
Use of uninitialized value $response in substitution (s///) at ./voteBot.pl line 2506.
Use of uninitialized value $response in substitution (s///) at ./voteBot.pl line 2506.
RESPONSE:
[Sun Sep 27 20:11:46] <QuickieBot>

Revision history for this message
Robb Munson (r.munson) wrote :

Here is the entire wiki section:

sub wiki {
 my $subject = shift;
 chomp $subject;
 my $wiki = WWW::Wikipedia->new();
 my $result = $wiki->search($subject);
 if($result) {
  my $text = $result->text();
  $text=~s/\<\!\-\-.*?\-\-\>//gs;
  $text=~s/\{\{.*?\}\}//gs;
  $text=~s/\(.*?\)//gs;
  print "$text\n\n";
  my($response) = $text =~ m/^(.*?\.)/is;
 - $response=~s/\n/ /g;
 - $response=~s/^\s*//gs;
  $response=~s/\s*$//gs;
  $response=~s/\ \ / /gs;
  print "RESPONSE: $response\n";
  return $response;
 }
 return "Error: Failed To Fetch Wikipedia Result";
}

I have added a - to the lines in question.

Revision history for this message
Robb Munson (r.munson) wrote :

I dont know if I should have opened up 2 seperate bug reports, but they both seem to be related.

Revision history for this message
Robb Munson (r.munson) wrote :

I probably shouldnt *bump* a bug report..but just making sure its still seen.

Changed in votebot:
assignee: nobody → Nathan Handler (nhandler)
importance: Undecided → Low
status: New → In Progress
Changed in votebot:
status: In Progress → Confirmed
assignee: Nathan Handler (nhandler) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.