home
·
contact
·
privacy
projects
/
plomlombot-irc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f3d9481
)
In Markov text generation, lowercase earlier.
author
Christian Heller
<c.heller@plomlompom.de>
Thu, 4 Feb 2016 07:07:59 +0000
(08:07 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Thu, 4 Feb 2016 07:07:59 +0000
(08:07 +0100)
plomlombot.py
patch
|
blob
|
history
diff --git
a/plomlombot.py
b/plomlombot.py
index c8c11f45ebb03a3e0a73a9339ba82013813278b7..82f96a21e4c93b7371ef1669f749fd73c96afde0 100755
(executable)
--- a/
plomlombot.py
+++ b/
plomlombot.py
@@
-192,7
+192,7
@@
def handle_command(command, argument, notice, target, session):
for name in session.uses_in_chan:
while True:
try:
for name in session.uses_in_chan:
while True:
try:
- del(tokens[tokens.index(name)])
+ del(tokens[tokens.index(name
.lower()
)])
except ValueError:
break
return tokens
except ValueError:
break
return tokens
@@
-207,7
+207,7
@@
def handle_command(command, argument, notice, target, session):
file.close()
tokens = []
for line in lines:
file.close()
tokens = []
for line in lines:
- line = line.replace("\n", "")
+ line = line.replace("\n", "")
.lower()
tokens += line.split()
tokens = purge_undesired(tokens)
if len(tokens) <= select_length:
tokens += line.split()
tokens = purge_undesired(tokens)
if len(tokens) <= select_length:
@@
-230,7
+230,7
@@
def handle_command(command, argument, notice, target, session):
for i in range(select_length - 1):
snippet[i] = snippet[i + 1]
snippet[select_length - 1] = new_end
for i in range(select_length - 1):
snippet[i] = snippet[i + 1]
snippet[select_length - 1] = new_end
- notice(msg
.lower()
+ "malkovich.")
+ notice(msg + "malkovich.")
if "addquote" == command:
addquote()
if "addquote" == command:
addquote()