Commits

Fabrice Gabolde committed 4bdb69f

Ignored users should not trigger the main hook.

Comments (0)

Files changed (1)

   ;; <http://www.emacswiki.org/emacs/ErcRobot>
 
   (let* ((sspec (aref kbot-parsed-privmsg 1))
-         (kbot-irc-from (substring (nth 0 (erc-parse-user sspec)) 1))
+         (kbot-irc-user (erc-parse-user sspec))
+         (kbot-irc-from (substring (nth 0 kbot-irc-user) 1))
          (kbot-irc-target (car (aref kbot-parsed-privmsg 4)))
          (kbot-irc-message (aref kbot-parsed-privmsg 5)))
-    (kbot-work kbot-erc-process kbot-irc-target kbot-irc-from kbot-irc-message))
+    (unless (erc-ignored-user-p kbot-irc-from)
+      (kbot-work kbot-erc-process kbot-irc-target kbot-irc-from kbot-irc-message)))
   ;; return nil so that erc keeps processing the rest of the
   ;; `erc-server-PRIVMSG-functions'
   nil)