Changeset 1048 for trunk


Ignore:
Timestamp:
10/16/09 15:23:28 (3 years ago)
Author:
james
Message:

did... something

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/en/complex_sucks.tcl

    r936 r1048  
    1515 
    1616proc bMotion_plugin_complex_sucks { nick host handle channel text } { 
    17                 global botnicks 
     17        global botnicks 
    1818 
    19                 if [regexp -nocase {([^ ]+) ((is|si|==) (teh|the)? )?sucks?} $text matches item] { 
    20                                 if {$item == "=="} { 
    21                                                 return 0 
    22                                 } 
     19        if [regexp -nocase {([a-z0-9]+) (all )?suck[.!]*$} $text matches item] { 
     20                bMotionDoAction $channel $item "%VAR{sucks}" 
     21                return 1 
     22        } 
    2323 
    24                                 if {[string tolower $item] == "i"} { 
    25                                                 return 0 
    26                                 } 
     24        if [regexp -nocase {^([a-z0-9]+) sucks} $text matches item] { 
     25                if [regexp -nocase "^(that|you|which|that|it|what)$" $item] { 
     26                        return 0 
     27                } 
     28                bMotionDoAction $channel $item "%VAR{sucks}" 
     29                return 1 
     30        } 
    2731 
    28                                 if [regexp -nocase "you|we|really|=|i|$botnicks" $item] { 
    29                                                 return 0 
    30                                 } 
     32        return 0 
    3133 
    32                                 bMotionDoAction $channel $item "%VAR{sucks}" 
    33                                 return 1 
     34        # DEAD CODE vvv 
     35 
     36        if [regexp -nocase {([^ ]+) ((is|si|==?) (teh|the)? )?(sucks?)} $text matches 1 2 3 4 5] { 
     37                set item $1 
     38                if {$item == "=="} { 
     39                        return 0 
    3440                } 
     41 
     42                if {[string tolower $item] == "i"} { 
     43                        return 0 
     44                } 
     45 
     46                if [regexp -nocase "you|we|really|=|i|$botnicks" $item] { 
     47                        return 0 
     48                } 
     49 
     50                if {($2 == "") && ($3 == "suck")} { 
     51                # no teh or the 
     52                } 
     53 
     54 
     55 
     56                bMotionDoAction $channel $item "%VAR{sucks}" 
     57                return 1 
     58        } 
    3559} 
    3660 
Note: See TracChangeset for help on using the changeset viewer.