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.
Old posts that have not been replied to for several years.
f
floris
Post
by floris » Tue Mar 09, 2004 6:09 am
Hi there
I'd like to expand .netshell to include the dcc listen port.
I have set a listen XXX all,
and it would be great if we can get
.netshell
from the hub, to display
[11:07] <system> <botnick> is on <shellhost> - Linux 2.4.25-grsec - 11:07am up 419 days, 11:24, 1 users, load average: 0.02, 0.27, 0.28 listen port: 12345
Does someone know how to do this? That would be really great.
slennox
Owner
Posts: 593 Joined: Sat Sep 22, 2001 8:00 pm
Contact:
Post
by slennox » Thu Mar 11, 2004 10:02 am
Here's one way:
.nettcl set conns "" ; foreach conn [dcclist] { if {[string equal [lindex [lindex $conn 4] 0] "lstn"]} {lappend conns [list [lindex [lindex $conn 4] 1] [lindex $conn 1]]} } ; return [join $conns ", "]
I think what netshell returns is crowded enough as it is, but a seperate ".netconn" command incorporating the above would be useful. I don't have time to do it at the moment but basically all that's required is to take an existing standard set of three procs used for net commands (e.g. netshell), copy and rename and modify it with the above, then add the standard hooks.
I'll write a component for since I think it would be a useful example showing scripters how they can add their own commands. Remind me if I haven't done so in the next week or two (lots going on at the moment so I may forget).
f
floris
Post
by floris » Thu Mar 11, 2004 10:20 am
Hi there, and thank you for the quick reply.
Yeah, it is quite crowded - but I considered that command the best to display it. I wouldn't even know how to write my own commands, so I just tried to expand on what was already there.
I would really appriciate it if you had the time to work on this. There is no rush at all and hopefully I also learn from what you posted above. I will at least try my best.
[15:23] <floris> .nettcl
[15:23] <System> [06:23] #floris# nettcl
[15:23] <System> Usage: nettcl <command>
[15:23] <floris> .nettcl set conns "" ; foreach conn [dcclist] { if {[string equal [lindex [lindex $conn 4] 0] "lstn"]} {lappend conns [list [lindex [lindex $conn 4] 1] [lindex $conn 1]]} } ; return [join $conns ", "]
[15:23] <System> [06:23] #floris# nettcl set conns "" ; foreach conn [dcclist] { if {[string equal [lindex [lindex $conn 4] 0] "lstn"]} {lappend conns [list [lindex [lindex $conn 4] 1] [lindex $conn 1]]} } ; return [join $conns ", "]
[15:23] <System> Executing command 'set conns "" ; foreach conn [dcclist] { if {[string equal [lindex [lindex $conn 4] 0] "lstn"]} {lappend conns [list [lindex [lindex $conn 4] 1] [lindex $conn 1]]} } ; return [join $conns ", "]' on netbots.
[15:23] <System> Tcl: 1550 (telnet)
Yay, so far so good. (btw; System is the hub to which 20+ leafs are connected to)
By the way .netupdate is a really really great feature. Your netscript is amazing.
I just done a .netupdate and let that do its thing.
After which I run the command again and weee: worked!
[15:29] <System> Tcl: 1550 (telnet)
[15:29] <System> Register: Tcl: 12661 (telnet)
[15:29] <System> wankah: Tcl: 11770 (telnet)
[15:29] <System> wiggle: Tcl: 16609 (telnet)
[15:29] <System> Zenith: Tcl: 1880 (telnet)
[15:29] <System> vB3Gold: Tcl: 1990 (telnet)
[15:29] <System> OMGWTFHI: Tcl: 1660 (telnet)
[15:29] <System> bouncy: Tcl: 16460 (telnet)
[15:29] <System> federal: Tcl: 11660 (telnet)
[15:29] <System> bastard: Tcl: 16650 (telnet)
[15:29] <System> sexy: Tcl: 11770 (telnet)
[15:29] <System> Longhorn: Tcl: 37773 (telnet)
[15:29] <System> RTFM: Tcl: 57775 (telnet)
[15:29] <System> Server: Tcl: 17771 (telnet)
[15:29] <System> UNIX: Tcl: 27772 (telnet)
[15:29] <System> Piracy: Tcl: 47774 (telnet)
[15:29] <System> forums: Tcl: 12660 (telnet)
[15:29] <System> NewPost: Tcl: 15660 (telnet)
[15:29] <System> Justice: Tcl: 13660 (telnet)
[15:29] <System> NewThread: Tcl: 14660 (telnet)
[15:29] <System> mainframe: Tcl: 1660 (telnet)
[15:29] <System> ProfeX: Tcl: 1770 (telnet)
[15:29] <System> wip3out: Tcl: 1660 (telnet)