tcldrop-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tcldrop/CVS] tcldrop/modules dcc.tcl


From: Philip Moore
Subject: [Tcldrop/CVS] tcldrop/modules dcc.tcl
Date: Tue, 18 Nov 2003 23:06:39 -0500

CVSROOT:        /cvsroot/tcldrop
Module name:    tcldrop
Branch:         
Changes by:     Philip Moore <address@hidden>   03/11/18 23:06:39

Modified files:
        modules        : dcc.tcl 

Log message:
        Added the .dccstat dcc command..  It's purdy. =)

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/tcldrop/tcldrop/modules/dcc.tcl.diff?tr1=1.21&tr2=1.22&r1=text&r2=text

Patches:
Index: tcldrop/modules/dcc.tcl
diff -u tcldrop/modules/dcc.tcl:1.21 tcldrop/modules/dcc.tcl:1.22
--- tcldrop/modules/dcc.tcl:1.21        Tue Nov 18 20:45:44 2003
+++ tcldrop/modules/dcc.tcl     Tue Nov 18 23:06:39 2003
@@ -1,6 +1,6 @@
 # dcc.tcl --
 #
-# $Id: dcc.tcl,v 1.21 2003/11/19 01:45:44 fireegl Exp $
+# $Id: dcc.tcl,v 1.22 2003/11/19 04:06:39 fireegl Exp $
 #
 # Copyright (C) 2003 FireEgl (Philip Moore) <address@hidden>
 #
@@ -32,7 +32,7 @@
        # Provide the users module:
        variable version {0.2}
        package provide tcldrop::dcc $version
-       variable rcsid {$Id: dcc.tcl,v 1.21 2003/11/19 01:45:44 fireegl Exp $}
+       variable rcsid {$Id: dcc.tcl,v 1.22 2003/11/19 04:06:39 fireegl Exp $}
        #checkmodule console
        # Export all the commands that should be available to 3rd-party 
scripters:
        namespace export dcclist listen putdcc getchan setchan console echo 
strip idx2hand hand2idx link bots islinked putbot putallbots sock2idx idx2sock
@@ -788,6 +788,18 @@
        unloadmodule $text
        putcmdlog "#$handle# unloadmod $text"
        putdcc $idx "Module unloaded: $text"
+}
+
+bind dcc n dccstat ::tcldrop::dcc::DCCSTAT
+proc ::tcldrop::dcc::DCCSTAT {handle idx text} {
+       putcmdlog "#$handle# dccstat $text"
+       putdcc $idx {IDX SOCKET PORT  HANDLE    HOSTNAME or IP                  
 TYPE}
+       putdcc $idx {--- ------ ----- --------- 
-------------------------------- ----}
+       foreach {a d} [::tcldrop::idx::Info] {
+               array unset idxinfo
+               array set idxinfo $d
+               putdcc $idx "[format {%-3.3s %-6.6s %-5.5s %-9.9s %-32.32s 
%-4.4s} $a $idxinfo(sock) $idxinfo(port) $idxinfo(handle) $idxinfo(hostname) 
$idxinfo(other)]"
+       }
 }
 
 bind time - {* * * * *} ::tcldrop::dcc::AutoLinkBots




reply via email to

[Prev in Thread] Current Thread [Next in Thread]