VoiceDelay For Freenode Spambots

By psykoo on Nov 27, 2018

VoiceDelay Script For Freenode Spambots

The concept of this script is to keep the channel moderated and delay
the +v given to possible spambots. Unsuspected users will be voiced immediately.

This idea has been tested and implemented across most major channels on
UnderNet and even other networks.

a TCL version for eggdrops is released. You can find it here

What makes this script really good is that any op in the channel can turn
the features on & off.

Pub cmds:
!securespam on/off | securespam on/off (Turns on/off the script on the channel)
!securespamshow on/off | securespamshow on/off (Turns on/off the onotice report of possible bots)

You can also turn the script & reports on/off by right clicking on the channel.


//psycho

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;               VoiceDelay Script For Freenode Spambots                       ;
;                                                                             ;
; The concept of this script is to keep the channel moderated and delay       ;
; the +v given to possible spambots. Unsuspected users will be voiced         ;
; immediately.                                                                ;
;                                                                             ;
; This idea has been tested and implemented across all major channels on      ;
; undernet, even a TCL version for eggdrops is released.                      ;
;                                                                             ;
; What makes this script really good is that any op in the channel can turn   ;
; the features on & off.                                                      ;
;                                                                             ;
; Pub cmds:                                                                   ;
; !securespam on/off        | <botnick> securespam on/off                     ;
;       Turns on/off the script on the channel                                ;
; !securespamshow on/off    | <botnick> securespamshow on/off                 ; 
;       Turns on/off the onotice report of possible bots.                     ;
;                                                                             ;
; You can also turn the script & reports on/off by right clicking on the      ;
; channel.                                                                    ;
;                                                                             ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Author:  psycho                                                             ;
; Network: Undernet / irc.undernet.org                                        ;
; Channel: #psycho                                                            ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Credits ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; xDaeMoN(http://hawkee.com/snippet/696/) for the /mass alias                                                 ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;Script starts here

ON *:LOAD:{ set %auto 14«4Auto14» }
on *:UNLOAD:{
  echo -at What the hell??
  echo -at Alrighty then!
}
ON *:JOIN:%secure.spam:{
  if (m isincs $chan(#).mode) {
    if ($chr(126) isin $ial($nick).user) && ($mid($ial($nick).user,2) isin $nick) { 
      if ($istok(%secure.spam.show,#,44)) { .onotice # %auto Suspected bot $autot($nick) - delaying voice.  | $+(.timer,$nick,$chr(46),$chan) 1 30 spamv # $nick } 
      if (!$istok(%secure.spam.show,#,44)) { $+(.timer,$nick,$chr(46),$chan) 1 30 spamv # $nick } 
    }
    else { mode # +v $nick }
  }
}

ON *:MODE:%secure.spam:{ if (m !isincs $chan(#).mode) && ($nick != $me) { mode # m | .onotice # %auto SecureSpam is set. } }
ON *:OP:%secure.spam:{ if ($opnick == $me) && (m !isincs $chan(#).mode) { mode # m | .onotice # %auto SecureSpam is set. | mode # m | mass +v # } }

ON *:TEXT:*securespam*:#:{
  if ($nick isop #) {
    if (($mid($1-2,2) == securespam on) || ($1-3 == $me securespam on)) && (!$istok(%secure.spam,#,44)) { set %secure.spam $addtok(%secure.spam,#,44) | .onotice # %auto SecureSpam is now on. | mode # m | mass +v # }
    if (($mid($1-2,2) == securespam off) || ($1-3 == $me securespam off)) && ($istok(%secure.spam,#,44)) { set %secure.spam $remtok(%secure.spam,#,44) | .onotice # %auto SecureSpam is now off. | mode # -m | mass -v # }
    if (($mid($1-2,2) == securespamshow on) || ($1-3 == $me securespamshow on)) && (!$istok(%secure.spam.show,#,44)) { set %secure.spam.show $addtok(%secure.spam.show,#,44) | .onotice # %auto SecureSpamShow is now on. }
    if (($mid($1-2,2) == securespamshow off) || ($1-3 == $me securespamshow off)) && ($istok(%secure.spam.show,#,44)) { set %secure.spam.show $remtok(%secure.spam.show,#,44) | .onotice # %auto SecureSpamShow is now off. }
  } 
}

menu channel { 
  SecureSpam
  .$iif($istok(%secure.spam,#,44),$style(1)) SecureSpam: set %secure.spam $iif($istok(%secure.spam,#,44),$remtok(%secure.spam,#,44),$addtok(%secure.spam,#,44)) | $iif($istok(%secure.spam,#,44),mode # m,mode # -m) | $iif($istok(%secure.spam,#,44),mass +v #,mass -v #)
  .$iif($istok(%secure.spam.show,#,44),$style(1)) SpamShow: set %secure.spam.show $iif($istok(%secure.spam.show,#,44),$remtok(%secure.spam.show,#,44),$addtok(%secure.spam.show,#,44)) 
}

alias autot { return 14(2 $1- 14) }
alias spamv { if ($2 ison $1) { mode $1 +v $2 } }

;Code by xDaemon
alias mass {
  if ( $regex($1,/^[\+-]?[ohbav]$/) ) && ( $me isop $2 ) {
    var %a, %c = $+($left($1,1),$str($right($1,1),$modespl))
    var %d = $iif( $left($1,1) === -, $right($1,1), $iif($right($1,1) == v,a,$+(a,$chr(44),o)) ), %b = $nick($2,0,%d)
    while %b {
      if ( $nick($2,%b,%d) != $me) {
        %a = %a $v1
        if ($modespl == $numtok(%a,32)) {
          mode $2 %c %a
          %a = ""
        }
      }
      dec %b
    }
    if (%a) mode $2 %c %a
  }
}

;EOF

Please do not hesitate to post your comments below.

Comments

Sign in to comment.
simo   -  Dec 05, 2018

nice idea for networks that lack channelmode +M

i also believe undernet has something extra by using channel mode +D and +m to set delayed voice using /names -d channel

i believe xplo wrote a code for it if i recall that could only be used for 1 channel at a time

 Respond  
xplo   -  Nov 27, 2018

Fabulous <3

Florian  -  Nov 27, 2018

:)

Sign in to comment

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.