Go to the first, previous, next, last section, table of contents.
The simplest way to customize is through the defvars, that is, variables.
You can place these either in your .emacs
or in a special file. The most
important defvars for getting irchat work the way you want it to are
irchat-beep-on-bells and irchat-command-window-on-top, but there are many
others.
The most used irchat variables follow, setting other variables requires
deeper understanding of irchat and is not recommended.
-
irchat-want-traditional: nil
Currently only used on determing whether the commands-window
is placed on bottom and to force regognition of old irc commands
that start with /.
-
irchat-server: from environment variable IRCSERVER
Tells what irc server irchat tries to connect.
-
irchat-service: from environment variable IRCPORT or 6667
Tells in what port the server resides.
-
irchat-nickname: from environment variable IRCNICK or your loginname
What is your nickname in IRC.
-
irchat-startup-channel: nil
Channel you try to join when starting irchat.
-
irchat-format-string: ">%s<"
Format used when displaying your private messages to some person,
person's name is inserted in place of %s.
-
irchat-format-string1 "=%s="
Format used when displaying private messages to you from some person,
person's name is inserted in place of %s.
-
irchat-format-string2 "<%s>"
Format used when displaying messages to your primary channel,
senders name is inserted in place of %s, sender is on this primary channel.
-
irchat-format-string3 "<%s:%s>"
Format used when displaying messages to some of your secondary channel,
senders name is inserted in place of first %s, channel the message has
arrived in place of second %s, sender is on this secondary channel.
-
irchat-format-string4 "(%s)"
Format used when displaying messages to your primary channel,
senders name is inserted in place of %s, sender is NOT on this primary channel.
-
irchat-format-string5 "(%s:%s)"
Format used when displaying messages to some of your secondary channel,
senders name is inserted in place of first %s, channel the message has
arrived in place of second %s, sender is NOT on this secondary channel.
-
irchat-nam-suffix: ""
What suffix is to be added to every line you send.
Not recommended to set, can be very annoying.
-
irchat-beep-on-bells: nil
What to do with arriving bells, if nil don't ring bell (or flash).
If value is 'always always ring a bell when it arrives, other values
mean that only bell us when bell arrives in private message to us.
Variables for controlling CTCP (Client-To-Client-Protocol) and
irchat's own file transmission protocol.
-
irchat-client-userinfo: "No userinfo given."
What is given as userinfo for people requesting it from you.
-
irchat-file-accept: nil
Do we want to accept file transmissions from users.
-
irchat-file-confirm-save: t
Do we want irchat to ask us before it writes the file in our directory.
If you're not happy with the way the keys are set up, you may wish to
modify the key bindings. This is most conveniently done by defining them
in your irchat-Command-mode-hook.
There are lots of other hooks, one for each server reply and so forth.
For every servers message the irchat first tries to run function named
irchat-handle- 'message' -hook, if that returns true it won't run
internal handler for that message. The definition of these functions
is somewhat tricky, you have to define it via defun
and then
use setq
to set its variable-value as this function, see provided
example for details.
With these, an auto-greeter, for example, would be trivial to write.
Here is two examples of using hooks. First we set up
irchat-Command-mode-hook to read our abbreviations and require
our own hook-code if it is not yet loaded and then
we set up autogreeter.
BTW, auto-greeters are annoying most of the time.
(setq irchat-Command-mode-hook
'(lambda ()
(make-variable-buffer-local 'blink-matching-paren)
(setq blink-matching-paren nil)
(setq local-abbrev-table irchat-mode-abbrev-table)
(abbrev-mode 1)
(require 'irchat-hooks)
))
(defun irchat-join-hook (prefix rest)
(cond
;;; do not greet people coming to channel #report
((and (not (string= prefix irchat-nickname))
(string= "#report" rest))
t)
((and (string= "INSERT_YOUR_FAVOURITE_PERSON_HERE" prefix)
(string= irchat-current-channel rest))
;;; send the greeting as private message
(irchat-Command-message prefix (format "Greetings %s" prefix)))
(t nil)))
(setq irchat-join-hook (function irchat-join-hook))
Go to the first, previous, next, last section, table of contents.