Ticket #135: complex-startrek.tcl.diff

File complex-startrek.tcl.diff, 1.6 KB (added by bmotion, 18 months ago)

Patch to fix the bot to respond to bot: and bot,

  • plugins/en/complex_startrek.tcl

     
    1313# in the modules directory. 
    1414############################################################################### 
    1515 
    16 bMotion_plugin_add_complex "st-cloak" "^%botnicks cloak$" 100 "bMotion_plugin_complex_startrek_cloak" "en" 
    17 bMotion_plugin_add_complex "st-decloak" "^%botnicks decloak$" 100 "bMotion_plugin_complex_startrek_decloak" "en" 
    18 bMotion_plugin_add_complex "st-fire" "^%botnicks fire " 100 "bMotion_plugin_complex_startrek_fire" "en" 
     16bMotion_plugin_add_complex "st-cloak" "^%botnicks:?,? cloak$" 100 "bMotion_plugin_complex_startrek_cloak" "en" 
     17bMotion_plugin_add_complex "st-decloak" "^%botnicks:?,? decloak$" 100 "bMotion_plugin_complex_startrek_decloak" "en" 
     18bMotion_plugin_add_complex "st-fire" "^%botnicks:?,? fire " 100 "bMotion_plugin_complex_startrek_fire" "en" 
    1919bMotion_plugin_add_complex "st-courtmartial" "^%botnicks:?,? courtmartial " 100 "bMotion_plugin_complex_startrek_courtmartial" "en" 
    2020 
    2121#cloak 
     
    4545#fire 
    4646proc bMotion_plugin_complex_startrek_fire { nick host handle channel text } { 
    4747  global botnicks bMotionInfo 
    48   if [regexp -nocase "$botnicks fire (.+) at (.+)" $text pop frogs weapon target] { 
     48  if [regexp -nocase "$botnicks:?,? fire (.+) at (.+)" $text pop frogs weapon target] { 
    4949    set weapon [string tolower $weapon] 
    5050    if {![regexp "(phasers|torpedoe?|photon|quantum|cheesecake|everything)" $weapon]} { 
    5151      if {[string range $weapon [expr [string length $weapon] - 1] end] == "s"} {