All pastes #751024 Raw Edit

Someone

public text v1 · immutable
#751024 ·published 2007-10-27 00:02 UTC
rendered paste body
on *:JOIN:#: {
  if ( %greet [ $+ [ $nick ] ] != $null ) {
    if ( %greet [ $+ [ $chan ] ] == on) {
      msg $chan $nick has entered the channel $chan $+ !
      msg $chan [( $nick ]) %greet [ $+ [ $nick ] ]
    }
  }
  else {
    notice $nick You do not have a custom greet set, to set one please type !RpGreet
  }
}


on *:TEXT:!rpgreet *:#: {
  if ( %greet [ $+ [ $chan ] ] == ON ) {
    if ( $2- == $null ) {
      notice $nick You need to write something for your greet. | halt
    }
    if ( $2- != $null ) {  
      if ( %greet [ $+ [ $nick ] ] == $2- ) {
        notice $nick Your greet is already that. | halt
      }
    }
    set %greet [ $+ [ $nick ] ] $2-
    notice $nick Your greet has been set as $2-
  }
  if ( %greet [ $+ [ $chan ] ] == OFF ) {
    notice $nick Sorry $nick but the custom greets for this channel are turned off. | halt
  }
} 



on *:TEXT:!Greet *:#: {
  if ( $nick isop $chan ) || ( $nick ishop $chan ) {
    if ( $2 == ON ) {
      if ( %greet [ $+ [ $chan ] ] == ON ) {
        notice $nick The custom greets for this channel are on already. | halt
      }
      set %greet [ $+ [ $chan ] ] ON
      notice $nick The custom greets for $chan has been turned 9ON 
    }
  }
  if ( $nick isop $chan ) || ( $nick ishop $chan ) {
    if ( $2 == OFF ) {
      if ( %greet [ $+ [ $chan ] ] == OFF ) {
        notice $nick The custom greets for this channel are off already. | halt
      }
      set %greet [ $+ [ $chan ] ] OFF
      notice $nick The custom greets for $chan has been turned 4OFF
    }
  }
}
else { 
  notice $nick Sorry $nick but you cannot change the settings of this channels greet
}