Hello.
This is my second script
-------- Commands --------
!SetGreet - Set the greet for your nick
!Greet - Turn the custom greets for your channel on or off
Any problems with spelling or the code please tell me.
Enjoy
~Corrosive~
on *:JOIN:#: {
if ( %greet [ $+ [ $nick ] ] != $null ) {
if ( %greet [ $+ [ $chan ] ] == on) {
msg $chan [[ $nick ]] %greet [ $+ [ $nick ] ]
}
}
else {
notice $nick You do not have a custom greet set, to set one please type !SetGreet
}
}
on *:TEXT:!Setgreet *:#: {
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 anyway | 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 anyway | 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
}