Timed Ban

By ITSOVER9000 on Sep 06, 2011

Well, this was just a little timed ban alias I made. I tried using else's, that didn't work out so well. So I feel amazed I got this alias using only if's. Oh, and just to point this out, I wouldn't add if ($me isop $chan), because, well, you wouldn't be using the alias if you weren't an op, would you? :P
I had to snoop around here a bit to figure out how /ban worked, Since previously I had just done /.timers to undo it. Now here is my many times improved, timed ban alias. (It's also always good to have a few channels to test it in. :P I had failed on the $duration, always good to have a channel to test and fix it, lol.)

; Usage: /tb <nick> <minutes> <reason> (Not required) 
alias tb { 
  if ($1) && ($1 ison $chan) && ($2 isnum) { ban $+(-ku,$calc($2 * 60)) $1 2 Banned for $+($duration($calc($2 * 60)),:) $iif($3-,$3-,No $&
    reason specified.) }
  if ($1 ison $chan) && ($2) && ($2 !isnum) { echo -a You have to specify a number, /tb <nick> <minutes> <reason> (Not required) }
  if ($1) && ($1 ison $chan) && (!$2) { echo -a Specify a number, and if you want to, a reason, /tb <nick> <minutes> <reason> $& 
    (Not required) }
  if ($1) && ($1 !ison $chan) { echo -a $1 isn't on $chan $+ , therefore, you can't ban them. }
  if (!$1) { echo -a Forgetting a nickname? /tb <nick> <minutes> <reason> (Not required) }
}

Comments

Sign in to comment.
ITSOVER9000   -  Sep 08, 2011

Lol Jethro. I do thank you for your help.

 Respond  
Jethro   -  Sep 08, 2011

If by being a jerk warrants a like from me and suggestion to improve the overall snippet, I consider myself a good jerk.

 Respond  
Stewie1k94   -  Sep 08, 2011

Jethro no i wasn't being sarcastic

 Respond  
yelow79   -  Sep 08, 2011

@itsover900 It doesn't suck, you just over thought it a bit. These guys are trying to show you that in a fun humorous way instead of being jerks and just coming out and saying it.

 Respond  
ITSOVER9000   -  Sep 07, 2011

OIC. :< I guess it does suck. Meh. I don't care.

 Respond  
Jethro   -  Sep 07, 2011

toclafane1, you sure you weren't being sarcastic by saying, "great script, thanks?" :/

 Respond  
Stewie1k94   -  Sep 07, 2011

great script , thanks

 Respond  
Jethro   -  Sep 07, 2011

MoshMage, It was a show-off is all, and it didn't work for me because it was supposed to be a satirical example. Damn you, Dani. :p

 Respond  
MoshMage   -  Sep 07, 2011

Anywho, is that regsub alias a overreaction or a overkill? X) neat nonetheless

 Respond  
Frenetic   -  Sep 07, 2011

Oh. Ok

 Respond  
Jethro   -  Sep 07, 2011

I was referring to the alias where you have to be on a channel to execute it successfully. If you try to trigger it in a status window, perhaps you're not meant to use it.

 Respond  
Frenetic   -  Sep 07, 2011

You have to be on a channel to ban someone, right? :/
No.

 Respond  
Jethro   -  Sep 07, 2011

Thir, use mine at the very top of the comment section. I don't know why the check for channel is necessary. You have to be on a channel to ban someone, right? :/

 Respond  
Thir   -  Sep 07, 2011

Yes, I'm on my friends channel, and when I do "/tb someone 1 test", it says that "#test is not a channel.".

 Respond  
yelow79   -  Sep 07, 2011

LMAO... I love the humor

 Respond  
ITSOVER9000   -  Sep 06, 2011

@Jethro: Thanks for your advice, hopefully I'll take it and become better. As you can see, I don't know very much about mSL.
@Dani
|11: I don't know/use/understand $regsubex,$regex,$regsub, etc, as I've never used them. Even regexp is a little confusing for me.
@Thir: Why is it showing that? What are you doing exactly? Are you on that channel? And who's are you using? Try Jethro_'s, mine might not work so well.

 Respond  
Jethro   -  Sep 06, 2011

make it look advanced, intelligent and confusing.That's so nerdy. I feel disgusted, conniving and inferior. :(

 Respond  
Frenetic   -  Sep 06, 2011

Oh please, we're not in kindergarten.

 Respond  
Dani_l11   -  Sep 06, 2011

No! You just don't get it! Just drop it, this thing is way too big for you. Once you're a super good msl scripter like jaytea or (you are pretending to be one like) jethro you will understand. Don't dig too deep. You do not wanna know this.

 Respond  
Frenetic   -  Sep 06, 2011

Because - What's the point in overdoing something. Yeah, I get doing it different ways, but no need to over complicate something, so simple.

 Respond  
Dani_l11   -  Sep 06, 2011

You totally don't get it.... why should we make it simple if we could add all kinds of regsubex, iifs and more complicated stuff to make it look advanced, intelligent and confusing.

 Respond  
Frenetic   -  Sep 06, 2011

why not use something like

alias TB { mode # +b $address($3,2) | if ($2 > 0) { .timer $+ unban $+ $3 1 $calc($2 * 60) mode # -b $address($3,2) }
 Respond  
Dani_l11   -  Sep 06, 2011

Oops my bad, it was !ison # not ison. Edited.

 Respond  
Jethro   -  Sep 06, 2011

I think dani's code was made to mess with us. It's a parody.

Where on earth did jaytea pop up? :/

 Respond  
jaytea   -  Sep 06, 2011

spoiler: Dani was joking.

 Respond  
KilllerX   -  Sep 06, 2011

does that actually work... Dani boi mind explaning the use of the calculation. isn't that more... oh I don't know long winded then just doing

elseif ($1 !ison #)  {
    echo -a $1 isn't on $chan $+ , therefore, you can't ban them.
  }

And the code still be as effective?

Edit: I input Dani's... and it doesn't even return with the fact that $1 isn't even in the chan.

 Respond  
Jethro   -  Sep 06, 2011

Ummm. $active can refer to status window so you need to make sure: if $active ischan

EDIT - Never mind. I missed seeing the ison operator is used. :(

 Respond  
Jethro   -  Sep 06, 2011

Shut up, Dani boi! :p

 Respond  
Dani_l11   -  Sep 06, 2011
alias tb {
  if (!$1) {
    echo -a Forgetting a nickname? /tb <nick> <minutes> <reason> (Not required)
  }
  elseif ($1 !ison $chan) {
    echo -a $1 isn't on $chan $+ , therefore, you can't ban them.
  }
  elseif ($2 !isnum) {
    echo -a You have to specify a number, /tb <nick> <minutes> <reason> (Not required)
  }
  else {
    ban $+(-ku,$calc($2 * 60)) $chan $1 2 Banned for $+($duration($calc($2 * 60)),:) $iif($3,$3-,No reason specified.)
  }
}

That's not how you code jethro

alias tb {
  if (!$2) {
    var %a = Forgetting a nickname?|$&
      You have to specify a number,
    echo -a $gettok(%a,$iif($remove($regsubex($1 - $2,/(.*?) - (.*?)/,\n),-) > 2,4,3),126) /tb <nick> <minutes> <reason> (Not required)
  }
  elseif ($regml($calc((($pi * $1 + 512 / 301 * 3 - 32) * 0) +1)) !ison $iif($chan == #,$($ $+ $chr($asc(+)) $+ chan,5),#)) {
    echo -a $1 isn't on $($ $+ $+($chr(118),2),3) $+ , therefore, you can't ban them.
  }
  else {
    ban $+(-ku,$calc($2 * 60)) $chan $1 2 Banned for $+($duration($calc($2 * 60)),:) $iif($3,$3-,No reason specified.)
  }
}

thats how you code!

 Respond  
KilllerX   -  Sep 06, 2011

@SR... Jethro aready gave a script 99% like that. all you did was change $Chan to $Active. and added the if ($me is !isno active) actually you said actice. and for it to work he doesn't need to specify what channel. and hopefully they are on the channel they are using it on. your's is redundant to me.

Seems like good work. but as Jethro has said. Not worth the time to continually check the same identifier, checking if $1 is provided over and over, isn't worth the time it takes to do that.

 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.