Fixed scope issue

This commit is contained in:
promostarr 2017-04-17 15:57:33 +01:00
parent abf5b9b684
commit 317252fc86
2 changed files with 8 additions and 9 deletions

15
.idea/workspace.xml generated
View file

@ -17,8 +17,8 @@
<file leaf-file-name="Janitor.rb" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Janitor.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1720">
<caret line="86" column="29" lean-forward="false" selection-start-line="86" selection-start-column="29" selection-end-line="86" selection-end-column="29" />
<state relative-caret-position="80">
<caret line="4" column="0" lean-forward="true" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
@ -268,16 +268,15 @@
<option name="presentableId" value="Default" />
<updated>1492353576138</updated>
<workItem from="1492353577745" duration="1817000" />
<workItem from="1492433677612" duration="7006000" />
<workItem from="1492433677612" duration="7194000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="8823000" />
<option name="totallyTimeSpent" value="9011000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="27" width="1920" height="1020" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1234375" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
@ -287,7 +286,7 @@
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22530521" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22530521" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
@ -351,8 +350,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/Janitor.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1720">
<caret line="86" column="29" lean-forward="false" selection-start-line="86" selection-start-column="29" selection-end-line="86" selection-end-column="29" />
<state relative-caret-position="80">
<caret line="4" column="0" lean-forward="true" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>

View file

@ -2,13 +2,13 @@ require 'teamspeak-ruby'
class Janitor
debug_mode = true
@ts = Teamspeak::Client.new('ts3.vereto.net')
def initialize
@ts = login()
end
def login()
@ts = Teamspeak::Client.new('ts3.vereto.net')
@ts.login('serveradmin', ENV["SrvQry"].dup)
@ts.command('use', {sid: 1})
return @ts