Changeset 834 for trunk/modules/extra/stats.tcl
- Timestamp:
- 07/29/07 17:18:19 (18 months ago)
- Files:
-
- 1 modified
-
trunk/modules/extra/stats.tcl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/extra/stats.tcl
r782 r834 26 26 ## /JMS 27 27 28 ### CONFIG 28 ### CONFIG: now set in settings.tcl; this bit just sets the defaults 29 ### Don't change these any more, edit your settings file :) 29 30 30 31 ## enable sending of stats etc 31 set bMotion_stats_enabled 0 32 if {![info exists bMotion_stats_enabled]} { 33 set bMotion_stats_enabled 0 34 } 32 35 33 36 ## enable version checking (doesn't need stats to be sent) 34 set bMotion_stats_version 0 37 if {![info exists bMotion_stats_version]} { 38 set bMotion_stats_version 0 39 } 35 40 36 41 37 42 ## what can we send (if stats_enabled is 1) 38 43 # this is the bot's nick 39 set bMotion_stats_send(botnick) 1 40 # the admin info ('admin' in config) 41 set bMotion_stats_send(admin) 1 42 # the network name ('network' in config) 43 set bMotion_stats_send(network) 1 44 # bmotion's gender/orientation 45 set bMotion_stats_send(bminfo) 1 44 if {![info exists bMotion_stats_send]} { 45 set bMotion_stats_send(botnick) 1 46 # the admin info ('admin' in config) 47 set bMotion_stats_send(admin) 1 48 # the network name ('network' in config) 49 set bMotion_stats_send(network) 1 50 # bmotion's gender/orientation 51 set bMotion_stats_send(bminfo) 1 52 } 46 53 47 54 ### END USER CONFIG … … 341 348 342 349 if {$bMotion_stats_time > 0} { 343 bMotion_putadmin " last stats run was [expr [clock seconds] - $bMotion_stats_time] seconds ago "350 bMotion_putadmin " last stats run was [expr [clock seconds] - $bMotion_stats_time] seconds ago ([clock format $bMotion_stats_time])" 344 351 } else { 345 352 bMotion_putadmin " last stats run never or unknown" … … 364 371 } 365 372 } 373 374 proc bMotion_stats_help { } { 375 bMotion_putadmin "Interact with the stats module." 376 bMotion_putadmin " .bmotion stats status" 377 bMotion_putadmin " Show the status of the stats module, including if it's enabled," 378 bMotion_putadmin " if it's checking for updates, your bots unique ID, when the last" 379 bMotion_putadmin " stats run took place, and when the next one will." 380 bMotion_putadmin " .bmotion stats go" 381 bMotion_putadmin " Immediately perform a stats run (if needed)" 382 bMotion_putadmin "(See settings.tcl and modules/extra/stats.tcl for config and information." 383 } 384 366 385 if {$bMotion_testing == 0} { 367 bMotion_plugin_add_management "stats" "^stats" n bMotion_stats_admin "any" 386 bMotion_plugin_add_management "stats" "^stats" n bMotion_stats_admin "any" "bMotion_stats_help" 368 387 } 369 388
