equal
deleted
inserted
replaced
96 mechanisms[mechanism] = true; |
96 mechanisms[mechanism] = true; |
97 end |
97 end |
98 end |
98 end |
99 end |
99 end |
100 end |
100 end |
101 self["possible_mechanisms"] = mechanisms; |
101 self.mechs = mechanisms; |
102 return mechanisms; |
102 return mechanisms; |
103 end |
103 end |
104 |
104 |
105 -- select a mechanism to use |
105 -- select a mechanism to use |
106 function method:select(mechanism) |
106 function method:select(mechanism) |
107 if self.mech_i then |
107 if self.mech_i then |
108 return false; |
108 return false; |
109 end |
109 end |
110 |
110 |
111 self.mech_i = mechanisms[mechanism]; |
111 self.mech_i = self.mechs[mechanism]; |
112 return (self.mech_i ~= nil); |
112 return (self.mech_i ~= nil); |
113 end |
113 end |
114 |
114 |
115 -- feed new messages to process into the library |
115 -- feed new messages to process into the library |
116 function method:process(message) |
116 function method:process(message) |