PDA

View Full Version : Windrop as service problem


sablord
11-17-2005, 08:33 AM
when i start bot as a service it start but dies after 1sec help please

RockyMaiviA
11-17-2005, 09:39 AM
have windrop service ??where can download?

sablord
11-17-2005, 11:51 AM
u have to make it a service

RockyMaiviA
11-19-2005, 08:13 PM
not understant

zag2me
02-23-2006, 03:55 AM
You dont have to make windrop as a service at all. It will run fine from the command line, infact things like dzsbot require you to run it from the command line using eggdrop -nt to show the console.

If you must run it as a service, try the Firedaemon program.

Mr_X
02-25-2006, 02:40 PM
You should better make it run on event OnServerStart

LordM
03-02-2006, 03:08 AM
You don't need to start your sitebot as a service. You could crate a batch file, that is executed OnServerStart, OnFTPLogin, or whenever you like. It checks, if sitebot is running and starts it, if not.

I quote from the Knowledge Base:

A: Create yourself a batch file that will check if the windrop is running and if not, will restart it.

Execute it each time someone logs in to make sure the bot is checked often. Do that by adding this OnFtpLogin event in your ioFTPD.ini:
[Events]
OnFtpLogIn = EXEC D:\ioFTPD\windrop\HideRun.exe D:\ioFTPD\windrop\botchk.bat

You can optionnaly add a SITE command to do the same:
[FTP_Custom_Commands]
SITEBOT = EXEC D:\ioFTPD\windrop\HideRun.exe D:\ioFTPD\windrop\botchk.bat

You need TaskIsRunning.exe (available in ioFTPD Forums) in your windrop directory. Also, HideRun.exe (available here) allows the script to run without hanging the current FTP session. Alternatives to both exe can be used (pslist.exe, hidden32.exe, hidewnd.exe, etc.) if you can modify the .bat file to fit your favorite tool.

For eggdrop.exe to be able to start, you need to add those lines in your ioFTPD\etc\ioftpd.env file (and restart ioFTPD):
SYSTEMROOT=%[environment(SYSTEMROOT)]
WINDIR=%[environment(WINDIR)]

If you have problems starting the sitebot from ioFTPD, but it runs fine from a command prompt, remove all references to hiderun.exe from .bat and ioFTPD lines related to your sitebot and try again. You should see an error appear when u try to execute SITE SITEBOT

Here's an example botchk.bat file:
@echo off
D:
cd "D:\ioFTPD\windrop"

rem Change this to the name of your bot's config:
set botscript=eggdrop.conf

rem Change this to the handle/botnet-nick of your bot:
set botname=SomeBot

rem Change this to the name of your bot's userfile:
set userfile=Bot.user

rem You probably don't need to change anything below here....
if exist .share* del .share*
if exist *.stackdump del *.stackdump
if exist *.tmp del *.tmp
if not exist %botscript% echo Config file (%botscript%) missing.
if not exist %botscript% goto cantload
if exist %userfile% goto checkrunning
if exist %userfile%~new ren %userfile%~new %userfile%
if exist %userfile% echo Missing userfile... Using the last saved one..
if exist %userfile% goto checkrunning
if exist %userfile%~bak ren %userfile%~bak %userfile%
if exist %userfile% echo Missing userfile... Using the last backed up one..
if exist %userfile% goto checkrunning
if not exist %userfile% echo Userfile missing. No backup/last saved userfile either. =/
goto cantload

:checkrunning
taskisrunning eggdrop.exe
if errorlevel 2 goto end
if errorlevel 1 goto end
if errorlevel 0 goto restart
goto end

:restart
set result=
if not exist eggdrop.exe echo eggdrop.exe not found!
if not exist eggdrop.exe goto cantload
echo Restarting Eggdrop...
HideRun.exe eggdrop.exe -nt
if errorlevel 8 echo Possibly Missing .dll File(s)? (tcl8*.dll, cygwin1.dll)
if errorlevel 8 goto cantload
goto success

:cantload
echo Could not reload the bot. =(
goto end

:success
echo Successfully Started Eggdrop (%botname% - %botscript%).

:end

Have fun with it

LordM