mIRC Home    About    Download    Register    News    Help

Print Thread
#270389 18/06/22 07:50 PM
Joined: Jun 2022
Posts: 12
M
mexico Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Jun 2022
Posts: 12
Muy buenas tardes, este codigo es un ejemplo, pero cuando entro al canal me hace whois y me gustaria tener una lista y agregarlo en badfullname.txt para que sea mas comodo el manejo de ello y pueda leer simbolos y colores sin excepciones. le agradezco el que quiera ayudarme en esta noble ocacion y voy aprendiendo.

on *:join:#xpl {
var %nickw = $nick
.whois %nickw
}
raw 311:*: {
if ($istok(cracker,$6-,46)) { mode #xpl +b $2 $6- }
write blacklist.txt $address($2,2)
}

Joined: Jan 2012
Posts: 301
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 301
I have created a small script for you. Try to use it. All settings are made inside the alias "abrn_set".

Code
#####################################################################
#   Name: Anti Bad Realname v1.0
#   Author: Epic (epicnet@mail.ru, http://epicnet.ru)
#   Description: All nicks join the channel are checked for bad words in their real name.
#####################################################################

alias -l abrn_set {
  %abrn_work = yes
  %abrn_kick = yes
  %abrn_ban = yes
  %abrn_write = yes
  %abrn_path_bw = $scriptdir $+ badwords.txt
  %abrn_path_bl = $scriptdir $+ blacklist.txt
  %abrn_reason = There is a bad word in your real name: &word
  %abrn_chans = #test,#xpl
}
---------------------------------------------------------------------
on *:JOIN:*: abrn_set | if (%abrn_work == yes && $istok(%abrn_chans,$chan,44)) { .hadd -m abrn $nick $chan | .who $nick }
raw 352:*:{
  var %nick $6 | var %rname $9-
  if ($hget(abrn,%nick)) {
    var %chan $hget(abrn,%nick)
    if ($bwfind(%rname)) {
      var %bw $v1 | var %addr $address(%nick,2)
      if (%abrn_ban == yes) .mode %chan +b %addr
      if (%abrn_kick == yes) .kick %chan %nick $replace(%abrn_reason,&word,%bw)
      if (%abrn_write == yes) .write -i %abrn_path_bl $+(%nick,;,%addr,;,%rname)
    } | haltdef
  }
}
raw 315:*: if ($hget(abrn,$2)) { .hdel -sw abrn $2 | haltdef }
alias -l bwfind { var %f %abrn_path_bw | var %i 1 | while (%i <= $lines(%f)) { var %s $read(%f,%i) | if (%s isin $1-) return %s | inc %i } }

If you have any difficulties with the setup or you encounter some errors while working with the code, then leave your comments here.


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Epic #270392 19/06/22 11:30 AM
Joined: Jun 2022
Posts: 12
M
mexico Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Jun 2022
Posts: 12
shocked you are pro bro, tanks!

Epic #270393 19/06/22 11:40 AM
Joined: Jun 2022
Posts: 12
M
mexico Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Jun 2022
Posts: 12
he tenido este problema con users que ponen este tipo de fullnames: 10ᴍᴇ14xɪ13ᴋᴏ y no los patea espero no molestarte con ese detalle

Joined: Jan 2012
Posts: 301
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 301
Originally Posted by mexico
he tenido este problema con users que ponen este tipo de fullnames: 10ᴍᴇ14xɪ13ᴋᴏ y no los patea espero no molestarte con ese detalle

If you need to remove all formatting codes from the text to search for a bad word, then need to use the identifier "$strip()" - https://en.wikichip.org/wiki/mirc/identifiers/$strip

Find in the code the line "var %rname $9-" and change it to this "var %rname $strip($9-)". Thus you will get: "ᴍᴇxɪᴋᴏ".

But you should be aware that with the "UTF-8" encoding, people can use any possible characters (an infinite number of combinations) that are allowed by IRCd for creating a real username.
Therefore, it will be extremely difficult for you to find bad words in a real username if they are written using various non-standard characters from unicode.

Nevertheless, you can try to write down all the words you need (in any format and any characters) inside a file "badwords.txt".


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Epic #270396 20/06/22 12:21 PM
Joined: Jun 2022
Posts: 12
M
mexico Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Jun 2022
Posts: 12
gracias, excelente dia epic, tu siempre ilustrando a todos con tus explicaciones, gracias!!

Epic #270686 26/08/22 01:03 PM
Joined: Mar 2022
Posts: 15
Pikka bird
Offline
Pikka bird
Joined: Mar 2022
Posts: 15

apologies for bumping an old thread... but, do you happen to have a version of this for bad nicks? I like your script smile it kinda looks complicated for me to write myself and this is so neatly done. smile


JilValentine | (Read error: EOF from client) | https://jilvalentine.de

Link Copied to Clipboard