Dance.handle()   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 7

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
cc 2
dl 7
loc 7
rs 9.4285
c 0
b 0
f 0
1 View Code Duplication
class Dance:
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2
  def __init__(self, events=None, printer_handle=None, bot=None, say=None):
3
    self.events = events
4
    self.printer = printer_handle
5
    self.interests = ['__.dance__']
6
    self.bot = bot 
7
8
    self.help = ".dance"
9
10
    for event in events:
11
      if event._type in self.interests:
12
        event.subscribe(self)
13
14
  def handle(self, event):
15
    try:
16
      self.printer("PRIVMSG " + event.channel + " : :D-\-< " + '\n')
17
      self.printer("PRIVMSG " + event.channel + " : :D-|-< " + '\n')
18
      self.printer("PRIVMSG " + event.channel + " : :D-/-< " + '\n')
19
    except TypeError:
20
      pass
21