public
Description: matzbot is nice so we are nice
Clone URL: git://github.com/defunkt/matzbot.git
Search Repo:
Always store the pidfile, disable the hax plugin
evanphx (author)
Tue Aug 14 16:56:49 -0700 2007
commit  bd12deb7130ac16d21444a7acb1173c3fb5c72e4
tree    598ec01c34347e9cea3d58ac98df8e10dd993ee8
parent  70844cb21a61b21ea871488725a65da613b970cd
...
54
55
56
 
 
 
57
58
59
60
 
61
62
63
...
54
55
56
57
58
59
60
 
61
62
63
64
65
66
0
@@ -54,10 +54,13 @@ Choice.options do
0
 end
0
 
0
 MatzBot::Session.load unless Choice.choices[:daemonize] == 'stop'
0
+
0
+require 'daemon'
0
+
0
 if Choice.choices[:daemonize]
0
- require 'daemon'
0
   MatzBot::Daemonize.daemonize(Choice.choices.merge('daemonize' => Choice.choices[:daemonize] == 'stop' ? 'stop' : 'start'))
0
 else
0
+ MatzBot::Daemonize.store
0
   begin
0
     MatzBot::Client.start(Choice.choices)
0
   ensure
...
60
61
62
63
 
64
65
66
...
60
61
62
 
63
64
65
66
0
@@ -60,7 +60,7 @@ module MatzBot
0
       Process.kill("TERM", pid) rescue nil
0
     end
0
 
0
- def store(pid)
0
+ def store(pid=Process.pid)
0
       if File.file? pid_fn
0
         puts "** Already started with PID #{File.read(pid_fn)}"
0
         exit!
...
1
 
 
 
2
3
4
...
1
2
3
4
5
6
7
0
@@ -1,4 +1,7 @@
0
 module MatzBot::Commands
0
+
0
+ raise "no!"
0
+
0
   protected
0
   def hax(data)
0
     pm eval(data.join(" ")).inspect

Comments

    No one has commented yet.