Annotation of ruby/pirc/pirc.rb, revision 1.2
1.1 as 1: #!/usr/bin/env ruby
2: #
3: # Copyright (c) 2007 Aron Schlesinger
4: # All rights reserved.
5: #
6: # Redistribution and use in source and binary forms, with or without
7: # modification, are permitted provided that the following conditions
8: # are met:
9: # 1. Redistributions of source code must retain the above copyright
10: # notice, this list of conditions and the following disclaimer.
11: # 2. Redistributions in binary form must reproduce the above copyright
12: # notice, this list of conditions and the following disclaimer in the
13: # documentation and/or other materials provided with the distribution.
14: #
15: # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
16: # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO
17: # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18: # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
19: # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
20: # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
21: # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
22: # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23: # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24: # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
25: # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26: #
1.2 ! as 27: # $Paefchen: ruby/pirc/pirc.rb,v 1.1 2007/10/05 18:30:26 as Exp $
1.1 as 28:
29: require 'pirc/pircc'
30: require 'getoptlong'
31:
32: PIRC::DEBUG = true
33: PIRC::DEBUG_TRACE = true
34:
35: begin
1.2 ! as 36: #(opts = GetoptLong.new(
! 37: # [ '--user', '-u', GetoptLong::REQUIRED_ARGUMENT ],
! 38: # [ '--nick', '-n', GetoptLong::REQUIRED_ARGUMENT ]
! 39: #)).quiet = true
! 40:
! 41: #args = {}
! 42: #opts.each do |arg, value|
! 43: # args[arg[2..-1].to_sym] = value
! 44: #end
1.1 as 45:
1.2 ! as 46: PIRC::PIRCC.new(:nick => 'test', :user => 'user').run
1.1 as 47:
48: rescue => e
1.2 ! as 49: PIRC::Interface.destroy
1.1 as 50: $stderr.puts sprintf('%s: %s => %s', File.basename($0), e.class, e.message)
1.2 ! as 51: $stderr.puts e.backtrace.flatten
1.1 as 52: end
53:
54: #EOF