All pastes #776462 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-11-16 02:10 UTC
rendered paste body
; You can set the color theme here. $c1 is the
; primary color, and $c2 is the secondary
; (highlight) color. You *must* prefix all
; single-digit colors with a 0.  For example,
; use 02, *not* 2.

; The primary color:
alias -l $c1 { return 02 }

; The secondary color:
alias -l $c1 { return 04 }


;This is where the actual script begins.
on $*:text:/^[!@`.](set)?greet(me?s?sa?ge?)?/Si:#:{
  if ($2) {
    writeini -n greet.ini GREET $nick $2-
    notice $nick $c1 4+ Your greet message has been set to: $+ $c2 $+ $2-
  }
  else {
    remini greet.ini GREET $nick
    notice $nick $c1 $+ Your greet message has been $+ $c2 $+ removed $+ $c1 $+ .
  }
}
on $*:text:/^[!@`.](del(ete)?|rem(ove)?)greet(me?s?sa?ge?)?/Si:#:{
  remini greet.ini GREET $nick
  notice $nick $c1 $+ Your greet message has been $+ $c2 $+ removed $+ $c1 $+ .
}

on *:join:*:{
  var %msg = $readini(greet.ini,n,GREET,$nick)
  if (%msg) {
    msg $chan $+($c2,$chr(91),$c1,$nick,$c2,$chr(93),$c1) %msg
  }
}