tcldrop-commits
[Top][All Lists]
Advanced

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

[Tcldrop/CVS] tcldrop/modules/irc irc.tcl


From: Philip Moore
Subject: [Tcldrop/CVS] tcldrop/modules/irc irc.tcl
Date: Mon, 01 Dec 2003 01:49:32 -0500

CVSROOT:        /cvsroot/tcldrop
Module name:    tcldrop
Branch:         
Changes by:     Philip Moore <address@hidden>   03/12/01 01:49:31

Modified files:
        modules/irc    : irc.tcl 

Log message:
        Support for "need" binds is complete.  \o/

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

Patches:
Index: tcldrop/modules/irc/irc.tcl
diff -u tcldrop/modules/irc/irc.tcl:1.31 tcldrop/modules/irc/irc.tcl:1.32
--- tcldrop/modules/irc/irc.tcl:1.31    Sun Nov 30 20:59:52 2003
+++ tcldrop/modules/irc/irc.tcl Mon Dec  1 01:49:31 2003
@@ -4,7 +4,7 @@
 #              * All IRC related commands.
 #      Depends: core, server, channels.
 #
-# $Id: irc.tcl,v 1.31 2003/12/01 01:59:52 fireegl Exp $
+# $Id: irc.tcl,v 1.32 2003/12/01 06:49:31 fireegl Exp $
 #
 # Copyright (C) 2003 Tcldrop Development Team <Tcldrop-Devel>
 #
@@ -30,7 +30,7 @@
 namespace eval ::tcldrop::irc {
        # Provide the irc module:
        variable version {0.6}
-       variable rcsid {$Id: irc.tcl,v 1.31 2003/12/01 01:59:52 fireegl Exp $}
+       variable rcsid {$Id: irc.tcl,v 1.32 2003/12/01 06:49:31 fireegl Exp $}
        package provide tcldrop::irc $version
        # Initialize variables:
        # Nicks stores the non-channel specific info for each nick:
@@ -92,6 +92,38 @@
 #       global var for deciding how many modes-per-line to use (for example).
 #
 
+# Currently supported RAW's:
+# MODE
+# 311
+# JOIN
+# 367
+# 324
+# 331
+# 332
+# 333
+# TOPIC
+# NICK
+# QUIT
+# KICK
+# 433
+# 352
+# 471
+# 473
+# 474
+# 475
+# PART
+# NOTICE
+# PRIVMSG
+
+# Less important RAW's to add:
+# irc.nac.net: 319 FireEgl Harley @#pgpnet @#betas @#aeternamtech
+# irc.nac.net: 312 FireEgl Harley irc.nac.net Winning popularity contests 
since 2003
+# irc.nac.net: 317 FireEgl Harley 4 1069595760 seconds idle, signon time
+# irc.inter.net.il: 353 FireEgl = #Tcldrop @Singles @SafeTcl +horcy +vipy 
@Slug @FireEgl @I-C-U-P @llength @lindex @lset @Mel0dy @lreplace @Flounder 
@Mmmmmmmmm @Atlantica @lsearch
+# irc.inter.net.il: 353 FireEgl @ #pgpnet @Jax @Parker @Delta` @Dispatch @Lilo 
@Whore @DJ @Harley @Robin @Skyway @Slut` @Batman FireEgl @pgpbot @Deryl @ardya 
@pgpkeys
+# irc.inter.net.il: 329 FireEgl #pgpnet 1064713818
+# irc.inter.net.il: 401 FireEgl Deryl_ No such nick/channel
+
 proc ::tcldrop::irc::resetchan {channel} {
        putquick "MODE $channel +b"
        putquick "MODE $channel"
@@ -186,22 +218,40 @@
 # Note: Eggdrop supports the following need types: op, unban, invite, limit, 
and key.
 proc ::tcldrop::irc::callneed {channel {type {join}}} {
        foreach b [binds need] {
-               foreach {type flags mask count proc} $b {}
+               foreach {bindtype flags mask count proc} $b {}
                if {[string match -nocase $mask "$channel $type"]} {
-                       ::tcldrop::countbind $type $mask $proc
                        if {[catch { $proc $channel $type } err]} {
                                putlog "Error in $proc: $err"
                                puterrlog "$::errorInfo"
                        }
+                       ::tcldrop::countbind $bindtype $mask $proc
                }
        }
        if {[set script [channel get $channel "need-$type"]] != {}} {
+               # FixMe: This may require an uplevel #0 to eval $script:
                if {[catch { eval $script } err]} {
                        putlog "Error in $script: $err"
                        puterrlog "$::errorInfo"
                }
        }
 }
+
+# irc.choopa.net: 471 Fire_Egl #Tcldrop Cannot join channel (+l)
+bind raw - 471 ::tcldrop::irc::471 -priority 100
+proc ::tcldrop::irc::471 {from key arg} { callneed [lindex [split $arg] 1] 
limit }
+
+# irc.choopa.net: 473 Fire_Egl #Tcldrop Cannot join channel (+i)
+bind raw - 473 ::tcldrop::irc::473 -priority 100
+proc ::tcldrop::irc::473 {from key arg} { callneed [lindex [split $arg] 1] 
invite }
+
+# irc.choopa.net: 474 Fire_Egl #Tcldrop Cannot join channel (+b)
+bind raw - 474 ::tcldrop::irc::474 -priority 100
+proc ::tcldrop::irc::474 {from key arg} { callneed [lindex [split $arg] 1] 
unban }
+
+# irc.inter.net.il: 475 FireEgl #pgpnet Cannot join channel (+k)
+bind raw - 475 ::tcldrop::irc::475 -priority 100
+proc ::tcldrop::irc::475 {from key arg} { callneed [lindex [split $arg] 1] key 
}
+
 
 # This gets called once a minute and joins the channels we need in, and parts 
the ones we're not supposed to be in.
 # It also does a [callneed $channel op] if the bot is in a channel but doesn't 
have ops.




reply via email to

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