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: Wed, 19 Nov 2003 00:19:26 -0500

CVSROOT:        /cvsroot/tcldrop
Module name:    tcldrop
Branch:         
Changes by:     Philip Moore <address@hidden>   03/11/19 00:19:26

Modified files:
        modules        : dcc.tcl 

Log message:
        Added .modules and .status dcc commands.

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

Patches:
Index: tcldrop/modules/dcc.tcl
diff -u tcldrop/modules/dcc.tcl:1.22 tcldrop/modules/dcc.tcl:1.23
--- tcldrop/modules/dcc.tcl:1.22        Tue Nov 18 23:06:39 2003
+++ tcldrop/modules/dcc.tcl     Wed Nov 19 00:19:26 2003
@@ -1,6 +1,6 @@
 # dcc.tcl --
 #
-# $Id: dcc.tcl,v 1.22 2003/11/19 04:06:39 fireegl Exp $
+# $Id: dcc.tcl,v 1.23 2003/11/19 05:19:26 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.22 2003/11/19 04:06:39 fireegl Exp $}
+       variable rcsid {$Id: dcc.tcl,v 1.23 2003/11/19 05:19:26 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
@@ -801,6 +801,27 @@
                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 dcc n modules ::tcldrop::dcc::MODULES
+proc ::tcldrop::dcc::MODULES {handle idx text} {
+       putcmdlog "#$handle# modules $text"
+       putdcc $idx {Modules loaded:}
+       foreach m [modules] { putdcc $idx "  Module: [lindex $m 0] (v[lindex $m 
1])" }
+       putdcc $idx {End of modules list.}
+}
+
+bind dcc n status ::tcldrop::dcc::STATUS
+bind dcc n statu ::tcldrop::dcc::STATUS
+bind dcc n stat ::tcldrop::dcc::STATUS
+proc ::tcldrop::dcc::STATUS {handle idx text} {
+       putcmdlog "#$handle# status $text"
+       global botnet-nick ver owner config tcl_platform
+       putdcc $idx "I am ${botnet-nick}, running Tcldrop v$ver."
+       putdcc $idx "Admin: $owner"
+       putdcc $idx "Config file: $config"
+       putdcc $idx "OS: $tcl_platform(os) $tcl_platform(osVersion)"
+}
+
 
 bind time - {* * * * *} ::tcldrop::dcc::AutoLinkBots
 proc ::tcldrop::dcc::AutoLinkBots {minute hour day month year} {




reply via email to

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