Guest User

Untitled

a guest
Oct 22nd, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.64 KB | None | 0 0
  1.  
  2. ;MuteBanEnforce by Ford_Lawnmower irc.GeekShed.net #Script-Help
  3. menu nicklist {
  4. -
  5. .Mute
  6. ..$iif(!$hget(MuteEnforce,$+($network,$chan,$address($$1,2))),$style(2)) RemoveMute $$1: {
  7. var %mask $+($network,$chan,$address($$1,2))
  8. hdel MuteEnforce %mask
  9. if ($timer(%mask).com) {
  10. $v1
  11. .notice $$1 11,1Your Mute from # has been lifted early! 4You may now speak in $+($chan,.) 11PLZ DONT repeat the same activity that you caused for you to get muted. 4Otherwise YOU WILL GET LONGER BIGGER PUNISHMENTS
  12. $+(.timer,%mask) off
  13. }
  14. else mode $chan -b $+(~q:,$address($$1,2))
  15. }
  16. ..Mute $$1
  17. ...3 Minutes:mute $$1 180 $$?="Reason for Muting $$1"
  18. ...5 Minutes:mute $$1 300 $$?="Reason for Muting $$1"
  19. ...10 Minutes:mute $$1 600 $$?="Reason for Muting $$1"
  20. ...30 Minutes:mute $$1 1800 $$?="Reason for Muting $$1"
  21. ...60 Minutes:mute $$1 3600 $$?="Reason for Muting $$1"
  22. ...Set Time: {
  23. var %length $$?="Length of ban in minutes"
  24. mute $$1 $calc(%length * 60) $$?="Reason for Muting $$1"
  25. }
  26. }
  27. alias -l mute {
  28. var %nick $$1
  29. if (%nick ison $chan) && ($regex($nick(#,$me).pnick,/[~&!@%]/)) {
  30. ialcheck %nick
  31. var %usermodes $replace($remove($nick(#,%nick).pnick,%nick),~,q,&,a,!,a,@,o,%,h,+,v), %addy $iif($address(%nick,2),$v1,%nick)
  32. mode $chan $+(+b-,%usermodes) $+(~q:,%addy) $str($+(%nick,$chr(32)),$len(%usermodes))
  33. hadd -m MuteEnforce $+($network,$chan,%addy) mute
  34. if ($$2 isnum) {
  35. $+(.timer,$network,$chan,%addy) 1 $$2 removeMute $+($network,$chan,%addy) $chan $+(-b+,%usermodes) $+(~q:,%addy) $str($+(%nick,$chr(32)),$len(%usermodes))
  36. .notice $$1 11,1You have been Muted! From # 4Duration: $duration($2) 11Reason: $iif($3-,$3-,Intolerable Behavior!) 0- 4IF YOU CONTINUE, YOU WILL GET LONGER BIGGER PUNISHMENTS
  37. }
  38. else msg $chan %nick You have been Muted! $+(Reason:,$iif($2-,$2-,Intolerable Behavior!))
  39. }
  40. else echo -a Error: Either %nick is not on $chan or you do not have the correct privileges to use the mute command.
  41. }
  42. alias -l ialcheck {
  43. if (!$ial($1)) .who $1
  44. }
  45. alias -l removeMute {
  46. if ($($+($,$0),2) !ison $2) mode $2 -b $4
  47. else mode $2-
  48. hdel MuteEnforce $1
  49. }
  50. alias -l parseMode {
  51. tokenize 32 $1
  52. var %start 1, %finish $len($1), %+-, %modes -1, %location $+(parseMode,$chr(3),$network,$chr(3),$chan)
  53. while (%start <= %finish) {
  54. if ($mid($1,%start,1) isin +-) { %+- = $replace($v1,+,1,-,-1) | inc %modes }
  55. elseif ($mid($1,%start,1) isin qaohvb) {
  56. var %mode $+($v1,$($+($,$calc(%start - %modes)),2))
  57. hadd -m %location %mode $calc($hget(%location,%mode) + %+-)
  58. }
  59. inc %start
  60. }
  61. var %hash $regsubex($regsubex($str(.,$hget(%location,0).item),/(.)/g,$+($hget(%location,\n).data,$hget(%location,\n).item,$chr(32))),/(\b0[^\s]*)/g,)
  62. if ($hget(%location)) hfree $v1
  63. var %count 1, %max $numtok(%hash,32), %return, %temp
  64. while (%count <= %max) {
  65. %temp = $gettok(%hash,%count,32)
  66. %return = $+(%return,$chr(32),$iif($left(%temp,1) == -,$+(-,$mid(%temp,3)),$+(+,$mid(%temp,2))))
  67. inc %count
  68. }
  69. return %return
  70. }
  71. On !*:rawmode:#: {
  72. checkMutes $network $chan $parsemode($1-)
  73. }
  74. alias -l checkMutes {
  75. var %network $1, %chan $2, %modes $3-
  76. tokenize 32 %modes
  77. checkMute %network %chan $*
  78. }
  79. alias -l checkMute {
  80. var %mode $left($3,2), %target $mid($3,3)
  81. if ((%mode isincs +v+h+o+a+q) && ($hget(MuteEnforce,$+($1,$2,$address(%target,2))))) mode $2 $replace(%mode,+,-) %target
  82. elseif ((%mode == -b) && ($hget(MuteEnforce,$+($1,$2,$gettok(%target,-1,58))))) mode $chan +b %target
  83. }
  84. ;Syntax /m Nick TimeinMinutes Reason
  85. alias m mute $$1 $iif($2 isnum,$calc($2 * 60),180 $2) $3-
Add Comment
Please, Sign In to add comment