All pastes #770020 Raw Edit

Untitled

public text v1 · immutable
·published 2007-11-11 20:56 UTC
rendered paste body
on *!:JOIN:#:{
  set %chan $chan
  set %nick $nick
  if !$read(greets.txt, s, $address($nick,2)) { | halt }
  elseif timer 1 1 /opcheck $nick $chan
  elseif timer 1 1 /hopcheck $nick $chan
  elseif timer 1 1 /vocheck $nick $chan
  elseif ($read(greets.txt, s, $chan) == none) { | halt }
  else { | halt }
}

alias opcheck {
  if ($read(greets.txt, s, %chan) == op) && (%nick isop %chan) msg %chan $c1([) $+ $c2($nick) $+ $c1(]) $read(greets.txt, s, $address(%nick,2)) 
}

alias hopcheck {
  if ($read(greets.txt, s, %chan) == hop) && (%nick ishop %chan) || (%nick isop %chan) msg %chan $c1([) $+ $c2($nick) $+ $c1(]) $read(greets.txt, s, $address(%nick,2)) 
}

alias vocheck {
  if ($read(greets.txt, s, %chan) == voice) && (%nick isvo %chan) || (%nick ishop %chan) || (%nick isop %chan) msg %chan $c1([) $+ $c2($nick) $+ $c1(]) $read(greets.txt, s, $address(%nick,2)) 
}