Conditions | 3 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | from event import Event |
||
25 | def ping(self, nick): |
||
26 | import subprocess |
||
27 | try: |
||
28 | resp = subprocess.call(["ping", "-c 1", self.box_to_ip[nick.lower()]]) |
||
29 | except KeyError: |
||
30 | self.say(self.event.channel, "BAD NAME IDIOT") |
||
31 | return False |
||
32 | if resp == 0: |
||
33 | return True |
||
34 | else: |
||
35 | return False |
||
36 | |||
37 |