Fixed indentation.
[riece] / lisp / riece-hangman.el
index d86ed58..1d59f27 100644 (file)
@@ -18,8 +18,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -55,8 +55,6 @@
 (defvar riece-hangman-player-context-alist nil)
 (defvar riece-hangman-words-buffer nil)
 
-(defvar riece-hangman-enabled nil)
-
 (defconst riece-hangman-description
   "Allow channel members to play the hangman game.")
 
@@ -140,7 +138,7 @@ The wordlist is read from `riece-hangman-words-file'."
               "")))))
 
 (defun riece-hangman-after-privmsg-hook (prefix string)
-  (if riece-hangman-enabled
+  (if (get 'riece-hangman 'riece-addon-enabled)
       (let* ((user (riece-prefix-nickname prefix))
             (parameters (riece-split-parameters string))
             (targets (split-string (car parameters) ","))
@@ -231,11 +229,7 @@ The wordlist is read from `riece-hangman-words-file'."
   (remove-hook 'riece-after-privmsg-hook 'riece-hangman-after-privmsg-hook))
 
 (defun riece-hangman-enable ()
-  (random t)
-  (setq riece-hangman-enabled t))
-
-(defun riece-hangman-disable ()
-  (setq riece-hangman-enabled nil))
+  (random t))
 
 (provide 'riece-hangman)