Skip to content

Commit

Permalink
small refactory that also fix some issues with weird from addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
formigarafa committed May 28, 2013
1 parent 25954c8 commit a632bf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jabber_shell.rb
Expand Up @@ -46,7 +46,7 @@ def power_off

def process_message(message)
puts "Received #{message.body} from #{message.from}"
master_name = message.from.to_s.slice(0,message.from.to_s.index('/')).sub('/', '')
master_name = message.from.to_s.split('/').first
if message && AllowsedUsers.include?(master_name)
process_command(message.body, master_name, message)
else
Expand Down

0 comments on commit a632bf2

Please sign in to comment.