summaryrefslogtreecommitdiffstats
path: root/wmd/actions/passive/pong.py
blob: 19e12a753fbf5401732b3486cb0710b87c55687c (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
            self.log(msg)
            irc.rawsend(msg)