Notes module


This module provides support for storing of notes for users from each other notes between currently online users is supported in the core, this is only for storing the notes for later retrieval, direct user <-> user notes are built-in

  1. Config file settings
  2. Tcl commands
  3. Tcl bindings

1. Config file settings

Lines in bold are the lines that need to be included in the eggdrop config file if you want to use the share module.
Lines in bold italics are optional and only required if you wish to change the default behaviour for that particular feature.

Put this line into your eggdrop.conf file to load notes module:

loadmodule notes

There are also some variables you can to set in your config file:

set notefile "LamestBot.notes"

Enter here the filename where private notes between users are stored

set max-notes 50

Set here the maximum number of notes to allow to be stored for each user (to prevent flooding)

Valid settings are 0-99999

set note-life 60

Set here how long (in days) to store notes before expiring them

Valid settings are 0-99999

set allow-fwd 0

Set this to 1 if you want to allow users to specify a forwarding address for forwarding notes to another account on another bot.

Valid settings are 0 and 1.

set notify-users 1

Set this to 1 if you want the bot to let people know hourly if they have any notes

Valid settings are 0 and 1.

set notify-onjoin 1

Set this to 1 if you want the bot to let people know on join if they have any notes

Valid settings are 0 and 1.


2. Tcl commands

notes <user> [number]

gets info on notes stored for a user

returns: (if no numbers specified) number of notes for user, -1 if no such user, -2 if notefile failure (if a note number specified) the number'th note for the user, -1 if no such user, -2 if notefile failure, 0 if no such note. the note is a list, first element from, 2nd element timestamp, 3rd element the note itself

erasenotes <user> <numberlist>

erases some or all stored notes for a user

returns: -1 if no such user, -2 if notefile failure, 0 if no such note, or number of erased notes. 'erasenote mynick "-"' erase all notes for mynick.

listnotes <user> <numberlist>

lists existing notes according to the numberlist (ex: "2-4;8;16-")

returns: -1 if no such user, -2 if notefile failure, 0 if no such note, list of existing notes.

storenote <from> <to> <msg> <idx>

stores a note for later reading, notify idx of any results (use idx == -1 for no notify).

returns: 0 on success non-0 on failure

sendnote <from> <to> <message>

simulates what happens when one user sends a note to another (this can also do cross-bot notes)

returns: "1" if the note was delivered locally or sent to another bot, "2" if the note was stored locally, "3" if the user's notebox is too full to store a note, "4" if a Tcl binding caught the note, "5" if the note was stored because the user is away, or "0" if the send failed


3. Tcl bindings

NOTE

bind note <flags> <nickname> <proc>
proc-name <from> <to> <text>

incoming notes (either from the party line, someone on IRC, or someone on another bot on the botnet) are checked against these binds before being process; if a bind exists, the bot will not deliver the note; the nickname must be an exact match (no wild- cards), but it is not case sensitive; flags are ignored


© 1997 Robey Pointer
© 1999,2000 Eggheads