Botserv Possesion version 2.1
Platform: mIRC
Published Dec 25, 2011
Updated Mar 31, 2012
This is version two of my old script.
Just right click!
This version allows seperate channels so you cna resume normal chatting in other channels while controling a bot in one channel.
Of course this allows mutliple channel bot control!
Make sure there is a bot assigned to the channel and that you have access!
Rightclick -> "Botserv Possesor" -> "posses #channel's bot"
To unposses repeat the same step but the text will read "unposses #channel's bot".
Have fun!
This script uses my tools I scripted earlier last month :D
Updated to v2.1:
Added a fix provided by Savage_CL and it only works with Anope currently. :|
EXTRA Juicy code:
If you would like to make scripts work through botserv then simply add this in:
; This code is nice for bots ;)
; CAUTION: This code is buggy and may break. Remove it if you experience problems.
alias msg {
; Rewrites other scripts to go through botserv
if ($getvar($network,$chan,possessed) == 1) {
raw -q privmsg botserv :say $1-
HALT
}
}
alias describe {
; Rewrites other scripts to go through botserv
if ($getvar($network.$chan,possessed) == 1) {
raw -q privmsg botserv :act $1-
HALT
}
}
; 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
}