A simple script born out of neccesity.
For servers that don't have services or when you don't want to use service bots, you can use this script instead.
To use, just type [+/-] in the channel.
Script also features mutes and bans (including unmutes and unbans) which you can set using [+/-][b/m]. Using +bk bans and kicks the person.
Mostly just for using modes on a channel with ease.
Nothing serious, just sharing for those who want it.
(By the way, I am aware that my brackets are all over the place))
Got bored. Added timed kickbans (Use +tkb [reason]) made it stealthy and cleaned it up a bit.
Made mutes and bans work properly.
on 1:INPUT:#: {
if ($pos($1,+,1) == 1) || ($pos($1,-,1) == 1) && ($pos($1,b,1) != 2) && ($pos($1,m,1) != 2) && ($pos($1,t,1) != 2) {
if ($2) {
/mode $chan $1 $2- $2 $2 $2 $2
}
if (!$2) {
/mode $chan $1 $me $me $me $me
}
halt
}
if (($pos($1,+,1) == 1) && ($pos($1,b,1) == 2)) {
if ($2 ison $chan) {
/mode $chan +b $address($2,2)
}
else {
/mode $chan +b $2
}
if ($pos($1,k,1) == 3) {
set %ban. $+ $2 $address($2,2)
/kick $chan $2-
}
halt
}
if (($pos($1,-,1) == 1) && ($pos($1,b,1) == 2)) {
if (%,ban.,$2) {
/mode $chan -b $eval($+(%,ban.,$2),2)
.notice $2 You have been unbaned from $chan
}
if (!%,ban.,$2) {
if ($2 ison $chan) {
/mode $chan -b $address($2,2)
}
else {
mode $chan -b $2
}
}
halt
}
if (($pos($1,+,1) == 1) && ($pos($1,m,1) == 2)) {
if ($2) {
if ($2 ison $chan) {
/mode $chan +b ~q: $+ $address($2,2)
/mode $chan -hov $2 $2 $2 $2
set %muted. $+ $2 $eval($address($2,2))
}
else {
/mode $chan +b ~q: $+ $2
}
}
if (!$2) {
/mode $chan +m
}
halt
}
if (($pos($1,-,1) == 1) && ($pos($1,m,1) == 2)) {
if ($2) {
if ((%,muted.,$2)) {
/mode $chan -b ~q: $+ $eval($+(%,muted.,$2),2)
.notice $2 You have been unmuted on $chan
unset %muted. $+ $2
}
if (!(%,muted.,$2)) {
if ($address($2,2)) {
/mode $chan -b ~q: $+ $address($2,2)
}
if (!$address($2,2)) {
/mode $chan -b ~q: $+ $2
}
}
}
if (!$2) {
/mode $chan -m
}
halt
}
if (($pos($1,+,1) == 1) && ($pos($1,t,1) == 2)) {
if (($pos($1,k,1) == 3) && ($pos($1,b,1) == 4)) {
if ($3 ison $chan) {
var %tkbtime = $calc(($2)*60)
/mode $chan +b $address($3,2)
.timer 1 %tkbtime mode $chan -b $address($3,2)
set %ban. $+ $2 $address($3,2)
if (!$4) {
/kick $chan $3 Time out. $2 minute(s) ( $+ %tkbtime seconds)
}
if ($4) {
/kick $chan $3 Time out. Reason: $4- ( $+ $2 minute(s) ( $+ %tkbtime seconds))
}
}
}
else {
mode $chan +t
}
halt
}
}