Ignore:
Timestamp:
09/15/03 12:03:35 (9 years ago)
Author:
jamesoff
Message:

greet users based on being in the bot, not being +I
sometimes be rude to them :P

File:
1 edited

Legend:

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

    r258 r259  
    1111############################################################################### 
    1212 
    13  
    14 bMotion_plugin_add_irc_event "default join" "join" ".*" 80 "bMotion_plugins_irc_default_join" "en" 
    1513 
    1614proc bMotion_plugins_irc_default_join { nick host handle channel text } {  
     
    2927  set chance [rand 10] 
    3028  set greetings [bMotion_abstract_all "ranjoins"] 
    31   if {$chance > 8} { 
    32     if [matchattr $handle I] { 
    33       set greetings [concat $greetings [bMotion_abstract_all "bigranjoins"] 
    34       if {$nick == $bMotionCache(lastLeft)} { 
    35         set greetings [bMotion_abstract_all "welcomeBacks"] 
    36         set bMotionCache(lastLeft) "" 
    37       } 
    38       incr mood(happy) 
    39       incr mood(lonely) -1 
     29  if {$handle != "*"} { 
     30    set greetings [concat $greetings [bMotion_abstract_all "bigranjoins"]] 
     31    set greetings [concat $greetings [bMotion_abstract_all "insult_joins"]] 
     32    if {$nick == $bMotionCache(lastLeft)} { 
     33      set greetings [bMotion_abstract_all "welcomeBacks"] 
     34      set bMotionCache(lastLeft) "" 
    4035    } 
     36    incr mood(happy) 
     37    incr mood(lonely) -1 
     38  } 
    4139 
    42     #set nick [bMotion_cleanNick $nick $handle] 
     40  #set nick [bMotion_cleanNick $nick $handle] 
    4341 
    44     bMotionDoAction $channel [bMotionGetRealName $nick $host] [pickRandom $greetings] 
    45     set bMotionCache(lastGreeted) $nick 
    46     bMotion_plugins_settings_set "system:join" "lasttalk" $channel "" 1 
    47   } 
     42  bMotionDoAction $channel [bMotionGetRealName $nick $host] [pickRandom $greetings] 
     43  set bMotionCache(lastGreeted) $nick 
     44  bMotion_plugins_settings_set "system:join" "lasttalk" $channel "" 1 
    4845 
    4946  return 0 
    5047} 
    5148 
     49bMotion_plugin_add_irc_event "default join" "join" ".*" 75 "bMotion_plugins_irc_default_join" "en" 
     50 
     51bMotion_abstract_register "insult_joins" 
     52bMotion_abstract_batchadd "insult_joins" [list "%ruser: yeah, %% does suckOH HI %%!" "\[%%\] I'm a %VAR{PROM}%|%VAR{wrong_infoline}" "\[%%\] I love %ruser%|%VAR{wrong_infoline}"] 
     53 
     54bMotion_abstract_register "wrong_infoline" 
     55bMotion_abstract_batchadd "wrong_infoline" [list "oops, wrong infoline, sorry" "huk, wrong infoline" "whoops" "o wait not that infoline"] 
Note: See TracChangeset for help on using the changeset viewer.