Untitled

mIRC/HexDroid Scripting boxlabs 9 Views Size: 1.19 KB Posted on: Nov 4, 26 @ 4:18 PM
  1. ; Part a channel when someone on the avoid list is in it, or joins later.
  2.  
  3. on LOAD {
  4.     set %avoid $list(somenick, someothernick)
  5.     set %avoid_wait $map()
  6. }
  7.  
  8. on JOIN {
  9.     if ($isme == true) {
  10.         ; Scripts can't read the member list, so ask the server who is here.
  11.         setat %avoid_wait $lower($chan) wait
  12.         who $chan
  13.         return
  14.     }
  15.     if ($has(%avoid, $lower($nick)) == true) {
  16.         part $chan
  17.     }
  18. }
  19.  
  20. on NUMERIC {
  21.     ; 352 is one WHO line: <channel> <nick> <flags> <user@host> ...
  22.     if ($code == 352) {
  23.         set -l %w $split($text)
  24.         set -l %c $lower($get(%w, 0))
  25.         set -l %state $get(%avoid_wait, %c)
  26.         if (%state != wait && %state != left) { return }
  27.         if (%state == wait && $has(%avoid, $lower($get(%w, 1))) == true) {
  28.             setat %avoid_wait %c left
  29.             part $get(%w, 0)
  30.         }
  31.         halt
  32.     }
  33.     ; 315 ends the WHO reply: <channel>: End of WHO list
  34.     if ($code == 315) {
  35.         set -l %c $lower($replace($get($split($text), 0), ":", ""))
  36.         set -l %state $get(%avoid_wait, %c)
  37.         if (%state != wait && %state != left) { return }
  38.         setat %avoid_wait %c done
  39.         halt
  40.     }
  41. }

Raw Paste

Comments 0
Login to post a comment.
  • No comments yet. Be the first.
Login to post a comment. Login or Register
We use cookies. To comply with GDPR in the EU and the UK we have to show you these.

We use cookies and similar technologies to keep this website functional (including spam protection via Google reCAPTCHA or Cloudflare Turnstile), and — with your consent — to measure usage and show ads. See Privacy.