bot rules on invite

By Spanky on Aug 02, 2008

This is a Snippet I found on here by Cobra_Strike.
Right with this script I just changed a few things made it so they got to invite the bot to a channel before they can make it join and basically tried my best to make it better.
please leave me comments I want to know if I'm any good.

on *:invite:#: {
  set %invite on
  msg $nick You have chosen to use $me If you wish to use the bot then you need to agree to the rules of usage 
  msg $nick Rules: Do not spam $me, Do not P,M $me as it will not answer (It is a Bot) and do not under any Circumstances Flood $me causing it to quit due to excess flood 
  msg $nick if you agree type yes if not type no.
} 
on *:text:yes:?:{
tokenize 32 $strip($1)
  if (%invite == on) set %yes on | .timer 1 2 msg $nick thank you now please type join #channel and i will join. 
}
on *:text:no:?:{
tokenize 32 $strip($1)
  msg $nick  You responded no good bye..
  close -m $nick
} 
on *:text:join*:?:{
tokenize 32 $strip($1-)
  if (%yes == on) .timer 1 2 msg $nick joining $2 now... | .timer 1 4 join $2 
  else .timer 1 2 msg $nick you have not said yes or have not invited me to the channel. plz try again
  unset %invite
  unset %yes
  close -m $nick
}

Comments

Sign in to comment.
Jethro   -  Apr 12, 2011

The thing is, everybody can enter $2 as a word, and it doesn't have to be a channel. We want to make sure it starts with "#." just in case. There are people who might tamper with it. I don't see the need for three text events though:

on $*:text:/^(yes|no|join\s\43(?!\43)\S+)$/iS:?:{
  if ($regml(1) == yes) && (%invite == on) {
    set %yes on 
    .timer 1 2 msg $nick thank you now please type join #chan and i will join.
  }
  elseif ($regml(1) == no) {
    msg $nick  You responded no good bye..
    close -m $nick
  } 
  else {
    if (%yes == on) {
      .timer 1 2 msg $nick joining $token($regml(1),2,32) now... 
      .timer 1 4 $regml(1)
    }
    else {
      .timer 1 2 msg $nick you have not said yes or have not invited me to the channel. plz try again
      unset %invite %yes
      close -m $nick
    }
  }
}
 Respond  
Spanky   -  Apr 12, 2011

It should part automatically.

 Respond  
Lenooox   -  Apr 11, 2011

Hello

I tried your scipt ! i invited my bot and i typed NO in pm , i got this answer : You responded no good bye..

But the bot not parted ! thats not automaticaly? or why not parted the bot? Thanks for Answer :)

 Respond  
Tannn3r   -  Aug 11, 2010

Nice work! You made it a lot better. :)

 Respond  
Fuzion   -  Aug 04, 2008

good work

 Respond  
DragonFlare   -  Aug 02, 2008

Nice Work Spencer

 Respond  
Spanky   -  Aug 02, 2008

updated it to El\'s idea and it works perfect ty

 Respond  
EL   -  Aug 02, 2008

Hmm seems u have some unneeded code and no flood protection as well.Heres a simple redo if you will added $strip (so you can use color) and made it one text event and flood protection and it wont trigger if you havent been invited.

on *:invite:#: {
  inc -u10 $+(%,_IN_F,.,$nick) 1
  if ($($+(%,_IN_F,.,$nick),2) == 2) { .msg $nick Please do NOT flood me. | close -m $nick | unset %invite %invite_chan |  halt }
  if ($($+(%,_IN_F,.,$nick),2) >= 3) { halt }
  set %invite on
  set %invite_chan $chan
  .msg $nick You have chosen to use $me If you wish to use the bot then you need to agree to the rules of usage 
  .msg $nick Rules: Do not spam $me, Do not P,M $me as it will not answer (It is a Bot) and do not under any Circumstances Flood $me $+ . 
  .msg $nick if you agree type yes and i will join %invite_chan $+ ,if not type no to end this session.
} 

on *:text:*:?:{
  if (%invite == On) && ($strip($1) == No) { 
    msg $nick  u responded no good bye..
    unset %invite %invite_chan
    close -m $nick
  } 
  if (%invite == On) && ($strip($1) == Yes) { 
    .timer 1 2 msg $nick joining %invite_chan now... 
    .timer 1 4 join %invite_chan 
    unset %invite %invite_chan
    close -m $nick
  }
}

Lemme know should work fine.And this is a good idea for bots that u dotn want to have auto join on invite.`-.-´

 Respond  
Spanky   -  Aug 02, 2008

updated and ty

 Respond  
Fan_Of_Ur_Mom   -  Aug 02, 2008

msg $nick Rules: Do not spam $me, Do not P,M $me as it will not answer (It is a Bot) and do not under any cercumstances Flood $me causing it to quit due to excess flood

Circumstances** and change your $me, to => $me $+ , it\'s a well scripted script, kinda pointless, but hey, what ever creams your twinkie. :D

 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.