Changeset 20
- Timestamp:
- 01/19/07 10:07:17 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/amazonbot/amazonbot.py
r19 r20 147 147 return method(c, e, to, words[1:]) # words[0] == command name 148 148 149 # silence 150 self.silence(msg, c, e, to) 151 if self._silent: 152 return False 153 149 154 # freq_lines 150 155 self._current_lines += 1 … … 169 174 return False 170 175 self._prev_time = _current_time 171 172 # silence173 self.silence(msg, c, e, to)174 if self._silent:175 return False176 176 177 177 nominals = mecab_parse(msg) … … 210 210 def process_keyword(self, keyword): 211 211 return [None, None] 212 213 def is_silent(self): 214 return self._silent 215 def get_current_lines(self): 216 return self._current_lines 217 def get_prev_time(self): 218 return self._prev_time 212 219 213 220 class AmazonBot(AmazonBotBase): … … 237 244 return 'AmazonBot by %s, based on python-irclib' % __author__ 238 245 246 def onmsg_s(self, c, e, to, args): return self.onmsg_status(c, e, to, args) 247 def onmsg_status(self, c, e, to, args): 248 """Syntax: !status 249 """ 250 _debug('in status command: %s', str(args)) 251 252 c.notice(to, 'silent: %s' % self.is_silent()) 253 c.notice(to, 'current lines: %d' % self.get_current_lines()) 254 c.notice(to, time.strftime('previous time: %b %d %T', 255 time.localtime(self.get_prev_time()))) 256 return True 257 239 258 def onmsg_isbn(self, c, e, to, args): 240 259 """Syntax: !isbn <ISBN number> … … 315 334 _from = nm_to_n(e.source()) # ãã°ãæµããŠããŸãã®ã§ãã«ãã¯çŽæ¥éä¿¡å 316 335 ãž 336 c.notice(_from, self.get_version()) 337 317 338 docs = [] 318 339 for key in dir(self):
Note: See TracChangeset
for help on using the changeset viewer.