Personal Greets (for bots)

By Krobeluskill on Feb 07, 2007

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-)
    }
  }
}

Comments

Sign in to comment.
kylethegeek   -  Jun 25, 2010

One bug. You have $ as variables. When they are %. Other than that good Script!

 Respond  
m4g3script   -  Jun 02, 2007

found a bug once u turn the script on it turns off

 Respond  
m4g3script   -  Jun 02, 2007

testing

 Respond  
Sasuke   -  Apr 18, 2007

Or... you could just make

on *:join:#(channame):{ notice $nick etcetc }

_>

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.