Changeset 6479
- Timestamp:
- 02/10/08 14:40:14 (5 years ago)
- Location:
- lang/ruby/chokan/branches/citrus
- Files:
-
- 4 modified
-
config.yaml.sample (modified) (3 diffs)
-
lib/citrus/core.rb (modified) (1 diff)
-
plugins/simple_reply.rb (modified) (2 diffs)
-
plugins/system.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/chokan/branches/citrus/config.yaml.sample
r6395 r6479 5 5 user: chokan 6 6 nick: chokan 7 real: chokan bot via tiarra7 real: chokan bot via Tiarra 8 8 error: "#chokan" 9 9 plugin_dir: plugins … … 14 14 System: 15 15 operator: "foo!bar@localhost" 16 #operator: !ruby/regexp /^foo\w*?!bar@baz\d+\.example\.com$/i 16 17 17 18 HTTP: … … 28 29 reply: "pong" 29 30 30 Foobar: 31 disabled: 32 - "#foobar" 31 Foo: 32 disabled: &disabled_group 33 - "#PublicHoge" 34 35 Bar: 36 disabled: *disabled_group 37 38 Baz: 39 enabled: &enabled_group 40 - "#PrivateFuga" 41 - !ruby/regexp /^#P(?:rivate|ublic)Piyo@.+$/i 33 42 34 43 Jitensya: 35 enabled: 36 - "#foobar" 44 enabled: *enabled_group 45 46 ... -
lang/ruby/chokan/branches/citrus/lib/citrus/core.rb
r6455 r6479 147 147 case 148 148 when enabled 149 next unless enabled. include?(channel)149 next unless enabled.find {|c| c === channel } 150 150 when disabled 151 next if disabled. include?(channel)151 next if disabled.find {|c| c === channel } 152 152 end 153 153 end -
lang/ruby/chokan/branches/citrus/plugins/simple_reply.rb
r6416 r6479 3 3 def on_privmsg(prefix, channel, message) 4 4 @config["replies"].each do |r| 5 if r["words"].include?(message) &&6 (!r["channel "] || r["channel"].include?(channel))5 if r["words"].include?(message) && 6 (!r["channels"] || r["channels"].include?(channel)) 7 7 8 8 notice channel, r["reply"] … … 23 23 "replies" => [ 24 24 { 25 "words" => ["foo", "bar"],26 "channel " => "#test",27 "reply" => "Nice boat.",25 "words" => ["foo", "bar"], 26 "channels" => "#test", 27 "reply" => "Nice boat.", 28 28 } 29 29 ] -
lang/ruby/chokan/branches/citrus/plugins/system.rb
r6416 r6479 2 2 class System < Citrus::Plugin 3 3 def on_privmsg(prefix, channel, message) 4 return unless Regexp.new(@config['operator']) =~prefix4 return unless @config['operator'] === prefix 5 5 case message 6 6 when /^reload(?:\s+([a-z]+))?$/i
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)