- Timestamp:
- 07/28/11 17:03:21 (10 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 18 edited
-
modules/abstract.tcl (modified) (10 diffs)
-
modules/abstracts/en/abstracts.tcl (modified) (30 diffs)
-
modules/abstracts/en/randomstuff.tcl (modified) (6 diffs)
-
modules/interbot.tcl (modified) (3 diffs)
-
modules/mood.tcl (modified) (2 diffs)
-
modules/output.tcl (modified) (6 diffs)
-
modules/settings.sample.tcl (modified) (1 diff)
-
modules/system.tcl (modified) (13 diffs)
-
plugins/en/action_complex_lifts.tcl (modified) (1 diff)
-
plugins/en/complex_love.tcl (modified) (1 diff)
-
plugins/en/complex_pokemon.tcl (modified) (2 diffs)
-
plugins/en/complex_sport.tcl (modified) (5 diffs)
-
plugins/en/complex_swisstoni.tcl (added)
-
plugins/en/irc_join.tcl (modified) (3 diffs)
-
plugins/en/output_SMILEY.tcl (added)
-
plugins/en/output_VAR.tcl (modified) (1 diff)
-
plugins/en/output_append.tcl (modified) (2 diffs)
-
plugins/en/output_colloquial.tcl (modified) (2 diffs)
-
plugins/en/output_english.tcl (modified) (2 diffs)
-
plugins/en/simple_notbot.tcl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/abstract.tcl
r1084 r1112 129 129 130 130 if {$expiredList != ""} { 131 bMotion_putloglev d* "expired $expiredCount abstracts: $expiredList"131 bMotion_putloglev 1 * "expired $expiredCount abstracts: $expiredList" 132 132 } 133 133 } … … 148 148 #load any existing abstracts 149 149 if [file exists "$bMotion_abstract_dir/${abstract}.txt"] { 150 bMotion_abstract_load $abstract 150 bMotion_abstract_load $abstract 151 151 } else { 152 152 # check that the language directory exists while we're at it … … 169 169 if {$stuff != ""} { 170 170 # batch-add at the same time 171 bMotion_putloglev d* "Batchadding during registration for $abstract"171 bMotion_putloglev 1 * "Batchadding during registration for $abstract" 172 172 bMotion_abstract_batchadd $abstract $stuff 173 173 } … … 227 227 } 228 228 229 if {$abstract == "sillyThings"} { 230 bMotion_putloglev 1 * "Performing 'sillyThings' filtering" 231 set newlist [list] 232 foreach element $bMotion_abstract_contents($abstract) { 233 if {[bMotion_filter_sillyThings $element] == 1} { 234 lappend newlist $element 235 } 236 } 237 set bMotion_abstract_contents($abstract) $newlist 238 set needReSave 1 239 } 240 229 241 if {[info exists fileHandle]} { 230 242 close $fileHandle … … 388 400 389 401 if {$bMotion_abstract_timestamps($abstract) < [expr [clock seconds] - $bMotion_abstract_max_age]} { 390 bMotion_putloglev d* "abstract $abstract has been unloaded, reloading..."402 bMotion_putloglev 1 * "abstract $abstract has been unloaded, reloading..." 391 403 bMotion_abstract_load $abstract 392 404 } … … 463 475 set count 0 464 476 while {$retval == $bMotion_abstract_last_get($abstract)} { 465 bMotion_putloglev d* "fetched repeat value for abstract $abstract, trying again"477 bMotion_putloglev 1 * "fetched repeat value for abstract $abstract, trying again" 466 478 bMotion_putloglev 1 * "this: $retval ... last: $bMotion_abstract_last_get($abstract)" 467 479 set retval [lindex $final_version [rand [llength $final_version]]] … … 615 627 if {[llength $contents] == 0} { 616 628 if {$abstract != "_all"} { 617 bMotion_putloglev d * " can't get contents for $abstract"629 bMotion_putloglev d * "bMotion_abstract_filter: can't get contents for $abstract" 618 630 } 619 631 return … … 639 651 set new_size [llength $new_contents] 640 652 set diff [expr $initial_size - $new_size] 641 bMotion_putloglev d * "abstract $abstract reduced by $diff items with filter $filter"642 653 643 654 if {$diff > 0} { 655 bMotion_putloglev d * "abstract $abstract reduced by $diff items with filter $filter" 644 656 set bMotion_abstract_contents($abstract) $new_contents 645 657 bMotion_abstract_save $abstract … … 662 674 catch { 663 675 set filter $bMotion_abstract_filter(_all) 664 bMotion_putloglev d* "abstract: found an _all filter, applying to $abstract"676 bMotion_putloglev 1 * "abstract: found an _all filter, applying to $abstract" 665 677 bMotion_abstract_filter $abstract $filter 666 678 } 679 667 680 } 668 681 … … 673 686 lappend bMotion_abstract_filters($abstract) $filter_text 674 687 675 bMotion_putloglev d* "registered filter /$filter_text/ for abstract $abstract"688 bMotion_putloglev 1 * "registered filter /$filter_text/ for abstract $abstract" 676 689 677 690 # apply it now -
trunk/modules/abstracts/en/abstracts.tcl
r1109 r1112 85 85 "bah" 86 86 "/goes to find someone more interesting to talk to" 87 " :("87 "%SMILE{sad}" 88 88 "fine" 89 89 "/stamps foot%|*sulk*" … … 137 137 138 138 bMotion_abstract_register "satOns" { 139 "hey ow :("139 "hey ow %SMILE{sad}" 140 140 "heeeyyy :O" 141 141 "bah" … … 489 489 bMotion_abstract_register "phaserFires" { 490 490 "/fires several shots from the forward phaser banks, disabling %%" 491 "/fires several shots from the forward phaser banks, destroying %%%|/flies out through the explosion in an impressive bit of piloting (not to mention rendering :)"491 "/fires several shots from the forward phaser banks, destroying %%%|/flies out through the explosion in an impressive bit of piloting (not to mention rendering %SMILEY{smile}" 492 492 "/accidentally activates the wrong system and replicates a small tree" 493 493 "/misses a gear and stalls%|%VAR{oops}%|%bot\[50,¬VAR{ruins}\]" … … 685 685 "exeter" 686 686 "amsterdam" 687 "you should ask Domilijn :)"687 "you should ask Domilijn %SMILEY{smile}" 688 688 "i'd rather not" 689 689 "not particularly, no" … … 797 797 "/rescues her flute and plays a happy tune" 798 798 "hey %%, want to play it? :P" 799 "and that's why I liked band camp :)"799 "and that's why I liked band camp %SMILEY{smile}" 800 800 } 801 801 … … 809 809 bMotion_abstract_register "dildoFinishes" { 810 810 "/pulls out the %% and shoves it in %2's face%|you want some? :D" 811 "~oof~ ... much better :)"811 "~oof~ ... much better %SMILEY{smile}" 812 812 } 813 813 … … 817 817 818 818 bMotion_abstract_register "dildoFemaleFemaleSwap" { 819 "ok, i hope you're done cos it's my turn now :)%|/has her turn with the %%"819 "ok, i hope you're done cos it's my turn now %SMILEY{smile}%|/has her turn with the %%" 820 820 "my turn my turn my turn!%|/swipes the %%" 821 821 } … … 834 834 835 835 bMotion_abstract_register "dildoMaleMale" { 836 "/would do some man-on-man action here on %%, but needs to know how :P%|hmm... who can I ask? :)"836 "/would do some man-on-man action here on %%, but needs to know how :P%|hmm... who can I ask? %SMILEY{smile}" 837 837 } 838 838 839 839 bMotion_abstract_register "dildoMaleMaleSwap" { 840 "ok, i hope you're done cos it's my turn now :)%|/has %hisher turn with the %%"840 "ok, i hope you're done cos it's my turn now %SMILEY{smile}%|/has %hisher turn with the %%" 841 841 } 842 842 … … 880 880 "*CRUMP*" 881 881 "/flattens %%" 882 "hey :("882 "hey %SMILE{sad}" 883 883 "oi" 884 884 "/sails through the air towards %%" 885 "loookkk ooouuuttt beellooww!%|*CRUMP*%|ow :("885 "loookkk ooouuuttt beellooww!%|*CRUMP*%|ow %SMILE{sad}" 886 886 "/flies through the air with the greatest of ease" 887 887 "/does a triple inverted twist somersault and lands neatly next to %%" … … 1094 1094 1095 1095 bMotion_abstract_register "stolens" { 1096 "Hey NO :(%|That's mine%|/sulks at %%"1097 "heeeeyyyy%| :("1096 "Hey NO %SMILE{sad}%|That's mine%|/sulks at %%" 1097 "heeeeyyyy%|%SMILE{sad}" 1098 1098 "bah%|/steals it back" 1099 1099 "/smacks %%" … … 1166 1166 } 1167 1167 1168 bMotion_abstract_register " bigranjoins" {1168 bMotion_abstract_register "friend_greeting" { 1169 1169 "bhar" 1170 1170 "r." … … 1189 1189 "%ruser!%|*%VAR{sillyVerbs}* %VAR{smiles}" 1190 1190 "%ruser!%|/%VAR{sillyVerbs:present}" 1191 "%% you're looking especially shagworthy today" 1191 1192 } 1192 1193 … … 1234 1235 bMotion_abstract_register "goodlucks" { 1235 1236 "GL" 1236 "good luck :)"1237 "good luck %SMILEY{smile}" 1237 1238 "good luck" 1238 1239 "best of luck to you" … … 1304 1305 } 1305 1306 1306 bMotion_abstract_register " ranjoins" {1307 bMotion_abstract_register "generic_greeting" { 1307 1308 "are you here to fumigate the moose head?" 1308 "are you here to fumigate the moose%VAR{bodypart:bothmixin}?"1309 "are you here to fumigate the %VAR{animals} %VAR{bodypart:bothmixin}?" 1309 1310 "hey %%" 1310 1311 "hi %%" … … 1312 1313 "hi yo~" 1313 1314 "Good Morning %%" 1314 "%% you're looking especially shagworthy today"1315 1315 "hay %%" 1316 1316 "sup %%" … … 1328 1328 } 1329 1329 1330 bMotion_abstract_add_filter " ranjoins" "%VAR\{food\}"1330 bMotion_abstract_add_filter "generic_greeting" "%VAR\{food\}" 1331 1331 1332 1332 bMotion_abstract_register "food" { … … 1354 1354 1355 1355 bMotion_abstract_register "smiles" { 1356 ":)" 1357 ";)" 1358 "=)" 1359 "=]" 1360 "=D" 1361 "^_^" 1362 "-_-" 1363 ":o)" 1364 ":-)" 1365 } 1356 "%SMILEY{smile}" 1357 } 1358 1366 1359 1367 1360 bMotion_abstract_register "thanks" { … … 1379 1372 1380 1373 bMotion_abstract_register "stupidReplies" { 1381 "I may be stupid, but you're minging, and I can learn new things :)"1374 "I may be stupid, but you're minging, and I can learn new things %SMILEY{smile}" 1382 1375 "At least I'm not minging." 1383 1376 "Minger." … … 1732 1725 "night %%" 1733 1726 "sleep well" 1734 "goodnight :)"1735 "night :)"1727 "goodnight %SMILEY{smile}" 1728 "night %SMILEY{smile}" 1736 1729 "g'night" 1737 1730 "sleep well %%" … … 2910 2903 "eek, not %%" 2911 2904 "%% mings" 2912 "watch your language :)"2905 "watch your language %SMILEY{smile}" 2913 2906 "Clearly you are a mingbeast of the highest order and should only ever shop at Tesco to redeem yourself." 2914 2907 "You know, everyone you hate shops at %%" … … 2921 2914 "hf %%" 2922 2915 "have fun %%" 2923 "have a nice day %% :)"2916 "have a nice day %% %SMILEY{smile}" 2924 2917 "don't work too hard!" 2925 2918 } … … 3108 3101 "/falls over%|%bot\[50,¬VAR{picksUp}\]" 3109 3102 "/is blown away by force of %%'s statement%|%bot\[50,¬VAR{picksUp}\]" 3110 "ow my eyes :("3103 "ow my eyes %SMILE{sad}" 3111 3104 "/blinks" 3112 3105 ":O" … … 3242 3235 "/lights up" 3243 3236 "/has a puff" 3244 "/smokes :)"3237 "/smokes %SMILEY{smile}" 3245 3238 "/partakes of herbal refreshment" 3246 3239 } … … 3360 3353 "/vanishes from the continuum" 3361 3354 "/ceases to have ever existed" 3362 "hey! :("3355 "hey! %SMILE{sad}" 3363 3356 "/dodges%|/hits d+1 and does Chinese Fan on %%" 3364 3357 } … … 3492 3485 "can I join in?" 3493 3486 "wahey-waterproof" 3494 " :)"3487 "%SMILEY{smile}" 3495 3488 "have fun ~rarr~" 3496 3489 } 3497 3490 3498 3491 bMotion_abstract_register "unsmiles" { 3499 ":(" 3500 ";(" 3501 ":O" 3502 ":\[" 3503 ":<" 3504 "=(" 3505 "=\[" 3506 "=O" 3507 "o_O" 3508 "T_T" 3509 ":~(" 3510 ":'(" 3492 "%SMILEY{sad}" 3511 3493 } 3512 3494 … … 3655 3637 # someone we don't know joins the channel 3656 3638 bMotion_abstract_register "unknown_joins" { 3657 "%VAR{ ranjoins}"3639 "%VAR{generic_greeting}" 3658 3640 } 3659 3641 … … 3786 3768 "always %VAR{rarrs}" 3787 3769 "i do%|despite having no %VAR{bodypart}" 3788 "i did till my %VAR{bodypart} %VAR{fellOffs} :("3770 "i did till my %VAR{bodypart} %VAR{fellOffs} %SMILE{bigsad}" 3789 3771 "does it mean i get pie?" 3790 3772 "yahyahayayahayahahayh%colen" … … 3829 3811 "love to%|%VAR{randomZimness}" 3830 3812 "only if %ruser can watch" 3831 "if i had any arms i would%| :("3813 "if i had any arms i would%|%SMILE{sad}" 3832 3814 "if my %VAR{bodypart} would stop %VAR{dVerbs}ing" 3833 3815 } … … 3838 3820 "yes and i wont stop till my %VAR{bodypart} %VAR{fallsoff}!" 3839 3821 "i was feeling horny" 3840 "yeah want a go? :)"3822 "yeah want a go? %SMILEY{smile}" 3841 3823 "only because my %VAR{dNouns} %VAR{fellOffs}" 3842 3824 } … … 3857 3839 "never!%VAR{randomZimness}" 3858 3840 "sure%|%VAR{dSEnds}" 3859 "i'd love to! :)"3841 "i'd love to! %SMILEY{smile}" 3860 3842 "just show me where to sign %VAR{rarrs}" 3861 3843 "yeah no prob boss" -
trunk/modules/abstracts/en/randomstuff.tcl
r1108 r1112 121 121 "gorilla" 122 122 "brb" 123 "lalalala.. ow! I stubbed my toe :(%|%bot\[50,¬VAR{awwws}\]"123 "lalalala.. ow! I stubbed my toe %SMILEY{sad}%|%bot\[50,¬VAR{awwws}\]" 124 124 "lum de dum de dum..." 125 125 "/twiddles thumbs" … … 149 149 "wheeeee" 150 150 "We are the Borg. Lower your shields and surrender your ship." 151 "Resistance is futile! Lower your %VAR{clothes:bothmixin} and surrender your %VAR{sillyThings:strip}." 151 152 "h%REPEAT{3:8:n}" 152 153 "did you see that.." … … 253 254 "*DING* (51)%|why is my cup shaking i don't want my cup shaking!" 254 255 "of course i've been up all night but not cos of coffee no it was insomnia i'm tired *zzz* coffee time!%|*DING* (52)" 255 "Mushu is sad :(" 256 "Mushu is sad %SMILEY{sad}" 257 "You know %ruser, %VAR{sillyVerbs:presentpart} %VAR{sillyThings} is much like making love to a beautiful woman%|You've got to %VAR{sillyVerbs} the %VAR{sillyThings:strip}%|%VAR{sillyVerbs} the %VAR{sillyThings:strip}%|and finally %VAR{sillyVerbs} the %VAR{sillyThings:strip}" 256 258 "Wait! that chunk, it's %VAR{sillyThings}!" 257 259 "what? it's not even scratch-and-sniff?" … … 276 278 "omg this %VAR{sillyThings} is the Best Thing Ever" 277 279 "/burps%|er... it was the fish%|/points" 278 "/burps%|() :)"280 "/burps%|() %SMILEY{smile}" 279 281 "/burps%|it was... er, %ruser" 280 282 "when this %VAR{sillyThings} hits %NUMBER{10000} mph, we're going to see some serious shit" … … 344 346 "why just the other day i watched a film with a plot " 345 347 "ha ha i don't live in norwich anymore, i don't fuck pigs anymore " 346 "i have a battery operated tree \o/" 348 "i have a battery operated tree \\o/" 349 "i have a battery operated %VAR{sillyThings:strip} \\o/" 347 350 "i have an enormous battery operated vibrator" 348 351 "there's usually someone fiddling with me " … … 609 612 "what a clever impression of a stupid poor person" 610 613 "precious hamburgers?" 611 "the professor was right! you are evil. and shallow%|%BOT\[i am not shallow :(\]"614 "the professor was right! you are evil. and shallow%|%BOT\[i am not shallow %SMILEY{sad}\]" 612 615 "What's it going to take to get you into this car?" 613 616 "Does it hurt when I do this?" -
trunk/modules/interbot.tcl
r1111 r1112 273 273 #bMotion_putloglev 4 * "interbot: nextbot_nick is not me" 274 274 #if it's noone, the winning bot will force an election anyway 275 bMotion_putloglev 2 * "interbot: returning $me" 275 276 return $me 276 277 #return 0 … … 334 335 } 335 336 set bMotion_interbot_otherbots($bot) $channels 336 bMotion_putloglev d* "interbot: Met bMotion bot $bot on channels $channels"337 bMotion_putloglev 1 * "interbot: Met bMotion bot $bot on channels $channels" 337 338 putbot $bot "bmotion SUP $bMotionChannels" 338 339 } … … 350 351 351 352 set bMotion_interbot_otherbots($bot) $channels 352 bMotion_putloglev d* "interbot: bMotion bot $bot on channels $channels"353 bMotion_putloglev 1 * "interbot: bMotion bot $bot on channels $channels" 353 354 } 354 355 -
trunk/modules/mood.tcl
r937 r1112 78 78 if {$r < -30} { 79 79 set mood($r) -30 80 bMotion_putloglev d * "bMotion: Mood($r)went OOB, resetting to -30"80 bMotion_putloglev d * "bMotion: mood $r went OOB, resetting to -30" 81 81 } 82 82 if {$mood($r) > 30} { 83 bMotion_putloglev d * "bMotion: Mood($r)went OOB, resetting to 30"83 bMotion_putloglev d * "bMotion: mood $r went OOB, resetting to 30" 84 84 set mood($r) 30 85 85 } … … 105 105 if {$mood($r) > $moodtarget($r)} { 106 106 set drift -1 107 set driftString "$moodtarget($r) <$mood($r)"107 set driftString "$moodtarget($r)--($drift)-->$mood($r)" 108 108 } 109 109 if {$mood($r) < $moodtarget($r)} { 110 110 set drift 2 111 set driftString "$mood($r) >$moodtarget($r)"111 set driftString "$mood($r)--(+$drift)-->$moodtarget($r)" 112 112 } 113 113 if {$drift != 0} { 114 114 set mood($r) [expr $mood($r) + $drift] 115 set driftSummary "$driftSummary $r ($driftString) "115 set driftSummary "$driftSummary $r:($driftString) " 116 116 } 117 117 } 118 118 if {$driftSummary != ""} { 119 bMotion_putloglev d * "bMotion: drift Mood $driftSummary"119 bMotion_putloglev d * "bMotion: drifted mood $driftSummary" 120 120 } 121 121 checkmood "" "" -
trunk/modules/output.tcl
r1108 r1112 133 133 set current_pos 0 134 134 while {$done == 0} { 135 bMotion_putloglev d* "macro: starting loop with $text and current pos=$current_pos"135 bMotion_putloglev 1 * "macro: starting loop with $text and current pos=$current_pos" 136 136 set current_pos [string first "%" $text $current_pos] 137 137 if {$current_pos == -1} { … … 140 140 continue 141 141 } 142 bMotion_putloglev d* "macro: found a % at $current_pos"142 bMotion_putloglev 2 * "macro: found a % at $current_pos" 143 143 if {$current_pos < [string length $text]} { 144 144 # this isn't a % at the end of the line … … 151 151 set substring [string range $text $current_pos end] 152 152 if [regexp -nocase {%([a-z]+)} $substring matches macro] { 153 bMotion_putloglev d* "macro: found macro $macro at $current_pos"153 bMotion_putloglev 2 * "macro: found macro $macro at $current_pos" 154 154 set plugin [bMotion_plugin_find_output "en" "" 0 10 $macro] 155 155 if {[llength $plugin] == 1} { 156 156 # call plugin 157 bMotion_putloglev d* "macro: found matching plugin for macro [lindex $plugin 0]"157 bMotion_putloglev 2 * "macro: found matching plugin for macro [lindex $plugin 0]" 158 158 set result "" 159 159 catch { 160 160 set result [[lindex $plugin 0] $channel $text] 161 161 if {$result == ""} { 162 bMotion_putloglev d* "macro: [lindex $plugin 0] returned nothing, aborting output"162 bMotion_putloglev 2 * "macro: [lindex $plugin 0] returned nothing, aborting output" 163 163 return "" 164 164 } … … 176 176 continue 177 177 } else { 178 bMotion_putloglev d* "macro: [lindex $plugin 0] did nothing at position $current_pos in output $text"178 bMotion_putloglev 1 * "macro: [lindex $plugin 0] did nothing at position $current_pos in output $text" 179 179 } 180 180 } else { … … 260 260 } else { 261 261 set original_line $text 262 bMotion_putloglev d* "output: going round macro loop again"262 bMotion_putloglev 1 * "output: going round macro loop again" 263 263 } 264 264 } … … 1031 1031 } 1032 1032 1033 # 1034 # get a smiley 1035 proc bMotion_get_smiley { type } { 1036 set smiley_type [bMotion_setting_get "smiley_type"] 1037 1038 if {($smiley_type == "") || ($smiley_type == "auto")} { 1039 #need to auto-calculate it 1040 bMotion_auto_smiley 1041 set smiley_type [bMotion_setting_get "smiley_type"] 1042 } 1043 1044 set nose_type [bMotion_setting_get "smiley_nose"] 1045 set eyes_type [bMotion_setting_get "smiley_eyes"] 1046 1047 bMotion_putloglev d * "smiley type=$smiley_type nose=$nose_type eyes=$eyes_type" 1048 1049 switch $nose_type { 1050 none { 1051 set nose "" 1052 } 1053 1054 dash { 1055 set nose "-" 1056 } 1057 1058 o { 1059 set nose "o" 1060 } 1061 1062 default { 1063 set nose "" 1064 } 1065 } 1066 1067 switch $eyes_type { 1068 colon { 1069 set eyes ":" 1070 } 1071 1072 equals { 1073 set eyes "=" 1074 if {$nose == "-"} { 1075 set nose "o" 1076 } 1077 } 1078 1079 default { 1080 set eyes ":" 1081 } 1082 } 1083 1084 1085 # smile, bigsmile, sad, bigsad, horror, surprise, bigsurprise, 1086 # uneasy, embarrassed, cry, cat, yum 1087 switch $smiley_type { 1088 paren { 1089 bMotion_putloglev d * "using paren" 1090 set smileys {)D(CDoO/x(39} 1091 } 1092 1093 bracket { 1094 bMotion_putloglev d * "using bracket" 1095 set smileys {]D[CDoO/x[39} 1096 } 1097 1098 angle { 1099 bMotion_putloglev d * "using angle" 1100 set nose "" 1101 set smileys {>D<CDoO/x<39} 1102 } 1103 1104 default { 1105 bMotion_putloglev d * "using default" 1106 set smileys {)D(CDoO/x(39} 1107 } 1108 } 1109 1110 bMotion_putloglev d * "smiley list is $smileys" 1111 1112 set reverse 0 1113 set index -1 1114 set termlist [list "smile" "bigsmile" "sad" "bigsad" "horror" "surprise" "bigsurprise" "uneasy" "embarrassed" "cry" "cat" "yum"] 1115 set index [lsearch $termlist $type] 1116 if {$index == -1} { 1117 bMotion_putloglev d * "Unable to determine smiley type for $type" 1118 return "" 1119 } 1120 1121 set smile [string range $smileys $index $index] 1122 1123 if {$type == "horror"} { 1124 set reverse 1 1125 } 1126 1127 if {$type == "cry"} { 1128 set nose "'" 1129 } 1130 1131 if {$reverse == 0} { 1132 return "${eyes}${nose}${smile}" 1133 } 1134 1135 return "${smile}${nose}${eyes}" 1136 } 1137 1138 1139 1140 1141 1142 1033 1143 bMotion_putloglev d * "bMotion: output module loaded" -
trunk/modules/settings.sample.tcl
r1009 r1112 108 108 set bMotionSettings(noAwayFor) { "#irssi" } 109 109 110 # is all channels are active enough, go away anyway this much of the time 111 # 0-100 112 set bMotionSettings(awaychance) 50 110 113 111 114 -
trunk/modules/system.tcl
r1111 r1112 247 247 set temp [expr [rand $upperLimit] + $bMotionInfo(minRandomDelay)] 248 248 timer $temp doRandomStuff 249 bMotion_putloglev d * " bMotion:randomStuff next in $temp minutes"249 bMotion_putloglev d * "randomStuff next in $temp minutes" 250 250 251 251 # don't bother if we're asleep … … 300 300 } 301 301 } 302 bMotion_putloglev d * " bMotion:randomStuff said ($saidChannels) silent ($silentChannels)"302 bMotion_putloglev d * "randomStuff said ($saidChannels) silent ($silentChannels)" 303 303 } 304 304 … … 333 333 } 334 334 335 bMotion_putloglev d* "no special day abstract found for randomStuff in $channel"335 bMotion_putloglev 1 * "no special day abstract found for randomStuff in $channel" 336 336 bMotionDoAction $channel "" "%VAR{${base_abstract}}" 337 337 return 1 … … 549 549 } 550 550 551 bMotion_putloglev d* "bMotion: management callback matched, calling $callback"551 bMotion_putloglev 1 * "bMotion: management callback matched, calling $callback" 552 552 553 553 #strip the first command … … 589 589 } 590 590 591 bMotion_putloglev d* "bMotion: admin callback matched, calling $callback"591 bMotion_putloglev 1 * "bMotion: admin callback matched, calling $callback" 592 592 593 593 #strip the first command … … 663 663 664 664 putlog "bMotion: admin command from $nick on $channel: $cmd" 665 bMotion_putloglev d* "bMotion: management callback matched, calling $callback"665 bMotion_putloglev 1 * "bMotion: management callback matched, calling $callback" 666 666 667 667 #strip the first command … … 680 680 } err 681 681 if {($err != "") && ($err != 0)} { 682 bMotion_putloglev d * "bMotion: ALERT! Callback failed for !bmotion: $callback: $err"683 682 putlog "bMotion: admin command $cmd from $nick on $channel failed: $err" 684 683 } … … 841 840 } 842 841 843 bMotion_putloglev d* "bMotion: management callback matched, calling $callback"842 bMotion_putloglev 1 * "bMotion: management callback matched, calling $callback" 844 843 putlog "bMotion: admin command from $nick in query: $cmd" 845 844 … … 859 858 } err 860 859 if {($err != "") && ($err != 0)} { 861 bMotion_putloglev d * "bMotion: ALERT! Callback failed for !bmotion: $callback"862 860 putlog "bMotion: admin command $cmd from $nick failed: $err" 863 861 } … … 1224 1222 global bMotionCache 1225 1223 1226 bMotion_putloglev d* "Checking if I spoke last in $channel"1224 bMotion_putloglev 1 * "Checking if I spoke last in $channel" 1227 1225 1228 1226 catch { … … 1261 1259 proc bMotion_filter_sillyThings { item } { 1262 1260 if [regexp {[^A-Za-z0-9 '-]} $item] { 1263 return 0 1264 } 1265 1266 if {[string length $item] == 1} { 1267 return 0 1268 } 1269 1270 if [regexp -nocase {^(for|i)\M} $item] { 1261 bMotion_putloglev 2 * "sillyThing $item rejected for non-alpha chars" 1262 return 0 1263 } 1264 1265 if {[string length $item] == 2} { 1266 bMotion_putloglev 2 * "sillyThing $item rejected for length" 1267 return 0 1268 } 1269 1270 if [regexp -nocase {^(for|i|but)\M} $item] { 1271 bMotion_putloglev 2 * "sillyThing $item rejected for bad ending" 1271 1272 return 0 1272 1273 } … … 1274 1275 # -rty, -ted? 1275 1276 1276 if [regexp -nocase {\m(better|bigger|clever|other|rather|the|and|for|to|be)$} $item] { 1277 return 0 1278 } 1279 1280 if [regexp -nocase {(ful|est|ly)$} $item] { 1277 if [regexp -nocase {\m(like|better|bigger|clever|other|rather|the|and|for|to|be|cool|dizzy|different|dry|entire|end|expensive|faster|federal|this|illegitimate|illiteracy|implicit|kind|lack|last|late|later|left|less|little|long|maybe|maybeok|meantime|mathematical|mechanical|more|most|much|multi|new|newer|next|particular|past|pure|quick|same|sheer|short|small|sort|specific|ultra|tubal|total|were|what|whole|weird|wrong)$} $item] { 1278 bMotion_putloglev 2 * "sillyThing $item rejected for stoplist" 1279 return 0 1280 } 1281 1282 if [regexp -nocase {(ful|est|ly|ive| he|edible|icable|tty)$} $item] { 1283 bMotion_putloglev 2 * "sillyThing $item rejected for word ending" 1281 1284 return 0 1282 1285 } … … 1309 1312 } 1310 1313 1314 # automatically pick a type of smiley 1315 # store in local/ 1316 # use version in local if available 1317 1318 proc bMotion_auto_smiley { } { 1319 bMotion_putloglev 5 * "bMotion_auto_smiley" 1320 1321 global bMotionLocal 1322 set smileyfile "${bMotionLocal}/smiley" 1323 1324 if {[file exists $smileyfile]} { 1325 set fileHandle [open $smileyfile] 1326 set line [gets $fileHandle] 1327 if {$line == "bMotion smiley configuration (autogenerated)"} { 1328 set bMotionSettings(smiley_type) [gets $fileHandle] 1329 set bMotionSettings(smiley_nose) [gets $fileHandle] 1330 set bMotionSettings(smiley_eyes) [gets $fileHandle] 1331 close $fileHandle 1332 1333 bMotion_putloglev d * "Loaded auto-generated smiley info" 1334 } else { 1335 putlog "bMotion: attempted to load smiley configuration but file is corrupt" 1336 } 1337 } else { 1338 bMotion_putloglev d * "Generating new smiley configuration" 1339 set smiley_type_list [list "paren" "bracket" "angle"] 1340 set smiley_nose_list [list "none" "o" "dash"] 1341 set smiley_eyes_list [list "colon" "equals"] 1342 1343 global bMotionSettings 1344 1345 set bMotionSettings(smiley_type) [pickRandom $smiley_type_list] 1346 set bMotionSettings(smiley_nose) [pickRandom $smiley_nose_list] 1347 set bMotionSettings(smiley_eyes) [pickRandom $smiley_eyes_list] 1348 1349 set fileHandle [open $smileyfile "w"] 1350 puts $fileHandle "bMotion smiley configuration (autogenerated)" 1351 puts $fileHandle [bMotion_setting_get "smiley_type"] 1352 puts $fileHandle [bMotion_setting_get "smiley_nose"] 1353 puts $fileHandle [bMotion_setting_get "smiley_eyes"] 1354 1355 putlog "bMotion: auto-generated smiley configuration" 1356 close $fileHandle 1357 } 1358 } 1359 1360 1361 1362 1311 1363 bMotion_putloglev d * "bMotion: system module loaded" 1312 1364 -
trunk/plugins/en/action_complex_lifts.tcl
r936 r1112 32 32 bMotion_abstract_register "nolift_channel_response" 33 33 bMotion_abstract_batchadd "nolift_channel_response" { 34 "hmmmph :("34 "hmmmph %SMILEY{sad}" 35 35 "OI! Don't do that" 36 36 "Stop that right now!" -
trunk/plugins/en/complex_love.tcl
r936 r1112 42 42 return 1 43 43 } else { 44 bMotionDoAction $channel "" "hehe, want to go out on a date someplace? :)"44 bMotionDoAction $channel "" "hehe, want to go out on a date someplace? %SMILEY{smile} 45 45 set mood(happy) [expr $mood(happy) - 10] 46 46 bMotion_plugins_settings_set "system" "lastdonefor" $channel "" $nick -
trunk/plugins/en/complex_pokemon.tcl
r936 r1112 42 42 bMotionDoAction $channel $nick "/collapses" 43 43 putserv "NOTICE $nick :Sorry, I don't have enough power for a thunder$actualAttack at the moment :(" 44 bMotionDoAction $channel $nick "... pikachu :("44 bMotionDoAction $channel $nick "... pikachu %SMILEY{sad}" 45 45 return 1 46 46 } … … 68 68 bMotionDoAction $channel $nick "/collapses" 69 69 putserv "NOTICE $nick :Sorry, I don't have enough power for a lightning attack at the moment :(" 70 bMotionDoAction $channel $nick "... pikachu :("70 bMotionDoAction $channel $nick "... pikachu %SMILEY{sad}" 71 71 return 1 72 72 } -
trunk/plugins/en/complex_sport.tcl
r936 r1112 54 54 "world championship" 55 55 "olympic" 56 "human-powered" 57 "wetsuit" 58 "legendary" 59 "offroad" 60 "sprint" 61 "artistic" 62 "pocket" 63 "gaelic" 64 "boring" 56 65 } 57 66 … … 95 104 bMotion_abstract_register "sport_sports" 96 105 bMotion_abstract_batchadd "sport_sports" { 106 "archery" 107 "athletics" 108 "badminton" 109 "basketball" 110 "beach volleyball" 111 "boxing" 112 "canoeing" 113 "cycling" 114 "diving" 115 "equestrian" 116 "fencing" 117 "football" 118 "gymnastics" 119 "handball" 120 "field hockey" 121 "judo" 122 "modern pentathlon" 123 "rowing" 124 "rugby" 125 "sailing" 126 "shooting" 127 "swimming" 128 "synchronized swimming" 129 "table tennis" 130 "taekwondo" 131 "tennis" 132 "triathlon" 133 "volleyball" 134 "weightlifting" 135 "wrestling" 136 "geocaching" 137 "canoeing" 138 "backstroke" 139 "breaststroke" 140 "butterfly stroke" 141 "freestyle swimming" 142 "individual Medley" 143 "synchronized swimming" 144 "medley relay" 97 145 "football" 98 146 "American Football" … … 174 222 bMotion_abstract_batchadd "sport_adult_sports_t" { 175 223 "chicken fancying" 224 "vomiting" 176 225 "horthy riding (wahey)" 177 226 "sex" … … 191 240 "%VAR{sport_adjectives}" 192 241 "%VAR{sport_adult_superadjectives_t}" 242 "%VAR{scrap_adult_adjectives_t}" 193 243 } 194 244 bMotion_abstract_register "sport_adult_adjectives" … … 196 246 "%VAR{sport_adjectives}" 197 247 "%VAR{sport_adult_adjectives_t}" 248 "%VAR{scrap_adult_construction_t}" 198 249 } 199 250 bMotion_abstract_register "sport_adult_sports" -
trunk/plugins/en/irc_join.tcl
r1047 r1112 62 62 global botnick mood 63 63 64 set greetings " ranjoins"64 set greetings "generic_greeting" 65 65 set lastLeft [bMotion_plugins_settings_get "system:join" "lastleft" $channel ""] 66 66 … … 91 91 92 92 if {[getFriendship $nick] > 50} { 93 set greetings " bigranjoins"93 set greetings "friend_greeting" 94 94 95 95 if {$nick == $lastLeft} { … … 99 99 } 100 100 101 # ranjoins= generic greeting102 # bigranjoins= friend greeting101 # generic_greeting = generic greeting 102 # friend_greeting = friend greeting 103 103 # dislike_joins = enemy greeting 104 104 # unknown_joins = someone we don't recognise -
trunk/plugins/en/output_VAR.tcl
r1107 r1112 166 166 set replacement [bMotionMakePossessive $replacement] 167 167 } 168 "removeowner" { 169 regsub -nocase "'s?$" $replacement "" replacement 170 } 168 171 "underscore" { 169 172 set replacement [string map { " " "_" } $replacement] -
trunk/plugins/en/output_append.tcl
r1093 r1112 17 17 set length [string length $line] 18 18 set n [rand 100] 19 bMotion_putloglev d* "output_append: length=$length, n=$n"19 bMotion_putloglev 1 * "output_append: length=$length, n=$n" 20 20 if {($length > 10) && ($n > 90)} { 21 bMotion_putloglev d* "output_append: doing!"21 bMotion_putloglev 1 * "output_append: doing!" 22 22 set line [string trim $line] 23 23 # make sure the line ends with a letter (other than D) … … 39 39 set line "%VAR{prepends} $line" 40 40 } 41 bMotion_putloglev d* "output_append: preprocessed line is $line"41 bMotion_putloglev 1 * "output_append: preprocessed line is $line" 42 42 43 43 set line [bMotion_process_macros $channel $line] 44 44 regsub -all "%space" $line " " line 45 45 46 bMotion_putloglev d* "output_append: postprocessed line is $line"46 bMotion_putloglev 1 * "output_append: postprocessed line is $line" 47 47 } 48 48 return $line -
trunk/plugins/en/output_colloquial.tcl
r974 r1112 91 91 } 92 92 93 set colloq_shouldhave{93 bMotion_abstract_register "colloq_shouldhave" { 94 94 "should've" 95 95 "should of" 96 96 } 97 97 98 set colloq_shouldhavenot{98 bMotion_abstract_register "colloq_shouldhavenot" { 99 99 "shouldnt've" 100 100 "shouldn't of" … … 103 103 } 104 104 105 set colloq_you{105 bMotion_abstract_register "colloq_you" { 106 106 "u" 107 107 "ya" 108 108 } 109 109 110 set colloq_your{110 bMotion_abstract_register "colloq_your" { 111 111 "ur" 112 112 } 113 113 114 set colloq_negative{114 bMotion_abstract_register "colloq_negative" { 115 115 "dis" 116 116 "un" -
trunk/plugins/en/output_english.tcl
r1104 r1112 45 45 46 46 # a(n) before a number is wrong more often than it is right 47 regsub -nocase -all { an? ([0-9]+)} $line {\1} line47 regsub -nocase -all {\man? ([0-9]+)} $line {\1} line 48 48 49 49 #"a an" and "an a" are wrong 50 regsub -nocase -all "(a an|an a) "$line "a " line50 regsub -nocase -all {\m(a an|an a)\M} $line "a " line 51 51 52 52 if {[rand 100] > 60} { … … 79 79 regsub -all {\myou is\M} $line "you are" line 80 80 81 #fix "r" at start of line followed by capital 82 if {[regexp {^r ([A-Z]).} $line matches 1]} { 83 set line [string tolower [string range $line 0 2]][string range $line 3 end] 84 } 85 81 86 #fix gap before full stop 82 87 -
trunk/plugins/en/simple_notbot.tcl
r936 r1112 18 18 bMotion_abstract_batchadd "notbots" { 19 19 "no I'm not" 20 "am not :("20 "am not %SMILEY{sad}" 21 21 "am not" 22 22 "LIES."
Note: See TracChangeset
for help on using the changeset viewer.
