Sha256: 8e173dd8bfb5daf9cc60959423b0494732cf2a5ce22782d1342bd559621cf735

Contents?: true

Size: 477 Bytes

Versions: 12

Compression:

Stored size: 477 Bytes

Contents

module Switchboard
  module Commands
    class Unregister < Switchboard::Command
      description "Unregister a JID"

      def self.run!
        switchboard = Switchboard::Client.new do
          begin
            client.remove_registration
          rescue Jabber::ServerError => e
            puts "Could not unregister #{settings["jid"]}: #{e}"
            shutdown(false)
            exit 1
          end
        end

        switchboard.run!
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
mojodna-switchboard-0.0.10 lib/switchboard/commands/unregister.rb
mojodna-switchboard-0.0.11 lib/switchboard/commands/unregister.rb
mojodna-switchboard-0.0.12 lib/switchboard/commands/unregister.rb
mojodna-switchboard-0.0.13 lib/switchboard/commands/unregister.rb
mojodna-switchboard-0.0.6 lib/switchboard/commands/unregister.rb
mojodna-switchboard-0.0.7 lib/switchboard/commands/unregister.rb
mojodna-switchboard-0.0.8 lib/switchboard/commands/unregister.rb
mojodna-switchboard-0.0.9 lib/switchboard/commands/unregister.rb
mojodna-switchboard-0.1.0 lib/switchboard/commands/unregister.rb
pkoch-switchboard-0.1.1b lib/switchboard/commands/unregister.rb
pkoch-switchboard-0.1.1a lib/switchboard/commands/unregister.rb
switchboard-0.1.0 lib/switchboard/commands/unregister.rb