Savage_CL commented on a Page, Botserv Possesion version 2.1  -  Dec 30, 2011
; Botserv Possessor Version 2
; ( Was named Chanserv Possesor )
; This uses the TMFKSOFT Coder Tools http://www.hawkee.com/snippet/9172/
; By Thomas Edwards (TMFKSOFT) 2011

; Simply right click and select "Possess bot on #channel" or "Unpossess bot on #channel"
; Yes, it is now channel specific 

menu channel {
  BotServ Possessor
  . $iif($getvar($network,$chan,possessed) == 1,Unpossess,Possess) $chan $+ 's bot:/possess
}
alias -l possess {
  if ($getvar($network,$chan,possessed) == 1) {
    echo 4[BotServ Possessor] You no longer possess $chan $+ 's bot.
    away
    unsetvar $network $chan possessed
  }
  else {
    if ($me isop $chan) {
      echo 4[BotServ Possessor] You now possess $chan $+ 's bot.
      away I am possesing the bot on $chan via http://www.hawkee.com/snippet/9251/
      setvar $network $chan possessed 1
    }
    else {
      echo 4[BotServ Possessor] Operator or above is required to possess $chan $+ s bot.
    }  
  }
}
on 1:input:#:{
  if ($getvar($network,$chan,possessed) == 1) {
    if ($1 == /me) {
      raw -q privmsg botserv :act $chan $2-
      HALT
    }
    else if ($1 == /topic) {
      raw -q privmsg chanserv :topic $chan $2-
      HALT
    }
    else if ( isin $1) {
      raw -q privmsg botserv :say $1-
      HALT
    }
    else if ($left($1,1) == /) {
      $1-
      HALT
    }
    else {
      raw -q privmsg botserv :say $chan $1-
      HALT
    }
  }
}

alias setvar {
  set % $+ $1 $+ . $+ $2 $+ . $+ $3 $4-
}
alias getvar {
  return % [ $+ [ $1 ] $+ . $+ [ $2 ] $+ . $+ [ $3 ] ]
}
alias unsetvar {
  unset % $+ $1 $+ . $+ $2 $+ . $+ $3
}

Adapted for a multi-network situation in which you might be in #chan on two different networks.

Good script

Cheers :)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.