Fgwirc builtin actions

actlist

 actlist - list all actions available
 Syntax: actlist

away

 away - set away state
 Syntax:
 away <msg> - activate away state, set away message
 away - deactivate away state, remove away message

bell

 bell - prints a bell character to stderr
 Syntax: bell

bind

 bind - bind an action script one-liner to a hotkey
 Syntax: bind [modifiers] <keycode> <script>

 Modifiers are: ctrl, alt, meta (for the command key), pad (for numpad), pad2, pad3, func

 Example: bind ctrl 12 "window redraw"
 binds ^L to redraw the current window using the window action.

conf_get

 conf_get - return the value of a config node (for scripting)
 Syntax: conf_get <conf_node_name>

ctcp

echo

 echo - print a line of static text in the current window (and log)
 Syntax: echo <text>

editor

 editor - query or set line editor states
 Syntax:
 editor get_str - return current content as string
 editor set_str <c> - overwrite content with c
 editor get_curs - return cursor position
 editor set_curs <p> - set cursor position to p
 editor get_scroll - return horizontal scroll offset
 editor set_scroll <p> - set horizontal scroll offset

 Cursor position is the offset of the character, counted from 0.

exit

 quit - quit from fgwirc
 Syntax: quit [quit_message]

 If quit message is specified, send that with the quit command to each irc server connected.

get_server

 get_server - read fields of a server slot
 Syntax:
 get_server nick [id] - scripting: return own nick on a server (str)
 get_server state [id] - scripting: return server conn. state (str)
 get_server host [id] - scripting: return server hostname (str)
 get_server port [id] - scripting: return server port (int)
 get_server status_win [id] - scripting: return status window id (int)

 If server id is not specified, use the current window's server.

help

 help - print help about a specific action
 Syntax: help <action>

hook_arg

 hook_arg - scripting: return an argument passed to the script hook/function
 Syntax: hook_arg <idx>

 idx shall be a positive number smaller than argc. Returns the requested arg as string

hook_block

 hook_block - scripting: do not run further stages of hooks
 Syntax: hook_block

hook_from_host

 hook_from_host - scripting: return origin hostname in a script hook/function
 Syntax: hook_from_host

 Returns a string with the host or empty if there is no origin or origin is not a nick

hook_from_hostmask

 hook_from_ident - scripting: return origin hostmask in a script hook/function
 Syntax: hook_from_hostmask

 Returns a string with the hostmask (nick!ident@hostname) or empty if there is no origin or origin is not a nick

hook_from_ident

 hook_from_ident - scripting: return origin ident in a script hook/function
 Syntax: hook_from_ident

 Returns a string with the ident or empty if there is no origin or origin is not a nick

hook_from_nick

 hook_from_nick - scripting: return origin nick in a script hook/function
 Syntax: hook_from_nick

 Returns a string with the nickname/servername or empty if there is no origin

hook_server

 hook_server - scripting: return the server ID the irc message is comig from
 Syntax: hook_server

 Returns -1 if no server is available

input_meta

 input_meta - press the meta key (a.k.a. the command key)

invite

 invite - irc command: invite a nick to a channel
 Syntax:
 invite <nick> <#chan>

join

 join - irc command: join a channel
 Syntax:
 join <#chan> - join #chan on server associated with current window
 join <id>/<#chan> - join #chan on server id and associate current window
 join - rejoin last channel used by the window (e.g. after part)

kick

 kick - irc command: kick a nick from a channel
 Syntax:
 kick [#chan] <nick> [message]
 links - as specified in the IRC protocol

list

 list - as specified in the IRC protocol

load

 load - load an user script
 Syntax: load <id> <filename> <language>

 id is an arbitrary unique identifier for the script, filename is the path of the script file and language is a fungw recognized scripting language (e.g. fawk or lua or tcl, etc)

me

mode

 mode - irc command: query or change channel modesSyntax:
 mode [#chan] - query chan mode of #chan or current win's channel
 mode [#chan] <mds> - set chan mode of #chan or current win's channel to mds

msg

 msg & notice - send a message or notice to a nick or chan
 Syntax:
 msg <nick|#chan> <message>
 notice <nick|#chan> <message>

names

 names - irc command: list nicks on a channel
 Syntax:
 names [#chan] - list nicks on #chan or channel associated with the window

nick

notice

 msg & notice - send a message or notice to a nick or chan
 Syntax:
 msg <nick|#chan> <message>
 notice <nick|#chan> <message>

num_server_slots

 num_server_slots - scripting: return the number of server slots allocated
 Syntax: num_server_slots

 Note: some slots may be empty. Slots are indexed from 0.

part

 part - irc command: part a channel
 Syntax:
 part <#chan> [msg] - part #chan on win-associated server with part msg
 part [msg] - part current window's channel with part msg

query

 query - irc command: use channel for private chat to a nick
 Syntax:
 query <nick> - chat with nick on server id associated with current window
 query <id>/<nick> - chat with nick on server id
 query - stop the chat, release window

quit

 quit - quit from fgwirc
 Syntax: quit [quit_message]

 If quit message is specified, send that with the quit command to each irc server connected.

quote

 raw - send raw irc protocol message to the server
 Syntax:
 raw <irc_proto_line>

raw

 raw - send raw irc protocol message to the server
 Syntax:
 raw <irc_proto_line>

rawto

 rawto - send raw irc protocol message to a specific server
 Syntax:
 raw <server_id> <irc_proto_line>

script_help

 script_help - scripting: mandatory action help text
 Syntax: script_help <firstarg> <help_line1> [help_line2] ...

 The first argument of the action has to be passed as firstarg.
 Returns non-zero if help triggered.

scripts

 scripts - list scripts loaded to the status window (window 0)
 Syntax: scripts

scroll

 scroll - scroll current window
 Syntax: scroll [offs]

 Scroll current window by positive (down) or negative (up) offset (integer).
 If offset is 0, scroll to the end (bottom).

server

 server - connect to an irc server
 Syntax:
 server <id>/hostname[:port] - connect server, explicit id
 server hostname[:port] - connect server using current win's server id

 If server id is already in use, first disconnect from the current server
 and replace the connection with one to the newly named server for the
 same id.

set

 set - change the value of a runtime config node
 Syntax: set <conf_node_name> <new_value>

strutil

 strutil - scripting: various string utilities
 Syntax:
 strutil strpbrk <str> <chrs> - scripting: strpbrk(3); returns offs or -1
 strutil tolower <str> - scripting: return lowercase str

toggle

 toggle - toggle the value of a boolean (integer) config node
 Syntax: toggle <conf_node_name>

topic

 topic - irc command: query or change channel topicSyntax:
 topic [#chan] - query topic of #chan or current win's channel
 topic [#chan] <str> - set topic of #chan or current win's channel to str

unload

 unload - unload an user script
 Syntax: unload <id>

 id is the same id that was given on load.

who

 who - irc command: query who info on a pattern
 Syntax:
 who <pattern>

whois

 whois - irc command: query whois info on a nick
 Syntax:
 whois <nick>

whowas

 whowas - as specified in the IRC protocol

win

 win - various window operations (UI)
 Syntax:
 win <number> - switch to and show window number (absolute)
 win [show|swap] <N> - same as above
 win <+number> - switch to and show window number (relative)
 win <-number> - switch to and show window number (relative)
 win new - create (open) a new window and switch to it
 win new*<number> - create (open) multiple new windows
 win server <id> - associate current window to integer server id
 win server - return current window's server id association
 win release - release (remove) association of current window
 win channel <#chan> - show #chan (on server last assigned) in this win
 win redraw - redraw the screen (current window)
 win log on <path> - start logging current window to file at path (append)
 win log off - stop logging current window
 win size - echo current window size
 win resize - query terminal size and set matching window size
 win resize <w> <h> - set window size to w (width) and h (height), integers
 win append <id> <t> - append text t at the end (bottom) of window id

 scripting:

 win get num - return number of windows
 win get current - return id of currently visible window
 win get size_[xy] - return window size in x or y direction
 win get type <id> - return window target type
 win get target <id> - return window target name (nick or chan)
 win get srvid <id> - return window target server ID
 win get dirty <id> - return 0 or 1 if window has unseen activity

 win set dirty <id> <val> - set or clear window unseen activity (1 or 0)

window

 window - alias to win