mIRC Home    About    Download    Register    News    Help

Print Thread
#119259 03/05/05 03:12 AM
Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
Posts: 41
I'm trying to make a script that does not allow a new mode for #thethirdchannel. so that way when someones sets mode +p it will set -p and set +nt. I tryed this script but it don't seem to work...

on @*:MODE:#thethirdchannel:/mode $chan - $+ $1

Could someone help me fix this script?

#119260 03/05/05 03:26 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
The easiest way to do this, is to use the mlock command that most chanserv's have. For more help look at /cs help mlock or /cs help set mlock...different chanservs have it in different locations.

However, if this option isn't available or for some reason you don't want to do it that way then you might try
Code:
on @*:mode:#thethirdchannel:{ .mode $chan $+(-,$1,+nt) }  

#119261 03/05/05 03:39 AM
Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
Posts: 41
For one i'm on undernet in a unregisterd channel. Two this script still does not work. This is what happend.

22:44 * XM-bot (XM@ip68-227-96-40.ok.ok.cox.net) has joined #thethirdchannel
22:44 * pUff` sets mode: +v XM-bot
22:44 * pUff` sets mode: +o XM-bot
22:44 * XM-bot sets mode: +p

The mode still remained...

#119262 03/05/05 03:50 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
If it's just the +p mode that you're worried about, then this should work
Code:
on @*:mode:#thethirdchannel:{ .mode $chan -p+nt } 


For that matter if you wanted to ensure that the only modes set were nt then
Code:
on @*:mode:#thethirdchannel:{ .mode $chan -imklps+nt } 

#119263 03/05/05 03:59 AM
Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
Posts: 41
I'm sorry for being picky but i found one little problem with your script. When someone sets +k the script will not set -k

#119264 03/05/05 04:41 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
the +k mode is for a key, and unless a key is specified, it's irrelevant as to whether that mode is active or not

#119265 03/05/05 12:43 PM
Joined: Feb 2005
Posts: 194
A
Vogon poet
Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
Code:
on @*:mode:*:{
  if ($nick != $me) {
    if (+ isin $1-) mode $comchan($me,1) $replace($1-,+,-)
    if (- isin $1-) mode $comchan($me,1) $replace($1-,-,+)
  }
}
Untested


"God sometimes puts us in the dark for us to see the light"
#119266 03/05/05 04:05 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
on @!*:mode:#:{ mode $chan $replacex($1-, +, -, -, +) }


New username: hixxy
#119267 04/05/05 05:48 AM
Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
Why use $comchan? Why not just use $chan?

#119268 04/05/05 08:19 PM
Joined: Feb 2005
Posts: 194
A
Vogon poet
Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
This isn't my code. I had it in an old file. I was in a hurry and just pasted it. I never even looked it over. :tongue:


"God sometimes puts us in the dark for us to see the light"
#119269 04/05/05 10:49 PM
Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
Posts: 41
I'm sorry but none of your scripts worked for +k

#119270 05/05/05 12:29 AM
Joined: Sep 2004
Posts: 200
I
Fjord artisan
Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
Quote:
Code:
on @!*:mode:#:{ mode $chan $replacex($1-, +, -, -, +) }


change that to:
Code:
on @!*:mode:#:{ mode $chan $replacex($1-, +, -, -, +) }$1- 


it will reverse ALL mode changes

#119271 05/05/05 03:49 AM
Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
Posts: 41
on @!*:mode:#:{ mode $chan $replacex($1-, +, -, -, +) }$1-

That script actualy FORCED the +k to stay... Let alone set -k

confused

#119272 05/05/05 04:00 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
did u use $replace or $replacex like instructed?

#119273 05/05/05 05:19 AM
Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
Quote:
on @!*:mode:#:{ mode $chan $replacex($1-, +, -, -, +) }$1-

That script actualy FORCED the +k to stay... Let alone set -k

confused


Shouldnt that be
on @!*:mode:#:{ mode $chan $replacex($1-, +, -, -, +) $1- }

#119274 05/05/05 05:22 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Mine already replaced all modes.


New username: hixxy
#119275 05/05/05 11:14 PM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
I might be way off, but I'd go for:

on @!*:mode:#:{ mode $chan $replacex($1, +, -, -, +) $2- }


Link Copied to Clipboard