summaryrefslogtreecommitdiffstats
path: root/wmd/actions/passive/pong.py
blob: 813147d0d2bde82ba09068475973f344219e873a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from wmd.actions import Action

import settings

class RespondToPing(Action):
    def recv_msg(self, irc, obj_data):
        if obj_data.command == "PING":
            if obj_data.params[0] == ":":
                server = obj_data.params[1:]
            else:
                server = obj_data.params
            msg = "-> PONG %s" % server
            print msg
            irc.rawsend(msg)