All pastes #995314 Raw Edit

Mine

public text v1 · immutable
#995314 ·published 2008-04-24 01:04 UTC
rendered paste body
############## Admin Greets ###########
#### By Sopie @ foxden.pureirc.net ####
#######################################
if ($nick == PureApp) || ($network == EFNet) || ($network == PureIRC) { 
  on $*:TEXT:/^[!@]adgreet/Si:#:{
    if ($AdminGreets($nick)) || ($AdminGreets($address($nick,2))) {
      if ($2) && ($3) {
        writeini Greets.ini Greets $address($2,2) $replace($3-,$chr(2),chr2,$chr(3),chr3,$chr(31),chrU)
        $iif(@* iswm $1,msg $chan,notice $nick) New greet for $2 has been set. $+([,$3-,$strip(])) (Note: If the user was not online, then it is not set.)
      }
      else {
        $iif(@* iswm $1,msg $chan,notice $nick) Error, you must insert an online user and his greet. Eg. !adgreet Sophie Hi, how are you?.
        halt
      }
    }
    else {
      $iif(@* iswm $1,msg $chan,notice $nick) Access Denied for $nick $+ .
      halt
    }
  }
  on $*:TEXT:/^[!@]addelgreet/Si:#:{
    if ($AdminGreets($nick)) || ($AdminGreets($address($nick,2))) {
      if ($2) {
        remini Greets.ini Greets $address($2,2)
        $iif(@* iswm $1,msg $chan,notice $nick) $2 $+ 's greet has been unset. (Note: If the user was not online, then it is not unset.)
      }
      else {
        $iif(@* iswm $1,msg $chan,notice $nick) Error, you must insert a username to delete his/her greet. Eg. !addelgreet Sophie.
      }
    }
    else {
      $iif(@* iswm $1,msg $chan,notice $nick) Access denied for $nick $+ .
    }
  }
  alias -l AdminGreets {
    if ($1) {
      if ($1 == Sophie) { return $true }
      elseif ($1 == *!*@lways.Spying.You) { return $true }
      elseif ($1 == _) { return $true }
      elseif ($1 == *!*@tching.You) { return $true }
      ;Simply press enter and type in: elseif ($1 == Blah) { return $true } to add more access. :P
    }
  }