Sophisticasean

dirtyrestart

Nov 20th, 2013
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. match /reload/, method: :reload, react_on: :private
  2.  
  3.  
  4.  def reload(m)
  5.        m.reply("brb")
  6.        bot.quit
  7.        #this one is cleaner but idk if it will reload completely
  8.        #at_exit { bot.start }
  9.        #more dirty but will probably reload everything
  10.        #at_exit { exec "ruby /home/sean/dragon.rb" }
  11.        at_exit { sleep(1) }
  12.        exit
  13.   end
Advertisement
Add Comment
Please, Sign In to add comment