Commit 67e2dc42 authored by Jonathan Harker's avatar Jonathan Harker
Browse files

Some bug fixes.

parent b3c4eb05
......@@ -180,7 +180,8 @@ class LolBot(irc.IRCClient):
print "Joined %s." % (channel,)
def privmsg(self, user, channel, msg):
if channel !=
user = user.split('!')[0]
if channel == self.nickname:
# Private /msg from a user
self.do_command(msg, user)
......@@ -203,12 +204,12 @@ class LolBot(irc.IRCClient):
def say_public(self, text):
"Print TEXT into public channel, for all to see."
self.msg(, text)
self.notice(, text)
self.log_event(self.nickname, text)
def say_private(self, nick, text):
"Send private message of TEXT to NICK."
self.msg(nick, text)
self.notice(nick, text)
def reply(self, text, to_private=None):
"Send TEXT to either public channel or TO_PRIVATE nick (if defined)."
......@@ -231,8 +232,6 @@ class LolBot(irc.IRCClient):
private message addressed to the bot. (e.g. "bot: blah").
target = target.strip()
if cmd == 'help':
self.reply(self.helptext, target)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment