Changeset 248
- Timestamp:
- 09/09/03 19:46:13 (8 years ago)
- Location:
- trunk/plugins/en
- Files:
-
- 2 edited
-
complex_questions.tcl (modified) (21 diffs)
-
simple_general.tcl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/en/complex_questions.tcl
r246 r248 16 16 17 17 proc bMotion_plugin_complex_question { nick host handle channel text } { 18 18 bMotion_putloglev 2 * "Question handler triggerred" 19 19 global botnicks bMotionFacts 20 20 21 21 regsub {(.+)[>\/]$} $text {\1?} text 22 22 bMotion_putloglev 3 * "Checking question for 'what'" 23 23 ## What question targeted at me 24 24 if { [regexp -nocase "what('?s)?(.+)" $text matches s question] || … … 33 33 } 34 34 35 bMotion_putloglev 3 * "Checking question for 'with/at/against'" 35 36 ## With/at/against who question targeted at me 36 37 if { [regexp -nocase "^$botnicks,?:? (with|at|against|by) who" $text ma mb prop] || … … 40 41 } 41 42 43 bMotion_putloglev 3 * "Checking question for 'who'" 42 44 ## Who question targeted at me 43 45 if { [regexp -nocase "^$botnicks,?:? who(se|'s)? " $text matches bot owner] || … … 47 49 } 48 50 51 bMotion_putloglev 3 * "Checking question for 'want'" 49 52 ## Want question targetted at me 50 53 if { [regexp -nocase "^$botnicks,?:? do you (need|want) (a|these|this|some|the|those|that)" $text] || … … 53 56 return 1 54 57 } 55 58 59 bMotion_putloglev 3 * "Checking question for 'why'" 56 60 ## Why question targeted at me 57 61 if { [regexp -nocase "^$botnicks,?:? why" $text] || … … 61 65 } 62 66 67 bMotion_putloglev 3 * "Checking question for 'where'" 63 68 ## Where question targeted at me 64 69 if { [regexp -nocase "^$botnicks,?:? where" $text] || … … 68 73 } 69 74 75 bMotion_putloglev 3 * "Checking question for 'how many'" 70 76 ## How many question targeted at me 71 77 if { [regexp -nocase "^$botnicks,?:? how ?many" $text] || … … 75 81 } 76 82 83 bMotion_putloglev 3 * "Checking question for 'when'" 77 84 ## When question targeted at me 78 85 if { [regexp -nocase "^$botnicks,?:? (when|what time)" $text] || … … 82 89 } 83 90 91 bMotion_putloglev 3 * "Checking question for 'how'" 84 92 ## How question targeted at me 85 93 if { [regexp -nocase "^$botnicks,?:? how" $text] || … … 89 97 } 90 98 99 bMotion_putloglev 3 * "Checking question for some general questions" 100 # some other random responses, handled here rather than simple_general so as not to break other code 101 if [regexp -nocase "^${botnicks}:?,? do(n'?t)? you (like|want|find .+ attractive|get horny|(find|think) .+ (is ?)horny|have|keep)" $text] { 102 bMotion_putloglev 2 * "$nick general question" 103 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{yesnos}" 104 return 1 105 } 106 91 107 # me .... ? 92 108 if [regexp -nocase "^${botnicks}:?,? (.+)\\?$" $text ming ming2 question] { 109 bMotion_putloglev 2 * "$nick final question catch" 93 110 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{randomReplies}" 94 111 return 1 … … 97 114 # ... me? 98 115 if [regexp -nocase "${botnicks}\\?$" $text bhar ming what] { 116 bMotion_putloglev 2 * "$nick very final question catch" 99 117 if { [rand 2] == 1 } { 100 118 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{randomReplies}" … … 104 122 105 123 if [bMotionTalkingToMe $text] { 124 bMotion_putloglev 2 * "$nick talkingtome catch" 106 125 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{randomReplies}" 107 126 return 1 … … 111 130 112 131 proc bMotion_plugin_complex_question_what { nick channel host question } { 132 bMotion_putloglev 2 * "$nick what is $question question" 113 133 global bMotionInfo bMotionFacts bMotionOriginalInput 114 134 #see if we know the answer to it … … 156 176 157 177 proc bMotion_plugin_complex_question_when { nick channel host } { 178 bMotion_putloglev 2 * "$nick When question" 158 179 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{answerWhens}" 159 180 return 1 … … 161 182 162 183 proc bMotion_plugin_complex_question_with { nick channel host prop } { 184 bMotion_putloglev 2 * "$nick with question" 163 185 set answer "$prop %VAR{answerWithWhos}" 164 186 bMotionDoAction $channel [bMotionGetRealName $nick $host] $answer … … 167 189 168 190 proc bMotion_plugin_complex_question_who { nick channel host owner } { 191 bMotion_putloglev 2 * "$nick who question" 169 192 if {$owner == "se"} { 170 193 set line "%OWNER[%VAR{answerWhos}]" … … 177 200 178 201 proc bMotion_plugin_complex_question_want { nick channel host } { 202 bMotion_putloglev 2 * "$nick Want/need question" 179 203 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{question_want_reply_wrapper}" 180 204 return 1 … … 182 206 183 207 proc bMotion_plugin_complex_question_why { nick channel host } { 208 bMotion_putloglev 2 * "$nick why question" 184 209 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{answerWhys}" 185 210 return 1 … … 187 212 188 213 proc bMotion_plugin_complex_question_where { nick channel host } { 214 bMotion_putloglev 2 * "$nick where question" 189 215 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{answerWheres}" 190 216 return 1 … … 192 218 193 219 proc bMotion_plugin_complex_question_many { nick channel host } { 220 bMotion_putloglev 2 * "$nick how many question" 194 221 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{answerHowmanys}" 195 222 return 1 … … 197 224 198 225 proc bMotion_plugin_complex_question_how { nick channel host } { 226 bMotion_putloglev 2 * "$nick how question" 199 227 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{answerHows}" 200 228 return 1 -
trunk/plugins/en/simple_general.tcl
r170 r248 32 32 bMotion_plugin_add_simple "didn't!" "^i didn'?t!?$" 40 "%VAR{ididntresponses}" "en" 33 33 bMotion_plugin_add_simple "ow" "^(ow+|ouch|aie+)!*$" 50 "%VAR{awwws}" "en" 34 bMotion_plugin_add_simple "question-have" "^%botnicks:?,? do(n'?t)? you (like|want|find .+ attractive|get horny|(find|think) .+ (is ?)horny|have|keep)" 100 "%VAR{yesnos}" "en" 34 #kis moved the following line to complex_questions because it was breaking stuff. 35 #kis bMotion_plugin_add_simple "question-have" "^%botnicks:?,? do(n'?t)? you (like|want|find .+ attractive|get horny|(find|think) .+ (is ?)horny|have|keep)" 100 "%VAR{yesnos}" "en" 35 36 bMotion_plugin_add_simple "dude" "^Dude!$" 40 "%VAR{sweet}" "en" 36 37 bMotion_plugin_add_simple "sweet" "^Sweet!$" 40 "%VAR{dude}" "en"
Note: See TracChangeset
for help on using the changeset viewer.
