Commit Diff


commit - 226a18d30068bb5656e736ec939efde93a145eb2
commit + dc0cf8254d3a05b6940c03fa729729d5d7b7f184
blob - a21bced174018c28beee6eb450a5dd3a75163c0f
blob + 6d1272f298f32bcdae6eb5ebd14eba7c7b1570dd
--- mata_bot.pl
+++ mata_bot.pl
@@ -77,6 +77,9 @@ sub respond_command {
 		(was)?sup+
 		)\b{wb}/ix) {
 		$reply = "Looking for technomage, and you? ${MATA_NORM}"
+	} elsif ($content =~ /\?$/) {
+		# we got a question
+		$reply = "$ball->[rand @$ball] ${MATA_CUTE}"
 	} elsif ($content =~ /\b{wb}(
 		goo+d+\s*(bo+[ity]+o*|gir(l+|lie+))|
 		w(elcome+)?\s*(b+|back+)
@@ -100,13 +103,10 @@ sub respond_command {
 		yo+
 		)\b{wb}/ix) {
 		$reply = "$hellos->[rand @$hellos], ${sender_nick}! ${MATA_HAPPY}"
-	} elsif ($content =~ /\?$/) {
-		# we got a question
-		$reply = "$ball->[rand @$ball] ${MATA_CUTE}"
 	} elsif ($sender_nick eq $MOTHER) {
 		$reply = "Done, mother! ${MATA_HAPPY}"
 	} else {
-		$reply = " ${MATA_NORM}\1"
+		$reply = "\1ACTION leans over and places it's hand near it's antenna. \"HUUH?\" ${MATA_NORM}\1";
 	}
 	return $reply;
 }
@@ -210,7 +210,7 @@ sub respond {
 		}
 	# TODO: this part should use [^ ] and .* instead but i'm scared of .*
 	} elsif ($message =~ /^ *${NICK_RE}[:, ] *([^\000\r\n ][^\000\r\n]*)$/
-		or $message =~ /^ *([^\000\r\n ][^\000\r\n]*)[, ] *${NICK_RE}\W*$/) {
+		or $message =~ /^ *([^\000\r\n ][^\000\r\n]*)[, ] *${NICK_RE}[\W\d]*$/) {
 		$reply = respond_command($lists->{'ball'}, $lists->{'hellos'}, $sender_nick, $1);
 	} elsif ($message =~ /\b${NICK_RE}\b/) {
 		$reply = respond_mention($lists->{'quotes'}, $sender_nick, $message);