Blob


1 Output
2 ========
4 putserv BOT TEXT
6 Sends text to the IRC server. Returns nothing.
8 Bind
9 ========
11 bind TYPE FLAGS MASK PROC
13 Binds perl procedures to events. Currently flags and mask are ignored. Returns the name of the command that was added.
15 1. MSG
17 bind "MSG" FLAGS COMMAND PROC
18 procname BOT NICK USERHOST HANDLE TEXT
20 Called on /msg commands. The first word of the msg is the command, and the rest
21 the text.
23 bind("msg", "", "admin", $proc);
24 sub proc {
25 my ($bot, $nick, $userhost, $hand, $text) = @_;
26 ...
27 }
29 2. PUB
31 bind "PUB" FLAGS COMMAND PROC
32 procname BOT NICK USERHOST HANDLE CHANNEL TEXT
34 bind("pub", "", "help", $proc);
35 sub proc {
36 my ($bot, $nick, $userhost, $hand, $chan, $text) = @_;
37 ...
38 }
40 Called on commands in a channel. The first word of the msg is the command, and the rest
41 the text.
43 3. MSGM (stackable)
45 bind "MSGM" FLAGS MASK PROC
46 procname BOT NICK USERHOST HANDLE TEXT
48 bind("msgm", "", "", $proc);
49 sub proc {
50 my ($bot, $nick, $userhost, $hand, $text) = @_;
51 ...
52 }
54 Match all text from a /msg. MSGM binds are processed before MSG binds.
56 4. PUBM (stackable)
58 bind "PUBM" FLAGS MASK PROC
59 procname BOT NICK USERHOST HANDLE CHAN TEXT
61 bind("pubm", "", "", $proc);
62 sub proc {
63 my ($bot, $nick, $userhost, $hand, $chan, $text) = @_;
64 ...
65 }
67 Match all text from a message on a channel. PUBM binds are processed before PUB binds.
69 5. NOTC (stackable)
71 bind "NOTC" FLAGS MASK PROC
72 procname BOT NICK USERHOST HANDLE TEXT DEST
74 bind("notc", "", "", $proc);
75 sub proc {
76 my ($bot, $nick, $userhost, $hand, $text, $dest) = @_;
77 ...
78 }
80 Called when a notice is sent. $dest is either the bot's nickname or channel.
81 You should not respond to a /notice, so this is useful for logging and analytics.
83 6. JOIN (stackable)
85 bind "JOIN" FLAGS MASK PROC
86 procname BOT NICK USERHOST HANDLE CHANNEL
88 bind("join", "", "", $proc);
89 sub proc {
90 my ($bot, $nick, $userhost, $hand, $chan) = @_;
91 ...
92 }
94 Called when someone joins a channel.
96 7. PART (stackable)
98 bind "PART" FLAGS MASK PROC
99 procname BOT NICK USERHOST HANDLE CHANNEL TEXT
101 bind("part", "", "", $proc);
102 sub proc {
103 my ($bot, $nick, $userhost, $hand, $chan, $text) = @_;
104 ...
107 Called when someone parts a channel.