mIRC Home    About    Download    Register    News    Help

Print Thread
#137837 21/12/05 01:36 AM
Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
Hi,

I have a blacklist popup and remote that will ignore queries based on a person's nick, but I decided it would be better to ignore based on address. The problem is that I can't figure out what to put in the popup for the address of the selected nick. Here's the popup so far
Code:
Badlist:/write C:\mirc\badlist.txt something here for address


The remote file is this:
Code:
on *:TEXT:*:?: {
  var %badlist = $read(C:\mirc\badlist.txt,w, $nick)
  if (%BlakeAway) { msg $nick 2 Blake is currently away from the computer | halt }
  elseif ($nick == %badlist) { msg $nick 4AUTO REPLY: Go away, your message was closed | close -m $nick | remove "C:\Program Files\mIRC\Logs\ $+ $nick" }
  else { echo }
}


That's the remote from before, based on the nick. Thanks for any help.

Last edited by bwr30060; 21/12/05 02:15 AM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 Badlist: /write badlist.txt $right($address($snick,0),-2)
 

Code:
 on *:text:*:?:{
if (%BlakeAway) { msg $nick 2 Blake is currently away from the computer }
elseif $read(badlist.txt,$address) { msg $nick 4AUTO REPLY: Go away, your message was closed | close -m $nick | remove $+($logdir,$nick)  }
}
 


There's the changes you requested, as well as a couple of others that I thought you might like. If there's something you don't understand, let me know what it is, and I'll try to explain.

I recommend associating that pop-up with the nicklist, as I'm not sure how (or if) it would work as a channel pop-up

Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
Hey,

For some reason, your popup isn't writing anything to the text file. I just tested it and it isn't working. Thanks for any help.

Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
I have something that works for the popup to write to a file, but it isn't being read properly to ignore the person. The new popup is:
Code:
Badlist: /write badlist.txt $address($snick(#,1),1)



Any ideas on how to get the remote to read the address back in the same format so the person gets ignored?

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
you might change the way you add the info and then extracting with the s switch in the $read instead of the w switch
Quote:

//echo $read(info.txt, s, mirc)

Scans the file info.txt for a line beginning with the word mirc and returns the text following the match value.


Also add a check to see if $address returned anything, the IAL isnt always populated and I think that is where $address gets its info, so if the $address fails ( is $null ) use $wildsite instead in your code.

so if you add
blake $wildsite

the file would have
blake *!*@123.some.host.com

if you added with the $mask() Identifier
blake $mask($wildsite,3)

the file would have
blake *!*@*.some.host.com

the $read(blockednames.txt,s,blake)
would return
*!*@*.some.host.com

the $read(blockednames.txt,w,blake*)
would return
blake


I dont know if I have made myself clear on this, feel free to ask more questions

Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
Thanks for the help. I didn't know about $wildsite, and that fixed the problem. Here's what I ended up with. Here's the popup:
Code:
Badlist: /write badlist.txt $address($snick(#,1),2)

And here's the remote:
Code:
on *:text:*:?:{
  if (%BlakeAway) { msg $nick 2 Blake is currently away from the computer }
  elseif $read(badlist.txt,w,$wildsite) { msg $nick 4AUTO REPLY: Go away, your message was closed | close -m $nick | remove $+($logdir,$nick)  }
}

Thanks again! smile


Link Copied to Clipboard