Ignore:
Timestamp:
09/20/03 14:01:31 (9 years ago)
Author:
jamesoff
Message:

upgrades to !bminfo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/system.tcl

    r288 r289  
    6969proc bMotionInfo {nick host handle channel text} {   
    7070  global bMotionInfo botnicks bMotionSettings cvsinfo randomsinfo botnick 
    71   if {![regexp -nocase $botnick $text]} { return 0 } 
     71  global bMotionVersion 
     72  if {(![regexp -nocase $botnick $text]) && ($text != "all")} { return 0 } 
     73  if {!([isvoice $nick] || [isop $nick]) || ($nick != "JamesOff")} { return 0 } 
    7274  set timezone [clock format [clock seconds] -format "%Z"]   
    73   set status "I am running bMotion under TCL [info patchlevel]: botGender $bMotionInfo(gender)/$bMotionInfo(orientation) : balefire $bMotionInfo(balefire) : pokemon $bMotionInfo(pokemon) : timezone $timezone : randomStuff $bMotionInfo(minRandomDelay), $bMotionInfo(maxRandomDelay), $bMotionInfo(maxIdleGap) : botnicks $botnicks : melMode $bMotionSettings(melMode) : needI $bMotionSettings(needI) : cvs $cvsinfo : randoms $randomsinfo" 
     75  putchan $channel "I am running bMotion $bMotionVersion under TCL [info patchlevel]." 
     76  set status "botGender $bMotionInfo(gender)/$bMotionInfo(orientation) : balefire $bMotionInfo(balefire) : pokemon $bMotionInfo(pokemon) : timezone $timezone : randomStuff $bMotionInfo(minRandomDelay), $bMotionInfo(maxRandomDelay), $bMotionInfo(maxIdleGap) : botnicks $botnicks : melMode $bMotionSettings(melMode) : needI $bMotionSettings(needI)" 
    7477  if {$bMotionInfo(silence)} { set status "$status : silent (yes)" } 
    75   append status " : www.bmotion.net" 
    7678  putchan $channel $status 
     79 
     80  #abstracts 
     81  global bMotion_abstract_contents bMotion_abstract_timestamps bMotion_abstract_max_age 
     82  global bMotion_abstract_ondisk 
     83 
     84  set mem [llength [array names bMotion_abstract_contents]] 
     85  set disk [llength $bMotion_abstract_ondisk] 
     86  putchan $channel "abstracts: [expr $mem + $disk] total, $mem loaded, $disk on disk" 
     87 
     88  #facts 
     89  global bMotionFacts 
     90  set items [lsort [array names bMotionFacts]] 
     91  set itemcount 0 
     92  set factcount 0 
     93  foreach item $items { 
     94    incr itemcount 
     95    incr factcount [llength $bMotionFacts($item)] 
     96  } 
     97  putchan $channel "facts: $factcount facts about $itemcount items" 
     98 
     99  return 0 
    77100} 
    78101 
Note: See TracChangeset for help on using the changeset viewer.