Colori nicks de Bots na VirtuaLife para mIRC

O Banco de Dados com os nicks de Bots e BotServs foi feito em 19 de outubro de 2021
mail@pastecode.io avatar
unknown
plain_text
2 years ago
6.8 kB
21
Indexable
Never
/*
* Colori nick de Bots e BotServs da rede VirtuaLife na NickList do mIRC. Desenvolvido por rockcavera.
*
* O Banco de Dados com os nicks de Bots e BotServs foi feito em 19 de outubro de 2021
*
* Bugs ou um nick não é Bot ou BotServ? Me procure em irc.virtualife.com.br canal #mIRC-rockcavera ou e-mail para rockcavera@gmail.com
*
* Todas as configurações encontram-se em Menus Popups
*/

on *:START:bots_vl_config

alias -l bots_vl_db_bots {
  bunset &bots
  bset -t &bots 1 eJxNVcty4zgMvE/VfEoOu1X7AbL8yCS2R+N4d1NziAxLiISYJrIQORXn6xcWQXlOBikSaHQ36DlBJ3CGr1/++PplJhQCj+H6Moy/9+jQp69r8i1EwbRanY8UxugpQEiHC9+iDOzTNsdPsO3AHp1LqxLEcTo/B0+af4z3TY8u1Q6xiW8x1Yz0WW+oi+gSQiAwOGUfm1O9ZRFK2XZAvk/fBBtw6cZiUHg0BGogHdv3KGjIZtTNeEj733bljINVhbrFutTMAVKaHbbHaCmVps56L1p0Wja1MMNhj7BJ6ITjO6EkKsj9Ivjzr3EB7TkR6PgIuat+aqvwFFK0oWH4EbFJydeghA8dk4mhlw1M/EjRT1Rgz2P4DL+m2gL1CizlPP4XcYCbbNU6ccIt1xWrejyY/mhNbcApD9CmS5VCmOrXT+wUrGRI6CcBirfYgg+YbSFMbZJD+CpFQkNblDax/3y3g1fbxsFRlyv+hE6lTKD2ciXhZIbB8ztbfiBr6tvse7UwaY+O4O7pau92UnvJ1tYSxYNvU4JKyDeZl5c9rWQxFC/j6kcEQR8gV1InExvdwjXUi0EpFauwUseA6+1w/T0GMS2VJWc8PeEHlz3Y8KB0xPWGJV1adN1c+D3b8MboGtmDGOClU4FT2CpA43kdG7VR2l5Fcmr0M96qeMN1daOZY0ah6Z9tnHQuccie8pZnA5eGk2GXcBRqfuu+ZE7+vWc+jcFDdLf55CG7TtvIEl69gEbEjjsUy/fAvfcXc7qyaGLcoxdSgsfFv5qFIIGpQEtlbraq5LTYsPqOjM5/KEv3vIM9zhOeYlO0sF3sk97FRq/Dy/Q4mYNbmVpZkTuihBt907A6svFcUjzZ8wL2Hqkc9uQshcwg496hUkchmJYr+tS3MbVeOoitsVNeZrg7zPhi/bLLKe4PhUJQW3aQWb9kRFde2Fo5K19waPFwQ7LFju/mZJRPrs531QCBfJ4W61EaweNkrJEhTQGf1i5hFkuZz6N9NQIG8+UjistvZCX8xuaLBwWdq1X0CGX/t4lG/d0+HtEKmkUKd62k/kk3Flfn52eJG+iNnXP+vyok9FGss3C1bp6kMMUbdJPXVsg6JTajIJawQr36YYQN+JrPXgZrDoTdoWR/Sl8OlYNLVm2n76p7ZTMpGfKXiip+TPH/0t/0zA==
  if (!$decode(&bots,bm)) || (!$decompress(&bots,b)) return
  if ($fopen(bots_vl_db_bots)) .fclose bots_vl_db_bots
  .fopen -o bots_vl_db_bots $qt($mircdirbots_vl_db_bots.db)
  .fwrite -b bots_vl_db_bots &bots
  .fclose bots_vl_db_bots
  return 1
}

alias -l bots_vl_db_botservs {
  bunset &bots
  bset -t &bots 1 eJxFUtFuwjAMfEfiU5A2adKeaRkdUmEVZUh7mtzGtNlKzJwEyr5+URzYUx37cne+tIaMdlDgdPI4newbcrGor9bhMZYl2ka3YOPhg/zONwLOezA18jke5gcmpZ1MsiyL3zWYDoQYbEu3Hv54bXo5FnBEuy9FtGV9Ev2cuKUzKAG9knVZcpYHRfwS1mq7WrzEagtKU6KZc6Mdy80KGAx4sbVARbOF55sRx3qMpXtWsl4OAYCzwgMrkahxpIE6SmN2VMIyl5E/EaeN12gSZoudR500am9lXmzeFUpSFepRmm8n5LAi34QczJbhqgiHfS0ZSERLPbS9ZIGg6j6FsQEHQ7JmYAipUXqojMFqGe11p+EfVJBOmNew5QVYzJRQ+M1q089FzztsSO5vqf2+Sneg8ELCtfY3mwN2ib3tob3vvjJKg6F7irHYBQcXbGLdP40PnIIQLj0MnwU4FHtVSNen/6emg7tbnR/hN0QjqD9AurP3
  if (!$decode(&bots,bm)) || (!$decompress(&bots,b)) return
  if ($fopen(bots_vl_db_botservs)) .fclose bots_vl_db_botservs
  .fopen -o bots_vl_db_botservs $qt($mircdirbots_vl_db_botservs.db)
  .fwrite -b bots_vl_db_botservs &bots
  .fclose bots_vl_db_botservs
  return 1
}

alias bots_vl_colorir {
  if (!%bots_vl_enable_ [ $+ [ $1 ] ]) return
  bots_vl_config
  set -l %cor %bots_vl_ [ $+ [ $1 ] $+ ] _color
  set -l %x $chan(0)
  set -l %y
  set -l %chan
  set -l %nick
  set -l %hash bots_vl_db_ $+ $1
  while %x {
    %chan = $chan(%x)
    %y = $nick(%chan,0)
    while %y {
      %nick = $nick(%chan,%y)
      if ($hget(%hash,%nick)) cline -l %cor %chan $nick(%chan,%nick)
      dec %y
    }
    dec %x
  }
}

menu channel,query,menubar,status {
  -
  Bots VirtuaLife
  .Colorir
  ..$iif(%bots_vl_enable_bots,$style(1)) Bots:{
    set %bots_vl_enable_bots $iif(%bots_vl_enable_bots,0,1)
    bots_vl_colorir bots
  }
  ..$iif(%bots_vl_enable_botservs,$style(1)) BotServs:{
    set %bots_vl_enable_botservs $iif(%bots_vl_enable_botservs,0,1)
    bots_vl_colorir botservs
  }
  .Cores
  ..Bots:{
    set -l %cor $input(Escolha o número da cor que deseja colorir os Bots na NickList dos canais da VirtuaLife. $crlf $crlf $+ Numéro de 0 a $iif($version >= 7.52,99,15),eqf,Bots VirtuaLife - Cor,%bots_vl_bots_color)
    if ($null == %cor) || ($false == $cor) return
    set %bots_vl_bots_color %cor
  }
  ..BotServs:{
    set -l %cor $input(Escolha o número da cor que deseja colorir os BotServs na NickList dos canais da VirtuaLife. $crlf $crlf $+ Numéro de 0 a $iif($version >= 7.52,99,15),eqf,Bots VirtuaLife - Cor,%bots_vl_botservs_color)
    if ($null == %cor) || ($false == $cor) return
    set %bots_vl_botservs_color %cor
  }
  .-
  .Sobre:noop $input(O código para colorir Bots e BotServs da rede VirtuaLife foi desenvolvido por rockcavera $+ $chr(44) com o intuito de mostrar aos usuários os bots de forma destacada na NickList dos canais. $crlf $crlf $+ Além disso $+ $chr(44) este código faz parte da "Campanha por um IRC livre de BOTs de VOLUME" $+ $chr(44) do canal #0Bots da VirtuaLife. $crlf $crlf $+ O Banco de dados dos nicks dos Bots e BotServs da VirtuaLife foi feito em maio de 2018. Portanto $+ $chr(44) pode ocorrer erros! Caso algum nick que não é Bot ou BotServ esteja sendo marcado como $+ $chr(44) informe-me!,oi,Bots VirtuaLife - Sobre)
}

alias bots_vl_config {
  if (%bots_vl_enable_bots !isnum 0-1) set %bots_vl_enable_bots 0
  if (%bots_vl_enable_botservs !isnum 0-1) set %bots_vl_enable_botservs 0
  if ($version >= 7.52) {
    if (%bots_vl_bots_color !isnum 0-99) set %bots_vl_bots_color 42
    if (%bots_vl_botservs_color !isnum 0-99) set %bots_vl_botservs_color 41
  }
  else {
    if (%bots_vl_bots_color !isnum 0-15) set %bots_vl_bots_color 8
    if (%bots_vl_botservs_color !isnum 0-15) set %bots_vl_botservs_color 9
  }
  if (!$hget(bots_vl_db_bots)) {
    if (!$isfile($mircdirbots_vl_db_bots.db)) && (!$bots_vl_db_bots) goto p
    hmake bots_vl_db_bots 221
    hload bots_vl_db_bots $qt($mircdirbots_vl_db_bots.db)
  }
  :p
  if (!$hget(bots_vl_db_botservs)) {
    if (!$isfile($mircdirbots_vl_db_botservs.db)) && (!$bots_vl_db_botservs) return
    hmake bots_vl_db_botservs 65
    hload bots_vl_db_botservs $qt($mircdirbots_vl_db_botservs.db)
  }
}

on *:JOIN:#:{
  if ($network != VirtuaLife) || ($nick == $me) || ((!%bots_vl_enable_bots) && (!%bots_vl_enable_botservs)) return
  if ($hget(bots_vl_db_bots,$nick)) {
    if (%bots_vl_enable_bots) cline -l %bots_vl_bots_color $chan $nick($chan,$nick)
  }
  elseif ($hget(bots_vl_db_botservs,$nick)) {
    if (%bots_vl_enable_botservs) cline -l %bots_vl_botservs_color $chan $nick($chan,$nick)
  }
}

raw 366:*:{
  if ($network != VirtuaLife) || ((!%bots_vl_enable_bots) && (!%bots_vl_enable_botservs)) return
  set -l %x $nick($2,0)
  set -l %nick
  while %x {
    %nick = $nick($2,%x)
    if ($hget(bots_vl_db_bots,%nick)) {
      if (%bots_vl_enable_bots) cline -l %bots_vl_bots_color $2 $nick($2,%nick)
    }
    elseif ($hget(bots_vl_db_botservs,%nick)) {
      if (%bots_vl_enable_botservs) cline -l %bots_vl_botservs_color $2 $nick($2,%nick)
    }
    dec %x
  }
}