- Timestamp:
- 01/17/11 15:52:28 (16 months ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
modules/abstracts/en/abstracts.tcl (modified) (1 diff)
-
modules/events.tcl (modified) (3 diffs)
-
modules/system.tcl (modified) (2 diffs)
-
modules/variables.tcl (modified) (1 diff)
-
plugins/en/complex_hello.tcl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/abstracts/en/abstracts.tcl
r1108 r1109 5867 5867 } 5868 5868 5869 bMotion_abstract_register "overslept" { 5870 "%VAR{swear}!%|/overslept %VAR{unsmiles}" 5871 "%VAR{swear}!%|slept through my alarm %VAR{unsmiles}" 5872 "oh %VAR{swear}, overslept%|all because i was %VAR{sillyVerbs:presentpart} too late last night" 5873 "%VAR{swear}, slept though my alarm" 5874 } 5875 5876 bMotion_abstract_register "oversleep_rush" { 5877 "/gets dressed so quickly he forgets to put on %VAR{clothes}" 5878 "now i don't have time for a delicious breakfast of %VAR{foods}" 5879 "/absent-mindedly puts on %VAR{foods} and eats $VAR{clothes} for breakfast" 5880 } 5881 5882 bMotion_abstract_register "swear" { 5883 "fuck" 5884 "shit" 5885 "bollocks" 5886 "cunt" 5887 "arse" 5888 "damn" 5889 "drat" 5890 "bugger" 5891 "rats" 5892 } 5893 5869 5894 bMotion_abstract_add_filter "_all" "\{strip\}\}" 5870 5895 bMotion_abstract_add_filter "_all" "\}\{strip\}" -
trunk/modules/events.tcl
r1099 r1109 297 297 set result 0 298 298 set result [$callback $nick $host $handle $channel $text] 299 bMotion_putloglev d* "returned from $callback"299 bMotion_putloglev 2 * "returned from $callback" 300 300 set bMotionCache(lastPlugin) $callback 301 301 bMotion_plugin_history_add $channel "complex" $callback … … 366 366 #tell the names we have 367 367 #TODO: move this into a plugin? 368 if [regexp -nocase "${botnicks}:?,? say my names?(,? bitch)?" $text] {368 if [regexp -nocase "${botnicks}:?,? (say my names?|what'?s my name)" $text] { 369 369 if {($handle == "*") || ($handle == "")} { 370 370 #no handle = no saving IRL … … 381 381 set realnames [getuser $handle XTRA irl] 382 382 if {$realnames == ""} { 383 bMotionDoAction $channel $nick "Ah you must be %%. (You have not set any IRL names.)" "" 1383 bMotionDoAction $channel $nick "Ah, you must be %%. (You have not set any IRL names.)" "" 1 384 384 } else { 385 385 bMotionDoAction $channel $nick "Your IRL name(s) are:\002 %2 \002" $realnames 1 -
trunk/modules/system.tcl
r1108 r1109 1082 1082 } 1083 1083 1084 1085 # realise we overslept 1086 proc bMotion_overslept { { onlychan "" } } { 1087 global bMotionSettings BMOTION_SLEEP 1088 if {[bMotion_setting_get "asleep"] != $BMOTION_SLEEP(OVERSLEEPING)} { 1089 bMotion_putloglev d * "overslept timer fired but I wasn't oversleeping" 1090 return 1091 } 1092 1093 set bMotionSettings(asleep) $BMOTION_SLEEP(AWAKE) 1094 1095 if {$onlychan == ""} { 1096 set chanlist $bMotionChannels 1097 } else { 1098 set chanlist [list $onlychan] 1099 } 1100 1101 foreach chan $chanlist { 1102 if {[bMotion_is_active_enough $chan]} { 1103 bMotionDoAction $chan "" "%VAR{overslept}" 1104 } 1105 } 1106 } 1107 1084 1108 proc bMotion_wake_up { } { 1085 1109 global bMotionSettings BMOTION_SLEEP bMotionChannels … … 1088 1112 if {$bMotionSettings(asleep) == $BMOTION_SLEEP(ASLEEP)} { 1089 1113 bMotion_putloglev 3 * "considering asleep -> awake" 1114 if {[rand 100] > 95} { 1115 putlog "bMotion: really quite tired today... think I'll stay in bed a bit longer" 1116 set snooze [expr [rand 120] + 30] 1117 timer $snooze bMotion_overslept 1118 putlog "bMotion: going to oversleep by $snooze minutes" 1119 set bMotionSettings(asleep) $BMOTION_SLEEP(OVERSLEEPING) 1120 1121 set hour [bMotion_setting_get "bedtime_hour"] 1122 set minute [bMotion_setting_get "bedtime_minute"] 1123 set bMotionSettings(sleepy_nextchange) [bMotion_sleep_next_event "$hour:$minute"] 1124 1125 return 1126 } 1127 1090 1128 if {[rand 10] > 7} { 1091 1129 putlog "bMotion: woke up!" -
trunk/modules/variables.tcl
r1008 r1109 92 92 set BMOTION_SLEEP(BEDTIME) 1 93 93 set BMOTION_SLEEP(ASLEEP) 2 94 set BMOTION_SLEEP(OVERSLEEPING) 3 94 95 95 96 # start off awake -
trunk/plugins/en/complex_hello.tcl
r1067 r1109 22 22 23 23 set lastGreeted [bMotion_plugins_settings_get "complex:hello" "lastGreeted" $channel ""] 24 25 global BMOTION_SLEEP 26 if {[bMotion_setting_get "asleep"] == $BMOTION_SLEEP(OVERSLEEPING)} { 27 bMotion_overslept $channel 28 set bMotionInfo(away) 0 29 set bMotionInfo(silence) 0 30 return 31 } 24 32 25 33 if {$bMotionInfo(away) == 1} {
Note: See TracChangeset
for help on using the changeset viewer.
