<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.0">
    <TriggerPackage>
        <TriggerGroup isActive="yes" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
            <name>who_grouping</name>
            <script></script>
            <triggerType>0</triggerType>
            <conditonLineDelta>0</conditonLineDelta>
            <mStayOpen>0</mStayOpen>
            <mCommand></mCommand>
            <mFgColor>#ff0000</mFgColor>
            <mBgColor>#ffff00</mBgColor>
            <mSoundFile></mSoundFile>
            <colorTriggerFgColor>#000000</colorTriggerFgColor>
            <colorTriggerBgColor>#000000</colorTriggerBgColor>
            <regexCodeList/>
            <regexCodePropertyList/>
            <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
                <name>who lines</name>
                <script>-- Is the room already in the list? If not, add it and initialize room attributes
if not who_list[matches[3]] then 
   who_list[matches[3]] = {}
   who_list[matches[3]].names = {}
   who_list[matches[3]].roomname = matches[3]
end

-- Now that we know the room exists, add the name
table.insert(who_list[matches[3]].names,matches[2])</script>
                <triggerType>0</triggerType>
                <conditonLineDelta>39</conditonLineDelta>
                <mStayOpen>0</mStayOpen>
                <mCommand></mCommand>
                <mFgColor>#ff0000</mFgColor>
                <mBgColor>#ffff00</mBgColor>
                <mSoundFile></mSoundFile>
                <colorTriggerFgColor>#000000</colorTriggerFgColor>
                <colorTriggerBgColor>#000000</colorTriggerBgColor>
                <regexCodeList>
                    <string>^\s+(\w+) - .* - (.*)$</string>
                </regexCodeList>
                <regexCodePropertyList>
                    <integer>1</integer>
                </regexCodePropertyList>
            </Trigger>
            <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
                <name>end of who</name>
                <script>expandAlias(&quot;groups&quot;)
disableTrigger(&quot;who_grouping&quot;)</script>
                <triggerType>0</triggerType>
                <conditonLineDelta>39</conditonLineDelta>
                <mStayOpen>0</mStayOpen>
                <mCommand></mCommand>
                <mFgColor>#ff0000</mFgColor>
                <mBgColor>#ffff00</mBgColor>
                <mSoundFile></mSoundFile>
                <colorTriggerFgColor>#000000</colorTriggerFgColor>
                <colorTriggerBgColor>#000000</colorTriggerBgColor>
                <regexCodeList>
                    <string>^There are \d+ players on this plane.*\.$</string>
                </regexCodeList>
                <regexCodePropertyList>
                    <integer>1</integer>
                </regexCodePropertyList>
            </Trigger>
        </TriggerGroup>
    </TriggerPackage>
    <TimerPackage/>
    <AliasPackage>
        <AliasGroup isActive="yes" isFolder="yes">
            <name>who_grouping_aliases</name>
            <script></script>
            <command></command>
            <regex></regex>
            <Alias isActive="yes" isFolder="no">
                <name>who group main</name>
                <script>send(&quot;config pagelength 250&quot;)
send(&quot;who&quot;)
send(&quot;config pagelength 30&quot;)
who_list = {}
enableTrigger(&quot;who_grouping&quot;)</script>
                <command></command>
                <regex>^whog$</regex>
            </Alias>
            <Alias isActive="yes" isFolder="no">
                <name>grouping output</name>
                <script>cecho(&quot;&lt;grey&gt;\n----------Groups----------\n&quot;)
for k,v in pairs(who_list) do
    if (#v.names &gt; 1) then
        echo(v.roomname)
        cecho(string.rep(&quot; &quot;,25-string.len(v.roomname))..&quot; has &lt;red&gt;&quot;..#v.names..&quot;&lt;grey&gt; people. (&lt;purple&gt;&quot;)
        for _,name in ipairs(v.names) do echo(&quot; &quot;..name) end
        echo(&quot; )\n&quot;)
    end
end</script>
                <command></command>
                <regex>^groups$</regex>
            </Alias>
            <Alias isActive="yes" isFolder="no">
                <name>find invididual</name>
                <script>echo(&quot;\n-----------Find-----------\n&quot;)
for k,v in pairs(who_list) do
    for _,current in pairs(v.names) do
        if (current == matches[2]) then
            echo(v.roomname)
            cecho(string.rep(&quot; &quot;,25-string.len(v.roomname))..&quot; has &lt;red&gt;&quot;..#v.names..&quot;&lt;grey&gt; people. (&lt;purple&gt;&quot;)
            for _,name in ipairs(v.names) do echo(&quot; &quot;..name) end
            echo(&quot; )\n&quot;)
        end
    end
end</script>
                <command></command>
                <regex>^find (\w+)$</regex>
            </Alias>
            <Alias isActive="yes" isFolder="no">
                <name>individuals</name>
                <script>cecho(&quot;&lt;grey&gt;\n----------Groups----------\n&quot;)
for k,v in pairs(who_list) do
    if (#v.names == 1) then
        echo(v.roomname)
        cecho(string.rep(&quot; &quot;,25-string.len(v.roomname))..&quot; has &lt;red&gt;&quot;..#v.names..&quot;&lt;grey&gt; people. (&lt;purple&gt;&quot;)
        for _,name in ipairs(v.names) do echo(&quot; &quot;..name) end
        echo(&quot; )\n&quot;)
    end
end</script>
                <command></command>
                <regex>^alone$</regex>
            </Alias>
        </AliasGroup>
    </AliasPackage>
    <ActionPackage/>
    <ScriptPackage/>
    <KeyPackage/>
</MudletPackage>
