muby 0.7.11 → 0.7.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/muby/configuration.rb +3 -1
- data/lib/muby/connection.rb +3 -0
- data/lib/muby/help.rb +1 -0
- metadata +1 -1
data/lib/muby/configuration.rb
CHANGED
@@ -4,7 +4,7 @@ require 'ncurses'
|
|
4
4
|
module Muby
|
5
5
|
|
6
6
|
|
7
|
-
VERSION = "0.7.
|
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 = []
|
data/lib/muby/connection.rb
CHANGED
@@ -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,
|