okaz_

Mute

Jan 25th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.67 KB | None | 0 0
  1. # 割と高機能だと思うけどこんなシステムいくらでも実装されてるMuteSkript
  2. # Requested by: okaz_ / おかず#1358(459946063080718347)
  3. # Created by: shuu_9025#1141(422081938489344000)
  4.  
  5. # 必須Skript
  6. # shuu_base_skript (Ver 1.0以上)
  7.  
  8. # 必須Addon
  9. # なし
  10.  
  11. # コマンド
  12. # /mute <Target> [Reason]
  13. # 対象のプレイヤーをミュートします。 権限: mute.punish.mute
  14. #
  15. # /mute-ip <Target> [Reason]
  16. # 対象のIPアドレスをミュートします。MCIDを指定した場合、そのプレイヤーが使用した最後のIPをミュートします。 権限: mute.punish.muteip
  17. #
  18. # /tempmute <Target> <Duration(*1)> [Reason]
  19. # 対象のプレイヤーを一定期間ミュートします。
  20. # Durationの指定方法については、*1を参照してください。 権限: mute.punish.tempmute
  21. #
  22. # /tempmute-ip <Target> <Duration> [Reason]
  23. # 対象のIPアドレスを一定期間ミュートします。MCIDを指定した場合、そのプレイヤーが使用した最後のIPをミュートします。 権限: mute.punish.tempmuteip
  24. #
  25. # /unmute <Target> [Reason]
  26. # 対象のミュートされているプレイヤーのミュートを解除します。 権限: mute.unpunish.mute
  27. #
  28. # /unmute-ip <Target> [Reason]
  29. # 対象のミュートされているIPアドレスのミュートを解除します。 権限: mute.unpunish.muteip
  30. #
  31. # /mutelist [TargetType(*2)]
  32. # ミュートされているプレイヤー(またはIPアドレスかその両方)の一覧を表示します。 権限: mute.info.list
  33. # TargetTypeの指定方法については、*2を参照してください。
  34. # TargetTypeのデフォルト値は、playersです。
  35. #
  36. # /muteinfo <Target>
  37. # ミュートされているプレイヤーのミュート情報を表示します。 権限: mute.info.info
  38. #
  39. # /muteinfo-ip <Target>
  40. # ミュートされているIPアドレスのミュート情報を表示します。 権限: mute.info.infoip
  41. #
  42. # /blackmutingcommand <add|remove|> <short|full> <Command>
  43. # コマンドをミュート中に使用できないコマンド(*3)として登録、または登録解除します。 権限: mute.punish.blackcmd
  44. # 第2引数としてshortを選択した場合、第3引数の引数を含まないコマンド部分が使用できないコマンドとして登録されます。
  45. # 例: [/blackmutingcommand add short tell]とした場合、ミュート中に/tellコマンドは使用できなくなります。
  46. # 第2引数としてfullを選択した場合、第3引数の引数を含む全てのコマンド部分が使用できないコマンドとして登録されます。
  47. # 例: [/blackmutingcommand add full gamemode creative]とした場合、ミュート中に/gamemode creativeが使用できないコマンドとして登録されます。/gamemodeコマンド自体は使用可能です。
  48. # このコマンドは/bmcまたは/blackcmdsのエイリアスコマンドが存在します。
  49. #
  50. # /bmclist [short|full|all]
  51. # ミュート中に使用できないコマンドの一覧を表示します。 権限: mute.info.blackcmds
  52. # 第1引数のデフォルト値は、allです。
  53.  
  54. # 参照
  55. # *1 - Durationは、<数値>(d, h, m, s, t)で指定します。 例: 5d(=5日), 12h(=12時間)
  56. # *2 - players, ips, allの3種類が指定可能です。playersはプレイヤー、ipsはIPアドレス、allはその両方です。
  57. # *3 - クライアントサイドのコマンド(OptiFine導入時の/reloadChunks等)、BungeeCordのコマンド(/glist, /alert等)も設定可能ですが、設定していても使用可能です。
  58.  
  59. # 二次配布、改造について
  60. # 改造は許可します。
  61. # 二次配布については、開発者及びリクエスト者を明記しているのであれば問題ありません。
  62. # 改造した際に発生した損害等について、開発者は一切責任を負いません。
  63.  
  64.  
  65.  
  66. options:
  67. # AllowNoReason - 理由なしを許可するかどうか。true=許可、false=禁止。
  68. # デフォルトはtrueです。
  69. AllowNoReason: true
  70.  
  71. # ReasonWhenNoReason - 理由が指定されていない場合に使用される理由。
  72. # デフォルトは"No Reason"です。
  73. ReasonWhenNoReason: "No Reason"
  74.  
  75. # MinimumDuration - Duration(期間)の最小時間。この時間を下回るミュートはできません。
  76. # デフォルトは0 secondsです。
  77. MinimumDuration: 0 seconds
  78.  
  79. # MaximumDuration - Duration(期間)の最大時間。 この時間を上回るミュートはできません。
  80. # デフォルトは365 daysです。
  81. MaximumDuration: 365 days
  82.  
  83. # AllowPunishAdmins - 権限「mute.punish.bypass」が付与されているプレイヤーのミュートを許可するかどうか。 true=許可、false=禁止。
  84. # この値にかかわらず、コンソールから権限を所持するプレイヤーをミュートできます。
  85. # デフォルトはfalseです。
  86. AllowPunishAdmins: false
  87.  
  88. # TempMuteCheckInterval - 期限付きミュートの有効期限が切れているかどうかを確認する間隔。
  89. # デフォルトは1 secondです。
  90. # この間隔を短くすればするほど、ラグの原因となります。
  91. TempMuteCheckInterval: 1 second
  92.  
  93. # ConsoleMuteCanUnmuteByPlayer - コンソールが実行したミュートをプレイヤーが解除できるかどうか。 true=許可、false=禁止。
  94. # デフォルトはfalseです。
  95. ConsoleMuteCanUnmuteByPlayer: false
  96.  
  97. # NotifyAllPlayersWhenPunished - ミュートが行われた際、全てのプレイヤーに通知するかどうか。 true=送信する、false=送信しない。
  98. # この値にかかわらず、権限「mute.punish.notify」が付与されているプレイヤーとターゲットには通知されます。
  99. # デフォルトはfalseです。
  100. NotifyAllPlayersWhenPunished: false
  101.  
  102. # NotifyAllPlayersWhenUnPunished - ミュート解除が行われた際、全てのプレイヤーに通知するかどうか。 true=送信する、false=送信しない。
  103. # この値にかかわらず、権限「mute.unpunish.notify」が付与されているプレイヤーとターゲットには通知されます。
  104. # デフォルトはfalseです。
  105. NotifyAllPlayersWhenUnPunished: false
  106.  
  107. # SendMesageToAdminsWhileMuted - ミュート中に送信しようとしたメッセージを権限「mute.sendmsg」が付与されているプレイヤーに通知するかどうか。 true=送信する、false=送信しない。
  108. # デフォルトはfalseです。
  109. SendMesageToAdminsWhileMuted: false
  110.  
  111. # TabListPrefixToMutingPlayer - ミュート中のプレイヤーに「[Muted]」または「[IP-Muted]」のPrefixをつけるかどうか。 true=つける、false=つけない。
  112. # NameTagEditなどの、他のTabList編集プラグインが導入されている場合、この設定はfalseにしてください。
  113. # デフォルトはtrueです。
  114. TabListPrefixToMutingPlayer: true
  115.  
  116. # AllowOwnMute - 自分自身にミュートを実行できるようにするかどうか。true=許可、false=禁止。
  117. # デフォルトはfalseです。
  118. AllowOwnMute: false
  119.  
  120. # AllowOwnUnMute - 自分自身のミュートを解除できるようにするかどうか。 true=許可、false=禁止。
  121. # AllowPunishAdminsがtrueの場合、この設定はtrueにすることをおすすめします。
  122. # デフォルトはtrueです。
  123. AllowOwnUnMute: true
  124.  
  125.  
  126. # 以下コードです。下手に編集すると動かないかもしれません。
  127.  
  128.  
  129. function mute_TabListPrefixChange():
  130. if {@TabListPrefixToMutingPlayer} is false:
  131. stop
  132. loop all players:
  133. if {mutelist::*} contains loop-player:
  134. set loop-player's tablist name to "&7[Muted] %loop-player%"
  135. else:
  136. set loop-player's tablist name to "%loop-player%"
  137. if {mutelistip::*} contains loop-player's ip:
  138. set loop-player's tablist name to "&7[IP-Muted] %loop-player%"
  139. else:
  140. set loop-player's tablist name to "%loop-player%"
  141.  
  142. function mute_TempMuteHasBeenExpired():
  143. loop {mutelist::*}:
  144. if {mute.%loop-value%.time} is set:
  145. if difference between now and {mute.%loop-value%.datetime} is more than or equal to {mute.%loop-value%.time}:
  146. delete {mute.%loop-value%.reason}
  147. delete {mute.%loop-value%.sender}
  148. delete {mute.%loop-value%.datetime}
  149. delete {mute.%loop-value%.time}
  150. remove loop-value from {mutelist::*}
  151. loop all players:
  152. if loop-player is not loop-value-1:
  153. if {@NotifyAllPlayersWhenUnPunished} is true:
  154. send "&a[&bMuteSkript&a]&r &d%loop-value-1% &aを&6自動ミュート解除&aしました。 理由:&r ミュートの有効期限が切れました。" to loop-player
  155. else:
  156. if loop-player has permission "mute.unpunish.notify":
  157. send "&a[&bMuteSkript&a]&r &d%loop-value-1% &aを&6自動ミュート解除&aしました。 理由:&r ミュートの有効期限が切れました。" to loop-player
  158. send "&a[&bMuteSkript&a]&r &d%loop-value% &aを&6自動ミュート解除&aしました。 理由:&r ミュートの有効期限が切れました。" to console
  159. send "&a[&bMuteSkript&a]&r &d%loop-value% &aを&6自動ミュート解除&aしました。 理由:&r ミュートの有効期限が切れました。" to loop-value
  160. loop {mutelistip::*}:
  161. if {muteip.%loop-value%.time} is set:
  162. if difference between now and {muteip.%loop-value%.datetime} is more than or equal to {muteip.%loop-value%.time}:
  163. delete {muteip.%loop-value%.reason}
  164. delete {muteip.%loop-value%.sender}
  165. delete {muteip.%loop-value%.datetime}
  166. delete {muteip.%loop-value%.time}
  167. remove loop-value from {mutelistip::*}
  168. loop all players:
  169. if loop-player's ip is not loop-value-1:
  170. if {@NotifyAllPlayersWhenUnPunished} is true:
  171. send "&a[&bMuteSkript&a]&r &dIPアドレス %loop-value-1% &aを&6自動ミュート解除&aしました。 理由:&r ミュートの有効期限が切れました。" to loop-player
  172. else:
  173. if loop-player has permission "mute.unpunish.notify":
  174. send "&a[&bMuteSkript&a]&r &dIPアドレス %loop-value-1% &aを&6自動ミュート解除&aしました。 理由:&r ミュートの有効期限が切れました。" to loop-player
  175. else:
  176. send "&a[&bMuteSkript&a]&r &dIPアドレス %loop-value-1% &aを&6自動ミュート解除&aしました。 理由:&r ミュートの有効期限が切れました。" to loop-player
  177. send "&a[&bMuteSkript&a]&r &dIPアドレス %loop-value% &aを&6自動ミュート解除&aしました。 理由:&r ミュートの有効期限が切れました。" to console
  178.  
  179.  
  180. every {@TempMuteCheckInterval}:
  181. mute_TabListPrefixChange()
  182. mute_TempMuteHasBeenExpired()
  183.  
  184. on command:
  185. set {_muted} to false
  186. if {mutelist::*} contains player:
  187. set {_muted} to true
  188. if {mutelistip::*} contains player's ip:
  189. set {_muted} to true
  190. if {_muted} is true:
  191. if {fullblackcmds::*} contains complete command:
  192. cancel event
  193. send "&a[&cMuteSkript&a]&r &cそのコマンドはミュート中に使用できないコマンド(Full)として設定されています。"
  194. send "&a[&cMuteSkript&a]&r &cミュート解除後に再度使用してください。"
  195. stop
  196. if {shortblackcmds::*} contains command:
  197. cancel event
  198. send "&a[&cMuteSkript&a]&r &cそのコマンドはミュート中に使用できないコマンド(Short)として設定されています。"
  199. send "&a[&cMuteSkript&a]&r &cミュート解除後に再度使用してください。"
  200. stop
  201.  
  202.  
  203. on load:
  204. broadcast "&a[&bMuteSkript&a]&r &d割と高機能だと思うけどこんなシステムいくらでも実装されてるMuteSkript&bがロードされました。"
  205.  
  206. on join:
  207. set {mute.%player%.ip} to player's ip
  208.  
  209. on chat:
  210. if {mutelist::*} contains player:
  211. cancel event
  212. send "&a[&cMuteSkript&a]&r &cあなたは現在ミュートされています。"
  213. send "&a[&cMuteSkript&a]&r &cミュートが解除されるまでお待ちください。"
  214. send "&a[&cMuteSkript&a]&r &eミュート理由: %{mute.%player%.reason}%"
  215. if {mute.%player%.time} is set:
  216. set {_left} to difference between now and {mute.%player%.datetime}
  217. set {_left} to difference between {mute.%player%.time} and {_left}
  218. send "&a[&cMuteSkript&a]&r &b残り時間: %{_left}%"
  219. if {@SendMesageToAdminsWhileMuted} is true:
  220. loop all players:
  221. if loop-player has permission "mute.sendmsg":
  222. send "&a[&bMuteSkript&a]&r &d%player%&eが発言しようとしたメッセージ: &r%message%" to loop-player
  223. stop
  224. if {mutelistip::*} contains player's ip:
  225. cancel event
  226. send "&a[&cMuteSkript&a]&r &cあなたは現在ミュートされています。"
  227. send "&a[&cMuteSkript&a]&r &cミュートが解除されるまでお待ちください。"
  228. send "&a[&cMuteSkript&a]&r &eミュート理由: %{muteip.%player's ip%.reason}%"
  229. if {muteip.%player's ip%.time} is set:
  230. set {_left} to difference between now and {muteip.%player's ip%.datetime}
  231. set {_left} to difference between {muteip.%player's ip%.time} and {_left}
  232. send "&a[&cMuteSkript&a]&r &b残り時間: %{_left}%"
  233. if {@SendMesageToAdminsWhileMuted} is true:
  234. loop all players:
  235. if loop-player has permission "mute.sendmsg":
  236. send "&a[&bMuteSkript&a]&r &d%player%&eが発言しようとしたメッセージ: &r%message%" to loop-player
  237. stop
  238.  
  239. command /bmclist [<text>]:
  240. description: Show the list of black muting commands.
  241. usage: /bmclist [players|ips|all]
  242. trigger:
  243. if sender does not have permission "mute.info.blackcmds":
  244. send "&a[&cMuteSkript&a]&r &cこのコマンドを実行する権限がありません。"
  245. stop
  246. set {_type} to arg 1
  247. if arg 1 is not set:
  248. set {_type} to "all"
  249. if {_type} is "short":
  250. if amount of {shortblackcmds::*} is 0:
  251. send "&a[&eMuteSkript&a]&r &e現在、ミュート中に使用できないコマンド(Short)はありません。"
  252. stop
  253. set {_cmds} to listtotext({shortblackcmds::*})
  254. send "&a[&bMuteSkript&a]&r &a現在、 &6%amount of {shortblackcmds::*}%&a 個のコマンドが登録されています。"
  255. send "&a[&bMuteSkript&a]&r &d> %{_cmds}%"
  256. stop
  257. else if {_type} is "full":
  258. if amount of {fullblackcmds::*} is 0:
  259. send "&a[&eMuteSkript&a]&r &e現在、ミュート中に使用できないコマンド(Full)はありません。"
  260. stop
  261. set {_cmds} to listtotext({fullblackcmds::*})
  262. send "&a[&bMuteSkript&a]&r &a現在、 &6%amount of {fullblackcmds::*}%&a 個のコマンドが登録されています。"
  263. send "&a[&bMuteSkript&a]&r &d> %{_cmds}%"
  264. stop
  265. else if {_type} is "all":
  266. if amount of {shortblackcmds::*} is 0:
  267. send "&a[&eMuteSkript&a]&r &e現在、ミュート中に使用できないコマンド(Short)はありません。"
  268. else:
  269. set {_cmds} to listtotext({shortblackcmds::*})
  270. send "&a[&bMuteSkript&a]&r &a現在、 &6%amount of {shortblackcmds::*}%&a 個のコマンドが登録されています。"
  271. send "&a[&bMuteSkript&a]&r &d> %{_cmds}%"
  272. delete {_mutes}
  273. if amount of {fullblackcmds::*} is 0:
  274. send "&a[&eMuteSkript&a]&r &e現在、ミュート中に使用できないコマンド(Full)はありません。"
  275. else:
  276. set {_cmds} to listtotext({fullblackcmds::*})
  277. send "&a[&bMuteSkript&a]&r &a現在、 &6%amount of {fullblackcmds::*}%&a 個のコマンドが登録されています。"
  278. send "&a[&bMuteSkript&a]&r &d> %{_cmds}%"
  279. stop
  280. else:
  281. send "&a[&cMuteSkript&a]&r &c使用法: /bmclist [short|full|all]"
  282. stop
  283.  
  284. command /blackmutingcommand [<text>] [<text>] [<text>] [<text>]:
  285. description: Manage unavaliable commands while muted.
  286. usage: /blackmutingcommand <add|remove> <short|full> <Command>
  287. aliases: /bmc, /blackcmds
  288. trigger:
  289. if sender does not have permission "mute.punish.blackcmd":
  290. send "&a[&cMuteSkript&a]&r &cこのコマンドを実行する権限がありません。"
  291. stop
  292. if arg 1 or arg 2 or arg 3 is not set:
  293. send "&a[&cMuteSkript&a]&r &c使用法: /blackmutingcommand <add|remove> <short|full> <コマンド>"
  294. stop
  295. if arg 1 is "add":
  296. if arg 2 is "short":
  297. if {shortblackcmds::*} contains arg 3:
  298. send "&a[&cMuteSkript&a]&r &cそのコマンドはすでにミュート中に使用できないコマンド(Short)です。"
  299. stop
  300. add arg 3 to {shortblackcmds::*}
  301. send "&a[&bMuteSkript&a]&r &bコマンドをミュート中に使用できないコマンド(Short)として登録しました。"
  302. stop
  303. else if arg 2 is "full":
  304. if {fullblackcmds::*} contains "%arg 3% %arg 4%":
  305. send "&a[&cMuteSkript&a]&r &cそのコマンドはすでにミュート中に使用できないコマンド(Full)です。"
  306. stop
  307. add "%arg 3% %arg 4%" to {fullblackcmds::*}
  308. send "&a[&bMuteSkript&a]&r &bコマンドをミュート中に使用できないコマンド(Full)として登録しました。"
  309. stop
  310. else:
  311. send "&a[&cMuteSkript&a]&r &c使用法: /blackmutingcommand <add|remove> <short|full> <コマンド>"
  312. stop
  313. else if arg 2 is "remove":
  314. if arg 2 is "short":
  315. if {shortblackcmds::*} does not contain arg 3:
  316. send "&a[&cMuteSkript&a]&r &cそのコマンドはミュート中に使用できないコマンド(Short)ではありません。"
  317. stop
  318. remove arg 3 from {shortblackcmds::*}
  319. send "&a[&bMuteSkript&a]&r &bコマンドをミュート中に使用できないコマンド(Short)から削除しました。"
  320. stop
  321. else if arg 2 is "full":
  322. if {fullblackcmds::*} does not contain "%arg 3% %arg 4%":
  323. send "&a[&cMuteSkript&a]&r &cそのコマンドはミュート中に使用できないコマンド(Full)ではありません。"
  324. stop
  325. remove "%arg 3% %arg 4%" from {fullblackcmds::*}
  326. send "&a[&bMuteSkript&a]&r &bコマンドをミュート中に使用できないコマンド(Full)から削除しました。"
  327. stop
  328. else:
  329. send "&a[&cMuteSkript&a]&r &c使用法: /blackmutingcommand <add|remove> <short|full> <コマンド>"
  330. stop
  331.  
  332. command /mutelist [<text>]:
  333. description: Show the list of muting players.
  334. usage: /mutelist [players|ips|all]
  335. trigger:
  336. if sender does not have permission "mute.info.list":
  337. send "&a[&cMuteSkript&a]&r &cこのコマンドを実行する権限がありません。"
  338. stop
  339. set {_type} to arg 1
  340. if arg 1 is not set:
  341. set {_type} to "players"
  342. if {_type} is "players":
  343. if amount of {mutelist::*} is 0:
  344. send "&a[&eMuteSkript&a]&r &e現在、ミュートされているプレイヤーはいません。"
  345. stop
  346. set {_mutes} to listtotext({mutelist::*})
  347. send "&a[&bMuteSkript&a]&r &a現在、 &6%amount of {mutelist::*}%&a 人のプレイヤーがミュートされています。"
  348. send "&a[&bMuteSkript&a]&r &d> %{_mutes}%"
  349. stop
  350. else if {_type} is "ips":
  351. if amount of {mutelistip::*} is 0:
  352. send "&a[&eMuteSkript&a]&r &e現在、ミュートされているIPアドレスはありません。"
  353. stop
  354. set {_mutes} to listtotext({mutelistip::*})
  355. send "&a[&bMuteSkript&a]&r &a現在、 &6%amount of {mutelistip::*}%&a 個のIPアドレスがミュートされています。"
  356. send "&a[&bMuteSkript&a]&r &d> %{_mutes}%"
  357. stop
  358. else if {_type} is "all":
  359. if amount of {mutelist::*} is 0:
  360. send "&a[&eMuteSkript&a]&r &e現在、ミュートされているプレイヤーはいません。"
  361. else:
  362. set {_mutes} to listtotext({mutelist::*})
  363. send "&a[&bMuteSkript&a]&r &a現在、 &6%amount of {mutelist::*}%&a 人のプレイヤーがミュートされています。"
  364. send "&a[&bMuteSkript&a]&r &d> %{_mutes}%"
  365. send "&a[&bMuteSkript&a]&r"
  366. delete {_mutes}
  367. if amount of {mutelistip::*} is 0:
  368. send "&a[&eMuteSkript&a]&r &e現在、ミュートされているIPアドレスはありません。"
  369. else:
  370. set {_mutes} to listtotext({mutelistip::*})
  371. send "&a[&bMuteSkript&a]&r &a現在、 &6%amount of {mutelistip::*}%&a 個のIPアドレスがミュートされています。"
  372. send "&a[&bMuteSkript&a]&r &d> %{_mutes}%"
  373. stop
  374. else:
  375. send "&a[&cMuteSkript&a]&r &c使用法: /mutelist [players|ips|all]"
  376. stop
  377.  
  378. command /muteinfo [<offline player>]:
  379. description: Show the mute information of specific player.
  380. usage: /muteinfo <Player>
  381. trigger:
  382. if sender does not have permission "mute.info.info":
  383. send "&a[&cMuteSkript&a]&r &cこのコマンドを実行する権限がありません。"
  384. stop
  385. if arg 1 is not set:
  386. send "&a[&cMuteSkript&a]&r &c使用法: /muteinfo <プレイヤー>"
  387. stop
  388. if arg 1 hasn't played before:
  389. send "&a[&cMuteSkript&a]&r &cサーバーに参加したことがないプレイヤーのミュート情報を確認することはできません。"
  390. stop
  391. send "&a[&bMuteSkript&a]&r &b%arg 1%のミュート情報"
  392. if {mutelist::*} does not contain arg 1:
  393. send "&a[&bMuteSkript&a]&r &bミュート状況: ミュートされていません。"
  394. stop
  395. send "&a[&bMuteSkript&a]&r &bミュート状況: &cミュートされています。"
  396. send "&a[&bMuteSkript&a]&r &bミュート理由: &r%{mute.%arg 1%.reason}%"
  397. send "&a[&bMuteSkript&a]&r &bミュート実行者: &r%{mute.%arg 1%.sender}%"
  398. send "&a[&bMuteSkript&a]&r &bミュート実行日時: &r%{mute.%arg 1%.datetime}%"
  399. if {mute.%arg 1%.time} is set:
  400. send "&a[&bMuteSkript&a]&r &b期間: %{mute.%arg 1%.time}%"
  401. set {_left} to difference between now and {mute.%arg 1%.datetime}
  402. set {_left} to difference between {mute.%arg 1%.time} and {_left}
  403. send "&a[&bMuteSkript&a]&r &b残り時間: %{_left}%"
  404. stop
  405. send "&a[&bMuteSkript&a]&r &b期間: 無期限"
  406. stop
  407.  
  408. command /muteinfo-ip [<text>]:
  409. description: Show the mute information of specific IP Address.
  410. usage: /muteinfo-ip <Player|IP Address>
  411. trigger:
  412. if sender does not have permission "mute.info.infoip":
  413. send "&a[&cMuteSkript&a]&r &cこのコマンドを実行する権限がありません。"
  414. stop
  415. if arg 1 is not set:
  416. send "&a[&cMuteSkript&a]&r &c使用法: /muteinfo-ip <プレイヤー|IPアドレス>"
  417. stop
  418. set {_ip} to arg 1
  419. if arg 1 does not contain ".":
  420. if {mute.%arg 1%.ip} is not set:
  421. send "&a[&cMuteSkript&a]&r &c対象のプレイヤーのIPアドレスが見つかりませんでした。"
  422. stop
  423. set {_ip} to {mute.%arg 1%.ip}
  424. send "&a[&bMuteSkript&a]&r &b%{_ip}%のミュート情報"
  425. if {mutelist::*} does not contain {_ip}:
  426. send "&a[&bMuteSkript&a]&r &bミュート状況: ミュートされていません。"
  427. stop
  428. send "&a[&bMuteSkript&a]&r &bミュート状況: &cミュートされています。"
  429. send "&a[&bMuteSkript&a]&r &bミュート理由: &r%{muteip.%{_ip}%.reason}%"
  430. send "&a[&bMuteSkript&a]&r &bミュート実行者: &r%{muteip.%{_ip}%.sender}%"
  431. send "&a[&bMuteSkript&a]&r &bミュート実行日時: &r%{muteip.%{_ip}%.datetime}%"
  432. if {muteip.%{_ip}%.time} is set:
  433. send "&a[&bMuteSkript&a]&r &b期間: %{muteip.%{_ip}%.time}%"
  434. set {_left} to difference between now and {muteip.%player's ip%.datetime}
  435. set {_left} to difference between {muteip.%player's ip%.time} and {_left}
  436. send "&a[&bMuteSkript&a]&r &b残り時間: %{_left}%"
  437. stop
  438. send "&a[&bMuteSkript&a]&r &b期間: 無期限"
  439. stop
  440.  
  441.  
  442. command /mute [<offline player>] [<text>]:
  443. description: Mute the player on username basis on this server permanently or until unmuted.
  444. usage: /mute <Player> [Reason]
  445. trigger:
  446. if sender does not have permission "mute.punish.mute":
  447. send "&a[&cMuteSkript&a]&r &cこのコマンドを実行する権限がありません。"
  448. stop
  449. if arg 1 is not set:
  450. if {@AllowNoReason} is false:
  451. send "&a[&cMuteSkript&a]&r &c使用法: /mute <プレイヤー> <理由>"
  452. stop
  453. else:
  454. send "&a[&cMuteSkript&a]&r &c使用法: /mute <プレイヤー> [理由]"
  455. stop
  456. if {mutelist::*} contains arg 1:
  457. send "&a[&cMuteSkript&a]&r &c対象のプレイヤーはすでにミュートされています。"
  458. stop
  459. if arg 1 hasn't played before:
  460. if sender is not console:
  461. send "&a[&cMuteSkript&a]&r &cサーバーに参加したことがないプレイヤーをミュートすることはできません。"
  462. stop
  463. else:
  464. send "&a[&eMuteSkript&a]&r &e%arg 1%はサーバーに参加したことがありません。"
  465. if arg 1 is sender:
  466. if {@AllowOwnMute} is false:
  467. send "&a[&cMuteSkript&a]&r &c自分自身をミュートすることはできません。"
  468. stop
  469. if arg 1 has permission "mute.punish.bypass":
  470. if sender is not console:
  471. if {@AllowPunishAdmins} is false:
  472. send "&a[&cMuteSkript&a]&r &cこのプレイヤーをミュートすることはできません。"
  473. stop
  474. set {_reason} to coloured arg 2
  475. if arg 2 is not set:
  476. if {@AllowNoReason} is false:
  477. send "&a[&cMuteSkript&a]&r &c理由は必須です。"
  478. stop
  479. set {_reason} to coloured {@ReasonWhenNoReason}
  480. # ミュート処理
  481. set {mute.%arg 1%.reason} to {_reason}
  482. set {mute.%arg 1%.sender} to sender's name
  483. if sender is console:
  484. set {mute.%arg 1%.sender} to "コンソール"
  485. set {mute.%arg 1%.datetime} to now
  486. add arg 1 to {mutelist::*}
  487. loop all players:
  488. if loop-player is not arg 1:
  489. if {@NotifyAllPlayersWhenPunished} is true:
  490. send "&a[&bMuteSkript&a]&r &b%{mute.%arg 1%.sender}%&a が &d%arg 1% &aを&6無期限ミュート&aしました。 理由:&r%{mute.%arg 1%.reason}%" to loop-player
  491. else:
  492. if loop-player has permission "mute.punish.notify":
  493. send "&a[&bMuteSkript&a]&r &b%{mute.%arg 1%.sender}%&a が &d %arg 1% &aを&6無期限ミュート&aしました。 理由:&r%{mute.%arg 1%.reason}%" to loop-player
  494. send "&a[&bMuteSkript&a]&r &b%{mute.%arg 1%.sender}%&a が &d%arg 1% &aを&6無期限ミュート&aしました。 理由:&r%{mute.%arg 1%.reason}%" to console
  495. send "&a[&bMuteSkript&a]&r &b%{mute.%arg 1%.sender}%&a が &d%arg 1% &aを&6無期限ミュート&aしました。 理由:&r%{mute.%arg 1%.reason}%" to arg 1
  496. stop
  497.  
  498. command /mute-ip [<text>] [<text>]:
  499. description: Mute player on an IP basis on this server permanently or until unmuted. No player logged in with that IP will be able to speak.
  500. usage: /mute-ip <Player|IP Address> [Reason]
  501. trigger:
  502. if sender does not have permission "mute.punish.muteip":
  503. send "&a[&cMuteSkript&a]&r &cこのコマンドを実行する権限がありません。"
  504. stop
  505. if arg 1 is not set:
  506. if {@AllowNoReason} is false:
  507. send "&a[&cMuteSkript&a]&r &c使用法: /mute-ip <プレイヤー|IPアドレス> <理由>"
  508. stop
  509. else:
  510. send "&a[&cMuteSkript&a]&r &c使用法: /mute-ip <プレイヤー|IPアドレス> [理由]"
  511. stop
  512. set {_ip} to arg 1
  513. if arg 1 does not contain ".":
  514. if {mute.%arg 1%.ip} is not set:
  515. send "&a[&cMuteSkript&a]&r &c対象のプレイヤーのIPアドレスが見つかりませんでした。"
  516. stop
  517. set {_ip} to {mute.%arg 1%.ip}
  518. if {mutelistip::*} contains arg 1:
  519. send "&a[&cMuteSkript&a]&r &c対象のIPアドレスはすでにミュートされています。"
  520. stop
  521. if sender's ip is {_ip}:
  522. if {@AllowOwnMute} is false:
  523. send "&a[&cMuteSkript&a]&r &c自分自身をミュートすることはできません。"
  524. stop
  525. set {_reason} to coloured arg 2
  526. if arg 2 is not set:
  527. if {@AllowNoReason} is false:
  528. send "&a[&cMuteSkript&a]&r &c理由は必須です。"
  529. stop
  530. set {_reason} to coloured {@ReasonWhenNoReason}
  531. # ミュート処理
  532. set {muteip.%{_ip}%.reason} to {_reason}
  533. set {_sender} to sender's name
  534. if sender is console:
  535. set {_sender} to "コンソール"
  536. set {muteip.%{_ip}%.sender} to {_sender}
  537. set {muteip.%{_ip}%.datetime} to now
  538. add {_ip} to {mutelistip::*}
  539. loop all players:
  540. if loop-player's ip is not {_ip}:
  541. if {@NotifyAllPlayersWhenPunished} is true:
  542. send "&a[&bMuteSkript&a]&r &b%{muteip.%{_ip}%.sender}%&a が &dIPアドレス %{_ip}% &aを&6無期限IPミュート&aしました。 理由:&r%{muteip.%{_ip}%.reason}%" to loop-player
  543. else:
  544. if loop-player has permission "mute.punish.notify":
  545. send "&a[&bMuteSkript&a]&r &b%{muteip.%{_ip}%.sender}%&a が &dIPアドレス %{_ip}% &aを&6無期限IPミュート&aしました。 理由:&r%{muteip.%{_ip}%.reason}%" to loop-player
  546. else:
  547. send "&a[&bMuteSkript&a]&r &b%{muteip.%{_ip}%.sender}%&a が &dIPアドレス %{_ip}% &aを&6無期限IPミュート&aしました。 理由:&r%{muteip.%{_ip}%.reason}%" to loop-player
  548. send "&a[&bMuteSkript&a]&r &b%{muteip.%{_ip}%.sender}%&a が &dIPアドレス %{_ip}% &aを&6無期限IPミュート&aしました。 理由:&r%{muteip.%{_ip}%.reason}%" to console
  549. stop
  550.  
  551. command /tempmute [<offline player>] [<text>] [<text>]:
  552. description: Mute the player on username basis on this server temporary or until unmuted.
  553. usage: /tempmute <Player> <Duration(Ex: 1d, 5h, 30m)> [Reason]
  554. trigger:
  555. if sender does not have permission "mute.punish.tempmute":
  556. send "&a[&cMuteSkript&a]&r &cこのコマンドを実行する権限がありません。"
  557. stop
  558. if arg 1 or arg 2 is not set:
  559. if {@AllowNoReason} is false:
  560. send "&a[&cMuteSkript&a]&r &c使用法: /tempmute <プレイヤー> <期間> <理由>"
  561. stop
  562. else:
  563. send "&a[&cMuteSkript&a]&r &c使用法: /tempmute <プレイヤー> <期間> [理由]"
  564. stop
  565. if {mutelist::*} contains arg 1:
  566. send "&a[&cMuteSkript&a]&r &c対象のプレイヤーはすでにミュートされています。"
  567. stop
  568. if arg 1 hasn't played before:
  569. if sender is not console:
  570. send "&a[&cMuteSkript&a]&r &cサーバーに参加したことがないプレイヤーをミュートすることはできません。"
  571. stop
  572. else:
  573. send "&a[&eMuteSkript&a]&r &e%arg 1%はサーバーに参加したことがありません。"
  574. if arg 1 is sender:
  575. if {@AllowOwnMute} is false:
  576. send "&a[&cMuteSkript&a]&r &c自分自身をミュートすることはできません。"
  577. stop
  578. if arg 1 has permission "mute.punish.bypass":
  579. if sender is not console:
  580. if {@AllowPunishAdmins} is false:
  581. send "&a[&cMuteSkript&a]&r &cこのプレイヤーをミュートすることはできません。"
  582. stop
  583. set {_time} to timeomission(arg 2)
  584. set {_max} to {@MaximumDuration}
  585. set {_min} to {@MinimumDuration}
  586. if {_time} is less than or equal to {@MinimumDuration}:
  587. send "&a[&cMuteSkript&a]&r &c期間が短すぎます。 %{_min}% 以上にしてください。"
  588. stop
  589. if {_time} is more than or equal to {@MaximumDuration}:
  590. send "&a[&cMuteSkript&a]&r &c期間が長すぎます。 %{_max}% 以下にしてください。"
  591. stop
  592. set {_reason} to coloured arg 3
  593. if arg 3 is not set:
  594. if {@AllowNoReason} is false:
  595. send "&a[&cMuteSkript&a]&r &c理由は必須です。"
  596. stop
  597. set {_reason} to coloured {@ReasonWhenNoReason}
  598. # ミュート処理
  599. set {mute.%arg 1%.reason} to {_reason}
  600. set {mute.%arg 1%.sender} to sender's name
  601. if sender is console:
  602. set {mute.%arg 1%.sender} to "コンソール"
  603. set {mute.%arg 1%.datetime} to now
  604. set {mute.%arg 1%.time} to {_time}
  605. add arg 1 to {mutelist::*}
  606. loop all players:
  607. if loop-player is not arg 1:
  608. if {@NotifyAllPlayersWhenPunished} is true:
  609. send "&a[&bMuteSkript&a]&r &b%{mute.%arg 1%.sender}%&a が &d%arg 1% &aを&6期限付きミュート&aしました。 理由:&r%{mute.%arg 1%.reason}% &a期間: %{mute.%arg 1%.time}%" to loop-player
  610. else:
  611. if loop-player has permission "mute.punish.notify":
  612. send "&a[&bMuteSkript&a]&r &b%{mute.%arg 1%.sender}%&a が &d %arg 1% &aを&6期限付きミュート&aしました。 理由:&r%{mute.%arg 1%.reason}% &a期間: %{mute.%arg 1%.time}%" to loop-player
  613. send "&a[&bMuteSkript&a]&r &b%{mute.%arg 1%.sender}%&a が &d%arg 1% &aを&6期限付きミュート&aしました。 理由:&r%{mute.%arg 1%.reason}% &a期間: %{mute.%arg 1%.time}%" to console
  614. send "&a[&bMuteSkript&a]&r &b%{mute.%arg 1%.sender}%&a が &d%arg 1% &aを&6期限付きミュート&aしました。 理由:&r%{mute.%arg 1%.reason}% &a期間: %{mute.%arg 1%.time}%" to arg 1
  615. stop
  616.  
  617. command /tempmute-ip [<text>] [<text>] [<text>]:
  618. description: Mute the player on ip basis on this server temporary or until unmuted. No player logged in with that IP will be able to speak.
  619. usage: /tempmute-ip <Player|IP Address> <Duration(Ex: 1d, 5h, 30m)> [Reason]
  620. trigger:
  621. if sender does not have permission "mute.punish.tempmuteip":
  622. send "&a[&cMuteSkript&a]&r &cこのコマンドを実行する権限がありません。"
  623. stop
  624. if arg 1 or arg 2 is not set:
  625. if {@AllowNoReason} is false:
  626. send "&a[&cMuteSkript&a]&r &c使用法: /tempmute-ip <プレイヤー|アドレス> <期間> <理由>"
  627. stop
  628. else:
  629. send "&a[&cMuteSkript&a]&r &c使用法: /tempmute-ip <プレイヤー|IPアドレス> <期間> [理由]"
  630. stop
  631. set {_ip} to arg 1
  632. if arg 1 does not contain ".":
  633. if {mute.%arg 1%.ip} is not set:
  634. send "&a[&cMuteSkript&a]&r &c対象のプレイヤーのIPアドレスが見つかりませんでした。"
  635. stop
  636. set {_ip} to {mute.%arg 1%.ip}
  637. if {mutelistip::*} contains {_ip}:
  638. send "&a[&cMuteSkript&a]&r &c対象のIPアドレスはすでにミュートされています。"
  639. stop
  640. if sender's ip is {_ip}:
  641. if {@AllowOwnMute} is false:
  642. send "&a[&cMuteSkript&a]&r &c自分自身をミュートすることはできません。"
  643. stop
  644. set {_time} to timeomission(arg 2)
  645. set {_max} to {@MaximumDuration}
  646. set {_min} to {@MinimumDuration}
  647. if {_time} is less than or equal to {@MinimumDuration}:
  648. send "&a[&cMuteSkript&a]&r &c期間が短すぎます。 %{_min}% 以上にしてください。"
  649. stop
  650. if {_time} is more than or equal to {@MaximumDuration}:
  651. send "&a[&cMuteSkript&a]&r &c期間が長すぎます。 %{_max}% 以下にしてください。"
  652. stop
  653. set {_reason} to coloured arg 3
  654. if arg 3 is not set:
  655. if {@AllowNoReason} is false:
  656. send "&a[&cMuteSkript&a]&r &c理由は必須です。"
  657. stop
  658. set {_reason} to coloured {@ReasonWhenNoReason}
  659. # ミュート処理
  660. set {muteip.%{_ip}%.reason} to {_reason}
  661. set {muteip.%{_ip}%.sender} to sender's name
  662. if sender is console:
  663. set {muteip.%{_ip}%.sender} to "コンソール"
  664. set {muteip.%{_ip}%.datetime} to now
  665. set {muteip.%{_ip}%.time} to {_time}
  666. add {_ip} to {mutelistip::*}
  667. loop all players:
  668. if loop-player's ip is not {_ip}:
  669. if {@NotifyAllPlayersWhenPunished} is true:
  670. send "&a[&bMuteSkript&a]&r &b%{muteip.%{_ip}%.sender}%&a が &dIPアドレス %{_ip}% &aを&6期限付きIPミュート&aしました。 理由:&r%{muteip.%{_ip}%.reason}% &a期間: %{muteip.%{_ip}%.time}%" to loop-player
  671. else:
  672. if loop-player has permission "mute.punish.notify":
  673. send "&a[&bMuteSkript&a]&r &b%{muteip.%{_ip}%.sender}%&a が &dIPアドレス %{_ip}% &aを&6期限付きIPミュート&aしました。 理由:&r%{muteip.%{_ip}%.reason}% &a期間: %{muteip.%{_ip}%.time}%" to loop-player
  674. else:
  675. send "&a[&bMuteSkript&a]&r &b%{muteip.%{_ip}%.sender}%&a が &dIPアドレス %{_ip}% &aを&6期限付きIPミュート&aしました。 理由:&r%{muteip.%{_ip}%.reason}% &a期間: %{muteip.%{_ip}%.time}%" to loop-player
  676. send "&a[&bMuteSkript&a]&r &b%{muteip.%{_ip}%.sender}%&a が &dIPアドレス %{_ip}% &aを&6期限付きIPミュート&aしました。 理由:&r%{muteip.%{_ip}%.reason}% &a期間: %{muteip.%{_ip}%.time}%" to console
  677. stop
  678.  
  679.  
  680. command /unmute [<offline player>] [<text>]:
  681. description: Unmute the player on username basis mutes on this server.
  682. usage: /unmute <Player> [Reason]
  683. trigger:
  684. if sender does not have permission "mute.unpunish.mute":
  685. send "&a[&cMuteSkript&a]&r &cこのコマンドを実行する権限がありません。"
  686. stop
  687. if arg 1 is not set:
  688. if {@AllowNoReason} is false:
  689. send "&a[&cMuteSkript&a]&r &c使用法: /unmute <プレイヤー> <理由>"
  690. stop
  691. else:
  692. send "&a[&cMuteSkript&a]&r &c使用法: /unmute <プレイヤー> [理由]"
  693. stop
  694. if {mutelist::*} does not contain arg 1:
  695. send "&a[&cMuteSkript&a]&r &c対象のプレイヤーはミュートされていません。"
  696. stop
  697. if arg 1 is sender:
  698. if {@AllowOwnUnMute} is false:
  699. send "&a[&cMuteSkript&a]&r &c自分自身のミュートを解除することはできません。"
  700. stop
  701. if {@ConsoleMuteCanUnmuteByPlayer} is false:
  702. if sender is not console:
  703. if {mute.%arg 1%.sender} is "コンソール":
  704. send "&a[&cMuteSkript&a]&r &cコンソールから行われたミュートはプレイヤーから解除することはできません。"
  705. stop
  706. set {_reason} to coloured arg 2
  707. if arg 2 is not set:
  708. if {@AllowNoReason} is false:
  709. send "&a[&cMuteSkript&a]&r &c理由は必須です。"
  710. stop
  711. set {_reason} to coloured {@ReasonWhenNoReason}
  712. # ミュート処理
  713. delete {mute.%arg 1%.reason}
  714. delete {mute.%arg 1%.sender}
  715. set {_sender} to sender's name
  716. if sender is console:
  717. set {_sender} to "コンソール"
  718. delete {mute.%arg 1%.datetime}
  719. remove arg 1 from {mutelist::*}
  720. loop all players:
  721. if loop-player is not arg 1:
  722. if {@NotifyAllPlayersWhenUnPunished} is true:
  723. send "&a[&bMuteSkript&a]&r &b%{_sender}%&a が &d%arg 1% &aを&6ミュート解除&aしました。 理由:&r%{_reason}%" to loop-player
  724. else:
  725. if loop-player has permission "mute.punish.notify":
  726. send "&a[&bMuteSkript&a]&r &b%{_sender}%&a が &d%arg 1% &aを&6ミュート解除&aしました。 理由:&r%{_reason}%" to loop-player
  727. send "&a[&bMuteSkript&a]&r &b%{_sender}%&a が &d%arg 1% &aを&6ミュート解除&aしました。 理由:&r%{_reason}%" to console
  728. send "&a[&bMuteSkript&a]&r &b%{_sender}%&a が &d%arg 1% &aを&6ミュート解除&aしました。 理由:&r%{_reason}%" to arg 1
  729. stop
  730.  
  731.  
  732.  
  733. command /unmute-ip [<text>] [<text>]:
  734. description: Unmute the player on IP basis mutes on this server.
  735. usage: /unmute-ip <Player|IP Address> [Reason]
  736. trigger:
  737. if sender does not have permission "mute.unpunish.muteip":
  738. send "&a[&cMuteSkript&a]&r &cこのコマンドを実行する権限がありません。"
  739. stop
  740. if arg 1 is not set:
  741. if {@AllowNoReason} is false:
  742. send "&a[&cMuteSkript&a]&r &c使用法: /unmute-ip <プレイヤー|IPアドレス> <理由>"
  743. stop
  744. else:
  745. send "&a[&cMuteSkript&a]&r &c使用法: /unmute-ip <プレイヤー|アドレス> [理由]"
  746. stop
  747. set {_ip} to arg 1
  748. if arg 1 does not contain ".":
  749. if {mute.%arg 1%.ip} is not set:
  750. send "&a[&cMuteSkript&a]&r &c対象のプレイヤーのIPアドレスが見つかりませんでした。"
  751. stop
  752. set {_ip} to {mute.%arg 1%.ip}
  753. if {mutelistip::*} does not contain {_ip}:
  754. send "&a[&cMuteSkript&a]&r &c対象のIPアドレスはミュートされていません。"
  755. stop
  756. if sender's ip is {_ip}:
  757. if {@AllowOwnUnMute} is false:
  758. send "&a[&cMuteSkript&a]&r &c自分自身のミュートを解除することはできません。"
  759. stop
  760. if {@ConsoleMuteCanUnmuteByPlayer} is false:
  761. if sender is not console:
  762. if {muteip.%arg 1%.sender} is "コンソール":
  763. send "&a[&cMuteSkript&a]&r &cコンソールから行われたミュートはプレイヤーから解除することはできません。"
  764. stop
  765. set {_reason} to coloured arg 2
  766. if arg 2 is not set:
  767. if {@AllowNoReason} is false:
  768. send "&a[&cMuteSkript&a]&r &c理由は必須です。"
  769. stop
  770. set {_reason} to coloured {@ReasonWhenNoReason}
  771. # ミュート処理
  772. delete {muteip.%{_ip}%.reason}
  773. delete {muteip.%{_ip}%.sender}
  774. set {_sender} to sender's name
  775. if sender is console:
  776. set {_sender} to "コンソール"
  777. delete {muteip.%{_ip}%.datetime}
  778. remove {_ip} from {mutelistip::*}
  779. loop all players:
  780. if loop-player's ip is not {_ip}:
  781. if {@NotifyAllPlayersWhenUnPunished} is true:
  782. send "&a[&bMuteSkript&a]&r &b%{_sender}%&a が &dIPアドレス %{_ip}% &aを&6IPミュート解除&aしました。 理由:&r%{_reason}%" to loop-player
  783. else:
  784. if loop-player has permission "mute.punish.notify":
  785. send "&a[&bMuteSkript&a]&r &b%{_sender}%&a が &dIPアドレス %{_ip}% &aを&6IPミュート解除&aしました。 理由:&r%{_reason}%" to loop-player
  786. else:
  787. send "&a[&bMuteSkript&a]&r &b%{_sender}%&a が &dIPアドレス %{_ip}% &aを&6IPミュート解除&aしました。 理由:&r%{_reason}%" to loop-player
  788. send "&a[&bMuteSkript&a]&r &b%{_sender}%&a が &dIPアドレス %{_ip}% &aを&6IPミュート解除&aしました。 理由:&r%{_reason}%" to console
  789. stop
Add Comment
Please, Sign In to add comment