mIRC Home    About    Download    Register    News    Help

Print Thread
#211085 03/04/09 10:18 AM
Joined: Apr 2009
Posts: 17
Pikka bird
OP Offline
Pikka bird
Joined: Apr 2009
Posts: 17
Ok it all works but the ignore part i have tried ignore $nick & a few other things but when whispered back they can still get through to me instead of being ignored, am chatting on buzzen server any suggestions on why it dosent ignore exactly?

Code:
 
raw WHISPER:*: {
  if ($nick isop $chan) { return }
  var %i = $lines(query-ignore.txt) 
  while (%i) { 
    if ($read(query-ignore.txt,%i) isin $1-) {
      .ignore $nick  
      .closemsg $nick 
    } 
    dec %i 
  } 
}

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
There is no $chan in a raw event, try $1 instead.

No such command as /closemsg. Try window -c $nick.

Again, I do not suggest while loops in text commands.

Are you certain the ignore command is being called? Do you see their nick in the ignore list?

/echo -a is a scripters friend. We use echo to show us exactly what is going on in a script. You can use it simply let you know that a comparison checked true or to return the actual data in the event.

raw whisper:*:{
echo -s WHISPER $1-

}
This here alone will tell you a lot about the whisper event.

You can also use $rawmsg to get the actual data the server sends you.

DJ_Sol #211089 03/04/09 12:19 PM
Joined: Apr 2009
Posts: 17
Pikka bird
OP Offline
Pikka bird
Joined: Apr 2009
Posts: 17
the closething does work but it is the ignore part I cannot get working.

Code:
raw WHISPER:*: {
  if ($nick isop $chan) { return }
  var %i = $lines(query-ignore.txt) 
  while (%i) { 
    if ($read(query-ignore.txt,%i) isin $1-) {
      .ignore $comchan($nick,1)  
      .closemsg $nick
    } 
    dec %i 
  } 
}

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
.closemsg $nick

should be

window -c $nick


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #211093 03/04/09 05:14 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
"closemsg <nick>" is an old (and now undocumentated, but valid) command.
It's the same as close -m <nick>


".ignore $comchan($nick,1)" sets an ignore to the channel name - I don't think that's the intended effect. As DJ_Sol suggested, debug your code by un-silenceing the ignore command (ignore instead of .ignore) and by echoing the processed raw line etc.

Edit: if you want to check if some nick is op in any common channel, you may use this custom identifier

Last edited by Horstl; 03/04/09 05:54 PM.

Link Copied to Clipboard