mIRC Homepage
Posted By: debita ignore script - 15/08/05 06:42 PM
I'd like to know how to ignore the people on a chat room when they talk to me. for example:

on 1:event:*:*: {
if ($nick ison #blablabla) { ignore $nick}
}

thxs
Posted By: ChrisWoodworth Re: ignore script - 15/08/05 06:46 PM
might i ask why you wish to ignore someone for chating with you in a chat room?
Posted By: debita Re: ignore script - 15/08/05 06:48 PM
I would like to ignore the people from another chat room that are always anoying me.
Posted By: ChrisWoodworth Re: ignore script - 15/08/05 06:54 PM
well, keep in mind you can write a script to ignore everyone who speaks to you
but
i think you might want to try to place the individuals on ignore.
Posted By: Riamus2 Re: ignore script - 15/08/05 07:15 PM
You can ignore specific people with /ignore $nick

If you want to ignore everyone in a specific channel who PM's you, you can use:

Code:
on ^*:text:*:?: {
  if ($nick ison #chan) { halt }
}


You won't even need to ignore them... their messages will not even come through this way. Just replace #chan with the channel name you want to use.
Posted By: debita Re: ignore script - 15/08/05 07:22 PM
Thank you so much laugh
Posted By: stefys99 Re: ignore script - 16/08/05 12:37 AM
You should also do a /closemsg, else a empty chat window will open, with no messages in it smile
Code:
on ^*:text:*:?: {
  if ($nick ison #chan) { .closemsg $nick | halt }
}
Posted By: Lpfix5 Re: ignore script - 16/08/05 02:01 AM
Quote:
I'd like to know how to ignore the people on a chat room when they talk to me. for example:

on 1:event:*:*: {
if ($nick ison #blablabla) { ignore $nick}
}

thxs


here is a POPUP dialog script in 1 with code to ignore and close message box etc.. for a pretty lady and your welcome in advance

this all goes into remotes

Code:
[color:blue]
dialog ignor {
  size -1 -1 200 120
  title "Warning!"
  text %ignor is trying to Cyber! ,1, 16 10 150 20
  text "Do You Want to Ignore?",2, 30 30 150 20
  button "YES",3, 30 60 40 20, Ok
  button "NO",4, 108 60 40 20, Cancel
  box "",5, 1 1 198 118
  box "",6, 1 100 198 118
  box "",7, 1 90 198 118
  box "",8, 1 49 198 121
  box "",9, 2 2 196 54
}
on *:TEXT:*:?:{ 
  %ignor = $nick
  dialog -md ignor ignor
}
on *:DIALOG:ignor:sclick:3:{ 
  .ignore %ignor 2
  .msg %ignor You have been ignored.
  .closemsg
  halt
  .unset %ignor
} [/color]
 
Posted By: Lpfix5 Re: ignore script - 16/08/05 04:11 AM
I appoligize i forgot one important sniplet of information im gonna add a sclick event for no button so that it created a var named %noignor then to unset it in 2 minutes, then add a sniplet of code to the on *:text:*:*:{ which im gonna tell the script that is var %noignor is there to just basically stop promptin the dialog box for 2 minutes.. after 2 minutes if the perosn still continues to talk it will re prompt you to ignore him or not

again though this script if you click YES will ignore the person indefinently and prevent you from seeing him say anything even though his namenick is change the reason behind it is that i used the ignore $nick 2 command so... until /ignore -r nickname is performed.. hes a muted mule... while the NO button allows you to chat with the person for atleast 2 minutes.

heres v2 of the script

Code:
 [color:blue]
dialog ignor {
  size -1 -1 200 120
  title "Warning!"
  text %ignor is trying to Cyber! ,1, 16 10 150 20
  text "Do You Want to Ignore?",2, 30 30 150 20
  button "YES",3, 30 60 40 20, Ok
  button "NO",4, 108 60 40 20, Cancel
  box "",5, 1 1 198 118
  box "",6, 1 100 198 118
  box "",7, 1 90 198 118
  box "",8, 1 49 198 121
  box "",9, 2 2 196 54
}
on *:TEXT:*:?:{ 
  %ignor = $nick
  if ($nick == %noignor) { . }
  elseif ($nick == %ignor) { dialog -md ignor ignor }
}
on *:DIALOG:ignor:sclick:3:{ 
  .ignore %ignor 2
  .msg %ignor You have been ignored for pming me without me asking.
  .closemsg
  halt
  .unset %ignor
}
on *:DIALOG:ignor:sclick:4:{
  %noignor = %ignor
  .timer 1 120 //unset %noignor 
}
[/color]
 


you see the neat thing about the 2 minute period is that i set a timer to only execute once... so after 120 seconds (2minutes) it will unset %noignor therefore, when someone else talks to you or same person after 2 minutes the script restarts with the yes or no

NOTE: you can change 120 to whatever you like for time period.. example 300 seconds = 5 minutes

Cheers..
Posted By: Riamus2 Re: ignore script - 16/08/05 12:51 PM
Quote:
You should also do a /closemsg, else a empty chat window will open, with no messages in it smile
Code:
on ^*:text:*:?: {
  if ($nick ison #chan) { .closemsg $nick | halt }
}


Hm.. I've not had a chance to test my code. It either needs halt or haltdef and then it won't even open a window. That's why I didn't include a /window -c $nick command (or /closemsg... tho I prefer using /window for such things). If halt lets the window open, change it to haltdef and it shouldn't open.
Posted By: Riamus2 Re: ignore script - 16/08/05 12:53 PM
Lpfix... if you use /closemsg, you need to tell it what message window to close. From a dialog, it wouldn't have any idea which one you are talking about.
Posted By: FiberOPtics Re: ignore script - 16/08/05 01:06 PM
Quote:
Hm.. I've not had a chance to test my code. It either needs halt or haltdef and then it won't even open a window. That's why I didn't include a /window -c $nick command (or /closemsg... tho I prefer using /window for such things). If halt lets the window open, change it to haltdef and it shouldn't open.


on ^*:text:*:?:halt

will not prevent the window from opening, it will just not show the text they said.

You probably meant to use the on open event, where a halt/haltdef will indeed prevent the window from opening in the first place, so that window -c $nick or closemsg etc will be obsolete.

on ^*:open:?:*: if ($nick ison #channel) halt

Note that the matchtext part (*) isn't necessary here, but it is good practice to include it anyway. If the parameters on the same line as the on open event contain a :, and you did not specify the matchtext part, it would certainly give unrequired results.
Posted By: Riamus2 Re: ignore script - 16/08/05 01:14 PM
Bah... Now I feel stupid. smile

Yes, I meant on open instead of on text.

* Riamus goes off and sits in a corner.
Posted By: stefys99 Re: ignore script - 16/08/05 01:38 PM
Quote:
Bah... Now I feel stupid. smile

Yes, I meant on open instead of on text.

* Riamus goes off and sits in a corner.

Yes, yes, yes
/me slaps Riamus2 around a bit with a large trout laugh
Posted By: Lpfix5 Re: ignore script - 16/08/05 03:13 PM
Quote:
Lpfix... if you use /closemsg, you need to tell it what message window to close. From a dialog, it wouldn't have any idea which one you are talking about.


actually when the script is executed, its from the window itself where the text is coming from so it already knows which window to close laugh

can i join in please I love TROUTS
Posted By: Riamus2 Re: ignore script - 16/08/05 05:40 PM
Hm... I haven't tried closing a window in that way from within a dialog. I wouldn't think that a dialog would store the location that it's created from. Most likely, it's closing the active message or most recent message window. Again, I've not tested it, but it just doesn't seem right that it would store that information and maintain it the entire time the dialog is open. You're in a sclick event and not even an init event, so....

Oh well, maybe I'll test it later. Regardless, I'd still recommend having a value there. And, personally, I would rather have it be automatic without a popup... if you're afk and get many people messaging you, you'll have one popup stuck on and then a bunch of errors saying the dialog already exists.
Posted By: Lpfix5 Re: ignore script - 16/08/05 05:57 PM
Quote:
Hm... I haven't tried closing a window in that way from within a dialog. I wouldn't think that a dialog would store the location that it's created from. Most likely, it's closing the active message or most recent message window. Again, I've not tested it, but it just doesn't seem right that it would store that information and maintain it the entire time the dialog is open. You're in a sclick event and not even an init event, so....

Oh well, maybe I'll test it later. Regardless, I'd still recommend having a value there. And, personally, I would rather have it be automatic without a popup... if you're afk and get many people messaging you, you'll have one popup stuck on and then a bunch of errors saying the dialog already exists.


oh yeah,, never thought of that..
© mIRC Discussion Forums