bin/imsg in imsg-0.0.4 vs bin/imsg in imsg-0.0.5
- old
+ new
@@ -9,23 +9,18 @@
end
str = str.chomp(' ');
ARGV.clear
STDOUT.flush
- # Show the chat list with the buddies names
- ImsgHandler.showChatList
+ # handles user message
+ ImsgHandler.ask_for_buddy_with_msg str
+end
- # Gets the buddy name or number
- response = gets.chomp
- # Send the message captured on the beggining to the selected buddy
- ImsgHandler.sendMessage str, response
+# Control+C trick in order to get out of exit() signal gracefully
+trap("SIGINT") { throw :ctrl_c }
+catch :ctrl_c do
+ begin
+ interactWithUser
+ rescue Exception
+ end
end
-
-# Control+C trick in order to get out of command gracefully
- trap("SIGINT") { throw :ctrl_c }
- catch :ctrl_c do
- begin
- interactWithUser
- rescue Exception
- end
- end