mirror of
https://github.com/RussellChamp/tilde-projects.git
synced 2026-10-28 00:22:34 +00:00
Add files I forgot
This commit is contained in:
1 parent
5f1bf146c3
commit
772995c0ff
29 files changed
+1807
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import pinhook.plugin
|
||||
from util import topic
|
||||
|
||||
import inflect
|
||||
|
||||
@pinhook.plugin.listener('topic')
|
||||
def topic_listener(msg):
|
||||
if msg.text.startswith("TOPIC"):
|
||||
topic.count_topic(msg.channel, msg.nick, msg.time, msg.text)
|
||||
|
||||
@pinhook.plugin.register('!topic')
|
||||
def topic_plugin(msg):
|
||||
return pinhook.plugin.message(topic.get_topic(msg.channel, msg.nick, msg.time))
|
||||
|
||||
@pinhook.plugin.register('!settopic')
|
||||
def set_topic_plugin(msg):
|
||||
return pinhook.plugin.action("TOPIC {} {}".format(msg.channel, msg.arg))
|
||||
|
||||
@pinhook.plugin.register('!randomtopic')
|
||||
def set_topic_plugin(msg):
|
||||
return pinhook.plugin.message(topic.random_topic(msg.channel, msg.nick, msg.time, msg.nick == msg.owner))
|
||||
|
||||
@pinhook.plugin.register('!suggesttopic')
|
||||
def suggest_topic_plugin(msg):
|
||||
return pinhook.plugin.message(topic.random_topic(msg.channel, msg.nick, msg.time, False))
|
||||
|
||||
@pinhook.plugin.register('!thistory')
|
||||
def topic_history_plugin(msg):
|
||||
return pinhook.plugin.message(topic.topic_history(msg.channel, msg.nick, msg.arg))
|
||||
|
||||
Reference in new issue
Block a user