Skip to content

Commit

Permalink
docsstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
renefritze committed Mar 30, 2012
1 parent 4142afe commit e8f1e4a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions meetbot.py
Expand Up @@ -79,6 +79,7 @@ def __init__(self,name,tasc):
@AdminOnly
@MinArgs(2)
def cmd_saidprivate_goto(self,args,cmd):
"""pm "!goto CHANNEL" to switch the bot to another channel"""
self.say('bye')
self.tasclient.leave(self._channel)
self._channel = args[1]
Expand All @@ -87,12 +88,14 @@ def cmd_saidprivate_goto(self,args,cmd):
@NotSelf
@MinArgs(4)
def cmd_said_top(self,args,cmd):
"""start a new section in minutes with "!top title can have whitespace" """
top = Top(' '.join(args[3:]),len(self._tops) + 1)
self._tops.append(top)
self._msg.append(top)

@NotSelf
def cmd_said_meetingend(self,args,cmd):
"""write minutes to file and output url to it"""
self._in_session = False
self.say('meeting record ends')
dt = str(self._begin).replace(' ', '_')
Expand All @@ -111,6 +114,7 @@ def cmd_said_meetingend(self,args,cmd):
@NotSelf
@MinArgs(3)
def cmd_said(self,args,cmd):
"""in an active session all SAID response not from myself are recorded"""
if self._in_session:
user = args[1]
if user != self.nick:
Expand All @@ -119,19 +123,22 @@ def cmd_said(self,args,cmd):

@NotSelf
def cmd_said_meetingbegin(self,args,cmd):
"""start a meeting session"""
self._begin = datetime.datetime.now()
self._in_session = True
self._msg = []

@NotSelf
@MinArgs(4)
def cmd_said_startvote(self,args,cmd):
"""start a +- 1|0 vote with "!startvote QUESTION_TITLE" """
vote = Vote(' '.join(args[3:]))
self._current_vote = vote

@NotSelf
@MinArgs(4)
def cmd_said_vote(self,args,cmd):
"""give your vote to current question with "!vote +1","!vote 0" or "!vote -1" """
user = args[1]
score = args[3]
try:
Expand All @@ -141,6 +148,7 @@ def cmd_said_vote(self,args,cmd):

@NotSelf
def cmd_said_endvote(self,args,cmd):
"""end current voting and output result"""
self._msg.append(self._current_vote)
self.say(self._current_vote.txt())

Expand Down

0 comments on commit e8f1e4a

Please sign in to comment.