]> gitweb.factorcode.org Git - factor.git/commitdiff
irc.client: Fix docs
authorBruno Deferrari <utizoc@gmail.com>
Tue, 30 Sep 2008 06:11:54 +0000 (03:11 -0300)
committerBruno Deferrari <utizoc@gmail.com>
Tue, 30 Sep 2008 06:11:54 +0000 (03:11 -0300)
extra/irc/client/client-docs.factor

index 6bb6a6328ed99c4ff3a065ecff41b23668b76b7c..d150e6d36f02a3af2ea2e816f9aa987966727d16 100644 (file)
@@ -1,20 +1,15 @@
 USING: help.markup help.syntax quotations kernel irc.messages ;
 IN: irc.client
 
-HELP: irc-client "IRC Client object"
-"blah" ;
+HELP: irc-client "IRC Client object" ;
 
-HELP: irc-server-listener "Listener for server messages unmanaged by other listeners"
-"blah" ;
+HELP: irc-server-listener "Listener for server messages unmanaged by other listeners" ;
 
-HELP: irc-channel-listener "Listener for irc channels"
-"blah" ;
+HELP: irc-channel-listener "Listener for irc channels" ;
 
-HELP: irc-nick-listener "Listener for irc users"
-"blah" ;
+HELP: irc-nick-listener "Listener for irc users" ;
 
-HELP: irc-profile "IRC Client profile object"
-"blah" ;
+HELP: irc-profile "IRC Client profile object" ;
 
 HELP: connect-irc "Connecting to an irc server"
 { $values { "irc-client" "an irc client object" } }
@@ -24,6 +19,10 @@ HELP: add-listener "Listening to irc channels/users/etc"
 { $values { "irc-listener" "an irc listener object" } { "irc-client" "an irc client object" } }
 { $description "Registers " { $snippet "irc-listener" } " with " { $snippet "irc-client" } " and starts listening." } ;
 
+HELP: join-irc-channel "Joining channels"
+{ $values { "irc-client-listener" "an irc client listener object" } }
+{ $description "Joins to the channel being listened by " { $snippet "irc-listener" } "." } ;
+
 HELP: remove-listener "Stop an unregister listener"
 { $values { "irc-listener" "an irc listener object" } { "irc-client" "an irc client object" } }
 { $description "Unregisters " { $snippet "irc-listener" } " from " { $snippet "irc-client" } " and stops listening. This is how you part from a channel." } ;
@@ -55,6 +54,7 @@ ARTICLE: "irc.client" "IRC Client"
 { $subsection terminate-irc }
 { $subsection add-listener }
 { $subsection remove-listener }
+{ $subsection join-irc-channel }
 { $subsection read-message }
 { $subsection write-message }
 { $heading "IRC messages" }
@@ -77,13 +77,14 @@ ARTICLE: "irc.client" "IRC Client"
 { $heading "Special messages" }
 "Some special messages that are created by the library and not by the irc server."
 { $table
-  { { $link irc-end } " sent when the client isn't running anymore, listeners should stop after this." }
+  { { $link irc-listener-end } "sent to a listener when it has been dettached from the client, the listener should stop after it receives this message. " }
+  { { $link irc-end } " sent when the client isn't running anymore, listeners should stop after it receives this message." }
   { { $link irc-disconnected } " sent to notify listeners that connection was lost." }
   { { $link irc-connected } " sent to notify listeners that a connection with the irc server was established." } }
 
 { $heading "Example:" }
 { $code
-  "USING: irc.client concurrency.mailboxes ;"
+  "USING: irc.client ;"
   "SYMBOL: bot"
   "SYMBOL: mychannel"
   "! Create the profile and client objects"
@@ -94,6 +95,8 @@ ARTICLE: "irc.client" "IRC Client"
   "\"#mychannel123\" <irc-channel-listener> mychannel set"
   "! Register and start listener (this joins the channel)"
   "mychannel get bot get add-listener"
+  "! Join to the channel"
+  "mychannel get join-irc-channel"
   "! Send a message to the channel"
   "\"what's up?\" mychannel get write-message"
   "! Read a message from the channel"