This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
curunir/modules/ddate.py
2010-05-02 21:51:15 +02:00

15 lines
520 B
Python

from base import ModuleBase
import re, subprocess
class Module(ModuleBase):
def __init__(self, manager):
ModuleBase.__init__(self, manager)
def commands(self):
return [('!ddate', 'Das heutige Datum im einzigen relevaten Kalender-System.')]
def groupchat(self, room, message_from, message_body, reply):
if not re.match(r'!ddate(?:\W|\Z)', message_body):
return
reply(subprocess.Popen(['ddate'], stdout=subprocess.PIPE).communicate()[0].strip())