Changeset 6415
- Timestamp:
- 02/09/08 13:07:12 (5 years ago)
- Location:
- lang/ruby/chokan/branches/citrus
- Files:
-
- 4 modified
-
lib/citrus/core.rb (modified) (1 diff)
-
plugins/system.rb (modified) (2 diffs)
-
spec/core_spec.rb (modified) (1 diff)
-
spec/spec_helper.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/chokan/branches/citrus/lib/citrus/core.rb
r6401 r6415 136 136 if args[1] && args[1][0] == ?# # when channel 137 137 channel = args[1] 138 enabled = @config.plugins[n]["enabled"] 139 disabled = @config.plugins[n]["disabled"] 138 config = @config.plugins[n] || {} 139 enabled = config["enabled"] 140 disabled = config["disabled"] 140 141 141 142 case -
lang/ruby/chokan/branches/citrus/plugins/system.rb
r5931 r6415 32 32 notice channel, "Reloaded: " + reloaded 33 33 end 34 35 when /^chokan: join to (\S+)(?: (\S+))?/ 36 chan, pass = Regexp.last_match.captures 37 log "Joining to '#{chan}' with '#{pass}'" 38 join(chan.to_s, pass.to_s) 39 40 when "chokan: part" 41 part(channel, "lambda....") 34 42 35 43 when "operator?" … … 81 89 end 82 90 91 it "can operate join/part" do 92 @socket.string = "" 93 @plugin.on_privmsg(@prefixop, "#test", "chokan: part") 94 @socket.string.should match(/^PART #test /) 95 96 @socket.string = "" 97 @plugin.on_privmsg(@prefixop, "#test", "chokan: join to #foobar") 98 @socket.string.should match(/^JOIN #foobar /) 99 100 @socket.string = "" 101 @plugin.on_privmsg(@prefixop, "#test", "chokan: join to #foobar password") 102 @socket.string.should match(/^JOIN #foobar password/) 103 end 104 83 105 it "can Gem.clear_paths" do 84 106 @socket.string = "" -
lang/ruby/chokan/branches/citrus/spec/core_spec.rb
r6407 r6415 154 154 @core.plugins["Bar"].results[:on_privmsg].should_not == ["foo!bar@localhost", "#bar", "message"] 155 155 end 156 157 # @core = Core.new(YAML.load(<<-YAML.gsub(/^\t/, "")))158 # ---159 # general:160 # server: charlotte161 # port: 6669162 # user: chokan163 # nick: chokan164 # real: chokan bot via tiarra165 # error: "#chokan@ircnet"166 # plugin_dir: plugins167 # charset:168 # default: iso-2022-jp169 # "#test": utf-8170 # plugins:171 # Core:172 # operator: "cho!cho45@localhost"173 # SimpleReply:174 # replies:175 # - words:176 # - "ping: chokan"177 # channels: []178 # reply: "pong"179 # - words:180 # - Nice181 # channel:182 # - "#foo"183 # - "#bar"184 # reply: boat.185 #186 # YAML187 156 end 188 157 -
lang/ruby/chokan/branches/citrus/spec/spec_helper.rb
r6407 r6415 45 45 "Foo" => { "disabled" => ["#foo"], }, 46 46 "Bar" => { "enabled" => ["#foo"], }, 47 "Baz" => nil, 47 48 } 48 49 }.merge(config)
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)