Public feed #889544

Something

public text v1 · immutable
Raw Edit
·published 2008-02-03 00:18 UTC
rendered paste body
# On load first thing: if table 'auth' doesn't exist let's make it.
# This script is good because this should be pretty fast after the authnames are collected.
on *:load:{
  if (!$hget(auth)) { hmake auth }
  if ($status == connected) { 
    var %x $chan(0) 
    while (%x) { 
      if ($chan(%x)) {
        timer 1 $calc(%x * 3) who 106 n%an $chan(%x)
        dec %x
      }
    }
  }
}
; On connect If auth table exists already for some reason we don't try to make it, else we make it and update the authnames in 10seconds.
on *:connect:{
  if ($hget(auth)) { timer 1 10 who 106 n%an * }
  if (!$get(auth)) { hmake auth | timer 1 10 who 106 n%an * }
}
; The raw event: <me> <nick> <auth_of_nick>
raw 354:*:{
  if (!$auth($2)) && ($3 != 0) { hadd auth $2 $3 }
}
; When someone parts and you don't have common channels with him/her, let's remove the authname from list.
on *:part:#:{ if ($comchan($nick) == 0) { hdel auth $nick } }
; When someone quits we remove the authname for table too...
on *:quit:{ hdel auth $nick }
alias auth { return $hget(auth,$1) }
on *:join:#:{
  if ($nick == $me) { who 106 n%an $chan }
  if ($readini(db3.ini,add,$auth($nick)) == 1337) { msg $chan $nick ( $+  $+ $readini(db.ini,add,$auth($nick)) $+  $+ ) Entered the channel! }
  if (!$auth($nick)) { who 106 n%an $nick
  }
}