Bot Greet Script

By Zaff on Mar 09, 2009

Simple Bot greet Script with multiple options

Channel Operator Commands
!changreet on|off - If off, when user joins their greet will not be displayed
!greetall on|off If off, when a user join no matter if they don't have a rank, their greet will be displayed.

User Commands
!greet on|off - Turns their greet on or off
!greet Greet_here - Change your greet

It should work fine, Its not tested cause I wrote it in this window, if not tell me.

on *:text:!greet *:#:{
     if ($2 == on) {
          notice $nick Your greet has been enabled.
          writeini greets.ini $nick mode on
     }
     elseif ($2 == off) {
          notice $nick Your greet has been disabled.
          writeini greets.ini $nick mode off
     }
     else {
          notice $nick Your greet has been succesfully changed.
          writeini greets.ini $nick greet $2-
     }
}

on *:text:!changreet *:#:{
     if ($2 == on) {
          msg $chan Greetings have been enabled.
          writeini greets.ini channels $chan on
     }
     elseif ($2 == off) {
          msg $chan Greetings have been disabled.
          writeini greets.ini channels $chan off
     }
}

on *:text:!greetall *:#:{
     if ($2 == on) {
          msg $chan Any one can use their greets in this channel now.
          writeini greets.ini channels2 $chan on
     }
     elseif ($3 == off) {
          msg $chan Only Voiced users and higher can use their greets in this channel.
          writeini greets.ini channel2 $chan off
     }
}

on *:join:#:{
if ($readini(greets.ini, $nick, greet)) {
     if ($readini(greets.ini, channels, $chan) == off) {
          halt
     }
     elseif ($readini(greets.ini, $nick, mode) == off) {
          halt
     }
     elseif ($nick isreg $chan) {
          if ($readini(greets.ini, channels2, $chan) == off) {
               halt
          }
          else {
               msg $chan [ $+ $nick $+ ] $readini(greets.ini, $nick, greet)
          }
     }
     else {
               msg $chan [ $+ $nick $+ ] $readini(greets.ini, $nick, greet)
          }
     }
}

Comments

Sign in to comment.
Zaff   -  Mar 09, 2009

I know their isnt any need for that. It's just how I do things. I'm used to it.

 Respond  
Aucun50   -  Mar 09, 2009

So it's like a join message? Also no need for more then one on text event

 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.