save nick save ident save ip

By nexuxirc on Jun 26, 2020

I did this for my protection in the room, but I would like to record the ident and the nick and the total ip of the nick in a text file

Then, when entering a nick, check in a file if that nick, ident, or total ip of the nick is in the file and ban and kikear

Is that feasible?

I try my code

on *:TEXT:ww w .*:#paraguay:/mode #paraguay +b $nick | /kick #paraguay $nick Molestias continuas en la sala. Spam
on *:TEXT:*perro*:#pruebapy:
{
mode # +b $nick
write texto.txt $nick
}   

Comments

Sign in to comment.
PurpleCow   -  5 days ago

Your question is not very clear, but from what I understand, you might want something like this:

on *:TEXT:*something*:#channel:{
  mode # +b $+($nick,!*@*)
  kick # $nick Add reason here...
  write scripts\bans.txt $replace($address($nick,5),!,$chr(32),@,$chr(32))
}
on *:JOIN:#channel:{
  var %ident $remove($gettok($address($nick,5),1,64),$nick $+ !)
  var %host $gettok($address($nick,5),2,64)
  var %c 1, %l $lines(scripts\bans.txt)
  while (%c <= %l) {
    var %line $read(scripts\bans.txt,%c)
    if ($findtok(%line,$nick,0,32) || $findtok(%line,%ident,0,32) || $findtok(%line,%host,0,32)) {
      mode # +b $+($nick,!*@*)
      kick # $nick Add reason here...
    }
    inc %c 1
  }
}

NOTE: It is just a concept. It may or may not work as you want it. Feel free to modify the code to suit your needs.
UPDATE (04.07.2020): script is rewritten

 Respond  
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.