Ticket #13: complex-shocked.diff

File complex-shocked.diff, 1.1 KB (added by bmotion, 2 years ago)

Removing bMotionCache from complex shocked plugin

  • complex_shocked.tcl

     
    1212############################################################################### 
    1313 
    1414proc bMotion_plugin_complex_shock { nick host handle channel text } { 
     15        #if we spoke last, it's probable this is a reaction to us being 
     16        # surprised at yourself is lame 
     17        if {$channel == [bMotion_plugins_settings_get "complex:shock" "last" $channel ""]} { 
     18                return 0 
     19        } 
    1520 
    16   global bMotionCache 
    17   #if we spoke last, it's probable this is a reaction to us 
    18   #being surprised at yourself is lame 
    19   if {$bMotionCache($channel,last)} { 
    20     return 0 
    21   } 
    22  
    23   bMotionDoAction $channel $nick "%VAR{shocked}" 
    24   return 1 
     21        # set channel to stop use being suprised at ourselves! 
     22        bMotion_plugins_settings_set "complex:shock" "last" $channel "" "" 
     23         
     24        bMotionDoAction $channel $nick "%VAR{shocked}" 
     25        return 1 
    2526} 
    2627 
    2728bMotion_plugin_add_complex "shocked" "^((((=|:|;)-?(o|0))|(!+))|blimey|crumbs|i say)$" 40 bMotion_plugin_complex_shock "en" 
    28