hptoad/examples/plugins/example.py

13 lines
355 B
Python
Raw Normal View History

2017-06-09 15:28:28 +00:00
# -*- python -*-
class Plugin:
def command(self, command, body, nick, from_id, is_admin):
if command != "example":
return {"handled": False}
if is_admin:
reply = "%s: you are an admin" % nick
else:
reply = "%s: you are not an admin" % nick
return {"handled": True, "reply": reply}