No Facebook? Get Kicked (Work In Progress)

By damdman on Mar 22, 2012

This script was made to weed out people who don't have a facebook. Of course people could lie but, oh well.
When you join the channel, the bot asks you via Pm do you have a facebook. and you reply either yes or no. If you say yes, it will Broadcast in the channel that you said yes. If you say no, it will kick you lol. I got mad a people and made this real quick. I'm still trying to get it to not message ops, but i haven't had any luck. It also has a timer, if you don't answer within 60 seconds it will kick you too. I had a Lot of help with this one Thanks you guys! I'll add the user list thing soon.

On *:JOIN:#: { 
 if ($nick isreg $chan) {
  msg $nick Hi, Welcome To $chan . Do you have a 0,2Facebook0,1? Please answer Yes or No in the next 60 seconds or you will be kicked. 
  fbtimer1 1 60 kick $chan $nick
}
}
On *:open:?:*: {
  { if ($1 = yes) msg $nick Thank You. Please Enjoy yourself. | fbtimer1 off | msg # $nick has a 0,2Facebook0,1 = Yes!  } 
  { if ($1 = no) msg $nick I'm sorry, you have to have a 0,2Facebook0,1 in order to join this channel. | fbtimer1 off  | kick $chan $nick 0,2Facebook0,1 = No :(  }
}

Comments

Sign in to comment.
blackvenomm666   -  Mar 27, 2012

haha sorry bout the random O_O was testing for hawkee man see if the ie8 bug was fixed

 Respond  
blackvenomm666   -  Mar 26, 2012

O_O

 Respond  
damdman   -  Mar 23, 2012

Thanks :) Oh the channel isn't very busy at all sadly.

 Respond  
blackvenomm666   -  Mar 23, 2012

i didnt see the point either but i redid it to show a better/working way to do it

 Respond  
Stewie1k94   -  Mar 23, 2012

Why kick someone for not having Facebook?

 Respond  
ezkim0x   -  Mar 23, 2012

actually an additional 60 seconds.. so if another user joins within 64 seconds you could kick the wrong user and/or skip one.

 Respond  
ezkim0x   -  Mar 23, 2012

I would still call the timer as the nick.. i don't know how busy the channel is.. but if 2 people join within 4 seconds of each other it will ignore the first user.. if you change .timerfbcheck to .timer $+ $nick 1 4 fbcheck $nick $chan .. and get rid of the %kicknick %kickchan vars.. replacing %kicknick with $1 and %kickchan with $2 you would never have that problem.

 Respond  
blackvenomm666   -  Mar 23, 2012

seeing as your on text event triggers before modes are set it is best to use a timer with an alias to check for mod status or any other type of channel status voice op etcetc
i tested this with my bot and it worked fine. also you have it set to On :open:?:: { which will not work since that only has to do with a pm opening. and not even if YOU are the one opening it only if someone pm's you/the bot. what is said in the pm is not caught by the on open event. it has to be the on text as i did below


On *:JOIN:#: { 
  .set %kickchan $chan 
  .set %kicknick $nick 
  .timerfbcheck 1 4 fbcheck 
} 
alias fbcheck { 
  if (%kicknick !isop %kickchan) { 
    msg %kicknick Hi, Welcome To $1. Do you have a 0,2Facebook0,1? Please answer Yes or No in the next 60 seconds or you will be kicked. (4Ops Please Disregard This Message.) 
    timerfbkick 1 60 kick %kickchan %kicknick 
  } 
} 
On *:text:*:?: { 
  if ($1 = yes) { msg %kicknick Thank You. Please Enjoy yourself. 
    timerfbkick off 
    msg %kickchan %kicknick has a 0,2Facebook0,1 = Yes! 
    .unset %kickchan %kicknick 
  } 
  if ($1 = no) { msg %kicknick I'm sorry, you have to have a 0,2Facebook0,1 in order to join this channel. 
    timerfbkick off 
    kick %kickchan %kicknick 0,2Facebook0,1 = No  
    .unset %kickchan %kicknick 
  } 
} 

this should work for ya

 Respond  
ezkim0x   -  Mar 23, 2012

or use $+(.timer,$nick) so if they start /hoppin

 Respond  
KilllerX   -  Mar 23, 2012

Personally, I was just showing, for future scripts, if he doesn't want ops to see it (or use [chances are slim]), to use isreg to look if that person is a regular user. Then having to many if ($1 = text) using the same text, typically isn't the best idea. And as long as you name all your timers. rather then using a timer1, a timer, and a timer2. While if Timer1 is being used, timer would then take the timer2 position, and if you have something for timer2, triggered. IT wouldn't activate, due to timer taking over timer2. Good idea to get in the habbit, of giving names to them as .timer.name. Maybe even if this is a multi-channel. using the $chan in it, so it doesn't clog up others using it on another chan. Just thoughts. random things, that swirl across the stead of my mind.

 Respond  
Meta   -  Mar 23, 2012

The on JOIN event triggers before any modes are set, so you will need to use a timer in order to check if the person joining is an op or similar. I'd recommend creating an alias to perform the commands, and then call that with a timer in the event.

As for the rest of the script, you might want to be careful about calling your timer "timer1" as well as using the on open event for this...

  • I can't check right now, but since timers use numbered names by default, the one used in the on JOIN will probably replace an unnamed timer that happened to be set before
  • I believe the on OPEN event will only trigger when the query window is opened, so if the bot already happens to have a query window with the person answering, it'll never trigger.

Also, quick idea: maybe you could set a temporary storage system so that the bot doesn't ask the same person over and over whether or not they have a facebook every time they join the/a channel..?

 Respond  
KilllerX   -  Mar 23, 2012
On *:JOIN:#: { 
 if ($nick isreg $chan) {
  msg $nick Hi, Welcome To $chan . Do you have a 0,2Facebook0,1? Please answer Yes or No in the next 60 seconds or you will be kicked. 
  timer1 1 60 kick $chan $nick
}
}
On *:open:?:*: {
  { if ($1 = yes) msg $nick Thank You. Please Enjoy yourself. | timer1 off | msg # $nick has a 0,2Facebook0,1 = Yes!  } 
  { if ($1 = no) msg $nick I'm sorry, you have to have a 0,2Facebook0,1 in order to join this channel. | timer1 off  | kick $chan $nick 0,2Facebook0,1 = No :(  }
}

will only message regular users. Also condensed the ON :open:?::{ section, so you don't have two variables for If yes, and if no.

 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.