mIRC Home    About    Download    Register    News    Help

Print Thread
#243718 16/12/13 07:40 PM
Joined: May 2010
Posts: 46
M
Mythos Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: May 2010
Posts: 46
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.

Joined: Oct 2009
Posts: 24
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?

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
Also you don't include the brackets from the command help, just -k0ng1

Joined: May 2010
Posts: 46
M
Mythos Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: May 2010
Posts: 46
One is for voice and the other for op... and as for the 'n' missing I'm not sure. It'sa be fixed now.


Link Copied to Clipboard