]> gitweb.factorcode.org Git - factor-unmaintained.git/blobdiff - irc-ui/commands/commands.factor
unmaintained: New home for misfit Factor vocabularies.
[factor-unmaintained.git] / irc-ui / commands / commands.factor
diff --git a/irc-ui/commands/commands.factor b/irc-ui/commands/commands.factor
new file mode 100644 (file)
index 0000000..93d1e2e
--- /dev/null
@@ -0,0 +1,28 @@
+! Copyright (C) 2008 William Schlieper
+! See http://factorcode.org/license.txt for BSD license.
+
+USING: accessors kernel sequences arrays irc.client
+       irc.messages irc.ui namespaces ;
+
+IN: irc.ui.commands
+
+: say ( string -- )
+    irc-tab get
+    [ window>> client>> profile>> nickname>> <own-message> print-irc ]
+    [ chat>> speak ] 2bi ;
+
+: me ( string -- ) ! Placeholder until I make /me look different
+    "ACTION " 1 prefix prepend 1 suffix say ;
+
+: join ( string -- )
+    irc-tab get window>> join-channel ;
+
+: query ( string -- )
+    irc-tab get window>> query-nick ;
+
+: whois ( string -- )
+    "WHOIS" swap { } clone swap  <irc-client-message>
+    irc-tab get listener>> speak ;
+
+: quote ( string -- )
+    drop ; ! THIS WILL CHANGE