| 6 | |
| 7 | |
| 8 | class Interface(object): |
| 9 | |
| 10 | def __init__(self, address): |
| 11 | self.address = address |
| 12 | self.history = {} |
| 13 | |
| 14 | def last_plugin_access(self, plugin_name, account): |
| 15 | if (plugin_name, account) in self.history: |
| 16 | return self.history[(plugin_name, account)] |
| 17 | else: |
| 18 | return 0 |
| 19 | |
| 20 | def use_for(self, plugin_name, account): |
| 21 | self.history[(plugin_name, account)] = time.time() |
| 22 | |
| 23 | def __repr__(self): |
| 24 | return "<Interface - %s>" % self.address |
| 25 | |
| 26 | |
| 27 | class MultiHome(Addon): |