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: Fri, 14 Nov 2003 16:36:12 -0500

CVSROOT:        /cvsroot/tcldrop
Module name:    tcldrop
Branch:         
Changes by:     Philip Moore <address@hidden>   03/11/14 16:36:12

Modified files:
        modules        : dcc.tcl 

Log message:
        Added the .quit dcc command.

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

Patches:
Index: tcldrop/modules/dcc.tcl
diff -u tcldrop/modules/dcc.tcl:1.15 tcldrop/modules/dcc.tcl:1.16
--- tcldrop/modules/dcc.tcl:1.15        Fri Nov 14 10:58:47 2003
+++ tcldrop/modules/dcc.tcl     Fri Nov 14 16:36:11 2003
@@ -1,6 +1,6 @@
 # dcc.tcl --
 #
-# $Id: dcc.tcl,v 1.15 2003/11/14 15:58:47 fireegl Exp $
+# $Id: dcc.tcl,v 1.16 2003/11/14 21:36:11 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.15 2003/11/14 15:58:47 fireegl Exp $}
+       variable rcsid {$Id: dcc.tcl,v 1.16 2003/11/14 21:36:11 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
@@ -577,6 +577,20 @@
        putdcc $idx "There's no help here!  FixMe!"
 }
 
+bind dcc - quit ::tcldrop::dcc::QUIT
+proc ::tcldrop::dcc::QUIT {handle idx text} {
+       # FixMe: console users should be allowed to re-login when they type 
.quit
+       if {[idx2sock $idx] == {stdout}} {
+               putdcc $idx {Sorry, console users can't .quit   (FixMe!)}
+       } else {
+               putdcc $idx {Bu-Bye!}
+               # FixMe: This should be $nick $uhost instead:
+               putlog "[format $::tcldrop::lang(0xe16) $handle $idx]"
+               killdcc $idx $text
+       }
+}
+
+
 bind time - {* * * * *} ::tcldrop::dcc::AutoLinkBots
 proc ::tcldrop::dcc::AutoLinkBots {minute hour day month year} {
        foreach b [userlist b] {
@@ -585,6 +599,10 @@
                        link $b
                }
        }
+}
+
+proc ::tcldrop::dcc::killdcc {idx {reason {}}} {
+       killidx $idx
 }
 
 # FixMe: This is wrong, except for directly connected bots:




reply via email to

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