Public paste
qweq
By: qweqw | Date: Aug 18 2012 17:39 | Format: None | Expires: never | Size: 1.93 KB | Hits: 965

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