599 |
Returns: 1 if the nick matches the botnick; 0 otherwise |
Returns: 1 if the nick matches the botnick; 0 otherwise |
600 |
Module: server |
Module: server |
601 |
|
|
602 |
# botisop [channel] |
botisop [channel] |
603 |
# Returns: 1 if the bot has ops on the specified channel (or any channel |
Returns: 1 if the bot has ops on the specified channel (or any channel |
604 |
# if no channel is specified); 0 otherwise |
if no channel is specified); 0 otherwise |
605 |
# Module: irc |
Module: irc |
606 |
|
|
607 |
# botishalfop [channel] |
botishalfop [channel] |
608 |
# Returns: 1 if the bot has halfops on the specified channel (or any channel |
Returns: 1 if the bot has halfops on the specified channel (or any channel |
609 |
# if no channel is specified); 0 otherwise |
if no channel is specified); 0 otherwise |
610 |
# Module: irc |
Module: irc |
611 |
|
|
612 |
# botisvoice [channel] |
botisvoice [channel] |
613 |
# Returns: 1 if the bot has a voice on the specified channel (or any |
Returns: 1 if the bot has a voice on the specified channel (or any |
614 |
# channel if no channel is specified); 0 otherwise |
channel if no channel is specified); 0 otherwise |
615 |
# Module: irc |
Module: irc |
616 |
|
|
617 |
# botonchan [channel] |
botonchan [channel] |
618 |
# Returns: 1 if the bot is on the specified channel (or any channel if |
Returns: 1 if the bot is on the specified channel (or any channel if |
619 |
# no channel is specified); 0 otherwise |
no channel is specified); 0 otherwise |
620 |
# Module: irc |
Module: irc |
621 |
|
|
622 |
# isop <nickname> [channel] |
isop <nickname> [channel] |
623 |
# Returns: 1 if someone by the specified nickname is on the channel (or |
Returns: 1 if someone by the specified nickname is on the channel (or |
624 |
# any channel if no channel name is specified) and has ops; 0 otherwise |
any channel if no channel name is specified) and has ops; 0 otherwise |
625 |
# Module: irc |
Module: irc |
626 |
|
|
627 |
# ishalfop <nickname> [channel] |
ishalfop <nickname> [channel] |
628 |
# Returns: 1 if someone by the specified nickname is on the channel (or |
Returns: 1 if someone by the specified nickname is on the channel (or |
629 |
# any channel if no channel name is specified) and has halfops; 0 otherwise |
any channel if no channel name is specified) and has halfops; 0 otherwise |
630 |
# Module: irc |
Module: irc |
631 |
|
|
632 |
# wasop <nickname> <channel> |
# wasop <nickname> <channel> |
633 |
# Returns: 1 if someone that just got opped/deopped in the chan had op |
# Returns: 1 if someone that just got opped/deopped in the chan had op |
639 |
# had halfop before the modechange; 0 otherwise |
# had halfop before the modechange; 0 otherwise |
640 |
# Module: irc |
# Module: irc |
641 |
|
|
642 |
# isvoice <nickname> [channel] |
isvoice <nickname> [channel] |
643 |
# Returns: 1 if someone by that nickname is on the channel (or any |
Returns: 1 if someone by that nickname is on the channel (or any |
644 |
# channel if no channel is specified) and has voice (+v); 0 otherwise |
channel if no channel is specified) and has voice (+v); 0 otherwise |
645 |
# Module: irc |
Module: irc |
646 |
|
|
647 |
# onchan <nickname> [channel] |
onchan <nickname> [channel] |
648 |
# Returns: 1 if someone by that nickname is on the specified channel (or |
Returns: 1 if someone by that nickname is on the specified channel (or |
649 |
# any channel if none is specified); 0 otherwise |
any channel if none is specified); 0 otherwise |
650 |
# Module: irc |
Module: irc |
651 |
|
|
652 |
# nick2hand <nickname> [channel] |
# nick2hand <nickname> [channel] |
653 |
# Returns: the handle of a nickname on a channel. If a channel is not |
# Returns: the handle of a nickname on a channel. If a channel is not |
728 |
Returns: nothing |
Returns: nothing |
729 |
Module: irc |
Module: irc |
730 |
|
|
731 |
# getchanhost <nickname> [channel] |
getchanhost <nickname> [channel] |
732 |
# Returns: user@host of the specified nickname (the nickname is not included |
Returns: user@host of the specified nickname (the nickname is not included |
733 |
# in the returned host). If a channel is not specified, bot will check |
in the returned host). If a channel is not specified, bot will check |
734 |
# all of its channels. If the nickname is not on the channel(s), "" is |
all of its channels. If the nickname is not on the channel(s), "" is |
735 |
# returned. |
returned. |
736 |
# Module: irc |
Module: irc |
737 |
|
|
738 |
# getchanjoin <nickname> <channel> |
# getchanjoin <nickname> <channel> |
739 |
# Returns: timestamp (unixtime format) of when the specified nickname |
# Returns: timestamp (unixtime format) of when the specified nickname |
745 |
# channel is specified); 0 otherwise |
# channel is specified); 0 otherwise |
746 |
# Module: irc |
# Module: irc |
747 |
|
|
748 |
# chanlist <channel> [flags[&chanflags]] |
chanlist <channel> [flags[&chanflags]] |
749 |
# Description: flags are any global flags; the '&' denotes to look for |
Description: flags are any global flags; the '&' denotes to look for |
750 |
# channel specific flags. Examples: |
channel specific flags. Examples: |
751 |
# n (Global Owner) |
n (Global Owner) |
752 |
# &n (Channel Owner) |
&n (Channel Owner) |
753 |
# o&m (Global Op, Channel Master) |
o&m (Global Op, Channel Master) |
754 |
# Now you can use even more complex matching of flags, including +&- flags |
Now you can use even more complex matching of flags, including +&- flags |
755 |
# and & or | (and or or) matching. |
and & or | (and or or) matching. |
756 |
# Returns: list of nicknames currently on the bot's channel that have all |
Returns: list of nicknames currently on the bot's channel that have all |
757 |
# of the flags specified;. If no flags are given, all of the nicknames |
of the flags specified;. If no flags are given, all of the nicknames |
758 |
# are returned. Please note that if you're executing chanlist after a |
are returned. Please note that if you're executing chanlist after a |
759 |
# part or sign bind, the gone user will still be listed, so you can |
part or sign bind, the gone user will still be listed, so you can |
760 |
# check for wasop, isop, etc. |
check for wasop, isop, etc. |
761 |
# Module: irc |
Module: irc |
762 |
|
|
763 |
|
|
764 |
# getchanidle <nickname> <channel> |
# getchanidle <nickname> <channel> |
766 |
# specified user isn't on the channel |
# specified user isn't on the channel |
767 |
# Module: irc |
# Module: irc |
768 |
|
|
769 |
# getchanmode <channel> |
getchanmode <channel> |
770 |
# Returns: string of the type "+ntik key" for the channel specified |
Returns: string of the type "+ntik key" for the channel specified |
771 |
# Module: irc |
Module: irc |
772 |
|
|
773 |
jump [server [port [password]]] |
jump [server [port [password]]] |
774 |
Description: jumps to the server specified, or (if none is specified) |
Description: jumps to the server specified, or (if none is specified) |
776 |
Returns: nothing |
Returns: nothing |
777 |
Module: server |
Module: server |
778 |
|
|
779 |
# pushmode <channel> <mode> [arg] |
pushmode <channel> <mode> [arg] |
780 |
# Description: sends out a channel mode change (ex: pushmode #lame +o |
Description: sends out a channel mode change (ex: pushmode #lame +o |
781 |
# goober) through the bot's queuing system. All the mode changes will |
goober) through the bot's queuing system. All the mode changes will |
782 |
# be sent out at once (combined into one line as much as possible) after |
be sent out at once (combined into one line as much as possible) after |
783 |
# the script finishes, or when 'flushmode' is called. |
the script finishes, or when 'flushmode' is called. |
784 |
# Returns: nothing |
Returns: nothing |
785 |
# Module: irc |
Module: irc |
786 |
|
|
787 |
# flushmode <channel> |
flushmode <channel> |
788 |
# Description: forces all previously pushed channel mode changes to be |
Description: forces all previously pushed channel mode changes to be |
789 |
# sent to the server, instead of when the script is finished (just for |
sent to the server, instead of when the script is finished (just for |
790 |
# the channel specified) |
the channel specified) |
791 |
# Returns: nothing |
Returns: nothing |
792 |
# Module: irc |
Module: irc |
793 |
|
|
794 |
# topic <channel> |
topic <channel> |
795 |
# Returns: string containing the current topic of the specified channel |
Returns: string containing the current topic of the specified channel |
796 |
# Module: irc |
Module: irc |
797 |
|
|
798 |
validchan <channel> |
validchan <channel> |
799 |
Description: checks if the bot has a channel record for the specified |
Description: checks if the bot has a channel record for the specified |
1303 |
# list of logfiles such as: {mco * eggdrop.log} {jp #lame lame.log} |
# list of logfiles such as: {mco * eggdrop.log} {jp #lame lame.log} |
1304 |
# Module: core |
# Module: core |
1305 |
|
|
1306 |
# maskhost <nick!user@host> |
maskhost <nick!user@host> |
1307 |
# Returns: masked hostmask for the string given ("n!u@1.2.3.4" -> "*!u@1.2.3.*", |
Returns: masked hostmask for the string given ("n!u@1.2.3.4" -> "*!u@1.2.3.*", |
1308 |
# "n!u@lame.com" -> "*!u@lame.com", "n!u@a.b.edu" -> "*!u@*.b.edu") |
"n!u@lame.com" -> "*!u@lame.com", "n!u@a.b.edu" -> "*!u@*.b.edu") |
1309 |
# Module: core |
Module: core |
1310 |
|
|
1311 |
# timer <minutes> <tcl-command> |
# timer <minutes> <tcl-command> |
1312 |
# Description: executes the given Tcl command after a certain number of |
# Description: executes the given Tcl command after a certain number of |
1677 |
# for compatibility. |
# for compatibility. |
1678 |
# Module: server |
# Module: server |
1679 |
|
|
1680 |
# (8) JOIN (stackable) |
(8) JOIN (stackable) |
1681 |
# bind join <flags> <mask> <proc> |
bind join <flags> <mask> <proc> |
1682 |
# procname <nick> <user@host> <handle> <channel> |
procname <nick> <user@host> <handle> <channel> |
1683 |
# |
|
1684 |
# Description: triggered by someone joining the channel. The mask in |
Description: triggered by someone joining the channel. The mask in |
1685 |
# the bind is matched against "#channel nick!user@host" and can |
the bind is matched against "#channel nick!user@host" and can |
1686 |
# contain wildcards. |
contain wildcards. |
1687 |
# Module: irc |
Module: irc |
1688 |
|
|
1689 |
# (9) PART (stackable) |
(9) PART (stackable) |
1690 |
# bind part <flags> <mask> <proc> |
bind part <flags> <mask> <proc> |
1691 |
# procname <nick> <user@host> <handle> <channel> <msg> |
procname <nick> <user@host> <handle> <channel> <msg> |
1692 |
# |
|
1693 |
# Description: triggered by someone leaving the channel. The mask is |
Description: triggered by someone leaving the channel. The mask is |
1694 |
# matched against "#channel nick!user@host" and can contain |
matched against "#channel nick!user@host" and can contain |
1695 |
# wildcards. If no part message is specified, msg will be set |
wildcards. If no part message is specified, msg will be set |
1696 |
# to "". |
to "". |
1697 |
# |
|
1698 |
# New Tcl procs should be declared as |
| New Tcl procs should be declared as |
1699 |
# proc partproc {nick uhost hand chan {msg ""}} { ... } |
| proc partproc {nick uhost hand chan {msg ""}} { ... } |
1700 |
# for compatibility. |
| for compatibility. |
1701 |
# Module: irc |
Module: irc |
1702 |
|
|
1703 |
# (10) SIGN (stackable) |
# (10) SIGN (stackable) |
1704 |
# bind sign <flags> <mask> <proc> |
# bind sign <flags> <mask> <proc> |
1710 |
# matched against '#channel nick!user@host'. |
# matched against '#channel nick!user@host'. |
1711 |
# Module: irc |
# Module: irc |
1712 |
|
|
1713 |
# (11) TOPC (stackable) |
(11) TOPC (stackable) |
1714 |
# bind topc <flags> <mask> <proc> |
bind topc <flags> <mask> <proc> |
1715 |
# procname <nick> <user@host> <handle> <channel> <topic> |
procname <nick> <user@host> <handle> <channel> <topic> |
1716 |
# |
|
1717 |
# Description: triggered by a topic change. mask can contain wildcards |
Description: triggered by a topic change. mask can contain wildcards |
1718 |
# and is matched against '#channel <new topic>'. |
and is matched against '#channel <new topic>'. |
1719 |
# Module: irc |
Module: irc |
1720 |
|
|
1721 |
# (12) KICK (stackable) |
# (12) KICK (stackable) |
1722 |
# bind kick <flags> <mask> <proc> |
# bind kick <flags> <mask> <proc> |
1730 |
# kicked, and the reason; flags are ignored. |
# kicked, and the reason; flags are ignored. |
1731 |
# Module: irc |
# Module: irc |
1732 |
|
|
1733 |
# (13) NICK (stackable) |
(13) NICK (stackable) |
1734 |
# bind nick <flags> <mask> <proc> |
bind nick <flags> <mask> <proc> |
1735 |
# procname <nick> <user@host> <handle> <channel> <newnick> |
procname <nick> <user@host> <handle> <channel> <newnick> |
1736 |
# |
|
1737 |
# Description: triggered when someone changes nicknames. The mask |
Description: triggered when someone changes nicknames. The mask |
1738 |
# is matched against '#channel newnick' and can contain wildcards. |
is matched against '#channel newnick' and can contain wildcards. |
1739 |
#| Channel is "*" if the user isn't on a channel (usually the bot not |
| Channel is "*" if the user isn't on a channel (usually the bot not |
1740 |
#| yet in a channel). |
| yet in a channel). |
1741 |
# Module: irc |
Module: irc |
1742 |
|
|
1743 |
# (14) MODE (stackable) |
(14) MODE (stackable) |
1744 |
# bind mode <flags> <mask> <proc> |
bind mode <flags> <mask> <proc> |
1745 |
# proc-name <nick> <user@host> <handle> <channel> <mode-change> <victim> |
proc-name <nick> <user@host> <handle> <channel> <mode-change> <victim> |
1746 |
# |
|
1747 |
# Description: mode changes are broken down into their component |
Description: mode changes are broken down into their component |
1748 |
# parts before being sent here, so the <mode-change> will always |
parts before being sent here, so the <mode-change> will always |
1749 |
# be a single mode, such as "+m" or "-o". victim will show the |
be a single mode, such as "+m" or "-o". victim will show the |
1750 |
# argument of the mode change (for o/v/b/e/I) or "" if the set |
argument of the mode change (for o/v/b/e/I) or "" if the set |
1751 |
# mode does not take an argument. Flags are ignored. The bot's |
mode does not take an argument. Flags are ignored. The bot's |
1752 |
# automatic response to a mode change will happen AFTER all |
automatic response to a mode change will happen AFTER all |
1753 |
# matching Tcl procs are called. The mask will be matched against |
matching Tcl procs are called. The mask will be matched against |
1754 |
# '#channel +/-modes' and can contain wildcards. |
'#channel +/-modes' and can contain wildcards. |
1755 |
# |
|
1756 |
# If it is a server mode, nick will be "", user@host is the server |
If it is a server mode, nick will be "", user@host is the server |
1757 |
# name, and handle is *. |
name, and handle is *. |
1758 |
# |
|
1759 |
# Note that "victim" was added in 1.3.23 and that this will break |
| Note that "victim" was added in 1.3.23 and that this will break |
1760 |
# Tcl scripts that were written for pre-1.3.23 versions and use this |
| Tcl scripts that were written for pre-1.3.23 versions and use this |
1761 |
# binding. An easy fix (by guppy) is as follows (example): |
| binding. An easy fix (by guppy) is as follows (example): |
1762 |
# |
| |
1763 |
# Old script looks as follows: |
| Old script looks as follows: |
1764 |
# bind mode - * mode_proc |
| bind mode - * mode_proc |
1765 |
# proc mode_proc {nick uhost hand chan mc} { ... } |
| proc mode_proc {nick uhost hand chan mc} { ... } |
1766 |
# |
| |
1767 |
# To make it work with 1.3.23+ and stay compatible with older bots, do: |
| To make it work with 1.3.23+ and stay compatible with older bots, do: |
1768 |
# bind mode - * mode_proc_fix |
| bind mode - * mode_proc_fix |
1769 |
# proc mode_proc_fix {nick uhost hand chan mc {victim ""}} { |
| proc mode_proc_fix {nick uhost hand chan mc {victim ""}} { |
1770 |
# if {$victim != ""} {append mc " $victim"} |
| if {$victim != ""} {append mc " $victim"} |
1771 |
# mode_proc $nick $uhost $hand $chan $mc |
| mode_proc $nick $uhost $hand $chan $mc |
1772 |
# } |
| } |
1773 |
# proc mode_proc {nick uhost hand chan mc} { ... } |
| proc mode_proc {nick uhost hand chan mc} { ... } |
1774 |
# Module: irc |
Module: irc |
1775 |
|
|
1776 |
# (15) CTCP (stackable) |
# (15) CTCP (stackable) |
1777 |
# bind ctcp <flags> <keyword> <proc> |
# bind ctcp <flags> <keyword> <proc> |