mIRC Home    About    Download    Register    News    Help

Print Thread
#95373 24/08/04 02:05 PM
Joined: Oct 2003
Posts: 306
J
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Oct 2003
Posts: 306
i have this
on 1:mode:#: if $1 == m or should be (+m) { .do my stuff }

but isnt work , any help please?


mess with the best
#95374 24/08/04 02:21 PM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
on 1:mode:#: if (+*m* iswmcs $1) { do stuff }

...should work fine.

The reason I say use 'iswmcs' is some servers have a +M mode, I don't know about the one you use. Also, someone could set +im and it wouldn't detect it. If you really do only want to detect if +m is set on its own though, use if (+m === $1).

You do need to specify the + because otherwise it will also detect the -.

Hope this helps!

Regards,

Last edited by Mentality; 24/08/04 11:33 PM.

Mentality/Chris
#95375 24/08/04 02:40 PM
Joined: Oct 2003
Posts: 306
J
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Oct 2003
Posts: 306
you rulez


mess with the best
#95376 24/08/04 03:02 PM
Joined: Oct 2003
Posts: 306
J
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Oct 2003
Posts: 306
how can i add a nicklist ,to the other post

menu nicklist {
$iif($me isop #,Op Commands,$null)
}

something like that


mess with the best
#95377 24/08/04 11:17 PM
Joined: Feb 2004
Posts: 50
D
Babel fish
Offline
Babel fish
D
Joined: Feb 2004
Posts: 50
Code:
 
menu nicklist {
  $iif($me isop #,Op Commands)
  .ban:/etc
  .kick:/etc
}


is that what you mean? there's no need for the $null bit.

also it would probably be better to use:

Code:
on *:MODE:#: {
  if (m isincs $1-) { do stuff, like check $chan(#).mode to see if m is still active in the channel. }
}


as with Mentalities idea, if someone sets the mode +im your script will not trigger. <- disregard that, he edited his post after he saw mine :P~~~

Last edited by Ddan; 24/08/04 11:34 PM.
#95378 24/08/04 11:39 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Quote:
on 1:mode:#: if (+*m* iswmcs $1) { do stuff }

That would match +i-m, the simplest way to match it is $regex($1, /\+[^-]*m/)


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#95379 25/08/04 07:48 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Not sure how into it you'd like to get, but this script will retrieve individual modes for you. Just loop through for a +m


-KingTomato

Link Copied to Clipboard