This is a channel lockdown script of my design. Paste to Bot's remotes. Simply type Initiate Protocol JANUS to lock your channel down. Bot needs Oper or Admin priveledges.
on 1337:TEXT:*Initiate Protocol JANUS*:#: {
if (%janus == on) {
notice $nick Protocol JANUS is already in effect! }
else {
set %janus on | mode $chan +tms | mode $chan +lk 10 JANUS | msg operserv global Protocol JANUS enacted. $chan has been locked down.
}
}
on 1337:TEXT:*Rescend Protocol JANUS*:#: {
set %janus off | mode $chan -tms | mode $chan -lk JANUS | msg operserv global Protocol JANUS rescended. $chan will resume normal operation.
}
@napa see i knew you would take offense where none was intended. I am truly sorry for this. As i said, i thank you for the help, but it does not work. I copied your code to the letter. I wanted it to only be used with a certain user level, for one, and two: The Rescend Protocol JANUS dosent work. I am very grateful for your help, but please don't be rude when i tell you my opinion. @Frenetic lol @Jonesy How would i do that?
What do you mean it don't work?
<&Sick0> Initiate Protocol JANUS
<~napa182> global Protocol JANUS enacted. #Ban_Chan has been locked down.
- napa182 sets mode: +smlk 10 JANUS
<&Sick0> Rescend Protocol JANUS
<~napa182> global Protocol JANUS rescended. #Ban_Chan will resume normal operation.- napa182 sets mode: -smtlk JANUS
seems to work for me just fine. You over used the | making ur code compressed an ugly. You should really try an limit the use of the | . For one it will make ur code a lot cleaner an easier to read/debug among other things. an as for the use of regex in my example it was about he easiest use of it.
as well there is no point in having 2 on text events for this. either take it an learn from it or pick things out to learn from or don't I really don't care. Like i said there are many different ways to go about making a snippet as this. My example was just one of the many ways. but if you are going to complain about it I wont post any examples on ur snippets no hair off my ass.
Yea that dosent work, besides the fact that it's twice as convoluted as my original snippet. Mine was simple and it worked. Yours is complicated and (at least to a beginner) looks like gobbledegook. I am not trying to insult you, as i have great respect for you and the other "Elder Coders"® lol. Nor am i ungrateful for your help. But as was stated when i started this account: I write simple snippets for beginners. My dialogs are simple and not very populous. This is not for lack of knowledge. I know quite a bit about mSL, but to the majority of "regular" users, things like $regex (btw, why is everyone on here stuck on $regex?) are useless and far too advanced. I script for the little guys, and for now, that's not gonna change. :P
Now this is one of many ways to go about it, and I havnt scripted in msl for some time now but
on $1337:TEXT:/^(Initiate|Rescend) Protocol JANUS$/iS:#: {
if ($regml(1) = Initiate) {
if (%janus) { .notice $nick Protocol JANUS is already in effect! }
else {
set %janus on
mode # +tms+lk 10 JANUS
msg operserv global Protocol JANUS enacted. # has been locked down.
}
}
if ($regml(1) = Rescend) {
if (!%janus) { .notice $nick Protocol JANUS is already off! }
else {
unset %janus
mode # -tms-lk JANUS
msg operserv global Protocol JANUS rescended. # will resume normal operation.
}
}
}