mIRC Home    About    Download    Register    News    Help

Print Thread
Custom Window Help #243718 16/12/13 07:40 PM
Joined: May 2010
Posts: 44
M
Mythos Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: May 2010
Posts: 44
I made a custom window script for when ops/voiced users in a channel talk, it puts what they say in a separate window so I can track their messages.

It's a channel that's developing a game and the channel has 600+ people, so I like knowing when the developers specifically speak up.

Now, my script works, but I just need a little help.

Code:
on *:TEXT:*:#Starbound*: {
  if ($nick isop $chan) { 
    if ($nick == ModBot) { return }
    else { 
      ;;;window -k[0]ng[1] @Starbound 
      aline -pih @Starbound $timestamp <02 $+ $nick $+ > $1- 
    }
  }
  elseif ($nick isvoice $chan) { 
    ;;;window -k[0]g[1] @Starbound 
    aline -pih @Starbound $timestamp <02 $+ $nick $+ > $1- 
  }
  else return  
}


This is the script as it is, and I disabled the /window command for now. What I need is for it to only open the window if it's not open already. I figure it is a 'if @window == open' or something like that, but I don't know the code specifically to do that.

I don't want it triggering the /window command every time they talk since that's unecessary and it'll boot me out of the window itself when I am trying to read it.

Re: Custom Window Help [Re: Mythos] #243722 16/12/13 10:02 PM
Joined: Oct 2009
Posts: 24
Scakk Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2009
Posts: 24
Code:
if (!$window(@Starbound)) { window -k[0]ng[1] @Starbound }


The above will do what you need as it checks to see if @Starbound is made.

*Idle question. Why do you open the same window with 2 different sets of paramaters?

Re: Custom Window Help [Re: Scakk] #243723 16/12/13 11:54 PM
Joined: Jan 2004
Posts: 1,348
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,348
Also you don't include the brackets from the command help, just -k0ng1

Re: Custom Window Help [Re: Loki12583] #243724 17/12/13 12:00 AM
Joined: May 2010
Posts: 44
M
Mythos Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: May 2010
Posts: 44
One is for voice and the other for op... and as for the 'n' missing I'm not sure. It'sa be fixed now.