Protocol JANUS

By ProSec on Nov 21, 2011

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.
}

Comments

Sign in to comment.
Kentaro Kurosaki   -  Jan 25, 2012

/me gives +1 to all :D

More
 Respond  
ProSec   -  Dec 10, 2011

Think no more of it. We are all friends here.

More
 Respond  
napa182   -  Dec 10, 2011

ProSec Wrote:

Thanks.

No problem ProSec, and sorry if we got off on the wrong foot. I am only here to help others.

More
 Respond  
ProSec   -  Dec 09, 2011

No need to appologize, we both lost our heads, But thanks. That means a lot. My appologies, also.

More
 Respond  
Noutrious   -  Dec 09, 2011

ProSec, i was a bit overthinking the things I said, and yes, I flamed a bit too much based on my stereotypes which were formed based on your profile. Now I see, you're actually good-natured person and best wishes in scripting/coding. My apologies and take no offence from me. :)

More
 Respond  
ProSec   -  Dec 09, 2011

Thanks.

More
 Respond  
napa182   -  Dec 08, 2011

ProSec Wrote:

how would i set this (using napa's example) to only be usable by a certain user level?

PoSec i used the user lvl that you put in the code ie: 1337 so if you add users in ur user list under 1337 it will work.

More
 Respond  
ProSec   -  Dec 08, 2011

how would i set this (using napa's example) to only be usable by a certain user level?

More
 Respond  
ProSec   -  Dec 07, 2011

Thanks, i'll try that.

More
 Respond  
jonesy44   -  Dec 07, 2011

By checking $mode after the end. Incase CS has reset the modes :)

More
 Respond  
ProSec   -  Dec 07, 2011

Thanks Scott

More
 Respond  
Hawkee   -  Dec 07, 2011

I've removed all the flame comments.

More
 Respond  
toclafane1   -  Dec 06, 2011

I need some sleep lol Quote: <~napa182> global Protocol JANUS ejaculated #Ban_Chan has been locked down. I'm seeing things. Lmao.

More
 Respond  
napa182   -  Dec 06, 2011

no offence taken tbh,but the code works fine for me. as i posted in the other comment. anyways hosting 10th prestige CoD4 an 15th prestige Black Opps so I will be back later... for the ones that know my user account then you can message me for an invite...

More
 Respond  
ProSec   -  Dec 06, 2011

@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?

More
 Respond  
napa182   -  Dec 06, 2011

lol @ Frenetic

More
 Respond  
Frenetic   -  Dec 06, 2011

I need some sleep lol > <~napa182> global Protocol JANUS ejaculated #Ban_Chan has been locked down. I'm seeing things.

More
 Respond  
napa182   -  Dec 06, 2011

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.

More
 Respond  
jonesy44   -  Dec 06, 2011

You should atleast check +tms+lk is set before confirming it to the channel.

More
 Respond  
Frenetic   -  Dec 06, 2011

the other "Elder Coders"® Quote of the day!

More
 Respond  
ProSec   -  Dec 06, 2011

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

More
 Respond  
napa182   -  Dec 06, 2011

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.
    }
  }
}
More
 Respond  
ProSec   -  Dec 06, 2011

Napa, example?

More
 Respond  
Frenetic   -  Dec 06, 2011

LOL

More
 Respond  
napa182   -  Dec 06, 2011

rofl i was drinking coffee when i read that an almost spit it everywhere. nice going LMAO...

More
 Respond  
Frenetic   -  Dec 06, 2011

I thought the title said protocol anus, j/s

More
 Respond  
Hawkee   -  Dec 05, 2011

@Noutrious Why did you post that first comment here? It screams of bad attitude. Let's keep things mature around here.

More
 Respond  
jonesy44   -  Dec 05, 2011

You'd get loads more hits if a j were removed.. jus sayin

More
 Respond  
jonesy44   -  Dec 05, 2011

lol.

More
 Respond  
ProSec   -  Nov 22, 2011

Sorry, i didnt mean to sound like a dick. I guess it did fly over my head lol. Thanks for the like though.

More
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.