IRC MODULE
TCL COMMANDS:
botisop <channel>
returns: "1" if the bot is an op on that channel; "0" otherwise

isop <nickname> <channel>
returns: "1" if someone by that nickname is on the channel and has chop; "0" otherwise

isvoice <nickname> <channel>
returns: "1" if someone by that nickname is on the channel and has voice (+v); "0" otherwise

onchan <nickname> <channel>
returns: "1" if someone by that nickname is on the bot's channel; "0" otherwise

nick2hand <nickname> <channel>
returns: handle of the person on the channel with that nickname, if someone by that nickname is on the channel; "" otherwise

handonchan <handle> <channel>
returns: "1" if the the user@host for someone on the channel matches for the handle given; "0" otherwise

hand2nick <handle> <channel>
returns: nickname of the first person on the channel whose user@host matches that handle, if there is one; "" otherwise

chanbans <channel>
returns: a list of the current bans on the channel, each element is of the form {ban bywho age} age is seconds from the bots POV

ischanban <ban> <channel>
returns: "1" if that is a ban on the bot's channel

resetbans <channel>
removes all bans on the channel that aren't in the bot's ban list, and refreshes any bans that should be on the channel but aren't
returns: nothing

resetchan <channel>
rereads in the channel info from the server
returns: nothing

getchanhost <nickname> <channel>
returns: user@host of that person if they are on the channel; {} otherwise

getchanjoin <nickname> <channel>
returns: timestamp of when that person joined the channel

onchansplit <nick> <channel>
returns: "1" if that nick is split from the channel; "0" otherwise

chanlist <channel> [flags[&chanflags]]
flags are any flags that are global flags, the '&' denotes to look for channel specific flags. Examples:

n (Botowner)
&n (Channel owner)
o&m (Global op, Channel master)
now you can use even more complex matching of flags, including +&- flags and & or | (and or or) matching
returns: list of nicknames currently on the bot's channel that have all of the flags specified; if no flags are given, all of the nicknames are returned

getchanidle <nickname> <channel>
returns: number of minutes that person has been idle; "0" if the specified user isn't even on the channel

getchanmode <channel>
returns: string of the type "+ntik key" for the channel specified

pushmode <channel> <mode> [arg]
sends out a channel mode change (ex: pushmode #lame +o goober) through the bot's queueing system; all the mode changes will be sent out at once (combined into one line as much as possible) after the script finishes, or when 'flushmode' is called

flushmode <channel>
forces all previously pushed channel mode changes to go out right now, instead of when the script is done (just for the channel specified)

topic <channel>
returns: string of the current topic on the specified channel


BINDING(S) TABLE(S):
PUB
bind pub <flags> <command> <proc>
proc-name <nick> <user@host> <handle> <channel> <args>
used for commands given on a channel; just like MSG, the first word becomes the command and everything else is the argument string

PUBM (stackable)

bind pubm <flags> <mask> <proc>
proc-name <nick> <user@host> <handle> <channel> <text>
just like MSGM, except it's triggered by things said on a channel instead of things /msg'd to the bot; the mask is matched against the channel name followed by the text, i.e., "#nowhere hello there!", and can contain wildcards

JOIN (stackable)

bind join <flags> <mask> <proc>
proc-name <nick> <user@host> <handle> <channel>
triggered by someone joining the channel; the <mask> in the bind is matched against "#channel nick!user@host" and can contain wildcards

PART (stackable)

bind part <flags> <mask> <proc>
proc-name <nick> <user@host> <handle> <channel>
triggered by someone leaving the channel; as in JOIN, the <mask> is matched against "#channel nick!user@host" and can contain wildcards

SIGN (stackable)

bind sign <flags> <mask> <proc>
proc-name <nick> <user@host> <handle> <channel> <reason>
triggered by a signoff, or possibly by someone who got netsplit and never returned; the signoff message is the last argument to the proc; wildcards can be used in <mask>, which contains the channel name

TOPC (stackable)

bind topc <flags> <mask> <proc>
proc-name <nick> <user@host> <handle> <channel> <topic>
triggered by a topic change; can use wildcards in <mask>, which is matched against the channel name and new topic

KICK (stackable)

bind kick <flags> <mask> <proc>
proc-name <nick> <user@host> <handle> <channel> <kicked-nick> <reason>
triggered when someone is kicked off the channel; the <mask> is matched against "#channel nick" where the nickname is of the person who got kicked off (can use wildcards); the proc is called with the nick, user@host, and handle of the kicker, plus the channel, the nickname of the person who was kicked, and the reason; <flags> is unused here

NICK (stackable)

bind nick <flags> <mask> <proc>
proc-name <nick> <user@host> <handle> <channel> <newnick>
triggered when someone changes nicknames; wildcards are allowed; the mask is matched against "#channel newnick"

MODE (stackable)

bind mode <flags> <mask> <proc>
proc-name <nick> <user@host> <handle> <channel> <mode-change>
mode changes are broken down into their component parts before being sent here, so the <mode-change> will always be a single mode, like "+m" or "-o snowbot"; flags are ignored; the bot's automatic response to a mode change will happen AFTER all matching Tcl procs are called; the <mask> will have the channel prefixed (i.e., "#turtle +m")

SPLT (stackable)

bind splt <flags> <mask> <proc>
proc-name <nick> <user@host> <handle> <channel>
triggered when someone gets netsplit on the channel; be aware that this may be a false alarm (it's easy to fake a netsplit signoff message); <mask> may contain wildcards, and is matched against the channel and nick!user@host just like join; anyone who is SPLT will trigger a REJN or SIGN within the next 15 minutes

REJN (stackable)

bind rejn <flags> <nick!user@host> <proc>
proc-name <nick> <user@host> <handle> <channel>
someone who was split has rejoined; <mask> can contain wildcards, and contains channel and nick!user@host just like join

NEED (stackable)

bind need <flags> <op/voice/unban/limit/invite> <proc>
proc-name <channel> <which>
when the bot needs one of the listed things, on a channel, this binding is called to allow resolving

(c) 1997 Robey Pointer
(c) 1998 Eggdrop Development Team