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.
Support & discussion of released scripts, and announcements of new releases.
arejay
Voice
Posts: 7 Joined: Tue Apr 22, 2008 9:18 am
Post
by arejay » Thu May 01, 2008 8:35 am
Just wondering if anyone else is running the sysinfo.tcl script from
http://www.bluedevil.ca/eggdrop/sysinfo1.11.tgz
i receive the following error in my console
Code: Select all
[08:28] Tcl error [pub:sys_sysinfo]: syntax error in expression " exec ./scripts/sysinfo281.06.pl ": variable references require preceding $
this is the offending line in the script
proc sys_dosysinfo { } {
if { exec ./scripts/sysinfo281.06.pl } { set sysinfo "Perl script is not executable or doesn't exist." }
return "$sysinfo"
}
any help would be great, thank's guys
Last edited by
arejay on Tue May 06, 2008 7:36 am, edited 1 time in total.
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Thu May 01, 2008 9:08 am
Not using the script, but I would assume that piece of code should read like this:
Code: Select all
proc sys_dosysinfo { } {
if {[catch {exec ./scripts/sysinfo281.06.pl} sysinfo]} {
set sysinfo "Perl script is not executable or doesn't exist."
}
return "$sysinfo"
}
NML_375
arejay
Voice
Posts: 7 Joined: Tue Apr 22, 2008 9:18 am
Post
by arejay » Sun May 04, 2008 1:49 am
no longer errors, but does not produce any output to the channel,
when i run the perl script in my shell, it outputs the data. just wont do it on IRC
(01:43 AM):(rj@cube)~/bots/infowar2$ ./scripts/sysinfo281.06.pl
Hostname: cube - OS: FreeBSD 7.0-RELEASE/i386 - CPU: 2 x AMD Athlon MP 2800+ (2133.42 MHz) - Processes: 13 - Uptime: 4d 14h 39m - Users: 3 - Load Average: 3.12 - Memory Usage: 1303.89MB/2546.90MB (51.20%) - Disk Usage: 26.52GB/73.59GB (36.03%)
when i do !sysinfo
i see
01:44] <<arejay>> !*! !sysinfo
I've been unable to find the authors e-mail or contact info.
Anyone know of any other sysinfo scripts.
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Sun May 04, 2008 5:01 am
arejay wrote: no longer errors, but does not produce any output to the channel,
when i run the perl script in my shell, it outputs the data. just wont do it on IRC
(01:43 AM):(rj@cube)~/bots/infowar2$ ./scripts/sysinfo281.06.pl
Hostname: cube - OS: FreeBSD 7.0-RELEASE/i386 - CPU: 2 x AMD Athlon MP 2800+ (2133.42 MHz) - Processes: 13 - Uptime: 4d 14h 39m - Users: 3 - Load Average: 3.12 - Memory Usage: 1303.89MB/2546.90MB (51.20%) - Disk Usage: 26.52GB/73.59GB (36.03%)
when i do !sysinfo
i see
01:44] <<arejay>> !*! !sysinfo
I've been unable to find the authors e-mail or contact info.
Anyone know of any other sysinfo scripts.
I do see contact info in script
# If you have any suggestions, questions or you want to report
# bugs, please feel free to send me an email to
burn@bluedevil.ca
Theres one at tclscripts.com it works but only issue is ram/memory shows as ????/????, has started since I went to BSD 7
speechles
Revered One
Posts: 1398 Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)
Post
by speechles » Sun May 04, 2008 4:00 pm
Code: Select all
proc sys_dosysinfo { } {
if {[catch {set sysinfo [exec ./scripts/sysinfo281.06.pl]} error]} {
set sysinfo "Perl script is not executable or doesn't exist."
}
return "$sysinfo"
}
burn
Voice
Posts: 1 Joined: Sun May 04, 2008 8:19 pm
Post
by burn » Sun May 04, 2008 8:25 pm
Its is not outputting anything to IRC because the perl script is crapping out at some point, due to OS security. Run it through bash instead.
sysinfo.sh
Code: Select all
#!/bin/bash
<full path>/sysinfo281.06.pl 2>/dev/null
Change tcl script to use the .sh script instead. If someone knows how to 2>/dev/null in TCL, please let me know.
I have plans to incorporate this into the sysinfo at some point.
burn
arejay
Voice
Posts: 7 Joined: Tue Apr 22, 2008 9:18 am
Post
by arejay » Sun May 04, 2008 10:10 pm
ok.
did the following now.
#!/usr/local/bin/bash
/home/rj/bots/infowar2/scripts/sysinfo281.06.pl 2>/dev/null
saved as sysinfo.sh and chmodded +x
(10:02 PM):(rj@cube)~/bots/infowar2/scripts$ ./sysinfo.sh
Hostname: cube - OS: FreeBSD 7.0-RELEASE/i386 - CPU: 2 x AMD Athlon MP 2800+ (2133.42 MHz) - Processes: 13 - Uptime: 5d 10h 58m - Users: 3 - Load Average: 1.19 - Memory Usage: 1317.20MB/2546.90MB (51.72%) - Disk Usage: 26.51GB/73.59GB (36.03%)
works fine in the shell.
doing !sysinfo in the channel
shows this in the console still
[22:06] <<arejay>> !*! !sysinfo
and no output to the channel.
btw: i started fresh and downloaded a new copy of your sysinfo 1.11 script and only changed the line for the .pl to use my sysinfo.sh
TCL_no_TK
Owner
Posts: 509 Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire
Post
by TCL_no_TK » Mon May 05, 2008 12:28 am
arejay wrote: ... [22:06] <<arejay>> !*! !sysinfo ...
The display of "!*!" is usually an indication that the person using this command dosen't have an handle, have you checked that it requires the person to have a serton flag, that they have to be a valid user before it will display the output?
arejay
Voice
Posts: 7 Joined: Tue Apr 22, 2008 9:18 am
Post
by arejay » Mon May 05, 2008 6:31 am
it seems it didnt take the my .chattr handle +S and my host was off. all is well now.
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Mon May 05, 2008 9:05 am
burn wrote: ... If someone knows how to 2>/dev/null in TCL, please let me know...
Would be something like this:
Code: Select all
set output [exec "command" "arg1" "arg" ... "argn" 2> /dev/null]
arg1 thru argn are optional and passed to the command as separate parameters, quotes are optional if there are no whitespaces in any of the argument but always recommended. "2>" and "<fileName>" (/dev/null) must be two separate arguments (that is, use 2> /dev/null not 2>/dev/null)
See the exec(n) manpage for further information on possible redirections with exec.
NML_375