diff options
author | Alex Auvolat <alex@adnab.me> | 2017-01-17 16:35:28 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2017-01-17 16:35:28 +0100 |
commit | 2a4f89c41b82e7173d6fb4481af0dcd58c812c19 (patch) | |
tree | d99f1cf430c86b54449de1ae1fb66dfd00f9c098 /ircbot.py | |
parent | 9524ab7589f1083608cae5608e16285b0707bc48 (diff) | |
download | text-rnn-2a4f89c41b82e7173d6fb4481af0dcd58c812c19.tar.gz text-rnn-2a4f89c41b82e7173d6fb4481af0dcd58c812c19.zip |
Stuff.
Diffstat (limited to 'ircbot.py')
-rwxr-xr-x | ircbot.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -112,11 +112,11 @@ class IRCClient(SimpleIRCClient): # feed phrase to bot prob, = pred_f(self.str2data(s0+'\n')) if any(x in msg.lower() for x in [self.nick, 'frigal']): - if random.uniform(0, 1) < 0.3: - fromnick = self.pred_until(pred_f, prob, '\t', forbid_first=ord(nick[0])) - logger.info("from '%s'"%fromnick) - prob, = pred_f(self.str2data(nick+': ')) - rep = nick + ': ' + self.pred_until(pred_f, prob) + # if random.uniform(0, 1) < 0.3: + fromnick = self.pred_until(pred_f, prob, '\t', forbid_first=ord(nick[0])) + logger.info("from '%s'"%fromnick) + prob, = pred_f(self.str2data(nick+': ')) + rep = nick + ': ' + self.pred_until(pred_f, prob) else: logger.warn('Recieved message on unknown channel: %s'%chan) @@ -144,7 +144,7 @@ if __name__ == "__main__": saveload.do_load() # Build IRC client - server = 'clipper.ens.fr' + server = 'ulminfo.fr' port = 6667 nick = 'frigo' chans = ['#frigotest'] |