This varied greet snippet allows an op of a channel to turn it on/off. It also checks on every piece if the greets are on/off.
Uses:
!greets on/off - turns greets on/off
!setgreet "greet" - sets a greet
!delgreet - deletes a greet
on *:text:!greets*:#:{ if ($nick isop $chan) {
if ($2 == on) set $($+(%Greets.,$chan)) on | notice $nick Greets are now On for this channel.
if ($2 == off) unset $($+(%Greets.,$chan)) | notice $nick Greets are now Off for this channel.
else { notice $nick You must be an Op in this channel.
}
}
}
on *:text:!setgreet*:#:( if (!$($+(%Greets.,$chan),2-)) { halt }
else { if (!$2-) notice $nick You can't have nothing as a greet, if you want your greet deleting type !delgreet
else { set $($+(%,$nick,.Greet)) $2-
notice $nick You greet has been changed to: $2-
}
}
on *:text:!delgreet*:#:{ if (!$($+(%Greets.,$chan),2-)) { halt }
else { if (!$($+(%,$nick,.Greet),2)) notice $nick You do not have a greet to delete.
else { unset $($+(%,$nick,.Greet))
notice $nick You greet has been deleted.
}
}
}
on *:join:#:{ if (!$($+(%Greets.,$chan),2-)) { halt }
else { if (!$($+(%,$nick,.Greet),2)) notice $nick You do not have a greet, type !setgreet <greet> to make one.
else { msg $chan [ $+ $nick $+ ] $($+(%,$nick,.Greet),2-)
}
}
}