mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 1,237
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
Ok the following code is not working the way I intend it to.

Code:
  
on *:Input:*:{ 
  if (%gs.ss == yes) {
    if ( $1 == /msg ) && (*serv iswm $2 ) {    
      if ( $active != $+(@,SecureServ) ) {      
        echo -a ¤ All $2 commands should be typed in the  $+(@,SecureServ) Window! Please type: 10/ $+ Serv
        echo -a -      
      halt    }   
      else {      
        .msg $2-      
      halt  }  
    }
  } 
}


What it is supposed to do is whenever i click on the option to enable this feature, and type a (*Serv) services command
in any window i.e. status, query, or channel. that this directs you to type the command from the designated window which
would be my @SecureServ window.

Basically what im looking for is having the /msg *Serv or /*Serv only be executed from the @SecureServ window. Make sense?
I had this working a while back but for some reason my script is giving me hell...I only have a short time online so any fast replies would be greatly appreciated.

Joined: Nov 2003
Posts: 227
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
Maybe you have another Input stopping this one being triggered?
the variable %gs.ss is definetly set to %yes, this works ok for me:
Code:
on *:Input:*:{ 
  if (%gs.ss == yes) {  
    if (($1 == /msg) && (*serv iswm $2 )) || (/*serv iswm $1) {  
      if ($active != @SecureServ) { 
        echo -a ¤ All $2 commands should be typed in the  $+(@,SecureServ) Window! Please type: 10/ $+ Serv      
        echo -a -    
        halt 
      }       
    }
  }
}

i changed it a little, adding the /somethingserv to be picked up on too, and removed the else, didnt really need it just the halt in the other part stops it, else its going to happen anyway.

Joined: Dec 2002
Posts: 1,237
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
Thanks you're right. I did have something else preventing it from being triggered....dunno why i didn't spot it sooner. Thanks for the fix.


Link Copied to Clipboard