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: |
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 {} |
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] |
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 |
} |
} |
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> |