allow smilies at the end of greetings

This commit is contained in:
ian%hixie.ch 2003-08-16 19:34:01 +00:00
parent 4c0ad2ae06
commit 5ecacbf785

View File

@ -99,7 +99,7 @@ sub Told {
}
my $me = quotemeta($event->{'bot'}->nick);
my $expandedme = join('+', split(//gos, $me)).'+';
if ($message =~ /^\s*(?:(?:g[ood\']*\s*)?(?:mornin[g\']?|evenin[g\']?|afternoon|day)|hi|heya?|bonjour|hoi|w+a+[sz]+u+p+\?*|hello|wb|welcome\s+back|greetings|yo(?:\s+yo)*(?:\s+du+de)?|m+[ayh]+(?:\s+m+a+i+n+)?\s+m+a+n+|d+u+d+e+)[?!1.\s]*$/osi) {
if ($message =~ /^\s*(?:(?:g[ood\']*\s*)?(?:mornin[g\']?|evenin[g\']?|afternoon|day)|hi|heya?|bonjour|hoi|w+a+[sz]+u+p+\?*|hello|wb|welcome\s+back|greetings|yo(?:\s+yo)*(?:\s+du+de)?|m+[ayh]+(?:\s+m+a+i+n+)?\s+m+a+n+|d+u+d+e+)[?!1.\s]*(?::-?[\)Pp]\s*)*$/osi) {
if ($self->canGreet($event)) {
$self->Perform($event, 'greetings');
}
@ -159,7 +159,7 @@ sub Heard {
}
my $me = quotemeta($event->{'bot'}->nick);
my $expandedme = join('+', split(//gos, $me)).'+';
if ($message =~ /^\s*(?:(?:(?:g[ood\']*\s*)?(?:mornin[g\']?|evenin[g\']?|afternoon|day)|hi|heya?|bonjour|hoi|w+a+[sz]+u+p+|hello|wb|welcome\s+back|greetings|yo(?:\s+yo)*)\s+$me|$expandedme\s*)[!1\s]*|o+h[\s,.!?]+look[\s,.!?]+a\s+$me[\s.!1]*$/si) {
if ($message =~ /^\s*(?:(?:(?:g[ood\']*\s*)?(?:mornin[g\']?|evenin[g\']?|afternoon|day)|hi|heya?|bonjour|hoi|w+a+[sz]+u+p+|hello|wb|welcome\s+back|greetings|yo(?:\s+yo)*)\s+$expandedme[!1\s]*|o+h[\s,.!?]+look[\s,.!?]+a\s+$me[\s.!1]*)(?::-?[\)Pp]\s*)*$/si) {
if ($self->canGreet($event)) {
$self->Perform($event, 'greetings');
}