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 (parent:
1961e9f
)
Fix typo in variable name.
author
Christian Heller
<c.heller@plomlompom.de>
Fri, 5 Feb 2016 10:19:23 +0000
(11:19 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Fri, 5 Feb 2016 10:19:23 +0000
(11:19 +0100)
plomlombot.py
patch
|
blob
|
history
diff --git
a/plomlombot.py
b/plomlombot.py
index 786b072bf483d1c69cfd19e18c18895214bbbf6b..b95bb42499f2f99f3c701b869d4ac84670efcc8b 100755
(executable)
--- a/
plomlombot.py
+++ b/
plomlombot.py
@@
-226,7
+226,7
@@
def handle_command(command, argument, notice, target, session):
msg = ""
while 1:
new_end = markov(snippet)
msg = ""
while 1:
new_end = markov(snippet)
- for name in session.uses_in_chan:
+ for name in session.use
r
s_in_chan:
if new_end[:len(name)] == name.lower():
new_end = "malkovich" + new_end[len(name):]
break
if new_end[:len(name)] == name.lower():
new_end = "malkovich" + new_end[len(name):]
break
@@
-314,7
+314,7
@@
class Session:
self.io = io
self.nickname = nickname
self.channel = channel
self.io = io
self.nickname = nickname
self.channel = channel
- self.uses_in_chan = []
+ self.use
r
s_in_chan = []
self.twtfile = twtfile
self.io.send_line("NICK " + self.nickname)
self.io.send_line("USER " + username + " 0 * : ")
self.twtfile = twtfile
self.io.send_line("NICK " + self.nickname)
self.io.send_line("USER " + username + " 0 * : ")
@@
-382,14
+382,14
@@
class Session:
elif tokens[1] == "353":
names = tokens[5:]
names[0] = names[0][1:]
elif tokens[1] == "353":
names = tokens[5:]
names[0] = names[0][1:]
- self.uses_in_chan += names
+ self.use
r
s_in_chan += names
elif tokens[1] == "JOIN":
name = name_from_join_or_part(tokens)
if name != self.nickname:
elif tokens[1] == "JOIN":
name = name_from_join_or_part(tokens)
if name != self.nickname:
- self.uses_in_chan += [name]
+ self.use
r
s_in_chan += [name]
elif tokens[1] == "PART":
name = name_from_join_or_part(tokens)
elif tokens[1] == "PART":
name = name_from_join_or_part(tokens)
- del(self.use
s_in_chan[self.use
s_in_chan.index(name)])
+ del(self.use
rs_in_chan[self.user
s_in_chan.index(name)])
def parse_command_line_arguments():
parser = argparse.ArgumentParser()
def parse_command_line_arguments():
parser = argparse.ArgumentParser()