import postgres_interfacing class ping_pong(): def reply(self, target, source, command_arguments): my_postgres_interfacing = postgres_interfacing.postgres_interfacing() if command_arguments: reply_string = "pong. Here's your arguments back: %s" % command_arguments my_postgres_interfacing.irc_reply(target, source, reply_string) else: my_postgres_interfacing.irc_reply(target, source, "pong")