On invite

By Cobra_Strike on Oct 31, 2006

Ok this is simple but for me its better that a plain on *:invite:#: { join $2 ... I made this because i was getting fed up with people flooding my bot and Pming it all the time

Basicly on invite it sends the user a msg telling them the rules of using your bot then asks for them to type yes or no to conferm that they agree or disagree the user will then be prompted to type join #channel for the bot to join also after typing yes if they do not reply with join #channel within 15 seconds the script will reset.. pointless maybe but i have had less people flooding my bot and pming it since i have made this... Just press alt+r once your remotes is open click File, New to create a new remote script and past this code into your bot

Hope you enjoy this =D

on *:invite:#: { 
  msg $nick 0,1You have chosen to use <Botname> If you wish to use the bot then you need to agree to the rules of usage 
  msg $nick 4Rules: Do not spam <Botname>, Do not P,M <Botname> as it will not answer (It is a Bot) and do not under any cercumstances Flood <Botname> causing it to quit due to excess flood 
  msg $nick 0,1if you agree type yes if not type no 
} 
on *:TEXT:*:?: { 
  if ($1 == Yes) { 
    .timer 1 2 msg $nick thank you now please type join #channel and i will join 
    $+(.timerexpire.,$nick) 1 15 expire $nick 
  } 
  elseif ($1 == No) { 
    msg $nick $nick Replied no 
    close -m $nick 
  } 
  elseif ($1 == join) { 
    if ($timer($+(expire.,$nick))) { 
      .timer 1 2 msg $nick joining $2 now... 
      .timer 1 4 join $2 
      close -m $nick
      $+(.timerexpire.,$nick) off 
    } 
    else expire $nick 
  } 
} 
alias expire { 
  msg $1 Sorry you did not reply in time, please try again 
  if ($window($1)) close -m $1 
}

Comments

Sign in to comment.
Saeed   -  Sep 28, 2007

It would be easier if you could have the \'s switched to variables because it\'s easier to type /set %botname name instead of going through the script and changing the text. And, just in case a user doesn\'t specify, add an if ($2-) event to double-check if the user actually types the parameters. Other then that, it looks alright. You also have a typo/spelling error, it should be circumstances.

 Respond  
guest598594   -  Sep 28, 2007

and does refer to the nick that the script is in? cuz if it is, just do $me to return ur nick

 Respond  
guest598594   -  Sep 28, 2007

anyone can just pm ur bot with yes or no and it will apply

my suggestion is on invite, set %invite on

on text, if (%invite == on) continue...unset %invite

 Respond  
Creamlistner   -  Sep 24, 2007

Well, Its alright, only thing I don\'t like Is that It PM\'s you asking If you agree, and THEN Is has you retype where you want the bot to join, It can get annoying. I think Its easier to set It so Only Op/hop can invite, and It just automatically joins. Have an !exit script with it.

 Respond  
moneaungchit^^^gf   -  Nov 05, 2006

hi fri plz join #mandalay tha a lot

 Respond  
Acid-Religion   -  Nov 01, 2006

you could use Userlevels to make sure that the bot gets invited first, if not someone could just send a pm to the bot typing yes and join channel..
Also, to prevent flood alltogether you could just ignore the nick after accepting the rules and telling what channel to join..

 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.