Changeset 1002 for trunk/plugins/en/irc_join.tcl
- Timestamp:
- 04/22/09 14:00:16 (3 years ago)
- File:
-
- 1 edited
-
trunk/plugins/en/irc_join.tcl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/en/irc_join.tcl
r961 r1002 14 14 #if the user isban then dont bother 15 15 if {[ischanban $nick $channel] == 1 } { 16 bMotion_putloglev 2 d"dropping greeting for $nick on $channel as user is banned"16 bMotion_putloglev d * "dropping greeting for $nick on $channel as user is banned" 17 17 return 0 18 18 } … … 24 24 #if 0, someone has said something since 25 25 if {$lasttalk == 1} { 26 bMotion_putloglev 2 d"dropping greeting for $nick on $channel because it's too idle"26 bMotion_putloglev d * "dropping greeting for $nick on $channel because it's too idle" 27 27 return 0 28 28 } 29 29 30 # check if the user is already in the channel - probably means they've joined a 2nd client 31 # or that they're about to ping out or something 32 set count 0 33 foreach n [chanlist $channel] { 34 if {[nick2hand $n $channel] == $handle} { 30 # skip this check if handle is * as it's pointless 31 if {$handle == "*"} { 32 # check if the user is already in the channel - probably means they've joined a 2nd client 33 # or that they're about to ping out or something 34 set count 0 35 foreach n [chanlist $channel] { 36 if {[nick2hand $n $channel] == $handle} { 35 37 # we have a match 36 incr count 38 incr count 39 } 37 40 } 38 } 39 40 if {$count >= 2} {41 bMotion_putloglev d * "$nick has $count matching handles in $channel, so not greeting"42 return 141 42 if {$count >= 2} { 43 bMotion_putloglev d * "$nick has $count matching handles in $channel, so not greeting" 44 return 1 45 } 43 46 } 44 47 45 48 #we must also see if we're next to greet 46 49 if {![bMotion_interbot_me_next $channel]} { 50 bMotion_putloglev 1 * "we're not next for $channel, so not greeting" 47 51 return 1 48 52 } … … 50 54 if {[bMotion_setting_get "friendly"] == "2"} { 51 55 # don't greet anyone 56 bMotion_putloglev 1 * "we're friendly==2 so not greeting $nick in $channel" 52 57 return 0 53 58 } … … 60 65 if {$handle == "*"} { 61 66 if {[bMotion_setting_get "friendly"] != "1"} { 67 bMotion_putloglev d * "$nick has no handle and friendly!=1 so not greeting" 62 68 return 0 63 69 } … … 71 77 if {![rand 10]} { 72 78 set greetings "insult_joins" 79 bMotion_putloglev d * "decided to be rude to $nick on join as i know them" 73 80 } 74 81 bMotionGetHappy
Note: See TracChangeset
for help on using the changeset viewer.
