]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/lart.rb
lart plugin: ensure that the lart/praise being added/removed is a string
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / lart.rb
index 9b627fc5ad836c469a93e1e51e26bd1bb578aad1..fbc1f9e429f052768adf4410560ba431352cfd91 100644 (file)
@@ -1,24 +1,29 @@
-#  Original Author:
-#               Michael Brailsford  <brailsmt@yahoo.com>
-#               aka brailsmt
-#  Author:      Giuseppe "Oblomov" Bilotta <giuseppe.bilotta@gmail.com>
-#  Purpose:     Provide for humorous larts and praises
-#  Original Copyright:
-#               2002 Michael Brailsford.  All rights reserved.
-#  Copyright:   2006 Giuseppe Bilotta.  All rights reserved.
-#  License:     This plugin is licensed under the BSD license.  The terms of
-#               which follow.
+#-- vim:sw=2:et
+#++
 #
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions
-#  are met:
+# :title: lart/praise plugin for rbot
 #
-#  1. Redistributions of source code must retain the above copyright notice,
-#     this list of conditions and the following disclaimer.
+# Author::    Michael Brailsford  <brailsmt@yahoo.com> aka brailsmt
+# Author::    Giuseppe "Oblomov" Bilotta <giuseppe.bilotta@gmail.com>
 #
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
+# Copyright:: (C) 2002 Michael Brailsford.  All rights reserved.
+# Copyright:: (C) 2006 Giuseppe Bilotta.  All rights reserved.
+#
+# License::  This plugin is licensed under the BSD license.  The terms of
+#            which follow.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+#    this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# Purpose::   Provide for humorous larts and praises
 
 class LartPlugin < Plugin
 
@@ -120,25 +125,25 @@ class LartPlugin < Plugin
   end
 
   def handle_addlart(m, params)
-    @larts << params[:lart]
+    @larts << params[:lart].to_s
     @changed = true
     m.okay
   end
 
   def handle_rmlart(m, params)
-    @larts.delete params[:lart]
+    @larts.delete params[:lart].to_s
     @changed = true
     m.okay
   end
 
   def handle_addpraise(m, params)
-    @praises << params[:praise]
+    @praises << params[:praise].to_s
     @changed = true
     m.okay
   end
 
   def handle_rmpraise(m, params)
-    @praises.delete params[:praise]
+    @praises.delete params[:praise].to_s
     @changed = true
     m.okay
   end