Advertisement
westor

Ban Nick|Ident Commands for psycho v1.0

Feb 6th, 2021
2,532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.22 KB | None | 0 0
  1. ON *:TEXT:*:#: {
  2.   tokenize 32 $strip($1-)
  3.  
  4.   var %signs = !,@,-,.
  5.  
  6.   if (!$1) || (!$istok(%signs,$left($1,1),44)) { return }
  7.  
  8.   var %command = $mid($1,2-)
  9.  
  10.   if (%command == n)  {
  11.     if (!$2) || ($nick !isop $chan) { return }
  12.  
  13.     if ($2) && (!$3) { var %target = $2 }
  14.     if ($2) && ($3) && ($2 ischan) { var %target = $3 }
  15.     if ($2) && ($3) && ($2 !ischan) { var %target = $2 }
  16.  
  17.     if (%target == $me) || (%target == $nick) { return }
  18.  
  19.     mode $chan +b %target
  20.  
  21.     raw -q kick $chan %target [Banned]: Inappropriate nickname.. - Please change it before rejoining!
  22.   }
  23.  
  24.   if (%command == id) {
  25.     if (!$2) || ($nick !isop $chan) { return }
  26.  
  27.     if ($2) && (!$3) { var %target = $2 }
  28.     if ($2) && ($3) && ($2 ischan) { var %target = $3 }
  29.     if ($2) && ($3) && ($2 !ischan) { var %target = $2 }
  30.  
  31.     var %mask = *! $+ %target $+ @*
  32.  
  33.     mode $chan +b %mask
  34.  
  35.     var %t = $ialchan(%mask,$chan,0)
  36.  
  37.     if (!%t) { return }
  38.  
  39.     var %i = 1
  40.     while (%i <= %t) {
  41.       var %n = $ialchan(%mask,$chan,%i).nick
  42.  
  43.       if (%n) && (%n !== $me) && (%n !== $nick) && (%n !isop $chan) { raw -q kick $chan %n [Banned]: Inappropriate ident.. - Please change it before rejoining! }
  44.  
  45.       inc %i
  46.     }
  47.   }
  48.  
  49. }
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement