/[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.17 by fireegl, Tue May 27 15:32:09 2003 UTC revision 1.18 by fireegl, Wed Jun 4 21:02:38 2003 UTC
# Line 1  Line 1 
1  # irc.tcl --  # irc.tcl --
2    #       Handles:
3    #               * All IRC related binds.
4    #               * All IRC related commands.
5    #       Depends: core, server, channels.
6  #  #
7  # $Id$  # $Id$
8  #  #
9  # Copyright (C) 2003 FireEgl (Philip Moore) <FireEgl@Tcldrop.Tk>  # Copyright (C) 2003 Tcldrop Development Team <Tcldrop-Devel>
10  #  #
11  # This program is free software; you can redistribute it and/or  # This program is free software; you can redistribute it and/or
12  # modify it under the terms of the GNU General Public License  # modify it under the terms of the GNU General Public License
13  # as published by the Free Software Foundation; either version 2  # as published by the Free Software Foundation; either version 2
14  # of the License, or (at your option) any later version.  # of the License, or (at your option) any later version.
15  #  #
16  # This program is distributed in the hope that it will be useful,  # This program is distributed in the hope that it will be useful,
17  # but WITHOUT ANY WARRANTY; without even the implied warranty of  # but WITHOUT ANY WARRANTY; without even the implied warranty of
18  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  # GNU General Public License for more details.  # GNU General Public License for more details.
20  #  #
21  # You should have received a copy of the GNU General Public License  # You should have received a copy of the GNU General Public License
22  # along with this program (see gpl.txt); if not, write to the  # along with this program (see gpl.txt); if not, write to the
23  # Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  # Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  # Or visit http://www.GNU.Org/licenses/gpl.html  # Or visit http://www.GNU.Org/licenses/gpl.html
25  #  #
26  # The author of this project can be reached at FireEgl@Tcldrop.Tk  # The author of this project can be reached at FireEgl@Tcldrop.Tk
27  # Or can be found on IRC (EFNet or FreeNode) as FireEgl.  # Or can be found on IRC (EFNet or FreeNode) as FireEgl.
28  #  #
 #       irc module for tcldrop.  
 #       Depends on: server, channels.  
29    
30  namespace eval ::tcldrop::irc {  namespace eval ::tcldrop::irc {
31          # Provide the users module:          # Provide the users module:
# Line 253  proc ::tcldrop::irc::JOIN {from key arg} Line 255  proc ::tcldrop::irc::JOIN {from key arg}
255                  putserv "WHOIS $nick"                  putserv "WHOIS $nick"
256                  array set blabla [list nick $nick op 0 voice 0 halfop 0 "join" [set m [clock seconds]] "idle" $m]                  array set blabla [list nick $nick op 0 voice 0 halfop 0 "join" [set m [clock seconds]] "idle" $m]
257                  set ChannelNicks($element) [array get blabla]                  set ChannelNicks($element) [array get blabla]
258          }          }
259          # Call all the join binds:          # Call all the join binds:
260          foreach b [binds join] {          foreach b [binds join] {
261                  foreach {type flags mask count proc} $b {}                  foreach {type flags mask count proc} $b {}
# Line 276  proc ::tcldrop::irc::367 {from key arg} Line 278  proc ::tcldrop::irc::367 {from key arg}
278          set creator [lindex $larg 3]          set creator [lindex $larg 3]
279          set created [lindex $larg 4]          set created [lindex $larg 4]
280          # FixMe: Complete this.          # FixMe: Complete this.
281          # We need to make a second ban-array to seperate the bans on channel, and the          # We need to make a second ban-array to seperate the bans on channel, and the
282          # internal bans set by the bot (active or not)          # internal bans set by the bot (active or not)
283          variable Bans          variable Bans
284          set element [string tolower $channel,$ban]          set element [string tolower $channel,$ban]
# Line 383  bind raw - NICK ::tcldrop::irc::NICK 99 Line 385  bind raw - NICK ::tcldrop::irc::NICK 99
385  proc ::tcldrop::irc::NICK {from key arg} {  proc ::tcldrop::irc::NICK {from key arg} {
386          global botnick          global botnick
387          set oldnick [lindex [split $from !] 0]          set oldnick [lindex [split $from !] 0]
388          if {![string equal $::botnick $::nick] && [string equal -nocase $oldnick $::nick]} {          if {![string equal $::botnick $::nick] && [string equal -nocase $oldnick $::nick]} {
389                  putserv "NICK $::nick"                  putserv "NICK $::nick"
390                  set botnick $::nick                  set botnick $::nick
391          }          }
# Line 760  proc ::tcldrop::irc::chanexempts {channe Line 762  proc ::tcldrop::irc::chanexempts {channe
762  #      a sublist of the form {<invites> <bywho> <age>}. age is seconds from the  #      a sublist of the form {<invites> <bywho> <age>}. age is seconds from the
763  #      bot's POV.  #      bot's POV.
764  #    Module: irc  #    Module: irc
765  proc ::tcldrop::irc::chaninvites {channel} {  proc ::tcldrop::irc::chaninvites {channel} {
766  }  }
767    
768  #  resetbans <channel>  #  resetbans <channel>

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

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