Changeset 161
- Timestamp:
- 07/19/10 14:03:33 (7 weeks ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
conf/whatbot.conf-example (modified) (1 diff)
-
lib/whatbot/Command/Define.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/conf/whatbot.conf-example
r155 r161 27 27 <commands> 28 28 <admin user="adminuser" /> 29 <define sourcelist="urbandictionary google wikipedia" /> 29 30 </commands> 30 31 <log directory="/var/log/whatbot" /> -
trunk/lib/whatbot/Command/Define.pm
r160 r161 94 94 $def =~ s/ ,/,/g; 95 95 96 return $def . " (U )";96 return $def . " (UD)"; 97 97 } 98 98 … … 112 112 $def =~ s/ ,/,/g; 113 113 114 return $def . " (G )";114 return $def . " (GG)"; 115 115 } 116 116 … … 169 169 $def =~ s/\(help·info\)//g; 170 170 171 $def =~ s/\[ citation needed\]//g; # this makes me want to stab people, just for the record172 173 return $def . " (W )";171 $def =~ s/\[[^\]]+\]//g; 172 173 return $def . " (WP)"; 174 174 } 175 175 … … 205 205 my ( $self, $phrase ) = @_; 206 206 207 my @default_sources = qw( wikipedia urbandictionary google ); 207 my @default_sources; 208 if (!exists($self->my_config->{sourcelist})) { 209 @default_sources = qw(urbandictionary google wikipedia); 210 } 211 else { 212 @default_sources = split / /, $self->my_config->{sourcelist}; 213 } 214 208 215 my @sources; 209 216 $_ = $phrase;