Skip to content
General IRCd

why?

A TG007 community discussion started by Wish.

Discussion 8 posts
Page 1 of 1
Open
Topic #5932 · 8 published posts · 2,358 views

alias sban {

/ban $iif($2 isnum 0-100,$+(-u,$calc($2 * 60)),) $+(q~:,$address($1,2))

}

 

So this code? why do i need this part "$iif($2 isnum 0-100,$+(-u,$calc($2 * 60)),)" why can i not just have the calc $2 * 60 part and leave the isnum thing out?

 

appreciate any help.. thanks!

it's basically saying that if the second word after the alias is a number between 0 and 100 then it will ban for that number of minutes, otherwise it will just ban for the amount of time stated.

eg:

sban person 2 - this will ban person for 120 seconds (2 x 60)

sban person 120 - this will ban for 120 seconds (120 > 100)

People are like slinkies; they're generally boring until you push them down stairs

it's basically saying that if the second word after the alias is a number between 0 and 100 then it will ban for that number of minutes, otherwise it will just ban for the amount of time stated.

eg:

sban person 2 - this will ban person for 120 seconds (2 x 60)

sban person 120 - this will ban for 120 seconds (120 > 100)

 

Anything above 100 means the ban will be permanent in the above alias.

no.

No what?

Actually, it means that if $2 is either $null, or doesn't exist, or above 100 it will ban permanently. Otherwise if $2 is from 0-100 it will ban for that amount of time times 60.

If we're going to go into details it actually means if $2 is a number between 0 and 100 it will ban for that amount of minutes, but if $2 is any other value it will ban forever.

Exactly, lol. :pizza: