Full Updated script.
This script allows you to maintain a bot in channel 24/7.
This is made for a help channel for example where there are say 2 or 3 ops with the same scripts on their bots so if one goes offline another instantly joins the channel to provide seamless cover.
All bots names must be added to Notify for this script to work and obviously need to be online but not sat in the desired channel.
set up...
change #channel for the working channel
change nick nick2 for the nicks on notify
thanks to PuNkTuReD for helping with the user in channel check where there are more than one bot setup for the channel.
on *:JOIN:#channel:{
if ($istok(nick nick2,$nick,32)) { part #channel }
elseif ($nick == $me) { .timer 1 1 check4nicks $chan }
}
on *:UNOTIFY:{
if ($istok(nick nick2,$nick,32)) {
if ( ( $notify(nick).ison == $false ) && ( $notify(nick2).ison == $false ) ) {
join #channel
}
}
}
on *:NICK: { if ($istok(nick nick2,$newnick,32)) { part #channel } }
alias check4nicks { if (nick ison $1) || (nick2 ison $1) { part $1 } }
Hmm i like it finally got around to using it actualy.i have mine set up pretty simple i only have one server security bot so its easy.The \"Sleeper\" bot idles in one of my channels(prolly make this random soon),Just like its supossed if its notified that my main bot went off line,its changes nicks(gains admin at this point),joins all the channels that the main bot was in then ops it self an takes over the main bots security duties,being its just 2 mIRC applications i just use the same scripts an upadate when needed so all the protections an data remain the same,altho the only thing i really loose is the hash data,which i dont hav to i could relay all data to the Sleeper as my main bot works all day so i wont loose anything.I\'d actually like to expand on the idea further,since ppl will be looking to target the sleeper bot i actually like to haev the Sleeper auto disonnect change Indent an Fullname an even change to a proxy(list of about 10 working that would be on my exempt list on the main bot to get past it),Then reconnect an be anonomous again,prolly add anty idle along with some other things.Sorry gon off on rant there its a good idea tho,the reation time is a bit slower then lets say a on connect notice ora quit notice but then again the Sleeper doesnt hav to be in the same room or see notices to activate so it can be anonumous still so i ll deal with the reaction time.Ah also i changed theSleeper to -admin on connection notice of the main bot returning then join a certain channel an change to a random nick name.This way no trace about the only ppl know that it exists are the ppl seeing the indent/host then they can target it after that but all attacks to the sleeper whiles its not active i will relay to the main bot an hav the main bot protect the Sleeper.Yeah im just gettin silly i know lol there more but i ll spare you XD\"Rate it or Hate it?\"....7/10.Good work nice idea.`-.-
Nothing so special about that all - just /help $gettok and stuff, you will learn fast.
I have a way to learn too, because here is a one stupid mistake:
:again
and
.goto again
isn\'t needed in while (), i figured that out yesterday - so i have been eating a little bit more bytes of resources at my scripts than needed!
Yeah, the idea is nice, but you could make it simpler for the clients, somehow, for example:
alias -l getbots {
.var %botnicks = Bob,Tom,Sally
.var %n = 0
.var %num = $numtok(%botnicks,44)
:again
while (%n < %num) {
.inc %num
if ($gettok(%botnicks,%num,44) = $1) { return 1 }
.goto again
}
}
And now all you have to do is:
Replace:
if ( ( $nick == <nick1> ) || ( $nick == <nick2> ) ) {
if ( ( $notify(<nick1>).ison == $false ) && ( $notify(<nick2>).ison == $false ) ) {
With:
if ($getbots($nick) = 1) && (!$notify($nick).ison) {
And replace:
if ( ( $nick == <nick1> ) || ( $nick == <nick2> ) ) {
With:
if ($getbots($nick) = 1) {
This makes it user-friendlier and a little bit more professional :)
no.. sorry if i didnt explain it better. i have a bot, as do 2 of my ops. the bot runs 3 channel\'s control scripts etc. all bots are online but only one of them are in the channels. the others are sat in the \"hallway\" as it were idling. if the master bot goes offline, the script on each of the bots checks to see.. A - which of the other 2 bots are online, and if none are in channels, it will auto join them. if any of the other bots come on and in channel, then it will auto leave them. for example....
Bob, Tom, and Sally.
Bob runs the master bot. tom and sally have the \"backup bots\". If bob\'s goes offline then each of tom\'s and sally\'s bots will get the message via unotify and try to join the channels that bob\'s was in. however.. if one of the other bots are there already, it will not join. on the same note. if it joins the channels and bob\'s comes back on line and into the channels, it will leave them and go back to standby.
i hope that makes a bit more sense. if not let me know and i will try and simplify it a bit more for you