mIRC Home    About    Download    Register    News    Help

Print Thread
using remote scripts to open/close windows #120068 13/05/05 05:28 AM
Joined: May 2005
Posts: 6
D
duklaa Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: May 2005
Posts: 6
Is it possible to close a window upon a TEXT event?

e.g. if someone messages me with "offensive word", I want the query window to be automatically closed.

Ditto for open.

Thanks

Re: using remote scripts to open/close windows #120069 13/05/05 05:41 AM
Joined: Dec 2004
Posts: 11
D
DanielC Offline
Pikka bird
Offline
Pikka bird
D
Joined: Dec 2004
Posts: 11
one of the simple ways to do it is,

on *:TEXT:*:?:{
if (offensiveword1 isin $$1-) .close -m $nick
if (offensiveword2 isin $$1-) .close -m $nick
if (offensiveword3 isin $$1-) .close -m $nick
}
I haven't used mIRC in a while, so I know that's prob. not the greatest way to do it. But you can just add that to the remotes and chage the offensiveword to the words you consider offensive, and you should be set.

Re: using remote scripts to open/close windows #120070 13/05/05 06:42 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Not bad method, its clear and easy for someone to add to that way, you might have add a color striping to the front like so to beat any added color/bold/etc changes mid word.

on *:TEXT:*:?:{
tokenize 32 $strip($1-)
if (offensiveword1 isin $1-) .close -m $nick
etc etc


one could also use

on ^*:OPEN:?:*:{
tokenize 32 $strip($1-)
if (offensiveword1 isin $1-) halt
etc etc

but this wont close a query if its already open just stop a new one opening.