diff options
Diffstat (limited to 'bot.pl')
-rw-r--r-- | bot.pl | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -204,7 +204,7 @@ sub irc_pub_msg{ | |||
204 | #search in our knowledge | 204 | #search in our knowledge |
205 | my $thr = join ' ', $dbh->selectrow_array( | 205 | my $thr = join ' ', $dbh->selectrow_array( |
206 | "SELECT trigger, hilfsverb, reply FROM knowledge WHERE trigger = ? ORDER BY RANDOM() LIMIT 1", undef, $msg ); | 206 | "SELECT trigger, hilfsverb, reply FROM knowledge WHERE trigger = ? ORDER BY RANDOM() LIMIT 1", undef, $msg ); |
207 | $thr =~ s/^.*?(?:<reply> )(.*)$/$1/; | 207 | $thr =~ s/^.*?(?:<reply> +?)(.*)$/$1/; |
208 | $thr =~ s/!who/$nick/g; | 208 | $thr =~ s/!who/$nick/g; |
209 | $thr =~ s'!date'francoise_date()'eg; | 209 | $thr =~ s'!date'francoise_date()'eg; |
210 | $thr =~ s'!time'francoise_time()'eg; | 210 | $thr =~ s'!time'francoise_time()'eg; |
@@ -236,6 +236,9 @@ sub irc_priv_msg{ | |||
236 | $kernel->post( 'francoise', 'privmsg', $channel, $1) | 236 | $kernel->post( 'francoise', 'privmsg', $channel, $1) |
237 | if( $msg =~ /^!say (.*)$/ ); | 237 | if( $msg =~ /^!say (.*)$/ ); |
238 | 238 | ||
239 | $kernel->post( 'francoise', $1, $2, $3, $4 ) | ||
240 | if $msg =~ /^!magic +(\S+) +(\S+) +(\S+) (.*)/; | ||
241 | |||
239 | print "PRIV: [$nick] $msg\n"; | 242 | print "PRIV: [$nick] $msg\n"; |
240 | } | 243 | } |
241 | 244 | ||