Just a simple script that will kick ban a user for a certain amount of minutes...
Syntax:
/tb
alias tb {
ban -ku $+ $calc($2 * 60) $chan $1 2 BANNED! User has been banned from $chan for $2 minutes. Reason: $3-
}
Well, the reason I didn't mention the op check is that, almost 95% of the time (the remaining 5% is people forgot to get themselves as ops. :P) you're opped, or else you wouldn't have made this alias to kick and ban people, correct? ;)
But I suppose it wouldn't hurt to add it. =) Thanks WorldDMT for the suggestion. :D
Wait, I meant to say that I have to make sure myself is opped too...lol
if ($me isop #) {
But I'd kick or ban ops if they acted like a bunch of mischievous dickheads. :P
alias tb {
ban -ku $+ $calc($2 * 60) $chan $$1 2 BANNED! User has been banned from $chan for $2 minutes. Reason: $3-
}This will make sure you have provided the $1 before the alias shall trigger, so that you won't get an error when you just enter /tb without the $1.
Or you can use a check:> alias tb {
if ($1 ison $chan) {
ban -ku $+ $calc($2 * 60) $chan $1 2 BANNED! User has been banned from $chan for $2 minutes. Reason: $3-
}
}This will ensure that you've specified a nick to ban and that he or she must be on channel and their names shall match. This will prevent unnecessary typos or misspellings before the alias triggers.