Changeset 1108


Ignore:
Timestamp:
01/15/11 13:37:53 (16 months ago)
Author:
james
Message:

improve stoplist for demon plugin
add bMotion_sufficient_gap method
fix some pluralising
use new bMotion_sufficient_gap method for smiley, spoonerism and supermarket plugins
better trigger for sound questions
assorted new content

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/abstracts/en/abstracts.tcl

    r1103 r1108  
    46854685        "%channel is recorded in front of a live studio audience" 
    46864686        "%VAR{captains_logs}" 
     4687        "/scans wardrobe%|I think this is a %VAR{clothes} day." 
     4688        "Today, I will be mostly wearing... my %VAR{clothes} and my %VAR{clothes}" 
     4689        "/puts on %VAR{clothes}%|Important meeting today, got to look my best %VAR{smiles}" 
    46874690} 
    46884691 
     
    47424745        "The Secret Assignment" 
    47434746        "The Heat Thickens" 
     4747        "There Go My %VAR{clothes:plural,strip,camel}!" 
    47444748} 
    47454749 
     
    49804984        "shorts" 
    49814985        "jacket" 
     4986        "scarf" 
     4987        "vest" 
     4988        "coat" 
     4989        "anorak" 
     4990        "jacket" 
     4991        "poncho" 
     4992        "raincoat" 
     4993        "gloves" 
     4994        "boots" 
     4995        "slippers" 
     4996        "sneakers" 
     4997        "sandals" 
     4998        "baseball cap" 
     4999        "beanie" 
     5000        "bobble hat" 
     5001        "straw hat" 
     5002        "cape" 
     5003        "pajamas" 
     5004        "wetsuit" 
     5005        "apron" 
     5006        "sweater" 
     5007        "polo shirt" 
     5008        "jeans" 
     5009        "breeches" 
     5010        "chaps" 
     5011        "cycling shorts" 
     5012        "jean shorts" 
     5013        "fatsuit" 
    49825014} 
    49835015 
    49845016bMotion_abstract_register "clothes_female" { 
     5017        "crop top" 
     5018        "halter top" 
     5019        "bikini" 
     5020        "G-string" 
     5021        "ballgown" 
     5022        "dress" 
     5023        "burqa" 
     5024        "negligee" 
     5025        "cocktail dress" 
     5026        "frock" 
     5027        "bloomers" 
     5028        "little black dress" 
     5029        "petticoat" 
     5030        "wedding dress" 
     5031        "shoulder pads" 
    49855032        "knickers" 
    49865033        "tights" 
    49875034        "stockings" 
    49885035        "bra" 
     5036        "leg warmers" 
     5037        "leotard" 
    49895038        "skirt" 
    49905039        "thong" 
     5040        "hijab" 
     5041        "crop top" 
     5042        "miniskirt" 
     5043        "catsuit" 
     5044        "swimsuit" 
     5045        "skort" 
     5046        "bonnet" 
     5047        "suspenders" 
     5048        "corset" 
     5049        "girdle" 
     5050        "loose socks" 
    49915051} 
    49925052 
    49935053bMotion_abstract_register "clothes_male" { 
     5054        "jockstrap" 
     5055        "boxer shorts" 
     5056        "running shorts" 
     5057        "lederhosen" 
     5058        "codpiece" 
     5059        "boilersuit" 
     5060        "turban" 
     5061        "shirt" 
     5062        "tank top" 
     5063        "fez" 
     5064        "loincloth" 
     5065        "swimming trunks" 
     5066        "top hat" 
     5067        "fedora" 
    49945068        "Y-fronts" 
    49955069        "braces" 
  • trunk/modules/abstracts/en/randomstuff.tcl

    r1094 r1108  
    66### Used when the channel is not 'active' (default > 300s since last line) 
    77bMotion_abstract_register "randomStuff" { 
     8        "my %VAR{bodypart} is itchy, is that normal?" 
    89        "i have a MIGHTY NEED to use the %VAR{rooms}" 
    910        "help! my %VAR{bodypart:plural} are escaping!" 
     
    227228        "Pardon me. Do you have any grey poupon?" 
    228229        "PENIS BECOMES ARM" 
     230        "%VAR{bodypart:caps} BECOMES %VAR{bodypart:caps}" 
    229231        "UH OH YES IT IS LAUNDRY NIGHT FOR ME HA HA HA" 
    230232        "I'm eating cake mix!" 
  • trunk/modules/output.tcl

    r1085 r1108  
    10041004        bMotion_putloglev 5 * "bMotionMakePlural ($text)" 
    10051005 
    1006         if [regexp -nocase "(ss|ts|us|is|x|ch|sh)$" $text] { 
     1006        if [regexp -nocase "(ss|us|is|x|ch|sh)$" $text] { 
    10071007                append text "es" 
    10081008                return $text 
    10091009        } 
    10101010 
    1011         if [regexp -nocase "s$" $text] { 
     1011 
     1012        if [regexp -nocase {s$} $text] { 
    10121013                return $text 
    10131014        } 
  • trunk/modules/system.tcl

    r1081 r1108  
    200200 
    201201        if {($timeNow - $mostRecent) < $gapTime} { 
    202                 bMotion_putloglev 1 * "most recent is busy enough, not going away" 
    203                 return 0 
     202                set chance [rand 100] 
     203                if ($chance > [bMotion_setting_get "awaychance"]) { 
     204                        bMotion_putloglev 1 * "most recent is busy enough, not going away" 
     205                        return 0 
     206                } 
     207                bMotion_putloglev 1 * "most recent is busy enough but going away anyway" 
    204208        } 
    205209 
     
    210214        } 
    211215 
    212         if {[rand 4] == 0} { 
     216        if {[rand 3] == 0} { 
    213217                putlog "bMotion: All channels are idle, going away" 
    214218                bMotionSetRandomAway 
     
    12431247} 
    12441248 
    1245  
     1249# generic time-since handler 
     1250# mingap is in seconds 
     1251# other params are as for plugin settings 
     1252# returns 1 if gap since last is > mingap 
     1253# updates last to be now regardless 
     1254# nick is optional for this 
     1255proc bMotion_sufficient_gap { mingap plugin channel {nick ""} } { 
     1256        bMotion_putloglev 5 * "bMotion_sufficient_gap: $mingap $plugin $channel $nick" 
     1257                set lasttime [bMotion_plugins_settings_get $plugin "lasttime" $channel $nick] 
     1258                set diff [expr $mingap + 1] 
     1259                set gap_ok 0 
     1260 
     1261                if {$lasttime != ""} { 
     1262                        set diff [expr [clock seconds] - $lasttime] 
     1263                } 
     1264                bMotion_putloglev 1 * "sufficient_gap: last=$lasttime, now=[clock seconds], gap=$diff" 
     1265                if {$diff > $mingap} { 
     1266                        set gap_ok 1 
     1267                }  
     1268                bMotion_plugins_settings_set $plugin "lasttime" $channel $nick [clock seconds] 
     1269                bMotion_putloglev 1 * "sufficient_gap: returning $gap_ok for $plugin $channel ($nick) > $mingap" 
     1270                return $gap_ok 
     1271} 
    12461272 
    12471273bMotion_putloglev d * "bMotion: system module loaded" 
  • trunk/plugins/en/complex_card.tcl

    r1101 r1108  
    1616 
    1717proc bMotion_plugin_complex_card {nick host handle channel text} { 
    18  
    1918        if {[bMotionTalkingToMe $text] || [bMotion_interbot_me_next $channel]} { 
    2019                set modifier "" 
  • trunk/plugins/en/complex_questions.tcl

    r1084 r1108  
    3434 
    3535        bMotion_putloglev 3 * "checking question for sound: $text" 
    36         if {[regexp -nocase "^$botnicks,?:? what sound " $text] || [regexp -nocase "what sound .+${botnicks}\\?$" $text]} { 
     36        if {[regexp -nocase "^$botnicks,?:? what (noise|sound)s? " $text] || [regexp -nocase "what (noise|sound)s? .+${botnicks}\\?$" $text]} { 
    3737                bMotion_putloglev 3 * "it's a sound question" 
    3838                bMotionDoAction $channel $nick "%VAR{sound_answer}" 
  • trunk/plugins/en/complex_scrap.tcl

    r1100 r1108  
    455455  "tight" 
    456456  "loose" 
    457  
    458457  "pole dancing" 
    459458  "stripping" 
     459        "arousing" 
     460        "exciting" 
     461        "gentle" 
     462        "ENORMOUS" 
     463        "creepy" 
     464        "damp" 
     465        "hot" 
     466        "warm" 
     467        "substantial" 
     468        "anal" 
     469        "3D" 
     470        "HD" 
     471        "homosexual" 
     472        "heterosexual" 
     473        "wanking" 
     474        "lactating" 
     475        "vaginal" 
     476        "racist" 
     477        "dumping" 
     478        "mongy" 
     479        "nude" 
     480        "barfing" 
     481 
    460482} 
    461483bMotion_abstract_add_filter "scrap_adult_adjectives_t" "girating" 
     
    503525  "box" 
    504526  "dominatrix" 
     527        "butt plug" 
     528        "nipple clamp" 
     529        "gigolo" 
     530        "jockstrap" 
     531        "knickers" 
     532        "pants" 
     533        "handcuffs" 
     534        "bone" 
     535        "dog" 
     536        "condom" 
     537        "shit" 
     538        "anus" 
     539        "blowjob" 
     540        "gentials" 
     541        "dick" 
    505542} 
    506543bMotion_abstract_add_filter "scrap_adult_construction_t" "girator" 
  • trunk/plugins/en/complex_smiley.tcl

    r936 r1108  
    2323  if {![bMotion_interbot_me_next $channel]} { return 0 } 
    2424 
    25   foreach i {"smiley" "smiley2"} { 
    26         bMotion_putloglev 2 * "checking $i" 
    27          
    28                 if {[bMotion_plugin_history_check $channel "complex" "bMotion_plugin_complex_$i"]} { 
    29                         bMotion_putloglev 2 * "can't trigger a smiley so soon" 
     25        if [bMotion_sufficient_gap 120 "complex:smiley" $channel] { 
     26                if {$mood(happy) < 0} { 
    3027                        return 0 
    3128                } 
     29 
     30                bMotionDoAction $channel "" "%VAR{smiles}" 
     31                bMotionGetHappy 
     32                bMotionGetUnLonely 
     33                return 1 
    3234        } 
    33  
    34   if {$mood(happy) < 0} { 
    35     return 0 
    36   } 
    37  
    38   bMotionDoAction $channel "" "%VAR{smiles}" 
    39   bMotionGetHappy 
    40   bMotionGetUnLonely 
    41   return 1 
     35        return 0 
    4236} 
    4337 
     
    4741  if {![bMotion_interbot_me_next $channel]} { return 0 } 
    4842 
    49   if {$mood(happy) < 0} { 
    50     return 0 
    51   } 
     43        if [bMotion_sufficient_gap 120 "complex:smiley" $channel] { 
     44                if {$mood(happy) < 0} { 
     45                        return 0 
     46                } 
    5247 
    53   bMotionDoAction $channel "" "%VAR{smiles}" 
    54   bMotionGetHappy 
    55   bMotionGetUnLonely 
    56   return 1 
     48                bMotionDoAction $channel "" "%VAR{smiles}" 
     49                bMotionGetHappy 
     50                bMotionGetUnLonely 
     51                return 1 
     52        } 
     53        return 0 
    5754} 
  • trunk/plugins/en/complex_spoonerism.tcl

    r1094 r1108  
    5353        } 
    5454 
    55         if [regexp -nocase {([b-df-hj-np-tv-xz]+)(([aeiou])\3)([b-df-hj-np-tv-xz]+[.!?]?)} $text matches 1 2 3 4] { 
    56                 if {$matches == "cool"} { 
    57                         return 0 
     55        if [bMotion_sufficient_gap 300 "complex:spoonerism" $channel] { 
     56                if [regexp -nocase {([b-df-hj-np-tv-xz]+)(([aeiou])\3)([b-df-hj-np-tv-xz]+[.!?]?)} $text matches 1 2 3 4] { 
     57                        if {$matches == "cool"} { 
     58                                return 0 
     59                        } 
     60                        bMotionDoAction $channel $text "$1%REPEAT{2:10:$2}$3$4" 
     61                        return 1 
    5862                } 
    59                 bMotionDoAction $channel $text "$1%REPEAT{2:10:$2}$3$4" 
    60                 return 1 
    6163        } 
     64        return 0 
    6265} 
    6366 
     
    6871        } 
    6972 
    70         if [regexp -nocase {([a-z]+)less ([a-z]+)\M} $text matches one two] { 
    71                 if [regexp -nocase {^(un|use|b|regard)$} $one] { 
    72                         return 0 
     73        if [bMotion_sufficient_gap 300 "complex:spoonerism" $channel] { 
     74                if [regexp -nocase {([a-z]+)less ([a-z]+)\M} $text matches one two] { 
     75                        if [regexp -nocase {^(un|use|b|regard)$} $one] { 
     76                                return 0 
     77                        } 
     78 
     79                        if [regexp -nocase {^(and|one|of|n)$} $two] { 
     80                                return 0 
     81                        } 
     82 
     83                        if {[string range $two end end] == "s"} { 
     84                                append one "s" 
     85                                set two [string range $two 0 end-1] 
     86                        } 
     87                        bMotionDoAction $channel "" "${two}less $one" 
     88                        return 1 
    7389                } 
    74  
    75                 if [regexp -nocase {^(and|one|of|n)$} $two] { 
    76                         return 0 
    77                 } 
    78  
    79                 if {[string range $two end end] == "s"} { 
    80                         append one "s" 
    81                         set two [string range $two 0 end-1] 
    82                 } 
    83                 bMotionDoAction $channel "" "${two}less $one" 
    84                 return 1 
    8590        } 
     91        return 0 
    8692} 
    8793 
  • trunk/plugins/en/complex_supermarkets.tcl

    r936 r1108  
    1414 
    1515proc bMotion_plugin_complex_supermarket { nick host handle channel text } { 
    16   if {![bMotion_interbot_me_next $channel]} { return 1 } 
     16  if {![bMotion_interbot_me_next $channel]} {  
     17                return 1  
     18        } 
     19 
     20        set canDo [bMotion_sufficient_gap 900 "complex:supermarket" $channel] 
     21 
     22        if {$canDo == 0} { 
     23                return 0 
     24        } 
     25 
    1726  if [regexp -nocase {\m(sainsbury\'s|sainsburys|safeway|aldi|asda|walmart|wal-mart|wal mart|somerfield|lidl|co-op|budgens|cws|kiwk-save|kwiksave|kwik save|budgens|iceland|circle k|k-mart|7-11|costcutter|costco|marks and spencers|m&s|marks and sparks|mace-line)\M} $text matches where ] { 
    1827    bMotionDoAction $channel $where "%VAR{insultsupermarket}" 
  • trunk/plugins/en/output_demon.tcl

    r1097 r1108  
    3737 
    3838                #other special cases to fix 
    39                 set word [string map -nocase { soam some someoan someone oq ok looas loose } $word] 
     39                set word [string map -nocase { boaxs boxes soam some someoan someone oq ok } $word] 
    4040 
    4141                # [@     enid] i can not be represented by mere regexps. 
Note: See TracChangeset for help on using the changeset viewer.