17 # where blah is -> where is blah
18 s/ (where|what|who)\s+(\S+)\s+(is|are) / $1 $3 $2 /i;
20 # where blah is -> where is blah
21 s/ (where|what|who)\s+(.*)\s+(is|are) / $1 $3 $2 /i;
25 s/be tellin\'?g?/tell/i;
28 s/,? any(hoo?w?|ways?)/ /ig;
29 s/,?\s*(pretty )*please\??\s*$/\?/i;
33 s/wh(at|ich)\s+(add?res?s|country|place|net (suffix|domain))/wh$1 /ig
36 if ( ( length($in) == 2 ) && ( $in !~ /^\./ ) ) {
42 # profanity filters. just delete it
43 s/th(e|at|is) (((m(o|u)th(a|er) ?)?fuck(in\'?g?)?|hell|heck|(god-?)?damn?(ed)?) ?)+//ig;
45 s/this (.*) thingy?/ $1/gi;
46 s/this thingy? (called )?//gi;
47 s/ha(s|ve) (an?y?|some|ne) (idea|clue|guess|seen) /know /ig;
48 s/does (any|ne|some) ?(1|one|body) know //ig;
50 s/can (you|u|((any|ne|some) ?(1|one|body)))( please)? tell (me|us|him|her)//ig;
51 s/where (\S+) can \S+ (a|an|the)?//ig;
52 s/(can|do) (i|you|one|we|he|she) (find|get)( this)?/is/i
54 s/(i|one|we|he|she) can (find|get)/is/gi; # where i can find
55 s/(the )?(address|url) (for|to) //i; # this should be more specific
56 s/(where is )+/where is /ig;
60 if ( $in =~ s/\s*[\/?!]*\?+\s*$// ) {
66 s/^\s+|\s+$//g; # why twice, see Question.pl
79 s/(^|\W)\Q$who\Es\s+/$1${who}\'s /ig;
80 s/(^|\W)\Q$who\Es$/$1${who}\'s/ig;
81 s/(^|\W)\Q$who\E\'(\s|$)/$1${who}\'s$2/ig;
83 s/(^|\s)i\'m(\W|$)/$1$who is$2/ig;
84 s/(^|\s)i\'ve(\W|$)/$1$who has$2/ig;
85 s/(^|\s)i have(\W|$)/$1$who has$2/ig;
86 s/(^|\s)i haven\'?t(\W|$)/$1$who has not$2/ig;
87 s/(^|\s)i(\W|$)/$1$who$2/ig;
90 s/(^|\s)(me|myself)(\W|$)/$1$who$3/ig;
91 s/(^|\s)my(\W|$)/$1${who}\'s$2/ig; # turn 'my' into name's
92 s/(^|\W)you\'?re(\W|$)/$1you are$2/ig;
96 $mynick = $conn->nick() if ($conn);
98 # is it safe to remove $in from here, too?
99 $in =~ s/yourself/$mynick/i;
100 $in =~ s/(^|\W)are you(\W|$)/$1is $mynick$2/ig;
101 $in =~ s/(^|\W)you are(\W|$)/$1$mynick is$2/ig;
102 $in =~ s/(^|\W)you(\W|$)/$1$mynick$2/ig;
103 $in =~ s/(^|\W)your(\W|$)/$1$mynick\'s$2/ig;
112 # vim:ts=4:sw=4:expandtab:tw=80