User Control Panel
Advertisements

HELP US, HELP YOU!

Reboot "Without Rebooting"?

 
Post new topic   Reply to topic    Bot Depot Forum Index -> General Chat & Discussion
View unanswered posts
Author Message
Rameses
Senior Member
Senior Member


Joined: 02 Feb 2004
Posts: 182

Reputation: 31.1Reputation: 31.1Reputation: 31.1

PostPosted: Wed Feb 25, 2004 3:15 am    Post subject: Reply with quote

Is it possible to reboot without the bot signing off and backon? I know if you use the system function, it reboots quickly, but I'm trying to figure out a way that it could regather all the perl files and use those without logging off..

I'm working on it, I'll tell ya guys if I make any progress, lol.. (I think I may have an idea, lol)
Back to top
eric256
The Keymaker
The Keymaker


Joined: 03 May 2006
Posts: 2292
Location: Colorado
Reputation: 47Reputation: 47Reputation: 47Reputation: 47Reputation: 47

PostPosted: Wed Feb 25, 2004 6:17 am    Post subject: Reply with quote

You can reload the commands etc. But you can't reload the perl thats connecting to the MSN server. There might be a way to reload the main file if you can figure out how to pass the $msn object along. I can't see any reason to work so hard at this though, i just don't see the value.
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Dazzy
Agent
Agent


Joined: 09 Jan 2004
Posts: 1731

Reputation: 72.3

PostPosted: Wed Feb 25, 2004 10:20 am    Post subject: Reply with quote

well........i want it to like log off and like boot everything up again...

i did it like you said with system....it sort of worked.....but it didnt reset everything adn when you reboot it you had to closse the window and start it up again to use the commands..........it sorta locked up
it would go offline for a flash.....it wouldnt even leave the convo it was so fast!

but didnt work like it wanted it to....it wouldnt reset the msn.pm i changed the color and them rebooted and it didnt change so......... Sad

if you get it to work id like to take a look Very Happy
really i want it to reload msn.pm ,,,,i dont mind if it goes offline for a bit(2 secs)
Back to top
eric256
The Keymaker
The Keymaker


Joined: 03 May 2006
Posts: 2292
Location: Colorado
Reputation: 47Reputation: 47Reputation: 47Reputation: 47Reputation: 47

PostPosted: Wed Feb 25, 2004 1:29 pm    Post subject: Reply with quote

You can't reload MSN.pm and stay online, i thought i'd mentioned that. That is the part handling the sockets that are talking to MSN. Why you would be changing colors in MSN.pm I don't understand at all.
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Dazzy
Agent
Agent


Joined: 09 Jan 2004
Posts: 1731

Reputation: 72.3

PostPosted: Wed Feb 25, 2004 3:10 pm    Post subject: Reply with quote

sorry!!
MY MISTAKE

bot.pm
Back to top
Atomix
Young One
Young One


Joined: 24 Nov 2003
Posts: 67

Reputation: 31.2Reputation: 31.2Reputation: 31.2

PostPosted: Thu Feb 26, 2004 2:16 pm    Post subject: Reply with quote

*Cough*Eric, You can reboot without the main bot.pl file without logging off...
all you have to do is this:

system "botsname.pl";


*cough*
Back to top
eric256
The Keymaker
The Keymaker


Joined: 03 May 2006
Posts: 2292
Location: Colorado
Reputation: 47Reputation: 47Reputation: 47Reputation: 47Reputation: 47

PostPosted: Thu Feb 26, 2004 3:26 pm    Post subject: Reply with quote

*cough* thats a bad idea, and it still is going to log the bot off,if it doesn't, i would expect to experience major problems communicating with MSS. If you do that then every time you "reboot" your bot gets run agian, inside your old bot,so 5 reboots = 5 * the memory.
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Atomix
Young One
Young One


Joined: 24 Nov 2003
Posts: 67

Reputation: 31.2Reputation: 31.2Reputation: 31.2

PostPosted: Thu Feb 26, 2004 4:02 pm    Post subject: Reply with quote

Still, Its the only thing I can think off Razz
And it doesnt log the bot off :^)
Back to top
Sypher
Senior Member
Senior Member


Joined: 01 Jan 2004
Posts: 233
Location: The Netherlands
Reputation: 39.8Reputation: 39.8Reputation: 39.8Reputation: 39.8

PostPosted: Thu Feb 26, 2004 6:02 pm    Post subject: Reply with quote

Shut down the bot, let the bot run a batch file where you set-up the "perl bot.pl" ... Maybe that's usefull
_________________
Sypher
Developer of Codera
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Thu Feb 26, 2004 7:47 pm    Post subject: Reply with quote

One thing I've noticed when using a file reloading command is that it reloads all command files and misc subroutines, but won't reload the handlers.

So maybe if you have the handler call another file/sub immediately, then you can have the bot reload the "misc sub" and reload how handlers are handled without rebooting.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
eric256
The Keymaker
The Keymaker


Joined: 03 May 2006
Posts: 2292
Location: Colorado
Reputation: 47Reputation: 47Reputation: 47Reputation: 47Reputation: 47

PostPosted: Thu Feb 26, 2004 9:22 pm    Post subject: Reply with quote

I don't beleive that your bot is actualy reloading adn still keeping sockets connected to MSN open, perhaps you think its not getting offlien cause it does it in a hurry or something. system runs another program, running your bot a second time will still call all the connect info, which would force your bot to get on a second time. Maybe its like when you login at a new location and are already logged in somewhere esle, the transition could be fast enough to make it appear to stay online. I don't think appearing to never go offline is more important than the giant memory leak you are introducing though.
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
UnShavenGod
Young One
Young One


Joined: 26 Feb 2004
Posts: 99

Reputation: 28.7Reputation: 28.7Reputation: 28.7

PostPosted: Fri Feb 27, 2004 3:13 am    Post subject: Reply with quote

I've done something like this .... MIght not be exactly what you're looking for, but the results are the same?

I have a user command that "reloads" the vocab files into a global hash... Since subroutines are stored according to their memory addresses (just as hashes are), perhaps you could achieve what you want with the "do" command.

In my bot.pl, I use a "do" command which loads files like "chat_functions.pl" ....

I could have the reload "command" reload the subroutines without "rebooting" the bot. (By doing another "do"). I am not sure if you would need to reassign the handlers to a new memory reference --- BUT even so, you should be able to address that issue in the "reload without reboot" command.

... I haven't tried this... but i think it should work.
Back to top
paulwinter40
Newbie
Newbie


Joined: 19 Jan 2004
Posts: 28

Reputation: 28.5Reputation: 28.5Reputation: 28.5

PostPosted: Sat Mar 06, 2004 2:08 pm    Post subject: Reply with quote

Code:
<br />if ($msg eq "refresh") {<br />@dirs = ("Extras","Access","Commands");<br />foreach $dir (@dirs) {<br />  opendir(DIR, "./$dir");<br />  foreach $file (sort(grep(!/^\./, readdir(DIR)))) {<br />    if ($file =~ /.pl$/i) {<br />       require "$dir/$file";<br />    }<br />  }<br />  closedir(DIR);<br />  }<br />&send($self, "Refresh complete!");<br />}<br />
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> General Chat & Discussion All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group