diff options
author | joe <joe@jerkface.net> | 2014-02-14 23:39:33 -0500 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-02-14 23:39:33 -0500 |
commit | 74def56dfa4e7361d12f27f09fb0f754109c23b5 (patch) | |
tree | 55f72aa86bdba1a40e66f79e1599ac8c3f74f517 /Presence/EventUtil.hs | |
parent | 9beb2a108ee13e95f71b1c5d0bdce4263caef84c (diff) |
client connections
Diffstat (limited to 'Presence/EventUtil.hs')
-rw-r--r-- | Presence/EventUtil.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Presence/EventUtil.hs b/Presence/EventUtil.hs index a1c48e33..adcae1d3 100644 --- a/Presence/EventUtil.hs +++ b/Presence/EventUtil.hs | |||
@@ -29,6 +29,12 @@ isServerIQOf (EventBeginElement name attrs) testType | |||
29 | = True | 29 | = True |
30 | isServerIQOf _ _ = False | 30 | isServerIQOf _ _ = False |
31 | 31 | ||
32 | isClientIQOf (EventBeginElement name attrs) testType | ||
33 | | name=="{jabber:client}iq" | ||
34 | && matchAttrib "type" testType attrs | ||
35 | = True | ||
36 | isClientIQOf _ _ = False | ||
37 | |||
32 | matchAttrib name value attrs = | 38 | matchAttrib name value attrs = |
33 | case List.find ( (==name) . fst) attrs of | 39 | case List.find ( (==name) . fst) attrs of |
34 | Just (_,[ContentText x]) | x==value -> True | 40 | Just (_,[ContentText x]) | x==value -> True |