Tim34taft Posted October 26, 2011 Report Share Posted October 26, 2011 Ok I got no host while away code working I just need it to for no OWNER while away please thanks #nohostaway on raw 822:*:{ if ($nick isop $comchan($me,1)) && ($nick !isowner $comchan($me,1)) { mode $comchan($me,1) -o $nick msg $comchan($me,1) S eTahoma;0 Sorry $nick .... no hammer allowed while you're away .auser snoop $nick } } raw 821:*: { if ($nick == $ulist($nick,snoop,1)) { msg $comchan($me,1) S eTahoma;0 Well now that you are back, here's your hammer .ruser snoop $nick mode $comchan($me,1) +o $nick } } on snoop:OP:#: { mode # -o $opnick | msg # S eTahoma;0 Sorry $nick .... no hammer while you're away } on ^*:PART:#: { if ($nick == $ulist($nick,snoop,1)) { .ruser snoop $nick } } on ^*:QUIT:#: { if ($nick == $ulist($nick,snoop,1)) { .ruser snoop $nick } } #nohostaway end Link to comment Share on other sites More sharing options...
err0r Posted October 26, 2011 Report Share Posted October 26, 2011 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. Link to comment Share on other sites More sharing options...
Tim34taft Posted October 26, 2011 Author Report Share Posted October 26, 2011 err0r thanks for your help I'm such a noob *sigh* I just want a simple code where my bot takes away an owners gold hammer if they go on "away" and when they "return" have my bot give them back their gold hammer. Hopefully without involving the access levels list Here is an example of what I would like : › You have been marked as being away. Ðyno™ has changed your modes to -q › You are no longer marked as being away. Ðyno™ has changed your modes to +q Thats all I want for Christmas Link to comment Share on other sites More sharing options...
err0r Posted October 26, 2011 Report Share Posted October 26, 2011 i edited my post to include an example. Link to comment Share on other sites More sharing options...
Tim34taft Posted October 26, 2011 Author Report Share Posted October 26, 2011 err0r thank you a million times your code does exactly what I want it to AMEN Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now