From 79be7ce23b86c2dd0830ef87950e4b72c400e82f Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Fri, 16 Sep 2005 00:55:05 +0000 Subject: [PATCH] Finished up a little more syntaxy stuff... --- svnwatch.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/svnwatch.rb b/svnwatch.rb index d9d7f1c..09c4984 100644 --- a/svnwatch.rb +++ b/svnwatch.rb @@ -7,12 +7,12 @@ require 'drb' -# Configuration -@conf = Hash.new - -@conf[:port] = '7666' # 7666 -@conf[:host] = 'localhost' # localhost, don't set to remote ip unless you know what you are doing -@conf[:chan] = '#pdx.rb' +# Configuration Options +@conf = { + :port => '7666', # 7666 + :host => 'localhost', # localhost, don't set to remote ip unless you know what you are doing + :chan => '#pdx.rb' # IRC channel that you want rbot to send notices to +} class SvnWatch < Plugin @@ -25,7 +25,7 @@ def help(plugin, topic="") def privmsg(m) m.reply "I don't actually have anything to say. I just sit and wait for SVN to call me." end - + # Sends a message to the channel defined. This will allow # you to use the DRb instance to call the send_msg(str) # method, which will output to the desired channel @@ -46,3 +46,5 @@ def send_msg(str) DRb.start_service("druby://#{@conf[:host]}:#{@conf[:port]}", @svnwatch) DRb.thread.join } + +# that's all folks! \ No newline at end of file