Changeset 716
- Timestamp:
- 09/13/06 09:16:59 (6 years ago)
- File:
-
- 1 edited
-
trunk/plugins/en/complex_summon.tcl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/en/complex_summon.tcl
r715 r716 16 16 proc bMotion_plugin_complex_summon { nick host handle channel text } { 17 17 global summon_privmsg_response 18 global botnicks 18 19 19 20 # bMotion_putloglev d * "bMotion: (summon) entering" … … 39 40 # summon the best we can 40 41 if { ![onchan $name $channel] } { 42 # the botnick could be non-existant 43 if [regexp -nocase "^$botnicks\$" $name] { 44 bMotion_putloglev d * "bMotion: (summon) myself!" 45 bMotionDoAction $channel $nick "%VAR{summon_bot}" 46 return 1 47 } 41 48 bMotion_putloglev d * "bMotion: (summon) answering for someone not here" 42 49 bMotionDoAction $channel $name "%VAR{summon_channel_response_notthere}" 43 50 } else { 51 # the botnick could exist but be shorthand 52 if [isbotnick $name || regexp -nocase "$botnicks" $name] { 53 bMotion_putloglev d * "bMotion: (summon) myself!" 54 bMotionDoAction $channel $nick "%VAR{summon_bot}" 55 return 1 56 } 44 57 bMotion_putloglev d * "bMotion: (summon) answering for someone here" 45 58 if [isbotnick $name] { … … 48 61 } 49 62 bMotionDoAction $channel $name "%VAR{summon_channel_response}" 50 set msg [pickRandom $summon_privmsg_response] 51 # replacements 63 #set msg [pickRandom $summon_privmsg_response] 64 set msg [doInterpolation "%VAR{summon_privmsg_response}" $nick ""] 65 # replacements (TODO: may not be needed after doInterpolation) 52 66 regsub "%chan" $msg $channel msg 53 67 regsub "%%" $msg $nick msg 54 68 # notify 55 puthelp "NOTICE $name :$msg"56 69 puthelp "PRIVMSG $name :$msg" 57 70 } … … 68 81 bMotion_plugin_add_complex "summon" "^!summon" 100 "bMotion_plugin_complex_summon" "en" 69 82 70 set summon_channel_response_notthere { 83 bMotion_abstract_register "summon_channel_response_notthere" 84 bMotion_abstract_batchadd "summon_channel_response_notthere" { 71 85 "yoooo hooooo! %%!" 72 86 "hello there, %%?" … … 78 92 } 79 93 80 set summon_channel_response { 94 bMotion_abstract_register "summon_channel_response" 95 bMotion_abstract_batchadd "summon_channel_response" { 81 96 "/prods at %% with %noun" 82 97 "through my awesome powers of telepathy, I shall summon %%!!" … … 87 102 } 88 103 89 set summon_privmsg_response { 104 bMotion_abstract_register "summon_privmsg_response" 105 bMotion_abstract_batchadd "summon_privmsg_response" { 90 106 "FYI: %% was looking for you on %chan" 91 107 "just so you know %% was asking about you on %chan" … … 96 112 } 97 113 98 set summon_channel_idiot { 114 bMotion_abstract_register "summon_channel_idiot" 115 bMotion_abstract_batchadd "summon_channel_idiot" { 99 116 "ANNOUNCEMENT: %% is an idiot. That is all." 100 117 "Pay no attention to %%, the village idiot."
Note: See TracChangeset
for help on using the changeset viewer.
