Coders-IRC


IRC for Coders

Colored Nickname


image

All settings in the alias "ww_setting". You can reconfigure this script to your liking - change the welcome text, size, indentation, background and color of window frames, font and color gamut of changing letters, as well as the speed of the glitter effect and the off timer.


#####################################################################
#   WelcomeWindow v1.0
#   Description: Pop-up welcome window with animated glitter effect.
#   Author: Epic
#   Email: epicnet@mail.ru
#   Site: http://epicnet.ru
#####################################################################

on *:START: .timerWWSTART -m 1 1000 ww
alias ww { ww_setting | ww_window | ww_window_decor | ww_text_color }
=====================================================
alias -l ww_setting {
  .hadd -m ww text Hello, $+($me,!) :)))
  .hadd -m ww win-name @Welcome
  .hadd -m ww win-size-x 20
  .hadd -m ww win-size-y -10
  .hadd -m ww margin-w 50
  .hadd -m ww margin-h 30
  .hadd -m ww color-bg $rgb(14,12,18)
  .hadd -m ww color-line $rgb(91,76,116)
  .hadd -m ww color-text $rgb(147,122,187)
  .hadd -m ww font ComicSansMS
  .hadd -m ww fsize 28
  .hadd -m ww start-color 91
  .hadd -m ww end-color 97
  .hadd -m ww time-speed-color 150
  .hadd -m ww time-closing 5000
}
=====================================================
alias -l ww_window {
  set %ww_w $calc($width($hget(ww,text),$hget(ww,font),$hget(ww,fsize),0,1) + ($hget(ww,margin-w) *2))
  set %ww_h $calc($height($hget(ww,text),$hget(ww,font),$hget(ww,fsize)) + ($hget(ww,margin-h) *2))
  set %ww_mw $int($calc($window(-3).dw /2 + $hget(ww,win-size-x)))
  set %ww_x $calc($window(-2).dx + %ww_mw)
  set %ww_mh $int($calc($window(-3).dh /2 + $hget(ww,win-size-y)))
  set %ww_y $calc($window(-2).dy + %ww_mh)
  .window -pdBhiok0w0 +dL $hget(ww,win-name) %ww_x %ww_y %ww_w %ww_h | .window -a $hget(ww,win-name)
  .timerWW -m 1 $hget(ww,time-closing) .window -c $hget(ww,win-name)
}
=====================================================
alias -l ww_window_decor {
  .drawfill -r $hget(ww,win-name) $hget(ww,color-bg) %ww_w %ww_h 0 0
  .drawline -r $hget(ww,win-name) $hget(ww,color-line) 1 0 0 %ww_w 0
  .drawline -r $hget(ww,win-name) $hget(ww,color-line) 1 0 $calc(%ww_h -1) %ww_w $calc(%ww_h -1)
  .drawline -r $hget(ww,win-name) $hget(ww,color-line) 1 0 0 0 %ww_h
  .drawline -r $hget(ww,win-name) $hget(ww,color-line) 1 $calc(%ww_w -1) 0 $calc(%ww_w -1) $calc(%ww_h -1)
}
=====================================================
alias -l ww_text_color {
  if (!%ww_cc) { set %ww_cc $hget(ww,start-color) }
  if (%ww_cc <= $hget(ww,start-color)) set %ww_nc 1
  if (%ww_cc >= $hget(ww,end-color)) set %ww_nc 2
  if (%ww_nc == 1) inc %ww_cc | if (%ww_nc == 2) dec %ww_cc
  if ($hget(ww,ctext)) .hdel -sw ww ctext
  var %ww_ct $replace($hget(ww,text),$chr(32),$chr(160))
  var %ww_cl $len(%ww_ct) | var %ww_e %ww_cc | var %ww_w 1
  var %ww_q 1 | while (%ww_q <= %ww_cl) {
    .hadd -m ww ctext $+($hget(ww,ctext),$chr(3),%ww_e,$mid(%ww_ct,%ww_q,1))
    inc %ww_q | if (%ww_w == 1) inc %ww_e | if (%ww_w == 2) dec %ww_e
    if (%ww_e <= $hget(ww,start-color)) var %ww_w 1 | if (%ww_e >= $hget(ww,end-color)) var %ww_w 2
  }
  if ($window($hget(ww,win-name))) {
    ww_window_decor
    .drawtext -pr $hget(ww,win-name) $hget(ww,color-text) $hget(ww,font) $hget(ww,fsize) $hget(ww,margin-w) $hget(ww,margin-h) $hget(ww,ctext)
    .timerWWTC -m 1 $hget(ww,time-speed-color) ww_text_color
  }
}
=====================================================

Expand


Read More

On @*BAN event


image

If you want to be able to select custom address masks for ban by type "nick!ident@host" to be set, then the following script is suitable for you

If necessary, you can change these data values ​​according to your preference in the "jflood" alias, as this should work for you:

join-max 2 - this is the maximum number of possible joins per channel of one user before it is baned.
time-max 3 - this is the maximum time in seconds during which the user can get banned if he violates the limit on the number of joins.
type-ban 7 - this is number the type for the mask ban, which will be set when the joins limit is exceeded.

With these settings, the script will ban the user who will execute the2 joins or more times within3 seconds.


alias jflood {
  .hadd -m jf join-max 2
  .hadd -m jf time-max 3
  .hadd -m jf kick-text Stop Join Flood!
  ;---------------------
  ;# Type 1 = nick!ident@host
  ;# Type 2 = nick!*@host
  ;# Type 3 = *!ident@host
  ;# Type 4 = nick!*@*
  ;# Type 5 = *!ident@*
  ;# Type 6 = *!*@host
  ;# Type 7 = *!*@subnet*
  ;---------------------
  .hadd -m jf type-ban 7
}
on *:JOIN:#:{
  jflood | var %jf_chan $+(jfchan-,$chan) | var %jf_nick $+(jfnick-,$chan) | var %jf_ip $gettok($address($nick,5),2,64)
  if ($hget(%jf_chan,%jf_ip)) { .hinc -m %jf_chan %jf_ip 1 }
  if (!$hget(%jf_chan,%jf_ip)) { .hadd -mu $+ $hget(jf,time-max) %jf_chan %jf_ip 1 | .hadd -m %jf_nick %jf_ip $nick }
  .echo $chan 04JFLOOD: >>> $hget(%jf_nick,%jf_ip) $+($chr(40),%jf_ip,$chr(41)) = $+(04,$hget(%jf_chan,%jf_ip))
  if ($hget(%jf_chan,%jf_ip) >= $hget(jf,join-max)) {
    ;---------------------
    if ($hget(jf,type-ban) == 1) .mode $chan +b $address($hget(%jf_nick,%jf_ip),5)
    if ($hget(jf,type-ban) == 2) .mode $chan +b $address($hget(%jf_nick,%jf_ip),7)
    if ($hget(jf,type-ban) == 3) .mode $chan +b $address($hget(%jf_nick,%jf_ip),0)
    if ($hget(jf,type-ban) == 4) .mode $chan +b $+($hget(%jf_nick,%jf_ip),!*@*)
    if ($hget(jf,type-ban) == 5) .mode $chan +b $+($gettok($address($hget(%jf_nick,%jf_ip),1),1,64),@*)
    if ($hget(jf,type-ban) == 6) .mode $chan +b $address($hget(%jf_nick,%jf_ip),2)
    if ($hget(jf,type-ban) == 7) .mode $chan +b $+(*!*@,$gettok(%jf_ip,1-2,46),.*)
    ;---------------------
    .kick $chan $hget(%jf_nick,%jf_ip) $hget(jf,kick-text)
    .hdel -sw %jf_chan %jf_ip
  }
}

Expand


Read More

Clone detector


image

on *:Join:#: {
  var %host_to_search_for = $address($nick,2)
  var %number_from_that_host = $ialchan(%host_to_search_for,$chan,0)
  if (%number_from_that_host > 1) {
    ;we have clones!
    ;first set up our vars and loop
    var %count = 0
    unset %clones
    :loop
    inc %count
    ;loop through every nick, adding the nicks to %clones
    var %clones = %clones $ialchan(%host_to_search_for,$chan,%count).nick
    if (%count < %number_from_that_host) { goto loop }
    echo -t $chan 5(Clones Detected) 0 %count 7Clones From 5 $address($nick,2)
    echo -t $chan 5(Clones Nicks) 12 %clones
  }
}

Expand


Read More