.wiki causes multiple errors in terminal.
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>
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 |
Here is the entire wiki section:
sub wiki { >new(); search( $subject) ; ~s/\<\! \-\-.*? \-\-\>/ /gs; ~s/\{\{ .*?\}\} //gs; ~s/\(.* ?\)//gs; ~s/^\s* //gs; ~s/\s*$ //gs;
my $subject = shift;
chomp $subject;
my $wiki = WWW::Wikipedia-
my $result = $wiki->
if($result) {
my $text = $result->text();
$text=
$text=
$text=
print "$text\n\n";
my($response) = $text =~ m/^(.*?\.)/is;
- $response=~s/\n/ /g;
- $response=
$response=
$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.