egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

restart all bots the same time (botnet)

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Sun May 27, 2012 9:02 am    Post subject: restart all bots the same time (botnet) Reply with quote

Hey!

How can i restart / rehash all mine bots at one time so i don't need to log into party line to restart/rehash the bots ?
_________________
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sun May 27, 2012 9:15 am    Post subject: Reply with quote

I'd probably use something like this:
Code:
bind bot - rehash controlBot
bind bot - restart controlBot
bind dcc n botnetrehash sendBot
bind dcc n botnetrestart sendBot

proc controlBot {source command text} {
  switch -nocase -- $command {
    rehash {
      putlog "Rehash requested by $source"
      rehash
    }
    restart {
      putlog "Restart requested by $source"
      restart
    }
  }
}

proc sendBot {handle idx text} {
  switch -nocase -- $::lastbind {
    botnetrehash {
      putallbots "rehash"
      #Give ourself a small window to forward the botnet message before we rehash ourselves
      utimer 1 {rehash}
    }
    botnetrestart {
      putallbots "restart"
      #Give ourself a small window to forward the botnet message before we restart ourselves
      utimer 1 {restart}
    }
  }
}


Edit: Fixed typo
_________________
NML_375, idling at #eggdrop@IrcNET


Last edited by nml375 on Sun May 27, 2012 3:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Sun May 27, 2012 9:29 am    Post subject: Reply with quote

Thanks nml375!

Should that be loaded in every bots?
_________________
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sun May 27, 2012 9:30 am    Post subject: Reply with quote

Yes
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Sun May 27, 2012 9:32 am    Post subject: Reply with quote

Thanks again Smile

I have loaded it.

do i type rehash/restart in dcc ? if its the case its not working
_________________
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Sun May 27, 2012 12:04 pm    Post subject: Reply with quote

The commands are botnetrehash and botnetrestart. You can change them in the this two lines:
Code:

bind dcc n botnetrehash sendBot
bind dcc n botnetrestart sendBot

_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Sun May 27, 2012 3:00 pm    Post subject: Reply with quote

Yes im that fare Smile

but do i type the cmds in partyline or ?
_________________
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sun May 27, 2012 3:07 pm    Post subject: Reply with quote

Yes, the commands are .botnetrehash and .botnetrestart, and are entered on the dcc chat partyline.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Sun May 27, 2012 3:10 pm    Post subject: Reply with quote

tried that didnt happen much
_________________
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sun May 27, 2012 3:15 pm    Post subject: Reply with quote

Was a minor issue in my code, post has been updated now.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Sun May 27, 2012 3:24 pm    Post subject: Reply with quote

Working fine now!


big thanks nml375 Smile
_________________
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber