summaryrefslogtreecommitdiff
path: root/ircbot.py
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2017-01-17 16:35:28 +0100
committerAlex Auvolat <alex@adnab.me>2017-01-17 16:35:28 +0100
commit2a4f89c41b82e7173d6fb4481af0dcd58c812c19 (patch)
treed99f1cf430c86b54449de1ae1fb66dfd00f9c098 /ircbot.py
parent9524ab7589f1083608cae5608e16285b0707bc48 (diff)
downloadtext-rnn-2a4f89c41b82e7173d6fb4481af0dcd58c812c19.tar.gz
text-rnn-2a4f89c41b82e7173d6fb4481af0dcd58c812c19.zip
Stuff.
Diffstat (limited to 'ircbot.py')
-rwxr-xr-xircbot.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ircbot.py b/ircbot.py
index 07f6ff3..c567e5c 100755
--- a/ircbot.py
+++ b/ircbot.py
@@ -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']