Ignore:
Timestamp:
09/09/03 17:06:19 (9 years ago)
Author:
kevdadrum
Message:

Adds a handler for "Botname: do you need x?" and "do you want x botname?"
Currently buggy because it won't deal with "do you want" for no good reason.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/en/complex_questions.tcl

    r245 r246  
    4747  } 
    4848 
     49  ## Want question targetted at me 
     50  if { [regexp -nocase "^$botnicks,?:? do you (need|want) (a|these|this|some|the|those|that)" $text] || 
     51        [regexp -nocase "^do you (want|need) (a|these|this|some|the|those|that) .* $botnicks ?\\?" $text] } { 
     52      bMotion_plugin_complex_question_want $nick $channel $host 
     53      return 1 
     54  } 
     55   
    4956  ## Why question targeted at me 
    5057  if { [regexp -nocase "^$botnicks,?:? why" $text] || 
     
    169176} 
    170177 
     178proc bMotion_plugin_complex_question_want { nick channel host } { 
     179    bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{question_want_reply_wrapper}" 
     180    return 1 
     181} 
     182 
    171183proc bMotion_plugin_complex_question_why { nick channel host } { 
    172184  bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{answerWhys}" 
     
    196208  "%% i suppose" 
    197209} 
     210 
     211set question_want_reply_wrapper { 
     212  "Why? I've got %VAR{sillyThings}" 
     213  "With %VAR{sillyThings} I have no need for anything else" 
     214  "Ooh yes please, I've had %VAR{sillyThings} for so long it's boring me" 
     215  "Will it feel as good as %VAR{sillyThings} from %ruser" 
     216  "Hell yes, %ruser's given me %VAR{sillyThings} and I can't wait to get away from it!" 
     217  "I don't know, %VAR{sillyThings} from %ruser just %VAR{fellOffs}" 
     218  "Yes, %VAR{confuciousStart} %VAR{confuciousEnd}" 
     219  "No, %VAR{confuciousStart} %VAR{confuciousEnd}" 
     220  "Can I have a %VAR{chocolates} too?" 
     221  "Yes please, I left %VAR{sillyThings} in %VAR{answerWheres}" 
     222  "Not until %VAR{answerWhens}" 
     223  "Yes please, the Borg Queen offered me %VAR{trekNouns} and I only got %VAR{sillyThings}" 
     224  "%VAR{sweet}" 
     225} 
Note: See TracChangeset for help on using the changeset viewer.