mIRC Homepage
Posted By: nataliad autoprotect - 30/04/07 11:16 PM
hello

is it possible to write all operators ip/host and the ip of a specific nick and ident in a text file when I join in every channel?

thanks
Posted By: RusselB Re: autoprotect - 01/05/07 12:26 AM
Yes.
Writing of host addresses for active ops when you join the channel:Note this writes a different file for each channel that you join.
Code:
on me:*:join:#:{
  var %a = 1, %b = $nick($chan,0,o)
  while %a <= %b {
    .write $+($network,.,$chan,.IP.txt) $gettok($address($nick($chan,%a,o),2),-1,64)
    inc %a
  }
}


Regarding the IP and ident for a specific nick, note that some networks block the real IP from non-IRCops.
Posted By: nataliad Re: autoprotect - 01/05/07 12:48 AM
thanks

where is the IP.txt supposed to be written?

I joined a channel and no IP.txt file created
Posted By: genius_at_work Re: autoprotect - 01/05/07 12:58 AM
The file will be called <network>.<channel>.IP.txt Where <network> is the current network and <channel> is the current channel (when the script executes).

-genius_at_work
Posted By: nataliad Re: autoprotect - 01/05/07 01:04 AM
mmm it doesnt work for me frown
Posted By: RusselB Re: autoprotect - 01/05/07 01:23 AM
There's a possibility that you may have to use a different name for the file. I put the network and channel information into the file name, so that mIRC wouldn't recognize the windows reserved word of IP, although, that might not have worked. Try changing the IP in the file name to something else.
Posted By: nataliad Re: autoprotect - 01/05/07 02:53 AM
can you transform this pseudocode into code please ?

Code:
on me:join:#:
who $chan
timer 1 2
alias listip { //var %i = 1 | while ($nick($chan,%i,o,r)) { who $chan | protect $address($v1,2) | inc %i } }


thanks
Posted By: RusselB Re: autoprotect - 01/05/07 04:40 AM
Code:
on me:*:join:#:{
  updatenl
  var %i = 1
  while $nick($chan,%i,o) {
    .protect $nick(#,%i,o) $chan 2 $network
    inc %i
  }
}

If you don't want the protection to be channel specific, remove the $chan from protect line, also, if you don't want it to be network specific, remove the $network from that same line.
Posted By: nataliad Re: autoprotect - 01/05/07 04:07 PM
Originally Posted By: RusselB
Code:
on me:*:join:#:{
  updatenl
  var %i = 1
  while $nick($chan,%i,o) {
    .protect $nick(#,%i,o) $chan 2 $network
    inc %i
  }
}

If you don't want the protection to be channel specific, remove the $chan from protect line, also, if you don't want it to be network specific, remove the $network from that same line.


I leave the 2 or I remove it too? like this?

Code:
on me:*:join:#:{
  updatenl
  var %i = 1
  while $nick($chan,%i,o) {
    .protect $nick(#,%i,o) 2
    inc %i
  }
}


whats updatenl? I cant find it in the helpfile...

which is better?
this
https://forums.mirc.com/ubbthreads.php?ubb=showflat&Number=175999&page=0#Post175950
or this
https://forums.mirc.com/ubbthreads.php?ubb=showflat&Number=175999&page=0#Post175964

(both doesnt work for me)
Posted By: RusselB Re: autoprotect - 02/05/07 12:06 AM
1) Leave the 2. That parameter is being used to tell the protect line what format to protect. For other options see /help $mask

2) I don't know why you can't find it, unless you're using a help file that is out of date, or you're entering the word incorrectly.
I'm using the help file from mIRC 6.21 and here's the spelling using capitals, so that the letters are easier to distinguish.
/help /UPDATENL
3) If neither of those posts work for you, then it makes little sense for me to review them and recommend one.
© mIRC Discussion Forums