Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/ruby
- require 'cinch'
- one = 1
- bot = Cinch::Bot.new do
- configure do |c|
- c.server = "irc.wyldryde.org"
- c.channels = ["#fufy"]
- c.nick = "Nanook"
- c.password = "notonyourlife"
- end
- on :message, "hello" do |m|
- m.reply "hello, #{m.user.nick}"
- end
- on :message, "hello, nanook!" do |m|
- m.reply "muahahahha"
- end
- on :message, /^!shoot (.+)/ do |m, text|
- output = "elo "
- tens = output + text
- m.reply tens
- end
- on :message, "!desc" do |m|
- text = "testing"
- m.reply text
- m.channel.action text
- end
- on :message, "!name" do |m|
- m.reply "Hi, #{m.user.nick}"
- end
- on :message, "!add" do |m|
- atext = "Current adder value: "
- type = "adder.log"
- user = "#{m.user.nick}"
- filename = user + type
- one = one + 1
- msg = "heya"
- def func(a)
- m.reply a
- end
- func atext
- m.reply one
- File.open('adder.log', 'w') do |f2|
- f2.puts "The current adder value is:"
- f2.puts one
- end
- puts "Write attempt finished"
- File.open(filename.downcase, 'w') do |f2|
- f2.puts "Success!!!"
- end
- end
- end
- bot.start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement