well removing the op is easy.. you just add -qo $nick $nick
as for giving them back their hammer you are going to need a owner level vs a host level.. or you could include it in the level..
you could have it check the user mode removed and auser snoop $address($nick,6) o or $address($nick,6) q depending.. then you could use that to determine which mode you are giving back. like $ulist($address($nick,6),snoop,1).info would return o or q
a few things i would change..
$comchan ( $comchan is a bit lazy to use and I wouldn't recommend it unless you will only be running your script in one room)
$nick as a user level. I would rather use their address as nicks are easily cloned.
I put this together rather quickly but it should give u an idea of what i mean feel free to improve it however
#nohostaway on
raw 822:*:{
if ($nick($1,$nick,qo)) {
if ($nick($1,$nick,q)) { .auser -a snoop $address($nick,6) q }
if ($nick($1,$nick,o)) { .auser -a snoop $address($nick,6) o }
mode $1 -qo $nick $nick
msg $1 Sorry $nick .... no hammer allowed while you're away
}
}
raw 821:*: {
if (snoop isin $level($address($nick,6))) {
msg $1 Well now that you are back, here's your hammer
mode $1 + $+ $ulist($address($nick,6),snoop,1).info $nick
.ruser snoop $address($nick,6)
}
}
on ^*:OP:#: {
if (snoop isin $level($address($opnick,6))) {
mode # -qo $opnick $opnick
msg # Sorry $nick .... no hammer while you're away
}
}
on ^*:OWNER:#: {
if (snoop isin $level($address($opnick,6))) {
mode # -qo $opnick $opnick
msg # Sorry $nick .... no hammer while you're away
}
}
on ^*:PART:#: {
if (snoop isin $level($address($nick,6))) {
.ruser snoop $address($nick,6)
}
}
on ^*:JOIN:#: {
if (snoop isin $level($address($nick,6))) {
.ruser snoop $address($nick,6)
}
}
#nohostaway end
Above code isn't perfect but it at least gives you something to look at to make sense of what i was saying above.
Edited Oct 27, 2011 8:49 PM by err0r