]> gitweb.factorcode.org Git - factor.git/commitdiff
client.base: paremeters was getting the channel name instead of the channel>> slot...
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 9 May 2016 18:59:42 +0000 (11:59 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 9 May 2016 18:59:42 +0000 (11:59 -0700)
extra/irc/client/base/base.factor

index 8cc083d9dd2a007756acbc50a363732a735c3791..ce343315a298e2b408a5a52108fd17827b972178 100644 (file)
@@ -29,7 +29,13 @@ GENERIC: chat-name ( irc-message -- name )
 M: mode       chat-name name>> ;
 M: to-target  chat-name target>> ;
 M: to-me      chat-name sender>> ;
-M: to-channel chat-name channel>> ;
+
+! to-channel messages are things like JOIN
+! Freenode's join looks like:
+! ":flogbot2_!~flogbot2@c-50-174-221-28.hsd1.ca.comcast.net JOIN #concatenative-bots"
+! The channel>> field is empty and it's in parameters instead.
+! This fixes chat> for these kinds of messages.
+M: to-channel chat-name dup channel>> [ nip ] [ parameters>> ?first ] if* ;
 
 GENERIC: chat> ( obj -- chat/f )
 M: string      chat> irc> chats>> at ;