Commits

Jason R. Coombs  committed d5f1392

Update to use irc 5.0

  • Participants
  • Parent commits 1cd9b58

Comments (0)

Files changed (3)

+1104
+====
+
+* Updated to work with irc 5.0
+
 1103.6
 ======
 

File pmxbot/core.py

 			self._schedule_at(*action)
 
 	def on_join(self, c, e):
-		nick = e.source().nick
-		channel = e.target()
+		nick = e.source.nick
+		channel = e.target
 		for func in _join_registry:
 			try:
 				func(client=c, event=e, nick=nick, channel=channel)
 			c.notice(nick, line)
 
 	def on_pubmsg(self, c, e):
-		msg = u''.join(e.arguments())
+		msg = u''.join(e.arguments)
 		if not msg.strip():
 			return
-		nick = e.source().nick
-		channel = e.target()
+		nick = e.source.nick
+		channel = e.target
 		if channel in pmxbot.config.log_channels:
 			pmxbot.logging.Logger.store.message(channel, nick, msg)
 		self.handle_action(c, e, channel, nick, msg)
 
 	def on_privmsg(self, c, e):
-		msg = u''.join(e.arguments())
+		msg = u''.join(e.arguments)
 		if not msg.strip():
 			return
-		nick = e.source().nick
+		nick = e.source.nick
 		channel = nick
 		self.handle_action(c, e, channel, nick, msg)
 
 	def on_invite(self, c, e):
-		nick = e.source().nick
-		channel = e.arguments()[0]
+		nick = e.source.nick
+		channel = e.arguments[0]
 		if not channel.startswith('#'):
 			channel = '#' + channel
 		self._channels.append(channel)
 		],
 	),
 	install_requires=[
-		"irc>=3.6,<5.0dev",
+		"irc>=5.0,<6.0dev",
 		"popquotes>=1.3",
 		"excuses>=1.1.2",
 		"pyyaml",