mIRC Homepage
Posted By: Sl1pkn0t Is there a way.... - 14/12/02 04:37 AM
Hi, i was wondering is there a way to check if a xdcc server is a real server and not a spamer just wanting to get a voice... I was wondering if you could do like a on join when a bot join send them a "xdcc list" and if it doesn't reply withing like 10 seconds it wouldn't get voiced i tried doing ON join then using ON NOTICE but it wasn't working it wouldn't validate it being a server i want something like asus69's (mircscripts.org member) Fserver voice script he made but dont know how to validate the bot frown
Posted By: Dana Re: Is there a way.... - 14/12/02 12:16 PM
Code:
On @*:JOIN:#channelnamehere:{
   if (bot isin $nick) { 
    .ctcp $nick xdcc list 
    set %_bots $addtok(%_bots,$nick,46) 
    .timer 1 10 .set %_bots $remtok(%_bots,$nick,1,46)
  }
}
On *:NOTICE:*:?: {
  if ($istok(%_bots,$nick,46)) { 
    mode #channelnamehere +v $nick
  }
}

Something along those lines... if you have to manage more than one of these channels then use a loop to voice the bot in all the channels that you're opped in.
Posted By: Sl1pkn0t Re: Is there a way.... - 15/12/02 04:25 AM
Thanks Dana, but theres a problem with that it voices them upon every pack they have so if they have 15 it voices them 15 times is there a way to get rid of this?
Posted By: Hammer Re: Is there a way.... - 15/12/02 08:32 AM
On *:NOTICE:*:?: if (($istok(%_bots,$nick,46)) && ($nick !isvoice #channelnamehere)) mode #channelnamehere +v $nick
Posted By: Sl1pkn0t Re: Is there a way.... - 15/12/02 01:34 PM
Thanks, hammer and dana
Posted By: Sl1pkn0t Re: Is there a way.... - 15/12/02 01:48 PM
Okay i have a problem here is the code i have after editing it etc:
Code:
  
On @*:JOIN:#213:{
  if ([e]-DCC isin $nick) && ($nick !isvoice #213)) { 
    .ctcp $nick xdcc list 
    set %_bots $addtok(%_bots,$nick,46) 
    .timer 1 10 .set %_bots $remtok(%_bots,$nick,1,46)
  }
}

On *:NOTICE:*:?:{ 
  if (($istok(%_bots,$nick,46)) && ($nick !isvoice #213)) { mode #213 +v $nick | /avoice $nick | halt }
}

What i want to do is after the first time add the nick to avoice then when he rejoins just voice him not xdcc list him no more i tried to do the ($nick isavoice #213) thing in the first if statemen and i get invalid any ideas?
Posted By: Hammer Re: Is there a way.... - 15/12/02 01:56 PM
Code:
On @*:JOIN:#213:{
  if ((!$avoice($nick)) && ($nick !isvoice #213) && ([e]-DCC isin $nick)) {
    .ctcp $nick xdcc list
     set %_bots $addtok(%_bots,$nick,46)
     .timer 1 10 .set %_bots $remtok(%_bots,$nick,1,46)  
  }
}
Posted By: Sl1pkn0t Re: Is there a way.... - 15/12/02 09:37 PM
Hrm it still xdcc list's them frown
Posted By: Sl1pkn0t Re: Is there a way.... - 15/12/02 09:41 PM
Well nvm guys i got it to work thanks a lot Hammer and Dana smile here is what i have :
Code:
On @*:JOIN:#213:{
  if (%bot_done [ $+ [ $nick ] ] == $nick) { halt }
  if ((!$avoice($nick)) && ($nick !isvoice #213) && ([e]-DCC isin $nick)) {    
    .ctcp $nick xdcc list    
    set %_bots $addtok(%_bots,$nick,46)
    .set %bot_done $+ [ [ $nick ] ] $addtok(%_bots,$nick,46)
    .timer 1 10 .set %_bots $remtok(%_bots,$nick,1,46)    
  }
}

On *:NOTICE:*:?:{ 
  if (($istok(%_bots,$nick,46)) && ($nick !isvoice #213)) { mode #213 +v $nick | /avoice $nick | halt }
}

grin
O yea one more thing smile is there a way i could add it to kick/tem ban them for so many minutes if they dont respond to xdcc list ?
Posted By: _D3m0n_ Re: Is there a way.... - 15/12/02 10:08 PM
if they dont respond then wouldnt they be normal ppl tryin to use the xdcc???? .. if u made that way ud kick everyone from the channel
Posted By: Sl1pkn0t Re: Is there a way.... - 16/12/02 12:58 AM
No i want to kick the none real [e]-DCC guys cause spammers that join with the tag want a voice and they wont get it if they arent running a xdcc
Posted By: Dana Re: Is there a way.... - 16/12/02 01:20 AM
Code:
On @*:JOIN:#213:{  
  if (%bot_done [ $+ [ $nick ] ] == $nick) { return }
  if ((!$avoice($nick)) && ($nick !isvoice #213) && ([e]-DCC isin $nick)) {
    .ctcp $nick xdcc list
    set %_bots $addtok(%_bots,$nick,46)
    .set %bot_done $+ [ [ $nick ] ] $addtok(%_bots,$nick,46)
    .timer 1 10 check.bots $nick #
  }
}
alias -l check.bots {
  .set %_bots $remtok(%_bots,$1,1,46)
  if ($1 !isvoice $2) {
    ban $2 $1 2
    kick $2 $1 Imposter
  }
}
Something along these lines. smile

Dana

P.S.: You'd still need to keep your On NOTICE event of course. I was just too lazy to copy & paste it.
Posted By: Sl1pkn0t Re: Is there a way.... - 16/12/02 01:49 AM
Thank you Dana after editing some of your code i got it to work this is what i have :
Code:
On @*:JOIN:#213:{ 
  if (%bot_done [ $+ [ $nick ] ] == $nick) { halt }
  elseif ((!$avoice($nick)) && ($nick !isvoice #213) && ([e]-DCC isin $nick)) {
    .ctcp $nick xdcc list
    set %_bots $addtok(%_bots,$nick,46)
    .set %bot_done $+ [ [ $nick ] ] $nick
    .timer 1 10 check.bots $nick #
  }
}
alias -l check.bots {
  .set %_bots $remtok(%_bots,$1,1,46)
  if ($1 !isvoice $2) {
    ban $2 $1 2
    kick $2 $1 Imposter
  }
}

On *:NOTICE:*:?:{ 
  if (($istok(%_bots,$nick,46)) && ($nick !isvoice #213)) { mode #213 +v $nick | /avoice $nick | auser 96 $1 | halt }
}
Posted By: Dana Re: Is there a way.... - 16/12/02 01:52 AM
You're welcome smile

Eventhough I may be blind .. besides for the exchange of "return" for "halt", I don't see any difference between the code given. blush

As a sidenote, I would strongly recommend using "return" instead of "halt". Halt sometimes causes problems for other scripts in the same file.

Dana
© mIRC Discussion Forums