Advertisement
amandajean1

Area Repop

Apr 20th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE muclient>
  3. <!-- Saved on Monday, October 25, 2010, 3:21 AM -->
  4. <!-- MuClient version 4.61 -->
  5.  
  6.  
  7. <muclient>
  8. <plugin
  9. name="repop"
  10. author="Xaxz"
  11. id="74e855c52c18ccd8d0a56453"
  12. language="Lua"
  13. purpose="Displays GMCP repop messages"
  14. save_state="y"
  15. date_written="2011-05-23 06:52:00"
  16. requires="4.61"
  17. version="1.0"
  18. >
  19. <description trim="y">
  20. <![CDATA[
  21.  
  22. xrepop
  23. ]]>
  24. </description>
  25.  
  26. </plugin>
  27.  
  28.  
  29. <!-- Get our standard constants -->
  30.  
  31. <include name="constants.lua"/>
  32.  
  33. <!-- Triggers -->
  34. <triggers>
  35.  
  36. </triggers>
  37.  
  38. <!-- Aliases -->
  39. <aliases>
  40. <alias
  41. match="xrepop on"
  42. enabled="y"
  43. script="repop_on"
  44. regexp="n"
  45. >
  46. </alias>
  47.  
  48. <alias
  49. match="xrepop off"
  50. enabled="y"
  51. script="repop_off"
  52. regexp="n"
  53. >
  54. </alias>
  55.  
  56. <alias
  57. match="xrepop chan *"
  58. enabled="y"
  59. script="repop_chan"
  60. regexp="n"
  61. >
  62. </alias>
  63. </aliases>
  64.  
  65. <!-- Variables -->
  66.  
  67.  
  68. <!-- Plugin help -->
  69.  
  70.  
  71. <script>
  72. <![CDATA[
  73. repop_channel = "spouse"
  74. repopOn = true
  75.  
  76. function repop_on(name, line, wildcards)
  77. repopOn = true
  78. Note("XRepop: repop reporting on.")
  79. end
  80.  
  81. function repop_off(name, line, wildcards)
  82. repopOn = false
  83. Note("XRepop: repop reporting off.")
  84. end
  85.  
  86. function repop_chan(name, line, wildcards)
  87. repop_channel = wildcards[1]
  88. Note("XRepop: repop channel set to \""..repop_channel.."\"")
  89. end
  90.  
  91. function OnPluginBroadcast (msg, id, name, text)
  92.  
  93. -- Look for GMCP handler.
  94. if (id == '3e7dedbe37e44942dd46d264') then
  95. if (text == "comm.repop") then
  96. res, gmcpvar = CallPlugin("3e7dedbe37e44942dd46d264","gmcpval","comm.repop.zone")
  97. if repopOn then
  98. SendNoEcho(string.format("%s @RA@rrea @W%s @Rh@ras @Wr@wepopped @Ra@rt @W%s.@w", repop_channel, gmcpvar, os.date("%I:%M:%S %p")))
  99. end
  100. end
  101. end
  102. end
  103.  
  104. function OnPluginSaveState ()
  105. SetVariable("repop_channel", repop_channel)
  106. end
  107.  
  108. function OnPluginInstall()
  109. repop_channel = GetVariable("repop_channel")
  110. repop_channel = repop_channel or "spouse"
  111. end
  112.  
  113. ]]>
  114. </script>
  115.  
  116. </muclient>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement