circe-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Circe-help] [PATCH] circe-format-strings: new target 'server


From: John Foerch
Subject: [Circe-help] [PATCH] circe-format-strings: new target 'server
Date: Fri, 22 Oct 2010 12:12:37 -0400

The new target 'server means that the message will be displayed in the
server buffer.  A number of defaults have been updated, where sensible.
---
 circe.el |   38 +++++++++++++++++++++-----------------
 1 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/circe.el b/circe.el
index a30112b..929b084 100644
--- a/circe.el
+++ b/circe.el
@@ -34,7 +34,7 @@
 
 ;;; Code:
 
-(defvar circe-time-stamp "2009-04-26 10:29:34"
+(defvar circe-time-stamp "2010-10-21 17:41:28"
   "The modification date of Circe source file.")
 
 (defvar circe-version (format "from CVS (%s)" circe-time-stamp)
@@ -2234,11 +2234,11 @@ number, it shows the missing people due to that split."
   '(("INVITE" active "Invite: {origin} invites you to {1}")
     ("KICK" 0 "Kick: {1} kicked by {origin}: {2}")
     ("ERROR" active "Error: {0-}")
-    ("001" active "{1}")
-    ("002" active "{1}")
-    ("003" active "{1}")
-    ("004" active "{1-}")
-    ("005" active "{1-}")
+    ("001" server "{1}")
+    ("002" server "{1}")
+    ("003" server "{1}")
+    ("004" server "{1-}")
+    ("005" server "{1-}")
     ("302" active "User hosts: {1}")
     ("303" active "Users online: {1}")
     ;; This is returned on both WHOIS and PRIVMSG
@@ -2305,9 +2305,9 @@ number, it shows the missing people due to that split."
     ("484" active "{1-}")
     ("371" active "{1}")
     ("374" active "{1}")
-    ("375" active "{1}")
-    ("372" active "{1}")
-    ("376" active "{1}")
+    ("375" server "{1}")
+    ("372" server "{1}")
+    ("376" server "{1}")
     ("381" active "{1}")
     ("382" active "{1-}")
     ("391" active "Time on {1}: {2}")
@@ -2330,19 +2330,19 @@ number, it shows the missing people due to that split."
     ("221" active "User mode: {1-}")
     ("234" active "Service: {1-}")
     ("235" active "{1-}")
-    ("250" active "{1}")
-    ("251" active "{1}")
-    ("252" active "{1-}")
-    ("253" active "{1-}")
-    ("254" active "{1-}")
-    ("255" active "{1}")
+    ("250" server "{1}")
+    ("251" server "{1}")
+    ("252" server "{1-}")
+    ("253" server "{1-}")
+    ("254" server "{1-}")
+    ("255" server "{1}")
     ("256" active "{1-}")
     ("257" active "{1}")
     ("258" active "{1}")
     ("259" active "{1}")
     ("263" active "{1-}")
-    ("265" active "{1-}")
-    ("266" active "{1-}")
+    ("265" server "{1-}")
+    ("266" server "{1-}")
     )
   "A list of strings used to format IRC message.
 Each element of the list consists of four parts:
@@ -2357,6 +2357,7 @@ The target can be any of:
 
   'active  - The last active buffer of this server
   'nick    - The nick who sent this message
+  'server  - The server buffer for this server
   number   - The index of the argument of the target
 
 The strings itself are formatted using `lui-format'. Possible
@@ -2367,6 +2368,7 @@ arguments to the IRC message."
                        (choice :tag "Destination Window"
                                (const :tag "Active Window" active)
                                (const :tag "Originating Nick" nick)
+                               (const :tag "Server Buffer" server)
                                (number :tag "Index"))
                        (string :tag "Format")))
   :group 'circe)
@@ -2422,6 +2424,8 @@ The buffer might be nil if it is not alive."
     (let ((buf (circe-server-last-active-buffer)))
       (cons buf
             (buffer-name buf))))
+   ((eq (nth 1 spec) 'server)
+    (cons (current-buffer) (buffer-name)))
    (t
     (error "Bad target in format string: %s" (nth 1 spec)))))
 
-- 
1.7.1




reply via email to

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