Guide to TCL scripting for Eggdrop 1.6

[ Previous ] [ Index ] [ Next ]
[ Text version ]


A. IRC server commands

This Appendix will outline a few of the basic commands you can send to an IRC server.
The IRC server commands are fairly simple and straight forward and can be sent to the IRC server with the server output commands.

A.1 Messages and notices

This has already been used in scripts and you could've read about it in Chapter 6.3, but I'll repeat it one more time.
The IRC server command to send messages is PRIVMSG.
The syntax of a PRIVMSG command is PRIVMSG <nickname/channel> :<message>.

The <nickname/channel> is the nickname or channel you want to send the message to.

The <message> is the message you want to send.
Note that the ":" in front of the <message> is required.

You can send a notice in exactly the same way as sending a normal message except that you have to use "NOTICE" instead of "PRIVMSG".

A.2 CTCP's

You can send a CTCP by putting a code like the color decoration code described in Chapter 12.5 at the start of your message.
The code for a CTCP is \001 followed by the type of CTCP you want to send and after that you can put in any parameters you'd like.

For example if you want to send a CTCP PING to somebody the syntax would be putserv "PRIVMSG <nickname/channel> :\001PING $nick".

Note that many clients do not accept lowercase CTCP's, so make sure the CTCP you are sending is upper case.

There is one CTCP type that isn't really a CTCP, but has to be called upon like you are sending a CTCP. This is the "ACTION" type.
The "ACTION" type is what you get when you use the command "/me" in mIRC or BitchX for example.
For example if you want to get "/me feels tired." the syntax would be putserv "PRIVMSG <nickname/channel> :\001ACTION feels tired.".

A.3 Inviting

To invite somebody you simply send "INVITE <nickname> <channel>" to the IRC server.

The <nickname> is the nickname to which you want to send the invite.

The <channel> is the channel you want to invite the person to.

A.4 Joining channels

To let the bot join a channel manually you have to send "JOIN <channel> [key]" to the IRC server.

The <channel> is the channel you want to join.

The [key] is the key that the bot must use to join the channel.

Note that you also have to add the channel to Eggdrops list of channels or else it'll part it again immediantly, since it doesn't recognize it.
This can be done with the channel add command. You can find more about this command in the tcl-commands.doc file in your eggdrop/doc/ directory.

A.5 Parting channels

To let the bot part a channel manually you have to send "PART <channel> :[message]" to the IRC server.

The <channel> is the channel you want to part.

The [message] is the part message you want the bot to use when parting.

Note that you also have to remove the channel to Eggdrops list of channels or else it'll join it again immediantly, since it thought it parted by accident.
This can be done with the channel remove command. You can find more about this command in the tcl-commands.doc file in your eggdrop/doc/ directory.


[ Text version ]
[ Previous ] [ Index ] [ Next ]


Design & Graphics by Shawn Borton of CalcioStar.com