Jan has the option of listening globally or just one channel

This commit is contained in:
promostarr 2017-04-17 14:09:23 +01:00
parent c07ea102c7
commit fe787a7fdf
2 changed files with 16 additions and 17 deletions

31
.idea/workspace.xml generated
View file

@ -2,8 +2,7 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="ecb21532-0ae7-441d-90a8-4b144fd51290" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Janitor.rb" afterPath="$PROJECT_DIR$/Janitor.rb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/notification.rb" afterPath="$PROJECT_DIR$/notification.rb" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
@ -15,21 +14,21 @@
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="Janitor.rb" pinned="false" current-in-tab="true">
<file leaf-file-name="Janitor.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Janitor.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
<caret line="21" column="16" lean-forward="false" selection-start-line="21" selection-start-column="16" selection-end-line="21" selection-end-column="16" />
<state relative-caret-position="400">
<caret line="23" column="8" lean-forward="true" selection-start-line="23" selection-start-column="8" selection-end-line="23" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="notification.rb" pinned="false" current-in-tab="false">
<file leaf-file-name="notification.rb" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/notification.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="160">
<caret line="8" column="25" lean-forward="false" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="25" />
<caret line="8" column="26" lean-forward="false" selection-start-line="8" selection-start-column="26" selection-end-line="8" selection-end-column="26" />
<folding />
</state>
</provider>
@ -54,8 +53,8 @@
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/core.rb" />
<option value="$PROJECT_DIR$/notification.rb" />
<option value="$PROJECT_DIR$/Janitor.rb" />
<option value="$PROJECT_DIR$/notification.rb" />
</list>
</option>
</component>
@ -130,12 +129,12 @@
<option name="presentableId" value="Default" />
<updated>1492353576138</updated>
<workItem from="1492353577745" duration="1817000" />
<workItem from="1492433677612" duration="830000" />
<workItem from="1492433677612" duration="870000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="2647000" />
<option name="totallyTimeSpent" value="2687000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="27" width="1920" height="1020" extended-state="6" />
@ -203,18 +202,18 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/notification.rb">
<entry file="file://$PROJECT_DIR$/Janitor.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="160">
<caret line="8" column="25" lean-forward="false" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="25" />
<state relative-caret-position="400">
<caret line="23" column="8" lean-forward="true" selection-start-line="23" selection-start-column="8" selection-end-line="23" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Janitor.rb">
<entry file="file://$PROJECT_DIR$/notification.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
<caret line="21" column="16" lean-forward="false" selection-start-line="21" selection-start-column="16" selection-end-line="21" selection-end-column="16" />
<state relative-caret-position="160">
<caret line="8" column="26" lean-forward="false" selection-start-line="8" selection-start-column="26" selection-end-line="8" selection-end-column="26" />
<folding />
</state>
</provider>

View file

@ -6,7 +6,7 @@
jan = Janitor.new
while (i > 0)
begin
cmd = jan.listen(true)
cmd = jan.listen(false)
puts cmd
if cmd == '!help'
msg = "I am Janitor, you can tell me to do things."