[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tcldrop/CVS] tcldrop/modules core.tcl channels/channels.tcl ...
From: |
Philip Moore |
Subject: |
[Tcldrop/CVS] tcldrop/modules core.tcl channels/channels.tcl ... |
Date: |
Mon, 01 Dec 2003 19:57:52 -0500 |
CVSROOT: /cvsroot/tcldrop
Module name: tcldrop
Branch:
Changes by: Philip Moore <address@hidden> 03/12/01 19:57:52
Modified files:
modules : core.tcl
modules/channels: channels.tcl
modules/users : users.tcl
Log message:
more tweaks.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/tcldrop/tcldrop/modules/core.tcl.diff?tr1=1.28&tr2=1.29&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/tcldrop/tcldrop/modules/channels/channels.tcl.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/tcldrop/tcldrop/modules/users/users.tcl.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
Patches:
Index: tcldrop/modules/channels/channels.tcl
diff -u tcldrop/modules/channels/channels.tcl:1.11
tcldrop/modules/channels/channels.tcl:1.12
--- tcldrop/modules/channels/channels.tcl:1.11 Mon Dec 1 16:19:54 2003
+++ tcldrop/modules/channels/channels.tcl Mon Dec 1 19:57:51 2003
@@ -1,6 +1,6 @@
# channels.tcl --
#
-# $Id: channels.tcl,v 1.11 2003/12/01 21:19:54 fireegl Exp $
+# $Id: channels.tcl,v 1.12 2003/12/02 00:57:51 fireegl Exp $
#
# Copyright (C) 2003 FireEgl (Philip Moore) <address@hidden>
#
@@ -28,7 +28,7 @@
namespace eval ::tcldrop::channels {
# Provide the channels module:
variable version {0.8}
- variable rcsid {$Id: channels.tcl,v 1.11 2003/12/01 21:19:54 fireegl
Exp $}
+ variable rcsid {$Id: channels.tcl,v 1.12 2003/12/02 00:57:51 fireegl
Exp $}
package provide tcldrop::channels $version
# Initialize variables:
variable Channels
@@ -380,9 +380,7 @@
# After Tcldrop loads, we (re)load the chanfile:
bind evnt - loaded ::tcldrop::channels::Loaded -priority 0
-proc ::tcldrop::channels::Loaded {type} {
-putlog "Loading CHANELL!!!!"
-loadchannels }
+proc ::tcldrop::channels::Loaded {type} { loadchannels }
bind evnt - save ::tcldrop::channels::SaveChannels -priority 0
proc ::tcldrop::channels::SaveChannels {type} { savechannels }
Index: tcldrop/modules/core.tcl
diff -u tcldrop/modules/core.tcl:1.28 tcldrop/modules/core.tcl:1.29
--- tcldrop/modules/core.tcl:1.28 Mon Dec 1 18:23:51 2003
+++ tcldrop/modules/core.tcl Mon Dec 1 19:57:51 2003
@@ -1,6 +1,6 @@
# core.tcl --
#
-# $Id: core.tcl,v 1.28 2003/12/01 23:23:51 fireegl Exp $
+# $Id: core.tcl,v 1.29 2003/12/02 00:57:51 fireegl Exp $
#
# Copyright (C) 2003 FireEgl (Philip Moore) <address@hidden>
#
@@ -47,7 +47,7 @@
# Provide the users module:
variable version {0.4}
package provide tcldrop::core $version
- variable rcsid {$Id: core.tcl,v 1.28 2003/12/01 23:23:51 fireegl Exp $}
+ variable rcsid {$Id: core.tcl,v 1.29 2003/12/02 00:57:51 fireegl Exp $}
# Initialize variables:
variable Binds
variable Timers
@@ -287,7 +287,7 @@
proc ::tcldrop::bind {type flags mask proc args} {
array set options [list -priority 50 type $type flags $flags mask $mask
proc $proc count 0]
catch { array set options $args }
- # FixMe: This should check a list of registered bind types before
accepting the bind.
+ # Note/FixMe: Eggdrop checks to make sure $type is a valid bind type
before accepting it, but currently I don't see why that's such a great idea.
# Note: + or * means "anybody". And - means "nobody".
switch -- $flags {
{-} - {+} - {*} - {-|-} - {*|*} { array set options [list flags
{+|+}] }
@@ -298,8 +298,8 @@
set mask
}
-# Setup a bind that logs to the "screen":
-# This bind will be unbind'ed later..if and when we no longer have a screen to
log to.
+# Setup a log bind that sends logs to the "screen":
+# Note: This bind will be unbind'ed later..if/when we no longer have a screen
to log to.
::tcldrop::bind log $console * ::tcldrop::Stdout -priority 0
proc ::tcldrop::unbind {type flags mask proc {priority {*}}} {
@@ -317,6 +317,7 @@
}
if {[llength $matchbinds] == 0} {
# If none were found by type, we search by mask:
+ # FixMe: This is too slow!
foreach b [lsort -dictionary [array names Binds]] {
array set bind $Binds($b)
if {[string equal -nocase $typemask $bind(mask)]} {
@@ -710,12 +711,19 @@
die "failed to start."
} else {
callevent init
+ # We wanna display how many channels and users there are (like Eggdrop):
+ if {[catch { ::tcldrop::Stdout o - "=== ${::botnet-nick}:
[countchannels] channels, [countusers] users." }]} { ::tcldrop::Stdout o - "===
${::botnet-nick}: [countusers] users." }
if {[info exists background-mode] && ${background-mode}} {
# Disable showing logs to the "screen"...
# Because we're supposed to be running in the background.
unbind log - * ::tcldrop::Stdout
+ # Note: Eggdrop doesn't close these, but then it may not need
to.
+ # I think they should be closed though, since there is no
"screen" anymore.
+ catch {
+ close stderr
+ close stdout
+ close stdin
+ }
}
- # We wanna display how many channels and users there are (like Eggdrop):
- if {[catch { ::tcldrop::Stdout o - "=== ${::botnet-nick}:
[countchannels] channels, [countusers] users." }]} { ::tcldrop::Stdout o - "===
${::botnet-nick}: [countusers] users." }
}
Index: tcldrop/modules/users/users.tcl
diff -u tcldrop/modules/users/users.tcl:1.19
tcldrop/modules/users/users.tcl:1.20
--- tcldrop/modules/users/users.tcl:1.19 Mon Dec 1 18:25:47 2003
+++ tcldrop/modules/users/users.tcl Mon Dec 1 19:57:51 2003
@@ -1,6 +1,6 @@
# users.tcl --
#
-# $Id: users.tcl,v 1.19 2003/12/01 23:25:47 fireegl Exp $
+# $Id: users.tcl,v 1.20 2003/12/02 00:57:51 fireegl Exp $
#
# Copyright (C) 2003 FireEgl (Philip Moore) <address@hidden>
#
@@ -51,7 +51,7 @@
namespace eval ::tcldrop::users {
variable version {0.7}
- variable rcsid {$Id: users.tcl,v 1.19 2003/12/01 23:25:47 fireegl Exp $}
+ variable rcsid {$Id: users.tcl,v 1.20 2003/12/02 00:57:51 fireegl Exp $}
# Provide the users module:
package provide tcldrop::users $version
# Export all the commands that should be available to 3rd-party
scripters:
@@ -522,15 +522,15 @@
# The ban, ignore, exempt, and invite related stuff should be in other modules.
# Load all of the database modules..
-set dbpriority 0
+set dbpriority 1
foreach n $userdbs {
loadmodule "users::$n"
- incr dbpriority
foreach c {adduser countusers validuser finduser matchattr
matchchanattr userlist passwdok getuser setuser getinfo getchaninfo
getting-users chhandle chattr botattr adduser addbot deluser delhost addchanrec
delchanrec encpass save backup reload chpass setlaston} {
if {[info commands "::tcldrop::users::${n}::$c"] != {}} {
bind users {+|+} $c "::tcldrop::users::${n}::$c"
-priority $dbpriority
}
}
+ incr dbpriority
}
unset dbpriority n
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Tcldrop/CVS] tcldrop/modules core.tcl channels/channels.tcl ...,
Philip Moore <=