Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. on !*:join:#: {
  2. var %bl.network = $gettok($read($qt($mircdirBlacklist.lst)),3,126)
  3.  
  4. if ($network != %bl.network) { halt }
  5.  
  6. else {
  7. if ($nick ison $gettok($read($qt($mircdirBlacklist.lst)),2,126)) {
  8. ; We know the user if on list, will be kicked from specified channels,
  9. ; now to find the user if they have been blacklisted
  10.  
  11. var %bl.nickhost = $gettok($read($qt($mircdirBlacklist.lst)),1,126)
  12. var %bl.reason = $gettok($read($qt($mircdirBlacklist.lst)),4,126)
  13.  
  14. if (%bl.nickhost == $null) { halt }
  15.  
  16. ban $chan %bl.nickhost | kick $chan $nick Blacklisted - Reason: %bl.reason
  17. }
  18. else {
  19. halt
  20. }
  21. }
  22. }
  23.  
  24. alias blacklist {
  25. if ($1 == add) {
  26. if ($2 == $null) { echo -a Please specify the Nickname/Hostname to blacklist. | halt }
  27. if ($3 == $null) { echo -a Please specify the channel user is blacklisted from: | halt }
  28. if ($4 == $null) { echo -a Please specify the network NAME the blacklist will trigger on: | halt }
  29. if ($5 == $null) { echo -a Please specify a reason for the blacklisted user: | halt }
  30.  
  31. var %nick = $read($qt($mircdirBlacklist.lst), w, $+(*,$2,*))
  32. var %bl.netwk = $4
  33.  
  34. if (%bl.netwk == iwwfnet) { var %bl.netwk = IWWFNet }
  35. if (%bl.netwk == efnet) { var %bl.netwk = EFNet }
  36. if (%bl.netwk == dalnet) { var %bl.netwk = DALNet }
  37. if (%bl.netwk == undernet) { var %bl.netwk = UnderNet }
  38.  
  39. if (%nick == $null) {
  40. write $qt($mircdirBlacklist.lst) $2 $+ ~ $+ $3 $+ ~ $+ %bl.netwk $+ ~ $+ $5-
  41. echo -a 7( $+ $2 $+ 7) has been Blacklisted on the 7( $+ %bl.netwk $+ 7) Network with the reason 7( $+ $5- $+ 7)
  42. echo -a User is Blacklist Monitored on channel 7( $+ $3 $+ 7)
  43.  
  44. if ($2 ison $chan) { kick $chan $nick }
  45. }
  46. else {
  47. echo -a $2 is already on the Blacklist
  48. }
  49. }
  50.  
  51. if ($1 == chans) {
  52. if ($2- == $null) { echo -a Specify the channels with the # and spaces between them. }
  53.  
  54. set %bl.chans %bl.chans $2- | echo -a Channels now monitored: %bl.chans
  55. }
  56.  
  57. if ($1 == del) {
  58. if ($2 == $null) {
  59. echo -a Please specify the Nickname/Hostname to remove from the Blacklist.
  60. }
  61. else {
  62. $read($qt($mircdirBlacklist.lst), w, $2)
  63. var %x = $readn
  64. write -dl $+ %x $qt($mircdirBlacklist.lst)
  65.  
  66. echo -a Removed $2 from the Blacklist
  67. }
  68. }
  69.  
  70. if ($1 == list) {
  71. var %count = 1 | echo -a Current Blacklisted Users
  72.  
  73. if ($lines($mircdirBlacklist.lst) == 0) { echo -a None }
  74.  
  75. while (%count <= $lines($qt($mircdirBlacklist.lst))) {
  76. echo -a User: $gettok($read($qt($mircdirBlacklist.lst), %count),1,126) - Channel Blacklisted From: $gettok($read($qt($mircdirBlacklist.lst), %count),2,126)
  77. echo -a Server Affected: $gettok($read($qt($mircdirBlacklist.lst), %count),3,126) - Blacklisted: $gettok($read($qt($mircdirBlacklist.lst), %count),4,126)
  78. inc %count
  79. }
  80. }
  81.  
  82. if ($1 == clear) {
  83. if $exists($qt($mircdirBlacklist.lst)) {
  84. echo -a Blacklist has been wiped.
  85. remove $qt($mircdirBlacklist.lst)
  86. }
  87. else {
  88. echo -a No blacklist exists at this time, make one if you want.
  89. }
  90. }
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement