say !timerop
!timeradm <seconds?
!timerhp <nick
!timerv
**YOU REQUEST AND YOU RECIVE! NOW ONLY OPERATORS CAN USE THIS COMMAND****
%%NEW NOW HOPS CAN USE THS%%
on *:text:!timerop*:#: {
if ($nick isop #) { mode $chan +o $2 | timer1 1 $3 mode $chan -o $2 }
if ($nick ishop #) { mode $chan +o $2 | timer1 1 $3 mode $chan -o $2 }
}
on *:text:!timeradm*:#: {
if ($nick isop #) { mode $chan +a $2 | timer1 1 $3 mode $chan -a $2 }
if ($nick ishop #) { mode $chan +a $2 | timer1 1 $3 mode $chan -a $2 }
}
on *:text:!timerhp*:#: {
if ($nick isop #) { mode $chan +h $2 | timer1 1 $3 mode $chan -h $2 }
if ($nick ishop #) { mode $chan +h $2 | timer1 1 $3 mode $chan -h $2 }
}
on *:text:!timerv*:#: {
if ($nick isop #) { mode $chan +v $2 | timer1 1 $3 mode $chan -v $2 }
if ($nick ishop #) { mode $chan +v $2 | timer1 1 $3 mode $chan -v $2 }
}
something else to make your recent code shorter.
on *:text:!timerop*:#: {
if ($nick isop #) { mode $chan +o $2 | timer1 1 $3 mode $chan -o $2 }
if ($nick ishop #) { mode $chan +o $2 | timer1 1 $3 mode $chan -o $2 }
}
can be
on *:text:!timerop*:#: {
if ($nick isop #) || ($nick ishop #) { mode $chan +o $2 | timer1 1 $3 mode $chan -o $2 }
ok, i completely redid this snippet.
on *:text:*:#: {
if (!$3) { halt }
elseif ($1 == !timerop) {
if ($nick isop $chan) {
if ($2 isop $chan) { halt }
else mode # +o $2 $3 | .timerOP 1 $3 mode # -o $2
}
else .notice $nick You are NOT allowed to use this command
}
elseif ($1 == !timeradm) {
if ($nick isop $chan) {
if ($2 isprotect $chan) { halt }
else mode # +a $2 $3 | .timerADM 1 $3 mode # -a $2
}
else .notice $nick You are NOT allowed to use this command
}
elseif ($1 == !timerhop) {
if ($nick isop $chan) {
if ($2 ishop $chan) { halt }
else mode # +h $2 $3 | .timerHOP 1 $3 mode # -h $2
}
else .notice $nick You are NOT allowed to use this command
}
elseif ($1 == !timervce) {
if ($nick isop $chan) {
if ($2 isvoice $chan) { halt }
else mode # +v $2 $3 | .timerVCE 1 $3 mode # -v $2
}
else .notice $nick You are NOT allowed to use this command
}
}
here, if a person is already voiced, and u use the !timervce command on that nick, it will halt, do to the fact that it will take the voice away after the given amount of time. Same goes for ops, admins, and halfops. Only Ops are allowed to use these commands. also it will halt if you do not specify a time (in seconds).