muby 0.7.11 → 0.7.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ require 'ncurses'
4
4
  module Muby
5
5
 
6
6
 
7
- VERSION = "0.7.11" unless defined?(Muby::VERSION)
7
+ VERSION = "0.7.12" unless defined?(Muby::VERSION)
8
8
 
9
9
  #
10
10
  # The class that encapsulates all configuration.
@@ -114,6 +114,8 @@ module Muby
114
114
 
115
115
  @startup_triggers = []
116
116
 
117
+ @disconnect_triggers = []
118
+
117
119
  @connect_triggers = []
118
120
 
119
121
  @shutdown_triggers = []
@@ -358,6 +358,9 @@ class Muby::Connection
358
358
  end
359
359
  if @socket && !@socket.closed?
360
360
  status("Disconnecting our end")
361
+ conf.disconnect_triggers.each do |command|
362
+ @inputWindow.execute(command, @inputWindow, @outputWindow)
363
+ end
361
364
  @socket.close if @socket
362
365
  end
363
366
  end
data/lib/muby/help.rb CHANGED
@@ -56,6 +56,7 @@ If flush == false the lines matching these regular expressions will be shown as
56
56
  A line matching an anti gag and a gag will also be shown.",
57
57
  :shutdown_triggers => "The shutdown triggers. Code in this array will be run in order at shutdown.",
58
58
  :connect_triggers => "The connect triggers. Code in this array will be run in order when a connection is made.",
59
+ :disconnect_triggers => "The disconnect triggers. Code in this array will be run in order when a connection is closed.",
59
60
  :startup_triggers => "The startup triggers. Code in this array will be run in order after the windows have been properly initialized.",
60
61
  :remote_triggers => 'The remote triggers.
61
62
  Each line received from the server will be checked against all regular expression keys in this hash,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.11
4
+ version: 0.7.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Kihlgren, Sy Ali