]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/linkbot.rb
shiritori plugin: only load rulesets on request
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / linkbot.rb
index 624d241d6f9f8f5a9d61d86cf2bd8e0c2618d1ea..29d7ad1b23cebeadc92e70f2dd23901f3caa7290 100644 (file)
@@ -1,8 +1,11 @@
 #-- vim:sw=2:et
 #++
 #
-# Author: Giuseppe "Oblomov" Bilotta <giuseppe.bilotta@gmail.com>
-# Copyright (C) 2006 Giuseppe Bilotta
+# :title: linkbot management for rbot
+#
+# Author:: Giuseppe "Oblomov" Bilotta <giuseppe.bilotta@gmail.com>
+# Copyright:: (C) 2006 Giuseppe Bilotta
+# License:: GPL v2
 #
 # Based on an idea by hagabaka (Yaohan Chen <yaohan.chen@gmail.com>)
 #
 #
 # This plugin also shows how to create 'fake' messages from a plugin, letting
 # the bot parse them.
+#
 # TODO a possible enhancement to the Irc framework could be to create 'fake'
 # servers to make this even easier.
+
 class LinkBot < Plugin
   BotConfig.register BotConfigArrayValue.new('linkbot.nicks',
     :default => [],
@@ -34,7 +39,7 @@ class LinkBot < Plugin
     return unless m.kind_of?(PrivMessage)
     # Now we know that _m_ is a PRIVMSG from a linkbot. Let's split it
     # in nick, network, message
-    if m.message.match(/^\((\w+?)@(\w+?)\)\s+(.*)$/)
+    if m.message.match(/^\((\S+?)@(\S+?)\)\s+(.*)$/)
       new_nick = $1
       network = $2
       message = $3