|
Joined: Mar 2005
Posts: 41
Ameglian cow
|
OP
Ameglian cow
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?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
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 on @*:mode:#thethirdchannel:{ .mode $chan $+(-,$1,+nt) }
|
|
|
|
Joined: Mar 2005
Posts: 41
Ameglian cow
|
OP
Ameglian cow
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...
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
If it's just the +p mode that you're worried about, then this should work on @*:mode:#thethirdchannel:{ .mode $chan -p+nt } For that matter if you wanted to ensure that the only modes set were nt then on @*:mode:#thethirdchannel:{ .mode $chan -imklps+nt }
|
|
|
|
Joined: Mar 2005
Posts: 41
Ameglian cow
|
OP
Ameglian cow
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
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Feb 2005
Posts: 194
Vogon poet
|
Vogon poet
Joined: Feb 2005
Posts: 194 |
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"
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
on @!*:mode:#:{ mode $chan $replacex($1-, +, -, -, +) }
New username: hixxy
|
|
|
|
Joined: Mar 2004
Posts: 540
Fjord artisan
|
Fjord artisan
Joined: Mar 2004
Posts: 540 |
Why use $comchan? Why not just use $chan?
|
|
|
|
Joined: Feb 2005
Posts: 194
Vogon poet
|
Vogon poet
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"
|
|
|
|
Joined: Mar 2005
Posts: 41
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2005
Posts: 41 |
I'm sorry but none of your scripts worked for +k
|
|
|
|
Joined: Sep 2004
Posts: 200
Fjord artisan
|
Fjord artisan
Joined: Sep 2004
Posts: 200 |
on @!*:mode:#:{ mode $chan $replacex($1-, +, -, -, +) } change that to: on @!*:mode:#:{ mode $chan $replacex($1-, +, -, -, +) }$1- it will reverse ALL mode changes
|
|
|
|
Joined: Mar 2005
Posts: 41
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2005
Posts: 41 |
on @!*:mode:#:{ mode $chan $replacex($1-, +, -, -, +) }$1- That script actualy FORCED the +k to stay... Let alone set -k
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
did u use $replace or $replacex like instructed?
|
|
|
|
Joined: Mar 2004
Posts: 540
Fjord artisan
|
Fjord artisan
Joined: Mar 2004
Posts: 540 |
on @!*:mode:#:{ mode $chan $replacex($1-, +, -, -, +) }$1- That script actualy FORCED the +k to stay... Let alone set -k Shouldnt that be on @!*:mode:#:{ mode $chan $replacex($1-, +, -, -, +) $1- }
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
Mine already replaced all modes.
New username: hixxy
|
|
|
|
Joined: Apr 2003
Posts: 701
Hoopy frood
|
Hoopy frood
Joined: Apr 2003
Posts: 701 |
I might be way off, but I'd go for:
on @!*:mode:#:{ mode $chan $replacex($1, +, -, -, +) $2- }
|
|
|
|
|