Next: , Previous: , Up: Procedures   [Contents][Index]


8.1 General procedures

primitive: ft-load filepath

Loads and evaluates filepath.scm from mentioned path or from ~/.freetalk/extensions/ or from /usr/share/freetalk/extensions/.

Example:

(ft-load "beep.scm")
primitive: ft-add-buddy! buddy

Adds buddy into your contact list.

Example:

(ft-add-buddy! "friend@jabber.org")
primitive: ft-get-jid jabberid

Gets jabberid from the console.

Example:

(and (string=? (ft-get-jid) "") …)
primitive: ft-set-jid! defaultid

Set defaultid as the Jabber ID to be used on the next connect.

Example:

(ft-set-jid! "harsha@jabber.org")
primitive: ft-get-conn-status

Gets the status of the connection from the server. 0 - Not connected. 1 - Connected, Not authenticated. 2 - Authenticated. (usable for IM)

Example:

(display (ft-get-conn-status))
primitive: ft-get-password

Gets the currently set password.

Example:

(and (string=? (ft-get-password) …)
primitive: ft-get-server

Get the servername configured for the next connection.

Example:

(and (string=? (ft-get-server) "") …)
primitive: ft-set-sslconn! boolean

Set the value such that login is in SSL mode or not.

Example:

(ft-set-sslconn! #t)
primitive: ft-set-tlsconn! boolean

Set the value such that login is in TLS mode or not.

Example:

(ft-set-tlsconn! #t)
primitive: ft-send-message buddy message

Sends message to the buddy.

Example:

(ft-send-message "harsha@jabber.org" "had breakfast? or was it lunch?")
primitive: ft-display message

Prints the message in the console. Unlike the display primitive, this procedure takes care of printing message asynchronously keeping the readline state as-is.

Example:

(ft-display ("I am proud of freetalk"))
primitive: ft-bind-to-ctrl-key char command

Binds CTRL+ given char to arbitrary scm command. Allows for displaying roster or whatever by just pressing a key even during composition of new messages, keeping the readline state as-is.

Example:

(ft-bind-to-ctrl-key #\a "(/who \"all\")")

Next: , Previous: , Up: Procedures   [Contents][Index]