Advertisement
debiangr

Untitled

Apr 10th, 2023
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.18 KB | None | 0 0
  1. ON *:START: {
  2. var %h = BADNICK
  3. var %f = $mircdirdata\ $+ %h $+ .list
  4.  
  5. if (!$file(%f)) { return }
  6.  
  7. hmake %h 5000
  8. hload %h $qt(%f)
  9. }
  10.  
  11. menu status,channel,query {
  12. BN SQLINE CONNECT
  13. .On:.enable #bnsqline | .echo -a 4* BNICK-SQLINE ON *
  14. .Off:.disable #bnsqline | .echo -a 4* BNICK-SQLINE OFF *
  15. }
  16.  
  17. alias addbn {
  18. tokenize 32 $strip($1-)
  19.  
  20. var %h = BADNICK
  21. var %d = $hfind(%h,$1,0,W).data
  22.  
  23. if (!$1) { echo 4 -gate Error: Please specify a parameter! | return }
  24. if (%d) { echo 4 -gate Error: Already exists $qt($1) in %h list! | return }
  25.  
  26. hadd -m %h $ctime $1
  27. hsave %h $qt($mircdirdata\ $+ %h $+ .list)
  28.  
  29. echo 3 -gate Added $qt($1) in the %h list. - Total: $hget(%h,0).item
  30. }
  31.  
  32. alias delbn {
  33. tokenize 32 $strip($1-)
  34.  
  35. var %h = BADNICK
  36. var %d = $hfind(%h,$1,1,W).data
  37.  
  38. if (!$1) { echo 4 -gate Error: Please specify a parameter! | return }
  39. if (!%d) { echo 4 -gate Error: Not exists $qt($1) on the %h list! | return }
  40.  
  41. hdel %h %d
  42. hsave %h $qt($mircdirdata\ $+ %h $+ .list)
  43.  
  44. echo 3 -gate Removed $qt($1) from the %h list. - Total: $hget(%h,0).item
  45. }
  46.  
  47. alias listbn {
  48. var %h = BADNICK
  49. var %t = $hget(%h,0).item
  50.  
  51. if (!%t) { echo 4 -gate Error: %h list is empty! | return }
  52.  
  53. echo 10 -gate Display all %h list..
  54.  
  55. var %i = 1
  56. while (%i <= %t) {
  57. var %item = $hget(%h,%i).item
  58. var %data = $hget(%h,%item)
  59.  
  60. if (%item) && (%data) { echo 6 -gate $+($chr(35),%i,:) %data - Added on: $asctime(%item) }
  61.  
  62. inc %i
  63. }
  64.  
  65. echo 10 -gate End of %h list.
  66. }
  67.  
  68. #bnsqline off
  69.  
  70. ON *:SNOTICE:*Client connecting*: {
  71. var %h = BADNICK
  72. if ($hfind(%h,$4,1,W).data) { var %match = 1 | os sqline add +30m $4 4N41drysho 4E41mrin 4D41he 4J41eni 4T41e 4M41irepritur 4P41erseri... }
  73. if ($check_nick_chars($4)) { var %match = 1 | os sqline add +30m $4 4N41drysho 4E41mrin 4D41he 4J41eni 4T41e 4M41irepritur 4P41erseri... }
  74. if (%match) {
  75. window -e @SQLINES
  76. echo -t @SQLINES 10-- 3Client 4SQLINED 10connecting 4 $4 5 $+ $5 4 $+ $6
  77. }
  78. }
  79.  
  80. ON !*:NICK:{
  81. var %h = BADNICK
  82. if ($hfind(%h,$newnick,1,W).data) { var %match = 1 | os sqline add +30m $newnick 4N41drysho 4E41mrin 4D41he 4J41eni 4T41e 4M41irepritur 4P41erseri... }
  83. if ($check_nick_chars($newnick)) { var %match = 1 | os sqline add +30m $newnick  4N41drysho 4E41mrin 4D41he 4J41eni 4T41e 4M41irepritur 4P41erseri... }
  84. if (%match) {
  85. window -e @SQLINES
  86. echo -t @SQLINES 10-- 7Client 4SQLINED 10nickchange with newnickname:7 $newnick old nickname was4 $nick with address5 $address($newnick,2)
  87. }
  88. }
  89.  
  90. #bnsqline end
  91.  
  92. alias check_nick_chars {
  93. if (!$1) { return }
  94. var %regex = \-~!@#$%^&*()_+\|;:'",<.>/?{}=\][
  95. if ($regex($1,/([ %regex ])/gS)) { var %chars = $regml(0) }
  96. if (%chars >= 2) && ($len($1) >= 18) { return 1 }
  97.  
  98. var %t = $mid($1,0,0)
  99. var %i = 1
  100. while (%i <= %t) {
  101. var %n = $mid($1,%i,1)
  102. if ($count($1,%n) >= 2) && (%n isin %regex) { return 1 }
  103. inc %i
  104. }
  105. return 0
  106. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement