65 local mechanisms = {} |
65 local mechanisms = {} |
66 local cyrus_mechs = cyrussasl.listmech(self.cyrus, nil, "", " ", "") |
66 local cyrus_mechs = cyrussasl.listmech(self.cyrus, nil, "", " ", "") |
67 for w in s_gmatch(cyrus_mechs, "[^ ]+") do |
67 for w in s_gmatch(cyrus_mechs, "[^ ]+") do |
68 mechanisms[w] = true; |
68 mechanisms[w] = true; |
69 end |
69 end |
70 self.mechanisms = mechanisms |
70 self.mechs = mechanisms |
71 return array.collect(keys(mechanisms)); |
71 return array.collect(keys(mechanisms)); |
72 end |
72 end |
73 |
73 |
74 -- select a mechanism to use |
74 -- select a mechanism to use |
75 function method:select(mechanism) |
75 function method:select(mechanism) |
76 self.mechanism = mechanism; |
76 self.mechanism = mechanism; |
77 return self.mechanisms[mechanism]; |
77 return self.mechs[mechanism]; |
78 end |
78 end |
79 |
79 |
80 -- feed new messages to process into the library |
80 -- feed new messages to process into the library |
81 function method:process(message) |
81 function method:process(message) |
82 local err; |
82 local err; |