Ticket #13 (new enhancement)

Opened 3 years ago

Last modified 10 months ago

Stop using $bMotionCache

Reported by: james Owned by: james
Priority: major Milestone: 0.2.0
Component: core modules Version: 0.0.9
Keywords: Cc:

Description

Use plugins_settings_* instead, like [651] and #4 started to fix.

% grep -ri last * | grep Cache | grep -v svn
bMotion.tcl:  set bMotionCache($letter,lastlog) ""
bMotion.tcl:  set bMotionCache($letter,lastcount) 0
bMotion.tcl:    if {$bMotionCache($level,lastlog) == $text} {
bMotion.tcl:      incr bMotionCache($level,lastcount)
bMotion.tcl:    if {$bMotionCache($level,lastcount) > 0} {
bMotion.tcl:      putloglev $level $star "($level)Previous message repeated $bMotionCache($level,lastcount) time(s)"
bMotion.tcl:    set bMotionCache($level,lastlog) $text
bMotion.tcl:    set bMotionCache($level,lastcount) 0
modules/mood.tcl:  set bMotionCache(lastHows) ""
modules/output.tcl:  set bMotionCache($channel,last) 1
modules/output.tcl:      set what [array get bMotionCache "lastruser$bot"]
modules/events_support.tcl:  set bMotionCache(lastDoneFor) $nick
modules/events.tcl:    set bMotionCache($channel,last) 0
modules/events.tcl:  set bMotionCache(lastLeft) $nick
modules/events.tcl:  set bMotionCache(lastLeft) $nick
modules/events.tcl:  global bMotionLastEvent bMotionSettings botnicks bMotionCache bMotionInfo
modules/events.tcl:    set bMotionCache($channel,last) 0
modules/events.tcl:  if {![regexp -nocase $botnicks $text] && ($bMotionCache($channel,last) || [bMotion_setting_get "bitlbee"])} {
modules/events.tcl:  if {[regexp -nocase "(i'm not talking to|not) you" $text] && $bMotionCache($channel,last)} {
modules/events.tcl:    set bMotionCache($channel,last) 0
modules/events.tcl:  set bMotionCache($channel,last) 0
modules/events.tcl:                             set bMotionCache(lastPlugin) $callback
modules/events.tcl:    set bMotionCache($channel,last) 0
modules/variables.tcl:  set bMotionCache(lastGreeted) ""
modules/variables.tcl:  set bMotionCache(lastHows) ""
modules/variables.tcl:  set bMotionCache(lastDoneFor) ""
modules/variables.tcl:  set bMotionCache(lastLeft) ""
modules/variables.tcl:  set bMotionCache(lastPlugin) ""
modules/variables.tcl:  set bMotionCache(last_simple) ""
modules/plugins.tcl:        if {$bMotionCache(last_simple) == $key} {
modules/plugins.tcl:          set bMotionCache(last_simple) $key
modules/system.tcl:  set bMotionCache($chan,last) 0
modules/system.tcl:     if ($bMotionCache($channel,last)) {
plugins/en/complex_replicate.tcl:    set bMotionCache(lastDoneFor) $nick
plugins/en/complex_replicate.tcl:    set bMotionCache(lastDoneFor) $nick
plugins/en/complex_replicate.tcl:  set bMotionCache(lastDoneFor) $nick
plugins/en/irc_nick_away.tcl:    set bMotionCache(lastDoneFor) $nick
plugins/en/complex_sorry.tcl:  #if {![regexp -nocase $nick $bMotionCache(lastEvil)]} {return 0}
plugins/en/complex_sorry.tcl:  #set bMotionCache(lastEvil) ""
plugins/en/action_complex_pinch.tcl:    #set bMotionCache(lastEvil) $nick
plugins/en/complex_smiley.tcl:  if {$bMotionCache(lastPlugin) == "bMotion_plugin_complex_smiley"} {
plugins/en/complex_love.tcl:    set bMotionCache(lastDoneFor) $nick
plugins/en/complex_love.tcl:    set bMotionCache(lastDoneFor) $nick
plugins/en/complex_shocked.tcl:  if {$bMotionCache($channel,last)} {
plugins/en/complex_sex.tcl:    set bMotionCache(lastDoneFor) "$nick $forNick"
plugins/fr/action_complex_pinch.tcl:    #set bMotionCache(lastEvil) $nick

Attachments

complex-shocked.diff (1.1 KB) - added by bmotion 2 years ago.
Removing bMotionCache from complex shocked plugin
complex-smiley.diff (0.7 KB) - added by bmotion 2 years ago.
Removing bMotionCache from complex smiley, hopefully using the history check correctly
fr.complex-pinch.diff (0.6 KB) - added by bmotion 2 years ago.
Making the french complex pinch work like the english one
last-simple.diff (1.5 KB) - added by bmotion 2 years ago.
More converting from bMotionCache. This time adjusting last_simple
bmotion.tcl (0.7 KB) - added by bmotion 2 years ago.
OH NOES! turns out that I really broken bMotion, didn't notice until I restarted it. This is an alteration to make it work!

Change History

Changed 2 years ago by anonymous

  • priority changed from major to critical
  • type changed from enhancement to task
  • version 0.0.9 deleted
  • component changed from core modules to abstracts
  • milestone changed from 0.1.0 to 0.2.0

Changed 2 years ago by anonymous

  • priority changed from critical to blocker
  • type changed from task to defect
  • version set to 0.0.9
  • component changed from abstracts to extra modules
  • milestone 0.2.0 deleted

Changed 2 years ago by szrof

  • priority changed from blocker to major
  • type changed from defect to enhancement
  • component changed from extra modules to core modules
  • milestone set to 0.1.0

Reset ticket data to original values. Damn spammers.

Changed 2 years ago by james

  • milestone changed from 0.1.0 to 0.2.0

Changed 2 years ago by bmotion

Removing bMotionCache from complex shocked plugin

Changed 2 years ago by bmotion

Removing bMotionCache from complex smiley, hopefully using the history check correctly

Changed 2 years ago by bmotion

Making the french complex pinch work like the english one

Changed 2 years ago by bmotion

More converting from bMotionCache. This time adjusting last_simple

Changed 2 years ago by bmotion

OH NOES! turns out that I really broken bMotion, didn't notice until I restarted it. This is an alteration to make it work!

Changed 16 months ago by bmotion

If it matters any, I have been successfully using this for sometime on my bot.

Changed 10 months ago by znx

Added these patches in [884] still more to do though:

$ grep -ri last * | grep Cache | grep -v svn
modules/events.tcl:    set bMotionCache($channel,last) 0
modules/events.tcl:  global bMotionLastEvent bMotionSettings botnicks bMotionCache bMotionInfo
modules/events.tcl:    set bMotionCache($channel,last) 0
modules/events.tcl:  if {[regexp -nocase "(i'm not talking to|not) you" $text] && $bMotionCache($channel,last)} {
modules/events.tcl:    set bMotionCache($channel,last) 0
modules/events.tcl:  set bMotionCache($channel,last) 0
modules/events.tcl:			set bMotionCache(lastPlugin) $callback
modules/system.tcl:	set bMotionCache($chan,last) 0
modules/system.tcl:		return $bMotionCache($channel,last)
modules/output.tcl:	set bMotionCache($channel,last) 1
modules/output.tcl:			set what [array get bMotionCache "lastruser$bot"]
modules/variables.tcl:  set bMotionCache(lastGreeted) ""
modules/variables.tcl:  set bMotionCache(lastHows) ""
modules/variables.tcl:  set bMotionCache(lastDoneFor) ""
modules/variables.tcl:  set bMotionCache(lastLeft) ""
plugins/en/action_complex_pinch.tcl:    #set bMotionCache(lastEvil) $nick
Note: See TracTickets for help on using tickets.