summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2005-07-27 16:39:45 +0000
committererdgeist <>2005-07-27 16:39:45 +0000
commit47b4fb71337b08935dd2418dfd7438939059232c (patch)
treeee8ca4769c933037eda9c60177ca6189cb04c5b2
parentd7df5388d80ce68586473134c3f6fbd6de8bb701 (diff)
Some regex issues
-rw-r--r--bot.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/bot.pl b/bot.pl
index 3c68caf..d426602 100644
--- a/bot.pl
+++ b/bot.pl
@@ -7,8 +7,8 @@ use DBI;
7use POE; 7use POE;
8use POE::Component::IRC; 8use POE::Component::IRC;
9 9
10my $current_nick = 'francoise_'; 10my $current_nick = 'francoise';
11my $channel = '#test'; 11my $channel = '#kiffer.de';
12 12
13POE::Component::IRC->new("francoise"); 13POE::Component::IRC->new("francoise");
14POE::Session->new ( _start => \&irc_start, 14POE::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;