okay here is the fun part. I managed to get the sub commands working thanks to sleeping and ppslim, and a few others. I'm haveing trouble with this lovely statment.. I'm pretty much pulling this out of thin air, and it doesn't work =/
proc net_lu {nick uhost hand chan arg} {
global lu
if {$chan != $net(chan)} {return 0}
if {[lindex $arg 0] == "local" || [lindex $arg 0] == ""} {
set net(status) "l"
set net(reply) "local "
putquick "LUSERS"
return 0
} else {
set net(status) "u"
set net(reply) "[lindex $arg 0] "
putquick "USERS [lindex $arg 0]"
putquick "STATS $net(cmd) [lindex $arg 0]"
putquick "TIME [lindex $arg 0]"
return 0
}
}
I'm woundering if i should at least add something else to this.. I know I'm missing something. I have to be missing some other sets somewhere but its just not jumping out at me for some odd reason. Getting this to print the output with a "command" has me stumped =/[/code]
SmokeyOne wrote:This is what I added, i think this will get it, but i do need a little help.
[snip]
any idea's ?
SmokeyOne, I'm not 100 % sure what you are after, but from the snippets you posted it seems you want to send a command like "LUSERS" to the server, then wait for the server to send back the answer and post the results in a channel.
If this is the case, you will need to dig into rfc1459 to see what RAW numerics the server sends back upon such a request. Maybe there are also scripts available at www.egghelp.org/tcl.htm which can serve as an example.
Additionally, I've uploaded a sample script of sending a LUSERS request to the server and presenting the result back in the channel.