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

16 lines
503 B
Python
Raw Permalink Normal View History

from . import ModuleBase
2010-05-02 21:51:15 +02:00
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.')]
2010-05-02 23:40:21 +02:00
def groupchat(self, room, nick, text, handler):
if not re.match(r'!ddate(?:\W|\Z)', text):
2010-05-02 21:51:15 +02:00
return
2010-05-02 23:40:21 +02:00
handler.reply(subprocess.Popen(['ddate'], stdout=subprocess.PIPE).communicate()[0].strip())