Advertisement
Guest User

Untitled

a guest
Dec 31st, 2008
535
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 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="GOON"
  16. author="Nick Gammon"
  17. id="cb84a526b476f69f403517da"
  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="^\[ GOON \].*$"
  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="^From your wristpad.*$"
  53. omit_from_output="y"
  54. regexp="y"
  55. script="redirect"
  56. sequence="100"
  57. >
  58. </trigger>
  59.  
  60. </triggers>
  61.  
  62. <!-- Script -->
  63.  
  64.  
  65. <script>
  66. <![CDATA[
  67. chat_world = "chats"
  68. local first_time = true
  69.  
  70. function redirect (name, line, wildcards, styles)
  71.  
  72. -- try to find "chat" world
  73. local w = GetWorld (chat_world) -- get "chat" world
  74.  
  75. -- if not found, try to open it
  76. if first_time and not w then
  77. local filename = GetInfo (67) .. chat_world .. ".mcl"
  78. Open (filename)
  79. w = GetWorld (chat_world) -- try again
  80. if not w then
  81. ColourNote ("white", "red", "Can't open chat world file: " .. filename)
  82. first_time = false -- don't repeatedly show failure message
  83. end -- can't find world
  84. end -- can't find world first time around
  85.  
  86. if w then -- if present
  87. for _, v in ipairs (styles) do
  88. w:ColourTell (RGBColourToName (v.textcolour),
  89. RGBColourToName (v.backcolour),
  90. v.text)
  91. end -- for each style run
  92. w:Note ("") -- wrap up line
  93.  
  94. end -- world found
  95.  
  96. end -- function redirect
  97.  
  98. ]]>
  99. </script>
  100.  
  101.  
  102. </muclient>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement