|
void disconnect()
| |
Disconnects
from the server. Providing that the Bot was connected to the server,
the receiveDisconnect event will be called as soon as the
disconnection is made.
To
re-establish a connection with the server once the Bot has been
disconnected, you should call the reconnect message.
|
| |
|
StringArray getChannelList()
| |
Returns
a StringArray of all the channels the bot is in. To access
the the StringArray reference the value as a standard Tekadence
Magik array data type.
Example:
This example shows how you can call the getChannelList
message and iterate through the list of channels passed back in
the return value. Assume that the example is a script that is part
of the Bot object we are calling.
var channelList
= getChannelList();
for( var i = 0;
i < channelList.size(); i++ ) {
debugStr( channelList[i] ); // do something
here with the channel
}
|
| |
|
UserList
getUserList( String Channel )
| |
Returns
a UserList of all the users in a specific channel. The
Bot must be a member of the channel which is being queried in order
to return the list of its users.
Example:
This example shows how you can call the getUserList message
and iterate through the list of users passed back in the return
value. Assume that the example is a script that is part of the Bot
object we are calling.
var userList =
getUserList( "#magik_bot" );
for( var i = 0;
i < userList.size(); i++ ) {
debugStr(
userList[i] ); // do something here with the user
debugStr( "Nick: " + userList[i].nick
);
debugStr( "Has Op: " + userList[i].op
);
debugStr( "Has Voice: " + userList[i].voice
);
}
| |
channel
- the name of the channel for which we are trying to retrieve
a user list. |
| |
The
list of users of the specified channel as UserList
datatype. If the Bot is a memeber of the channel there should
always be one entry in the user list, otherwise the result will
be an empty user list. |
|
| |
|
void join( String channel
)
| |
Joins
a channel. If the Bot successfully joins the channel an immediate
recieveJoin event will be sent.
| |
channel
- the name of the channel that we are trying to join. |
|
| |
|
void kick( String channel,
String nick, String reason )
| |
Kicks
a user off a specific channel, giving a reason. This message will
only suceede if the Bot has operator privileges in the channel.
| |
channel
- the name of the channel to kick the user from.
nick
- the nick of the user to kick. reason
- the reason given to the user for being kicked off the channel. |
|
| |
|
void leave( String channel
)
| |
Leaves
a channel. If the Bot successfully leaves the channel an immediate
recieveLeave event will be sent.
| |
channel
- the name of the channel that we are trying to leave. |
|
| |
|
void reconnect()
| |
Reconnects
to the server.
Providing that the Bot was previously connected to a server, the
receiveConnect event will be called as soon as the connection
is made.
To
disconnect from the server once the Bot has been connected, you
should call the disconnect message.
|
| |
|
void sendAction( String
action, String target )
| |
Sends
an action to the target channel or user. An action is equivalent
to using the "/me" command on most IRC servers.
| |
action
- the action to send.
target
- the name of the channel or user to send the action to. |
|
| |
|
void sendCTCPCommand(
String target, String request, String data )
| |
Sends
a CTCP (Client To Client Protocol) command to the target channel
or user. CTCP commands include: "PING", "FINGER",
and "VERSION", and their results will vary depending on
the target client software.
| |
target
- the name of the channel or user to send the command to.
request
- the CTCP request to send. data
- any
data that is to be passed along with the CTCP request. |
|
| |
|
| |
See
also: |
| |
|
| |
|
void sendInvite( String
channel, String nick )
| |
Invites
a user to join a channel. This is necessary for channels that are
specified as "invite only".
| |
channel
- the channel that the user is being invited to.
nick
- the nick of the user to invite. |
|
| |
|
void sendMessage( String
messageText, String target )
| |
Sends
a message to the target channel or user.
Example:
This example shows how you can call sendMessage to send
a message to both an entire channel, and as a private message to
a specific user. Assume that the example is a script that is part
of the Bot object we are calling.
// sends a message
to the channel #magik_bot
sendMessage( "Hello there channel!", "#magik_bot"
);
// sends a message
to the user FrizzleFried
sendMessage( "Hi Frizz, you are the only one who can see this.",
"FrizzleFried" );
| |
messageText
- the message to send.
target
- the name of the channel or user to send the message to. |
|
| |
|
void sendNotice( String
notice, String target )
| |
Sends
a notice to the target channel or user.
| |
notice
- the notice to send.
target
- the name of the channel or user to send the notice to. |
|
| |
|
void sendRawLine( String
line )
| |
Send
a raw line of text to to the server. This is useful if you wish
to bypass the built-in messages in the Bot to execute a command
on the server, or if the Bot does not have a message that maps to
a specific command.
| |
line
- the line of text to send to the server. |
|
| |
|
void setOp( String nick,
String channel, Boolean op )
| |
Grants
or removes operator privilidges to a user on a specific channel.
The Bot must itself have operator privildges on the channel for
which it is attempting to set a users operator mode.
| |
nick
- the nick of the user to set operator
privilidges
on.
channel
- the name of the channel to set operator
privilidges for. op
- if true then the user is granted operator
privilidges. |
|
| |
|
void setTopic( String
channel, String topic )
| |
Sets
the current topic for a channel. The channel may require the Bot
to have operator privilidges
for the channel it is trying to change, if the topic is protected.
| |
channel
- the channel for which the topic is to be changed.
topic
- the new topic. |
|
| |
|
void setVoice( String
nick, String channel, Boolean voice )
| |
Grants
or removes voice privilidges to a user on a specific channel. The
Bot must have operator privildges on the channel for which it is
attempting to set a users voice mode.
| |
nick
- the nick of the user to set voice privilidges
on.
channel
- the name of the channel to set voice
privilidges for. voice
- if true then the user is granted voice
privilidges. |
|
| |
|
|