This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

is it possible to show window Uptime on channel ??

Old posts that have not been replied to for several years.
Locked
t
tbog_yang
Voice
Posts: 23
Joined: Fri Aug 22, 2003 1:36 am

is it possible to show window Uptime on channel ??

Post by tbog_yang »

is there any script that would do that ??
I know in MIRC there is Moo.dll Module that show window machine uptime.

thx
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

There is an uptime tcl in the egghelp tcl archive. :wink:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
t
tbog_yang
Voice
Posts: 23
Joined: Fri Aug 22, 2003 1:36 am

Post by tbog_yang »

but isnt that for eggdrop up time ??

The one i wanted is Windows Machine Uptime :(
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I do beleive there is a script for windows uptime somewhere on the forum, which includes a link to software required to get the uptime information.

Windows doesn't provide uptime in the same way *nix does, so a third-part program is needed.

However, due to inherant problems with windrop, Tcl and executing other programs, you may find it doesn't work./
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

here you can download uptime.exe from my ftp and use the script below, put uptime.exe in your home dir

Code: Select all

bind PUB - !uptime uptime:pub

proc uptime:pub {nick uhost hand chan arg} { 
  global botnick
  foreach line [split [exec uptime.exe] \n] {
    putquick "NOTICE $nick :$botnick [join [lrange [split $line " "] 1 end]]" 
  }
}
well its not entirely true cause it will show the uptime of the computer so .. but so will the uptime script for unix cause if it wasn't you could use the same tcl commands and they probaly use exec uptime so .. basicly its the same
XplaiN but think of me as stupid
t
tbog_yang
Voice
Posts: 23
Joined: Fri Aug 22, 2003 1:36 am

Post by tbog_yang »

thx you so much Ofloo
i will try it now :D


err sorry but it didnt work out :(
I got this error while do !uptime command:
[09:48] Tcl error [uptime:pub]: couldn't duplicate input handle: bad file number

i have put the uptime.exe in home dir (C:\windows)

Any idea ??

thanks
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

That is exactly the error I talked of in my message. There is currently no way around it.
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Sorry this is a bit off topic but do you know if they are trying to fix that problem ppslim? cuz its a bit annoying :wink:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

It is suspected to relate to the way eggdrop kills control of STDOUT and STDERR before entering the main loop.

As the development team are not activly developing for windows, they are not looking for a solution for this.

Eggdrop works on windows as designed. There is no need for external interfacing in the core, as such, they havn't changed it.

You may like to comment out lines 885 to 897 in src/main.c. You can then follow the instructions on http://windrop.sf.net/ for compilation help.
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Thx ppslim i'll give it a shot. :wink:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
s
spyda
Halfop
Posts: 64
Joined: Mon Aug 12, 2002 2:22 am
Location: Australia

status.tcl

Post by spyda »

I released a uptime and statistics script in the egghelp tcl's

status.TCL v1.0.1

or

Code: Select all

unix uptime -  catch {exec uptime} boxuptime 
windows uptime - [duration [expr [clock clicks] / 1000]]
Hope that helps

------------
ThePope
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

That is exactly the error I talked of in my message. There is currently no way around it.
yes there is i do it all the time :p

euhm load windrop like this sorry for got eggdrop -n config file then it will work ;) let me know if it does or doesn't hehe and put the uptime.exe in windrop root

note: this will run eggdrop in to forground you can put it to background by installing it as a service, or use a /b switch in dos not sur on how to use that never done that before but i know its possible (/b = background)

for service if your on w2k use firedaemon 0.9c or something
if on xp => use srunner cause firedaemon won't work or you should use the latest one witch isn't free if i remember well if you want srunner or firedaemon let me know i got em both
XplaiN but think of me as stupid
Locked