Public paste
Undefined
By: Guest | Date: Oct 18 2022 15:37 | Format: None | Expires: never | Size: 1.93 KB | Hits: 195

  1. raw 439:*: {
  2.   .timers off
  3.   .timer 1 1200 haps
  4. }
  5. alias haps {
  6.   .enable #Qfastinvite
  7.   var %x = 1
  8.   var %counter = 1
  9.   .timer 1 $calc(20 * $lines(fastinvite.txt) + 60) echo -s END OF LIST
  10.   .timer 1 $calc(20 * $lines(fastinvite.txt) + 60) .disable #Qfastinvite
  11.   .timer 1 $calc(20 * $lines(fastinvite.txt) + 60) unset %fast.*
  12.   while (%x <= $lines(fastinvite.txt)) {
  13.     if (!$read(isinvite.txt,w,$read(
  14. fastinvite.txt,%x))) {
  15.       .timer 1 $calc(20 * %counter) .msg q whois $chr(35) $+ $read(fastinvite.txt,%x)
  16.       inc %counter
  17.     }
  18.     inc %x
  19.   }
  20. }
  21. alias fastinvite {
  22.   write -c fastinvite.txt
  23.   set %fast.channel $chan
  24.   set %fast.msg $1-
  25.   set %fast.dump 1
  26.   .enable #Qfastinvite
  27.   .msg q chanlev $chan
  28. }
  29. #Qfastinvite on
  30. alias go.invite {
  31.   if ($comchan($1,0) == 0) {
  32.     .msg $1 %fast.msg
  33.     invite $1 %fast.channel
  34.     echo -s $timestamp $1 [priv]
  35.   }
  36.   else {
  37.     var %x = 1
  38.     while (%x <= $comchan($1,0)) {
  39.       if ($me !isreg $comchan($1,%x)) {
  40.         .cprivmsg $1 $comchan($1,%x) %fast.msg
  41.         invite $1 %fast.channel
  42.         echo -s $timestamp $1 [cpriv]
  43.         break
  44.       }
  45.       if (%x == $comchan($1,0)) {
  46.         .msg $1 %fast.msg
  47.         invite $1 %fast.channel
  48.         echo -s $timestamp $1 [priv]
  49.       }
  50.       inc %x
  51.     }
  52.   }
  53. }
  54. on ^*:NOTICE:*:*: {
  55.   if ($nick == Q) {
  56.     haltdef
  57.     if (-Information for account isin $1-) { set %go.user $left($4,-1) }
  58.     if ($nick == Q && $1 == Account) {
  59.       if ($4 ison %fast.channel) {
  60.         write isinvite.txt %go.user
  61.       }
  62.       elseif ($4 != (none) && !$read(isinvite.txt,w,%go.user)) {
  63.         go.invite $4
  64.         write isinvite.txt %go.user
  65.       }
  66.     }
  67.     elseif ($nick == Q && %fast.dump == 1) {
  68.       if ($1 == Total:) {
  69.         ; .disable #Qfastinvite
  70.         unset %fast.dump
  71.         haps
  72.       }
  73.       elseif (+ isin $1- && b !isin $2) {
  74.         write fastinvite.txt $1
  75.       }
  76.     }
  77.   }
  78. }
  79. #Qfastinvite end