I'm making an IRC bot which will log the hostname of a user that just joined the channel, and then log it to a file. The method I'm trying to do this in, is perform a whois command, and eventually it will seperated the hostname, then resolve it to an IP, and also log that.
I'm fairly new to both Python and Twisted, and this is the part of my code that is supposed to log the hostname of the user who just joined (or just log the whois for now):
def userJoined(self, user, channel):
self.logger.log("%s" % (self.whois(user)))
However, when I check the logs, it writes None. Does anybody know what's wrong with the code, and how to fix it? Thanks.