/[tcldrop]/tcldrop/modules/irc/irc.tcl
ViewVC logotype

Diff of /tcldrop/modules/irc/irc.tcl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.31 by fireegl, Mon Dec 1 01:59:52 2003 UTC revision 1.32 by fireegl, Mon Dec 1 06:49:31 2003 UTC
# Line 92  namespace eval ::tcldrop::irc { Line 92  namespace eval ::tcldrop::irc {
92  #       global var for deciding how many modes-per-line to use (for example).  #       global var for deciding how many modes-per-line to use (for example).
93  #  #
94    
95    # Currently supported RAW's:
96    # MODE
97    # 311
98    # JOIN
99    # 367
100    # 324
101    # 331
102    # 332
103    # 333
104    # TOPIC
105    # NICK
106    # QUIT
107    # KICK
108    # 433
109    # 352
110    # 471
111    # 473
112    # 474
113    # 475
114    # PART
115    # NOTICE
116    # PRIVMSG
117    
118    # Less important RAW's to add:
119    # irc.nac.net: 319 FireEgl Harley @#pgpnet @#betas @#aeternamtech
120    # irc.nac.net: 312 FireEgl Harley irc.nac.net Winning popularity contests since 2003
121    # irc.nac.net: 317 FireEgl Harley 4 1069595760 seconds idle, signon time
122    # 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
123    # irc.inter.net.il: 353 FireEgl @ #pgpnet @Jax @Parker @Delta` @Dispatch @Lilo @Whore @DJ @Harley @Robin @Skyway @Slut` @Batman FireEgl @pgpbot @Deryl @ardya @pgpkeys
124    # irc.inter.net.il: 329 FireEgl #pgpnet 1064713818
125    # irc.inter.net.il: 401 FireEgl Deryl_ No such nick/channel
126    
127  proc ::tcldrop::irc::resetchan {channel} {  proc ::tcldrop::irc::resetchan {channel} {
128          putquick "MODE $channel +b"          putquick "MODE $channel +b"
129          putquick "MODE $channel"          putquick "MODE $channel"
# Line 186  proc ::tcldrop::irc::callctcp {nick uhos Line 218  proc ::tcldrop::irc::callctcp {nick uhos
218  # Note: Eggdrop supports the following need types: op, unban, invite, limit, and key.  # Note: Eggdrop supports the following need types: op, unban, invite, limit, and key.
219  proc ::tcldrop::irc::callneed {channel {type {join}}} {  proc ::tcldrop::irc::callneed {channel {type {join}}} {
220          foreach b [binds need] {          foreach b [binds need] {
221                  foreach {type flags mask count proc} $b {}                  foreach {bindtype flags mask count proc} $b {}
222                  if {[string match -nocase $mask "$channel $type"]} {                  if {[string match -nocase $mask "$channel $type"]} {
                         ::tcldrop::countbind $type $mask $proc  
223                          if {[catch { $proc $channel $type } err]} {                          if {[catch { $proc $channel $type } err]} {
224                                  putlog "Error in $proc: $err"                                  putlog "Error in $proc: $err"
225                                  puterrlog "$::errorInfo"                                  puterrlog "$::errorInfo"
226                          }                          }
227                            ::tcldrop::countbind $bindtype $mask $proc
228                  }                  }
229          }          }
230          if {[set script [channel get $channel "need-$type"]] != {}} {          if {[set script [channel get $channel "need-$type"]] != {}} {
231                    # FixMe: This may require an uplevel #0 to eval $script:
232                  if {[catch { eval $script } err]} {                  if {[catch { eval $script } err]} {
233                          putlog "Error in $script: $err"                          putlog "Error in $script: $err"
234                          puterrlog "$::errorInfo"                          puterrlog "$::errorInfo"
# Line 203  proc ::tcldrop::irc::callneed {channel { Line 236  proc ::tcldrop::irc::callneed {channel {
236          }          }
237  }  }
238    
239    # irc.choopa.net: 471 Fire_Egl #Tcldrop Cannot join channel (+l)
240    bind raw - 471 ::tcldrop::irc::471 -priority 100
241    proc ::tcldrop::irc::471 {from key arg} { callneed [lindex [split $arg] 1] limit }
242    
243    # irc.choopa.net: 473 Fire_Egl #Tcldrop Cannot join channel (+i)
244    bind raw - 473 ::tcldrop::irc::473 -priority 100
245    proc ::tcldrop::irc::473 {from key arg} { callneed [lindex [split $arg] 1] invite }
246    
247    # irc.choopa.net: 474 Fire_Egl #Tcldrop Cannot join channel (+b)
248    bind raw - 474 ::tcldrop::irc::474 -priority 100
249    proc ::tcldrop::irc::474 {from key arg} { callneed [lindex [split $arg] 1] unban }
250    
251    # irc.inter.net.il: 475 FireEgl #pgpnet Cannot join channel (+k)
252    bind raw - 475 ::tcldrop::irc::475 -priority 100
253    proc ::tcldrop::irc::475 {from key arg} { callneed [lindex [split $arg] 1] key }
254    
255    
256  # This gets called once a minute and joins the channels we need in, and parts the ones we're not supposed to be in.  # This gets called once a minute and joins the channels we need in, and parts the ones we're not supposed to be in.
257  # It also does a [callneed $channel op] if the bot is in a channel but doesn't have ops.  # It also does a [callneed $channel op] if the bot is in a channel but doesn't have ops.
258  bind time - {* * * * *} ::tcldrop::irc::JoinChannels  bind time - {* * * * *} ::tcldrop::irc::JoinChannels

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26