Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.38 KB | None | 0 0
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE muclient>
  3. <!-- Saved on Saturday, June 30, 2007, 10:48 -->
  4. <!-- MuClient version 4.13 -->
  5.  
  6. <!-- Plugin "Chat_Redirector" generated by Plugin Wizard -->
  7.  
  8. <!--
  9. Edit plugin and change "chat_world" variable to be the name of the
  10. world you want chats to go to.
  11. -->
  12.  
  13. <muclient>
  14. <plugin
  15. name="Chatnet"
  16. author="Nick Gammon"
  17. id="cb84a526b476fffffffffffa"
  18. language="Lua"
  19. purpose="Redirects chat messages to another world"
  20. date_written="2007-06-30 10:45:35"
  21. requires="4.08"
  22. version="1.0"
  23. >
  24. <description trim="y">
  25. <![CDATA[
  26. Redirects chats to the specified world.
  27.  
  28. Add or modify "chat" triggers to capture different sorts of message.
  29.  
  30. Change the variable "chat_world" to be the name of the world chats are to go to.
  31. ]]>
  32. </description>
  33.  
  34. </plugin>
  35.  
  36. <!-- Triggers -->
  37.  
  38. <triggers>
  39.  
  40. <trigger
  41. enabled="y"
  42. match="^From your wristpad.*$"
  43. omit_from_output="y"
  44. regexp="y"
  45. script="redirect"
  46. sequence="100"
  47. >
  48. </trigger>
  49.  
  50. <trigger
  51. enabled="y"
  52. match="^You text.*$"
  53. omit_from_output="y"
  54. regexp="y"
  55. script="redirect"
  56. sequence="100"
  57. >
  58. </trigger>
  59.  
  60. <trigger
  61. enabled="y"
  62. match="^[a-zA-Z0-9].* says.*$"
  63. omit_from_output="y"
  64. regexp="y"
  65. script="redirect"
  66. sequence="100"
  67. >
  68. </trigger>
  69.  
  70. <trigger
  71. enabled="y"
  72. match="^\[ DONGS \].*$"
  73. omit_from_output="y"
  74. regexp="y"
  75. script="redirect"
  76. sequence="100"
  77. >
  78. </trigger>
  79.  
  80. <trigger
  81. enabled="y"
  82. match="^\[chatnet\].*$"
  83. omit_from_output="y"
  84. regexp="y"
  85. script="redirect"
  86. sequence="100"
  87. >
  88. </trigger>
  89.  
  90. <trigger
  91. enabled="y"
  92. match="^\[djnet\].*$"
  93. omit_from_output="y"
  94. regexp="y"
  95. script="redirect"
  96. sequence="100"
  97. >
  98. </trigger>
  99.  
  100. <trigger
  101. enabled="y"
  102. match="^\[tradenet\].*$"
  103. omit_from_output="y"
  104. regexp="y"
  105. script="redirect"
  106. sequence="100"
  107. >
  108. </trigger>
  109.  
  110. <trigger
  111. enabled="y"
  112. match="^\[zotnet\].*$"
  113. omit_from_output="y"
  114. regexp="y"
  115. script="redirect"
  116. sequence="100"
  117. >
  118. </trigger>
  119.  
  120. <trigger
  121. enabled="y"
  122. match="^\[ \].*$"
  123. omit_from_output="y"
  124. regexp="y"
  125. script="redirect"
  126. sequence="100"
  127. >
  128. </trigger>
  129.  
  130. <trigger
  131. enabled="y"
  132. match="^\[ \* \].*$"
  133. omit_from_output="y"
  134. regexp="y"
  135. script="redirect"
  136. sequence="100"
  137. >
  138. </trigger>
  139.  
  140. <trigger
  141. enabled="y"
  142. match="^\[ B=D \].*$"
  143. omit_from_output="y"
  144. regexp="y"
  145. script="redirect"
  146. sequence="100"
  147. >
  148. </trigger>
  149.  
  150. <trigger
  151. enabled="y"
  152. match="^\[ B===D \].*$"
  153. omit_from_output="y"
  154. regexp="y"
  155. script="redirect"
  156. sequence="100"
  157. >
  158. </trigger>
  159.  
  160. <trigger
  161. enabled="y"
  162. match="^\[B=====D\].*$"
  163. omit_from_output="y"
  164. regexp="y"
  165. script="redirect"
  166. sequence="100"
  167. >
  168. </trigger>
  169.  
  170. <trigger
  171. enabled="y"
  172. match="^\[jailnet\].*$"
  173. omit_from_output="y"
  174. regexp="y"
  175. script="redirect"
  176. sequence="100"
  177. >
  178. </trigger>
  179.  
  180. <trigger
  181. enabled="y"
  182. match="^\[PLAYnet\].*$"
  183. omit_from_output="y"
  184. regexp="y"
  185. script="redirect"
  186. sequence="100"
  187. >
  188. </trigger>
  189. <trigger
  190. enabled="y"
  191. match="^\[ MEME \].*$"
  192. omit_from_output="y"
  193. regexp="y"
  194. script="redirect"
  195. sequence="100"
  196. >
  197. </trigger>
  198.  
  199. </triggers>
  200.  
  201. <!-- Script -->
  202.  
  203.  
  204. <script>
  205. <![CDATA[
  206. chat_world = "hellmoo_Chat"
  207. local first_time = true
  208.  
  209. function redirect (name, line, wildcards, styles)
  210.  
  211. -- try to find "chatnet" world
  212. local w = GetWorld (chat_world) -- get "chatnet" world
  213.  
  214. -- if not found, try to open it
  215. if first_time and not w then
  216. local filename = GetInfo (67) .. chat_world .. ".mcl"
  217. Open (filename)
  218. w = GetWorld (chat_world) -- try again
  219. if not w then
  220. ColourNote ("white", "red", "Can't open chat world file: " .. filename)
  221. first_time = false -- don't repeatedly show failure message
  222. end -- can't find world
  223. end -- can't find world first time around
  224.  
  225. if w then -- if present
  226. for _, v in ipairs (styles) do
  227. w:ColourTell (RGBColourToName (v.textcolour),
  228. RGBColourToName (v.backcolour),
  229. v.text)
  230. end -- for each style run
  231. w:Note ("") -- wrap up line
  232.  
  233. end -- world found
  234.  
  235. end -- function redirect
  236.  
  237. ]]>
  238. </script>
  239.  
  240.  
  241. </muclient>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement