; Nick joins the channel
on 1:JOIN:#: {
; make sure we have power. If we don't, why bother threatening them
; that could just get us into further trouble :\
if ($me isop $chan) {
; Add them to the list of users we are checking up on...
/set % [ $+ [ $chan ] $+ ] .noop $addtok(% [ $+ [ $chan ] $+ ] .noop, $nick, 124)
; Set a timer to check them a minute from now..
.timer [ $+ [ $nick ] ] 1 60 /check.noop $chan $nick
; notify them to gain op
/msg $nick You have one minute to OP or be kicked!
}
}
; What abaout changing names?
on 1:NICK: {
; Go through all of our common chans..
/set -u0 %a 1
while (%a <= $comchan($newnick, 0)) {
; Save me from retyping $comchan(...)
/set -u0 %comchan $comchan($newnick, %a)
; We found the user in the list..
if ($findtok(% [ $+ [ %comchan ] $+ ] .noop, $nick, 1, 124)) {
;update their name
/set % [ $+ [ %comchan ] $+ ] .noop $reptok(% [ $+ [ %comchan ] $+ ] .nop, $nick, 1, 124)
}
/inc -u0 %a
}
}
alias check.noop {
; Make variables for easier-to-understand alias
/set -u0 %nick $1
/set -u0 %chan $2
; Now, check their status
; They are still in the channel
if (%nick ison %chan) {
; They do not have power, but we do
if ((%nick !isop %chan) && ($me isop %chan)) {
/kick %chan %nick You have failed to OP within 1 minute.
}
}
}