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: Sun, 06 Jul 2003 05:12:33 -0400

CVSROOT:        /cvsroot/tcldrop
Module name:    tcldrop
Branch:         
Changes by:     Philip Moore <address@hidden>   03/07/06 05:12:33

Modified files:
        modules/irc    : irc.tcl 

Log message:
        The skeleton of the MSG binds. (ADDHOST, INFO, WHO, IDENT, HELP, VOICE,
        WHOIS, PASS, OP, INVITE, GO, KEY, DIE, JUMP, MEMORY, SAVE, REHASH,
        RESET, STATUS.)

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

Patches:
Index: tcldrop/modules/irc/irc.tcl
diff -u tcldrop/modules/irc/irc.tcl:1.19 tcldrop/modules/irc/irc.tcl:1.20
--- tcldrop/modules/irc/irc.tcl:1.19    Mon Jun 30 02:25:05 2003
+++ tcldrop/modules/irc/irc.tcl Sun Jul  6 05:12:33 2003
@@ -4,7 +4,7 @@
 #              * All IRC related commands.
 #      Depends: core, server, channels.
 #
-# $Id: irc.tcl,v 1.19 2003/06/30 06:25:05 fireegl Exp $
+# $Id: irc.tcl,v 1.20 2003/07/06 09:12:33 fireegl Exp $
 #
 # Copyright (C) 2003 Tcldrop Development Team <Tcldrop-Devel>
 #
@@ -30,7 +30,7 @@
 namespace eval ::tcldrop::irc {
        # Provide the users module:
        variable version {0.2}
-       variable rcsid {$Id: irc.tcl,v 1.19 2003/06/30 06:25:05 fireegl Exp $}
+       variable rcsid {$Id: irc.tcl,v 1.20 2003/07/06 09:12:33 fireegl Exp $}
        package provide tcldrop::irc $version
        # Initialize variables:
        variable Nicks
@@ -1091,15 +1091,148 @@
 }
 
 ### MSG Commands:
-# Note, these may best be put into their own file (irc-msg.tcl)
 namespace eval ::tcldrop::irc::msg {}
 
-bind msg o|o op ::tcldrop::irc::msg::op
-proc ::tcldrop::irc::msg::op {nick host hand text} {
+# FixMe: Finish the procs for these....
+
+# -Atlantica- MSG commands for Atlantica:
+# -Atlantica-      ADDHOST    INFO       WHO        IDENT
+# -Atlantica-      HELP       VOICE      WHOIS      PASS
+# -Atlantica-      OP         INVITE     GO         KEY
+# -Atlantica-      DIE        JUMP       MEMORY     SAVE
+# -Atlantica-      REHASH          RESET           STATUS
+# -Atlantica- For help on a command, /MSG Atlantica HELP <command>
+# -Atlantica- You are a master.  Many many more commands are
+# -Atlantica- available via dcc chat.
+# -Atlantica- Admin: Atlantica <address@hidden>
+# -Atlantica- There may also be additional commands provided by other modules.
+bind msg -|- help ::tcldrop::irc::msg::HELP
+proc ::tcldrop::irc::msg::HELP {nick host hand text} {
+
+}
+
+# ADDHOST <password> <hostmask>
+bind msg n|n addhost ::tcldrop::irc::msg::ADDHOST
+proc ::tcldrop::irc::msg::ADDHOST {nick host hand text} {
+       if {[set hostmask [lindex [split $text] end]] == {}} {
+               # They neglected to specify the hostmask, so just do a regular 
IDENT instead.
+               ::tcldrop::irc::msg::IDENT $nick $host $hand $text
+       } elseif {![passwdok $hand -] && [passwdok $hand [lindex [split $text] 
0]]} {
+               if {[addhost $hand $hostmask]} {
+                       # FixMe: Tell them it was added successfully. (use 
lang!)
+               } else {
+                       # FixMe: Tell them it wasn't added, (maybe because it 
already existed).
+               }
+       } else {
+               # FixMe: Tell them they gave a bad password.
+       }
+}
+
+# INFO <password> [channel] [an info line]
+bind msg -|- info ::tcldrop::irc::msg::INFO
+proc ::tcldrop::irc::msg::INFO {nick host hand text} {
+
+}
+
+# WHO <channel>
+bind msg -|- who ::tcldrop::irc::msg::WHO
+proc ::tcldrop::irc::msg::WHO {nick host hand text} {
+
+}
+
+# IDENT <password> [nickname]
+bind msg -|- ident ::tcldrop::irc::msg::IDENT
+proc ::tcldrop::irc::msg::IDENT {nick host hand text} {
+
+}
+
+# VOICE <password> <channel>
+bind msg -|- voice ::tcldrop::irc::msg::VOICE
+proc ::tcldrop::irc::msg::VOICE {nick host hand text} {
+
+}
+
+# WHOIS <hand>
+bind msg -|- whois ::tcldrop::irc::msg::WHOIS
+proc ::tcldrop::irc::msg::WHOIS {nick host hand text} {
+
+}
+
+# PASS <password>
+bind msg -|- pass ::tcldrop::irc::msg::PASS
+proc ::tcldrop::irc::msg::PASS {nick host hand text} {
+
+}
+
+# OP <password> [channel]
+bind msg o|o op ::tcldrop::irc::msg::OP
+proc ::tcldrop::irc::msg::OP {nick host hand text} {
        set pass [lindex [split $text] 0]
        set chan [lindex $text end]
        if {![passwdok $hand -] && [passwdok $hand $pass]} {
                if {$chan != {}} { lappend channels $chan } else { set channels 
[channels] }
-               foreach c $channels { if {[matchattr $hand o|o $c]} { pushmode 
$c +o $nick } }
+               foreach c $channels {
+                       if {[onchan $nick $c] && [matchattr $hand o|o $c]} { 
pushmode $c +o $nick }
+               }
        }
+}
+
+# INVITE <password> <channel>
+bind msg -|- invite ::tcldrop::irc::msg::INVITE
+proc ::tcldrop::irc::msg::INVITE {nick host hand text} {
+
+}
+
+# GO <channel>
+bind msg -|- go ::tcldrop::irc::msg::GO
+proc ::tcldrop::irc::msg::GO {nick host hand text} {
+
+}
+
+# KEY <password> <channel>
+bind msg o|o key ::tcldrop::irc::msg::KEY
+proc ::tcldrop::irc::msg::KEY {nick host hand text} {
+
+}
+
+# DIE <password> [message]
+bind msg n|- die ::tcldrop::irc::msg::DIE
+proc ::tcldrop::irc::msg::DIE {nick host hand text} {
+
+}
+
+# JUMP <password> [server [port [server password]]]
+bind msg m|- jump ::tcldrop::irc::msg::JUMP
+proc ::tcldrop::irc::msg::JUMP {nick host hand text} {
+
+}
+
+# MEMORY <password>
+bind msg n|- memory ::tcldrop::irc::msg::MEMORY
+proc ::tcldrop::irc::msg::MEMORY {nick host hand text} {
+
+}
+
+# SAVE <password>
+bind msg m|n save ::tcldrop::irc::msg::SAVE
+proc ::tcldrop::irc::msg::SAVE {nick host hand text} {
+
+}
+
+# REHASH <password>
+bind msg n|- rehash ::tcldrop::irc::msg::REHASH
+proc ::tcldrop::irc::msg::REHASH {nick host hand text} {
+
+}
+
+# RESET <password> [channel]
+bind msg m|m reset ::tcldrop::irc::msg::RESET
+proc ::tcldrop::irc::msg::RESET {nick host hand text} {
+
+}
+
+# STATUS <password>
+bind msg m|m status ::tcldrop::irc::msg::STATUS
+proc ::tcldrop::irc::msg::STATUS {nick host hand text} {
+
 }




reply via email to

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