annotate mod_webpresence/mod_webpresence.lua @ 513:5e8843a869a3

mod_pastebin: Fix off-by-one in line counting (display issue only)
author Matthew Wild <mwild1@gmail.com>
date Mon, 19 Dec 2011 11:38:57 +0000
parents 63080b8973ee
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
1 do local e={};e["icons/status_online.png"]='�PNG\r\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2 \
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
3 \0\0\0\rIHDR\0\0\0\0\0\0\0\0\0�V%\0\0\0sBIT|d�\0\0\0 pHYs\0\0\r\0\0\r�B(�x\0\0\0tEXtSoftware\0www.inkscape.org��<\0\0IDAT(�U�_h[u�?�wo�M�65K�el]�+��a[u�OE\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
4 "�>D܆P�d0����/V�ӗ�XAa��)��Ct�i�����n7�U��$m�&Mn��{ׇ;kw���p��
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
5 �s��뺬�\'?��7C��jZ�����Ԣ� T��u����\\;�zV��wxG�n{f4�3�
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
6 ��wiI���/�/���ѿ�^;y�^���#����j�b��B\0H["�%v��1���k�?�R۶��<�\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7 ���\\b��Ь*Z@C�{�A\r�PQu%�3ε�jL�\0���ޕ�{Yh�
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
8 T��P���y��ɟ\'�� ��ޫ��?��(��a+d
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
9 E((BAh�c3T���^Ob0�a��2K�%u���U�-��.�x"-K��Ÿ`ߖ}�zb���cz�4P��ª��ґȲ�9���l��6m�i���b��A.w\\Fn�/7XQA GZ�Ч!��~�a�lcm"G"�9��� ��<�����x�ULE���o.5�"-�-�>~�@6@��$�
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
10 >�<JӚ&�q��8���<���pZ
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
11 �)�[�<�H\'\0�I���%��~#�t�gR!X����־����ؽ���2F�� #�\0p�C܈���wp*<��d������3S��/?�oY�V�\\�v�6
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
12 X����a\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
13 �V��������
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
14 SC�����T&��[��ζ�B5�?�1�2oe@��uw�DήI����\'�%�+ƈ�ݩ�QN��{<�J᱂�TTd�:\r�6��\\\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
15 }��q���s��C�Z��ӝ/V�����jg-hE�����ӯ�������_���\'�i�~�&\0\0\0\0IEND�B`�'e["icons/status_away.png"]='�PNG\r\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
16 \
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
17 \0\0\0\rIHDR\0\0\0\0\0\0\0\0\0�V%\0\0\0sBIT|d�\0\0\0 pHYs\0\0\r\0\0\r�B(�x\0\0\0tEXtSoftware\0www.inkscape.org��<\0\01IDAT(�U�_L�u\0����{���Q�D� at���Ԍp�X�H�g��\\��5��a��Vm��څEK��E.Bm,\'� �H�)” �����9�y��{]�����s�<�R��9���/���*���nA<�Ʀ]���m�����s��=��nS�lq����2����\0�t��c3w���r��I��p��w��~�x�ry��T��n0�i���i���8��.�p�ԉ3J\0<����X-V\0=0}�|�`�?���b��`�7A�}��m\0����m���5Ç0M���sf��Dj��K��+��XΚ����<_��0UzW8� �@:�a �~tˏfhB��á��f,��ͤX�(�[��>c��y�@y(�)��BI���,Y��ue�y�z3o�$胰�Z&�,�PII*���C����$2�d�I�{C��ֻ|���S����<\0��"�r��:��p�.���d�J�I$x�-���6~����/�ٱQ�`�ք1>�E�b�}t~x�֣ͼw��Ҩ�{�u���5�T%�%%\0�Ӿ��}�f&����Կ�G��Ъ`x��7<IM��Gw3H�@*�;0��K"���U�Dtd��/�M}C#6nfo��l ^`E(����5�����y�z�_C����z�cy�+W�����um��d��sx�IT�f�`2��\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
18 �{~��_SJQ]�U+����FFK�3��GϰőgƘY�Lz�A>�=4�>�ٛ=Fu�VC�h��?��bɔ�4C̠ɬ�w��U������j�wv����{Y[��ҏ]�@��*���N�n߼k^���q�Ro���,3v��,j�\0\0\0\0IEND�B`�'e["icons/status_xa.png"]="�PNG\r\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
19 \
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
20 \0\0\0\rIHDR\0\0\0\0\0\0\0\0\0�V%\0\0\0sBIT|d�\0\0\0 pHYs\0\0\r\0\0\r�B(�x\0\0\0tEXtSoftware\0www.inkscape.org��<\0\07IDAT(�U�mLUu\0���s�=�s�7���Lo�C؂��jm\r��IlB��h�����Ћ�sE�����zq���ImI�,m �(6�)|P,��.��������������쑄,Ϟ��6��ivF�jYEq�hF���������tC�m���E?�K�ۤIH�m
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
21 L����Dm�3�r�љPy����uS�m���^����JUMƥ�\0X�C�p�O��Kk���-,�>_SU180$d����'�x���h���S��T��>u��o�_PD�����87s@~���i�ҵ�/����M4��ώ��#���8�ӹk/�Ot���$X�ʖ���k%�|!�X�P�KW����6�օx�s
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
22 �b��G�uk;/?����etJ� ����%{�F�����};y�X��/��!�����8B��aa������ҁ��D����>7^��Ӷ���*>��+�~?�X�ƚ{y_��IX��&�����Eq9ic�9��acd�d���i��(\0�`���vp�\0��`�׫Ӓ$�j���5�T ��O\r�7��M\r��Ӆat=��P%��p���x��‚Y%�j3ٌ]p�񠷵Ѻ���~D������a&FFس�\0w����zv��XԽ3R䡺�����L'\\�+�z�
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
23
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
24 �����װL�3��ZU��딎��������͒��á#��N�ge���ʑ\\2��Q�m ,K2�L��M�7��^hQ\0��ڎc����+���_ ��E�e'(.�i-\\1��m����J������X�������M1�Q䋉���;Vw�>�E����*�lwQ:����E�=wUU'���v�?�����h��j��\0\0\0\0IEND�B`�"e["icons/status_dnd.png"]="�PNG\r\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
25 \
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
26 \0\0\0\rIHDR\0\0\0\0\0\0\0\0\0�V%\0\0\0sBIT|d�\0\0\0 pHYs\0\0\r\0\0\r�B(�x\0\0\0tEXtSoftware\0www.inkscape.org��<\0\0�IDAT(�}��k\\U���s��;IBj�\"���2h���RL��M[pQ����WnDtUQ(�nZ*6�]T�\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
27 �ªP-�lL-I�$����w���⚚ ���w��^x��D�����;{��-��S�GZ�宩�������_��U���٣��6�?�j��d\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
28 %!���E`9�x��}W'��zy�?�OϞZ�����x�i��.�+#E��i:mϷ{G~;�ܡ����\0h�^x���k}���`m�^D�@�w��)��|xp��_�'�浙�7~0XS*�'�}�z�`��@�B�����\"v�|�_���:;��ڢ�1�Z� R��Z�5(�P\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
29 ����_��6ϙ�(��\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
30 7�\0i���+R�1J�1A 1D�i�W���L�>�F�b�{s����9�s��f�=��?���=7j�!!ƈ�k-���(�ͦJVj�<w�]>�3��B� DAD�֚�Z�]1�4[���C��/��4�j�D!@��UY��@�����}�b�������SC�B�P��ʴ�zE�,E�n�w��������p�1����e:�]Yߕ��_��\\|j�ڭ{����ɉ�'�֓�{�+��
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
31 |�_����R:6rj��x����u�Rc���ፖN�uj)���О�O�?y�[�]𶎼�x�t��#������fjWW���d�������ݿ(�y�Ri�\0\0\0\0IEND�B`�"e["icons/status_chat.png"]='�PNG\r\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
32 \
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
33 \0\0\0\rIHDR\0\0\0\0\0\0\0\0\0�V%\0\0\0sBIT|d�\0\0\0 pHYs\0\0\r\0\0\r�B(�x\0\0\0tEXtSoftware\0www.inkscape.org��<\0\0IDAT(�U�L�u����s��!����D�`s��q�Y:3�deS˭��1���5d�-���m�f�rㇶ6;f-o��Zs؈X6`LԎ�������������K��k?��P�W�t:r5c�0:��75m\rLƌP��/ު���z��[�/�=�����@�4"�Xb24��~����ğo/�ǎ�{_h���h�*�Rn�r"),I �$��3�=]}8�@�m��@�J�Ҵ.Fk/Z�к�<���-�n��o:����\0���w��//��g�Mk6�E)�ŲbX�}N����\r�`"�&�����o++tyY�ŕ�Ma�p\0�к�\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
34 P�E�h�������v��si�w%]��D�a�gk�B�Y �e%�,���Nݦ��G�{�bu�o��X�d(-��+�g�E2tw�P\\<M�3N��G���ɓg�7�������-I�33ss��&ׯ���oC�?xzg���c�+�YS�����f �\0\0� �Ld�D" jk�s����b���
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
35 �"|�#G�p�g�,,K1q�yGϦ�̓g����Z[/��\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
36 u����Z� �@\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
37 �J 2���ܝ����u�ȵ���X%�W�իa���u�H����H�T7���j*�jލ�������Z&cy�����\\�={���
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
38 $n��Cq��.�u��~-" "�������.�D�}��䧟�7��Knٲ�7��Su�%XDx�����7��{lK��`��-�����("��j��[
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
39\rVT�V/se}�c��Ȉ��aw^�������b�@0�3\0\0\0\0IEND�B`�'e["icons/status_offline.png"]="�PNG\r\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
40 \
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
41 \0\0\0\rIHDR\0\0\0\0\0\0\0\0\0�V%\0\0\0sBIT|d�\0\0\0 pHYs\0\0\r\0\0\r�B(�x\0\0\0tEXtSoftware\0www.inkscape.org��<\0\0IDAT(�U��Kcg��^���\\��[;���S�Ap�)t�m�L)3V,dp��`6���
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
42 �]�/BA�2�JA�P���(����i�NҚdD'~Nr?޷�X��ٝ��=�Q��\\�_?V����AQ�v� �������埮g�j���C�i�a����(\0B<��u].//��ūT]>Z~��P�E�o5Fo�f���0\0����P0w�r���{�U���F��փ�6660�41]����!�J��d޽<�<P>�߯F>���������H)�u�t:���8###8�����F0>0��{5���놚�d���dpp���vFGG�m���n��8�T���ft]GJ���Q��\0�X���y������`ee������YZZb�����I��)����F�\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
43 (��szz��ܡP���#z{{��bT*��2������Du��<��$MMM�E\
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
44 �\0�m�L&�����<�\0x��jm7���֬������J����#�LR�TH$�������eYh���i)���˸���8d�Y��������Β�f���abb���~����u]|�e���>�Ь�¡��������R�D\"Agg'��S,�RRWWG�TUʓ��EJ�Gw?�ގ��<�\\.�������i��#��������3y��_?n���T�p�ztx\\�CQ���۶B�� ˲^���E�W���lx��V��ߥ��
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
45 aY�7�&���Â�3�Y�D��_~���UUu��۟_<1��mU�ir���r���Z���7�������g����D\0\0\0\0IEND�B`�"function require_resource(r)return e[r]or error("resource '"..tostring(r).."' not found");end end local s=require"util.jid".prepped_split;if not require_resource then
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
46 function require_resource(e)local r=io.open((config.get("*","core","presence_icons")or"")..e);if r then
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
47 return r:read("*a");end
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
48 module:log("warn","Failed to open image file %s",(config.get("*","core","presence_icons")or"")..e);return"";end
63080b8973ee mod_webpresence: Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
49 end