Ticket #76: summon.fix.diff
| File summon.fix.diff, 2.9 KB (added by znxster@…, 6 years ago) |
|---|
-
plugins/en/complex_summon.tcl
15 15 # random summoning callback 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" 20 21 # check to make sure we should bother … … 38 39 if { $name != "" && $name != $nick } { 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 { 44 bMotion_putloglev d * "bMotion: (summon) answering for someone here" 45 if [isbotnick $name] { 51 # the botnick could exist but be shorthand 52 if [isbotnick $name || regexp -nocase "$botnicks" $name] { 53 bMotion_putloglev d * "bMotion: (summon) myself!" 46 54 bMotionDoAction $channel $nick "%VAR{summon_bot}" 47 55 return 1 48 56 } 57 bMotion_putloglev d * "bMotion: (summon) answering for someone here" 49 58 bMotionDoAction $channel $name "%VAR{summon_channel_response}" 50 59 set msg [pickRandom $summon_privmsg_response] 51 60 # replacements … … 67 76 # register the summon callback 68 77 bMotion_plugin_add_complex "summon" "^!summon" 100 "bMotion_plugin_complex_summon" "en" 69 78 70 set summon_channel_response_notthere { 79 bMotion_abstract_register "summon_channel_response_notthere" 80 bMotion_abstract_batchadd "summon_channel_response_notthere" { 71 81 "yoooo hooooo! %%!" 72 82 "hello there, %%?" 73 83 "how should I know where %% is?" … … 77 87 "/searches all over the channel for %%" 78 88 } 79 89 80 set summon_channel_response { 90 bMotion_abstract_register "summon_channel_response" 91 bMotion_abstract_batchadd "summon_channel_response" { 81 92 "/prods at %% with %noun" 82 93 "through my awesome powers of telepathy, I shall summon %%!!" 83 94 "/uses a smoke signal to get %%'s attention" … … 86 97 "why do you want to talk to %%?" 87 98 } 88 99 89 set summon_privmsg_response { 100 bMotion_abstract_register "summon_privmsg_response" 101 bMotion_abstract_batchadd "summon_privmsg_response" { 90 102 "FYI: %% was looking for you on %chan" 91 103 "just so you know %% was asking about you on %chan" 92 104 "%% was too lazy to message you from %chan themselves so I had to" … … 95 107 "Oi! %chan now! %% looking for you!" 96 108 } 97 109 98 set summon_channel_idiot { 110 bMotion_abstract_register "summon_privmsg_response" 111 Motion_abstract_batchadd "summon_channel_idiot" { 99 112 "ANNOUNCEMENT: %% is an idiot. That is all." 100 113 "Pay no attention to %%, the village idiot." 101 114 "oOoOooOO very good %%... now who are you looking for?"
