diff options
-rw-r--r-- | bot.pl | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -7,8 +7,8 @@ use DBI; | |||
7 | use POE; | 7 | use POE; |
8 | use POE::Component::IRC; | 8 | use POE::Component::IRC; |
9 | 9 | ||
10 | my $current_nick = 'francoise_'; | 10 | my $current_nick = 'francoise'; |
11 | my $channel = '#test'; | 11 | my $channel = '#kiffer.de'; |
12 | 12 | ||
13 | POE::Component::IRC->new("francoise"); | 13 | POE::Component::IRC->new("francoise"); |
14 | POE::Session->new ( _start => \&irc_start, | 14 | POE::Session->new ( _start => \&irc_start, |
@@ -177,7 +177,7 @@ sub irc_pub_msg{ | |||
177 | $sth->execute( $word, $is0r, $isact ); | 177 | $sth->execute( $word, $is0r, $isact ); |
178 | } | 178 | } |
179 | 179 | ||
180 | if ( $msg =~ /^wo ist (\S+)\??$/i ) { | 180 | if ( $msg =~ /^wo ist (\S+?)\??$/i ) { |
181 | my $wois_ = $1; | 181 | my $wois_ = $1; |
182 | my $wois = francoise_getbasenick( $1 ); | 182 | my $wois = francoise_getbasenick( $1 ); |
183 | my $sth = $dbh->prepare( "SELECT awaymsg FROM users WHERE nick = ? AND isaway = 'true'"); | 183 | my $sth = $dbh->prepare( "SELECT awaymsg FROM users WHERE nick = ? AND isaway = 'true'"); |
@@ -187,7 +187,7 @@ sub irc_pub_msg{ | |||
187 | } else { | 187 | } else { |
188 | $kernel->post( 'francoise', 'privmsg', $channel, "Ich weiss nicht, wo $wois_ ist." ); | 188 | $kernel->post( 'francoise', 'privmsg', $channel, "Ich weiss nicht, wo $wois_ ist." ); |
189 | } | 189 | } |
190 | } elsif( $msg =~ /(?:\S: )(.+?) ($hv) (.*)$/i ) { | 190 | } elsif( $msg =~ /^(?:\S+: )?(.+?)\s+($hv)\s+(.*)$/i ) { |
191 | my $trigger = $1; | 191 | my $trigger = $1; |
192 | my $hilfsverb = $2; | 192 | my $hilfsverb = $2; |
193 | my $reply = $3; | 193 | my $reply = $3; |