Skip to content
General IRCd

No Owner While Away

A TG007 community discussion started by fpatrick.

Discussion 5 posts
Page 1 of 1
Open
Topic #15683 · 5 published posts · 2,093 views

#noowneraway on

raw 822:*:{

if ($nick isOwner $comchan($nick,1)) && ($me isOwner $comchan($nick,1)) {

if ($nick == $me) halt

mode $comchan($me,1) -q $nick | .auser -a snoown $nick

mode $comchan($me,1) -o $nick

msg $comchan($me,1) S eTahoma;0 Sorry $nick , No Hammer Allowed While Away :(

}

}

;return portion, unsets the user level and gives hammer back

raw 821:*: {

if ($nick == $ulist($nick,snoown,1)) {

msg $comchan($me,1) S eTahoma;0 Welcome Back $nick , Here Is Your Hammer :D

.ruser snoown $nick

mode $comchan($me,1) +q $nick

}

}

;keeps them from gaining a hammer while away

on snoown:OP:#: { mode # -q $opnick | msg # S eTahoma;0 Sorry $nick.... No Hammer While Away :( }

;If they leave while away will remove them from the snoown list, so if they return will allow hosting

on ^*:PART:#: {

if ($nick == $ulist($nick,snoown,1)) {

.ruser snoown $nick

}

}

;If they quit while away will remove them from the snoown list, so if they return will allow hosting

on ^*:QUIT:#: {

if ($nick == $ulist($nick,snoown,1)) {

.ruser snoown $nick

}

}

#noowneraway end

 

This is back from MSN days I believe and I am having trouble with the Bold font if statement at very start of code. I am using moschino connection to Buzzen. I dont have a fancy nicklist just the normal @ for a brown hammer and a . for a gold hammer. I was able to get the brown hammer code to work but cant get this owner hammer to work. If I use isop rest of code works but then it golds a brown hammy when returning. I am by far not a script code writer so please forgive me if this is a simple fix. I have also tried isin using the . and also letter q. I cant figure it out.

Try this

 

alias issuperowner return  $iif($left($nick($1,$2).pnick,1) == ',$true,$false)
#noowneraway on
raw 822:*:{
  if (($nick isowner $1) && (($me isowner $1) || ($issuperowner($1,$me)))) {
    if ($nick == $me) halt
    mode $1- -q $nick | .auser -a snoown $nick
    mode $1- -o $nick
    msg $1- S eTahoma;0 Sorry $nick , No Hammer Allowed While Away <img src='http://www.tg007.net/forum/public/style_emoticons/<#EMO_DIR#>/sad.png' class='bbc_emoticon' alt=':(' />
  }
}
;return portion, unsets the user level and gives hammer back
raw 821:*: {
  if ($nick == $ulist($nick,snoown,1)) {
    msg $1 S eTahoma;0 Welcome Back $nick , Here Is Your Hammer <img src='http://www.tg007.net/forum/public/style_emoticons/<#EMO_DIR#>/biggrin.png' class='bbc_emoticon' alt=':D' /> 
    .ruser snoown $nick
    mode $1 +q $nick
  }
}
;keeps them from gaining a hammer while away
on snoown:OP:#: { mode # -q $opnick | msg # S eTahoma;0 Sorry $nick.... No Hammer While Away <img src='http://www.tg007.net/forum/public/style_emoticons/<#EMO_DIR#>/sad.png' class='bbc_emoticon' alt=':(' /> }
;If they leave while away will remove them from the snoown list, so if they return will allow hosting
on ^*:PART:#: {
  if ($nick == $ulist($nick,snoown,1)) {
    .ruser snoown $nick
  }
}
;If they quit while away will remove them from the snoown list, so if they return will allow hosting
on ^*:QUIT:#: {
  if ($nick == $ulist($nick,snoown,1)) {
    .ruser snoown $nick
  }
}
#noowneraway end
Edited Aug 24, 2012 12:15 AM by err0r

Get information about ircWx here

isowner works in moschino.. you just have to account for if me is superowner.. also $comchan isn't the best method.. the away return raw outputs the roomname as $1

Get information about ircWx here

Thank for all your responses and help the alias did work thank goodness very fast response to i was surprised thank you again

glad we could help.

Get information about ircWx here