- Timestamp:
- 2015-04-12T13:46:45Z (10 years ago)
- Children:
- f15553d
- Parents:
- f3af614
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/implugin.py
rf3af614 rc5a7b8d 35 35 36 36 class BitlBeeIMPlugin(BaseHandler): 37 # Protocol name to be used in the BitlBee CLI, etc. 37 38 NAME = "rpc-test" 39 40 # See account.h (TODO: Add constants.) 41 ACCOUNT_FLAGS = 3 42 43 # Supported away states. If your protocol supports a specific set of 44 # away states, put them in a list in this variable. 45 AWAY_STATES = ["Away", "Busy"] #None 38 46 39 47 # Filled in during initialisation: … … 43 51 # Full version string 44 52 bitlbee_version_str = None 53 # Will become an RpcForwarder object to call into BitlBee 54 bee = None 45 55 46 56 @classmethod … … 62 72 "name": self.NAME, 63 73 "method_list": list(set(dir(self)) & set(SUPPORTED_FUNCTIONS)), 74 "account_flags": self.ACCOUNT_FLAGS, 75 "away_state_list": self.AWAY_STATES, 64 76 "settings": { 65 77 "oauth": { … … 89 101 print self.bee.set_setstr("test", handle) 90 102 print self.bee.set_reset("test") 103 104 def set_away(self, state, message): 105 print "You're a slacker: %s (%r)" % (state, message) 91 106 92 107 def RunPlugin(plugin, debug=True):
Note: See TracChangeset
for help on using the changeset viewer.