Commits

Jason R. Coombs committed 829489b

Implemented TODO in privmsg

  • Participants
  • Parent commits 00d5f59

Comments (0)

Files changed (1)

File irc/server.py

         """
         Handle sending a private message to a user or channel.
         """
-        # FIXME: events.codes['needmoreparams']
-        target, msg = params.split(' ', 1)
+        target, sep, msg = params.partition(' ')
+        if not msg:
+            raise IRCError.from_name('needmoreparams',
+                'PRIVMSG :Not enough parameters')
 
         message = ':%s PRIVMSG %s %s' % (self.client_ident(), target, msg)
         if target.startswith('#') or target.startswith('$'):