source: tags/mode_tracking/package.lisp

Last change on this file was 88, checked in by Erik Huelsmann, 19 years ago

Implement MODE tracking.

  • TODO: Remove MODE updating item.
  • doc/user-guide.txt: Add section about modes.
  • package.lisp: Export new symbols.
  • variable.lisp (*default-isupport-CHANMODES*, *default-isupport-PREFIX*): New. (*default-isupport-values*): Add modes described by the RFC and declare them the default (minimal set). (mode-description): New. Structure to describe characteristics of mode arguments sent by the server. (*default-char-to-channel-modes-map*,

*char-to-user-modes-map*): New. Assoc lists to map characters to names.

  • utility.lisp (parse-isupport-prefix-argument): New. Returns the prefix and mode argument parts of the PREFIX RPL_ISUPPORT parameter. (nick-prefixes-from-isupport): New. Returns a plist associating mode prefixes with mode character designations. (chanmode-descs-from-isupport): New. Returns a list of mode-description structures for use with auto-creation of mode objects. (do-property-list): New. Macro to walk a property list like dolist. (parse-mode-arguments): New. Parses mode arguments given a connection object and target and translates those into a list of mode change instructions.
  • protocol.lisp (irc-mode): New. Abstract super class. Derivatives used to store mode values. (set-mode-value, unset-mode-value, reset-mode-value, has-value-p): New. Methods for irc-mode and its derivatives. (single-value-mode, list-value-mode): New. Classes implementing two types of value-holding mode-storage. (connection:channel-mode-descriptions): New. Slot in which the channel mode descriptions for the connection get stored. (connection:nick-prefixes): New. Slot which stores a plist associating RPL_NAMREPLY prefixes with mode characters. (connection:user-mode-descriptions): New. Slot which stores user modes like channel-mode-descriptions does for channels. (add-default-hooks): Add hook for irc-mode-message. (channel:modes): Change initialization to signal the value held will be of LIST type. (mode-name-from-char): New. Translates a mode character into an internal 'name': symbol. (mode-description): New. Retrieves a mode-description record from the given connection of a given mode name. (get-mode, set-mode, unset-mode, remove-mode): New. These provide operations on both channel and user modes. (has-mode-p, has-mode-value-p): New. This must be obvious. (remove-users): Also remove references to all users from any properties which carry the :user value-type. (make-mode): New. Automatically create mode object for the given mode to be added to the given target (user/channel). (user:modes): New. Slot to hold modes just like there is one on the channel class. (remove-user): Same as remove-user, but for the given user only.
  • event.lisp (default-hook [irc-rpl_isupport-message]): Set new channel-mode-descriptions and nick-prefixes slots. (default-hook [irc-rpl_namreply-message]): Set mode fields based on prefixes passed in the reply. (default-hook [irc-mode-message]): Set or unset channel and user modes upon reception of server notification.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1;;;; $Id: package.lisp 88 2005-03-20 16:55:43Z ehuelsmann $
2;;;; $Source$
3
4;;;; See the LICENSE file for licensing information.
5
6(in-package :cl-user)
7
8;; the exports list needs some cleanup/clarification/categorization
9(eval-when (:execute :load-toplevel :compile-toplevel)
10  (defpackage :cl-irc
11      (:use :cl)
12    (:nicknames :irc)
13    (:export :read-message-loop
14             :read-message
15             :start-background-message-handler
16             :stop-background-message-handler
17             :socket-connect
18             :send-message
19             :server-name
20             :no-such-reply
21             :irc-mode
22             :single-value-mode
23             :list-value-mode
24             :add-mode
25             :remove-mode
26             :has-mode-p
27             :has-mode-value-p
28             :get-mode
29             :set-mode
30             :unset-mode
31             :parse-mode-arguments
32             :parse-raw-message
33             :normalize-nickname
34             :normalize-channel-name
35             :name
36             :normalized-name
37             :topic
38             :modes
39             :user-count
40             :users
41             :server-stream
42             :client-stream
43             :channels
44             :configuration
45             :dangling-users
46             :channel-list
47             :add-hook
48             :remove-hook
49             :remove-hooks
50             :remove-all-hooks
51             :add-default-hooks
52             :get-hooks
53             :make-user
54             :nickname
55             :normalized-nickname
56             :username
57             :hostname
58             :realname
59             :change-nickname
60             :irc-message
61             :source
62             :user
63             :host
64             :command
65             :arguments
66             :trailing-argument
67             :connection
68             :received-time
69             :raw-message-string
70             :make-connection
71             :make-channel
72             :channel
73             :client-log
74             :find-channel
75             :find-reply-name
76             :remove-channel
77             :remove-all-channels
78             :add-channel
79             :find-user
80             :add-user
81             :remove-all-users
82             :remove-user
83             :self-message-p
84             :pass
85             :nick
86             :user-
87             :oper
88             :mode
89             :op
90             :deop
91             :voice
92             :devoice
93             :ban
94             :unban
95             :service
96             :quit
97             :squit
98             :join
99             :part
100             :part-all
101             :topic-
102             :names
103             :list-
104             :invite
105             :kick
106             :privmsg
107             :notice
108             :motd-
109             :lusers
110             :version
111             :stats
112             :links
113             :time-
114             :connect
115             :trace-
116             :admin
117             :info
118             :servlist
119             :squery
120             :who
121             :whois
122             :whowas
123             :kill
124             :ping
125             :pong
126             :error-
127             :away
128             :rehash
129             :die
130             :restart-
131             :summon
132             :users-
133             :wallops
134             :userhost
135             :ison)))
136
Note: See TracBrowser for help on using the repository browser.