tglogo.png
0 LIKES

Snippet


D chan-mode System by YmmaX

In Category General IRC Posted by Snippets On 12/04/23
Tags: d chan ymmax 

With this script users are automatically unhide under D chan-mode. Captha module is included and can be enabled.
;###
;# D chan-mode System
;# yM]x @ UnderNet
;###

ON *:LOAD: {
 .set %mychan $$?="Your #Channel"
}

on *:CONNECT: {
 if (%mychan != $null) {
  .timer 0 60 /mode %mychan
 }
}

RAW 324:*: {
 if ($2 == %mychan) {
  if (D isin $3) {
   .timerdmode 0 10 /names -d %mychan
  }
  if (D !isin $3) {
    if ($timer(dmode)) {
     .timerdmode off
    }
  }
 }
}
RAW 355:*: {
 if ($3 == %mychan) {
  if ($4-) {
   if (%Dcaptcha != on) {
    if ($me isop $3) {
     /mode $3 +vvv $4-
    }
    if ($me !isop $3) && (X isop $3) {
     /msg x voice $3 $4 $5 $6
    }
   }
   if (%Dcaptcha == on) {
    if (%captha_[ $+ [ $4 ] ] == $null) {
     .set %captha_ $+ $4 $rand(0,9) $+ $rand(a-z) $+ $rand(0,9) $+ $rand(A,Z) $+ $rand(0,9)
    }
    if (%captha_sent_[ $+ [ $4 ] ] == $null) {
     .msg $4 $4 hi! You are human? If so, please type here the following captcha (only 3 tries are allowed): %captha_[ $+ [ $4 ] ] | .msg $4 Also, if captha will be not validate, you will be blocked in %mychan channel, in 1 minute. | .set %captha_sent_ $+ $4 isset
     if ($me isop %mychan) { .timerban $+ $4 1 60 /mode %mychan +b $address($4,2) | .timerkick $+ $4 1 60 /kick %mychan $4 You did not respond to captha verification.
     if ($me !isop %mychan) && (X isop %mychan) { .timerban $+ $4 1 60 /msg x ban %mychan $address($4,2) 1h 75 You did not respond to captha verification.
    }
   }
  }
 }
}

on ^*:OPEN:?:*:{
 if (%Dcaptcha == on) {
  if (%captha_sent_[ $+ [ $nick ] ] != $null) {
   if ($strip($1) === %captha_[ $+ [ $nick ] ]) {
    if ($me isop %mychan) { /mode %mychan +v $nick }
    if ($me !isop %mychan) && (X isop %mychan) { /.msg x voice %mychan $nick }
    .unset %captha_[ $+ [ $nick ] ]
    .unset %captha_sent_[ $+ [ $nick ] ]
    .unset %captha_try_[ $+ [ $nick ] ]
    .timerban $+ $nick off
    .timerkick $+ $nick off
   }
   if ($strip($1) !== %captha_[ $+ [ $nick ] ]) && (%captha_try_[ $+ [ $nick ] ] < 4) {
    if ($me isop %mychan) { /kick %mychan $nick The captcha code you gave was incorrect. }
    if ($me !isop %mychan) && (X isop %mychan) { /.msg x kick %mychan $nick The captcha code you gave was incorrect. }
    if (%captha_try_[ $+ [ $nick ] ] == $null) { .set %captha_try_ $+ $nick 1 }
    if  (%captha_try_[ $+ [ $nick ] ] != $null) { inc %captha_try_[ $+ [ $nick ] }
   }
   if ($strip($1) !== %captha_[ $+ [ $nick ] ]) && (%captha_try_[ $+ [ $nick ] ] >= 3) {
    if ($me isop %mychan) { /mode %mychan +b $address($nick,2) | /kick %mychan $nick You gave too many incorrect captcha code. }
    if ($me !isop %mychan) && (X isop %mychan) { /.msg x ban %mychan $address($nick,2) 1h 75 You gave too many incorrect captcha code. }
    .unset %captha_[ $+ [ $nick ] ]
    .unset %captha_sent_[ $+ [ $nick ] ]
    .unset %captha_try_[ $+ [ $nick ] ]
    .timerban $+ $nick off
    .timerkick $+ $nick off
   }
  }
 }
}
on *:TEXT:*:?: {
 if (%Dcaptcha == on) {
  if (%captha_sent_[ $+ [ $nick ] ] != $null) {
   if ($strip($1) === %captha_[ $+ [ $nick ] ]) {
    if ($me isop %mychan) { /mode %mychan +v $nick }
    if ($me !isop %mychan) && (X isop %mychan) { /.msg x voice %mychan $nick }
    .unset %captha_[ $+ [ $nick ] ]
    .unset %captha_sent_[ $+ [ $nick ] ]
    .unset %captha_try_[ $+ [ $nick ] ]
    .timerban $+ $nick off
    .timerkick $+ $nick off
   }
   if ($strip($1) !== %captha_[ $+ [ $nick ] ]) && (%captha_try_[ $+ [ $nick ] ] < 4) {
    if ($me isop %mychan) { /kick %mychan $nick The captcha code you gave was incorrect. }
    if ($me !isop %mychan) && (X isop %mychan) { /.msg x kick %mychan $nick The captcha code you gave was incorrect. }
    if (%captha_try_[ $+ [ $nick ] ] == $null) { .set %captha_try_ $+ $nick 1 }
    if  (%captha_try_[ $+ [ $nick ] ] != $null) { inc %captha_try_[ $+ [ $nick ] }
   }
   if ($strip($1) !== %captha_[ $+ [ $nick ] ]) && (%captha_try_[ $+ [ $nick ] ] >= 3) {
    if ($me isop %mychan) { /mode %mychan +b $address($nick,2) | /kick %mychan $nick You gave too many incorrect captcha code. }
    if ($me !isop %mychan) && (X isop %mychan) { /.msg x ban %mychan $address($nick,2) 1h 75 You gave too many incorrect captcha code. }
    .unset %captha_[ $+ [ $nick ] ]
    .unset %captha_sent_[ $+ [ $nick ] ]
    .unset %captha_try_[ $+ [ $nick ] ]
    .timerban $+ $nick off
    .timerkick $+ $nick off
   }
  }
 }
}

menu status,channel {
 -
 D chan-mode System
 .Enable (Captcha):.set %Dcaptcha on
 .Disable (Captha):.set %Dcaptcha off
 -
}


Comments 0


Please note that on our website we use cookies necessary for the functioning of our website, cookies that optimize the performance. To learn more about our cookies, how we use them and their benefits, please read our Cookie Policy.
I Understand